DragonBonesJS
DragonBonesJS copied to clipboard
pixi.js 4.5.2 display error
"color": [{
"time": 0
}, {
"time": 0.1
}, {
"time": 0.15
}, {
"time": 0.3
}],
Uncaught TypeError: Cannot read property 'charAt' of undefined
at Color.setFromString (pixi-spine.js:5095)
at SkeletonJson.readAnimation (pixi-spine.js:4009)
at SkeletonJson.readSkeletonData (pixi-spine.js:3880)
at Loader.<anonymous> (pixi-spine.js:5341)
at Loader.js:590
at async.js:35
for (var i = 0; i < timelineMap.length; i++) {
var valueMap = timelineMap[i];
var color = new core.Color();
color.setFromString(valueMap.color);
timeline.setFrame(frameIndex, valueMap.time, color.r, color.g, color.b, color.a);
this.readCurve(valueMap, timeline, frameIndex);
frameIndex++;
}
DragonBones can support export > [email protected]
I made this simple console PHP-script, which helps to fix json-files, that exported as Spine from DragonBones. json's which fixed by this script are works in pixi-spine and phaser-spine (by orange-games).
Gist: https://gist.github.com/dmknvk/dbb4fc4979d214453a066c68cfe310bb
Hope it helps.