mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-08 03:36:52 +08:00
Merge pull request #89 from ryanmcnz/patch-1
Fixed toColor function returning NaN
This commit is contained in:
commit
c0466be20c
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
var spine = {};
|
var spine = {};
|
||||||
|
|
||||||
spine.BoneData = function (name, parent) {
|
spine.BoneData = function (name, parent) {
|
||||||
@ -1078,7 +1077,7 @@ spine.SkeletonJson.readCurve = function (timeline, frameIndex, valueMap) {
|
|||||||
};
|
};
|
||||||
spine.SkeletonJson.toColor = function (hexString, colorIndex) {
|
spine.SkeletonJson.toColor = function (hexString, colorIndex) {
|
||||||
if (hexString.length != 8) throw "Color hexidecimal length must be 8, recieved: " + hexString;
|
if (hexString.length != 8) throw "Color hexidecimal length must be 8, recieved: " + hexString;
|
||||||
return parseInt(hexString.substring(colorIndex * 2, 2), 16) / 255;
|
return parseInt(hexString.substring(colorIndex * 2, (colorIndex * 2)+2), 16) / 255;
|
||||||
};
|
};
|
||||||
|
|
||||||
spine.Atlas = function (atlasText, textureLoader) {
|
spine.Atlas = function (atlasText, textureLoader) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user