Hello, I have hard time importing any spine object into my webpack phaser project. I am currently trying this coin animation, but after
this.hero = this.add.spine(200, 200, this.spineName, 'animation', true)
the screen goes simply black without any error message. It is also black if I set any other coordinates, or if I set this.hero.alpha
to anything more than 0.
The atlas, the skeleton and the image seems to be fine, because when I do
console.log(this.cache.json.get(this.spineName))
console.log(this.spine.spineTextures.get(this.spineName))
console.log(this.spine.cache.get(this.spineName))
it outputs:
> {skeleton: {…}, bones: Array(7), slots: Array(6), skins…
> TextureAtlas {pages: Array(1), regions: Array(7)}
> {preMultipliedAlpha: true, data: "↵coin.png↵size: 1024,1024↵format: RGBA8888↵filter:…, 245↵ …
I am using several scenes in the project, but don’t think it matters.
Any help would be appreciated.
Edit: this.hero.getBounds() gets interesting data: offset x,y is infinity, size is infinity…
Edit 2: There seems to be a bug in the current SpinePlugin.js in the function SkeletonJson.prototype.readCurve
, namely in the line timeline.setCurve(frameIndex, curve, this.getValue(map, "c2", 0), ...
The second parameter, curve
, is an array of numbers. Needs to be a number. But even if I change the line to timeline.setCurve(frameIndex, curve[0], curve[1], curve[2], curve[3])
, the result is the same. this.hero.getBounds() is the same…
I am getting somewhat desperate