Search the Community
Showing results for tags 'unatlas'.
-
I'm using phaserspine(https://github.com/StudioKrok/PhaserSpine) for my game, as I need some customized characters feature I use unatlased animation. But PhaserSpine only support atlased spine animation, I modefied the code get this error: TypeError: sprite.texture.on is not a function at Phaser.Plugin.PhaserSpine.attachBitmap (http://localhost:63342/PhaserSpine/src/_oldSrc/plugin.js:106:16) at PIXI.Spine.createSprite (http://localhost:63342/PhaserSpine/src/_oldSrc/pixiSpine.js:311:31) at new PIXI.Spine (http://localhost:63342/PhaserSpine/src/_oldSrc/pixiSpine.js:109:31) at Phaser.GameObjectFactory.spine (http://localhost:63342/PhaserSpine/src/_oldSrc/plugin.js:51:23) at Object.create (http://localhost:63342/PhaserSpine/index.html:30:23) at Phaser.StateManager.loadComplete (http://localhost:63342/PhaserSpine/src/phaser.js:30613:35) at Phaser.Loader.finishedLoading (http://localhost:63342/PhaserSpine/src/phaser.js:73003:25) at Phaser.Loader.processLoadQueue (http://localhost:63342/PhaserSpine/src/phaser.js:72958:18) at Phaser.Loader.asyncComplete (http://localhost:63342/PhaserSpine/src/phaser.js:73031:14) at Phaser.Loader.jsonLoadComplete (http://localhost:63342/PhaserSpine/src/phaser.js:73891:14) the code:/** * [attachBitmap call _attachBitmap if baseTexture has loaded, * otherwise set a callback to _attachBitmap on * texture update] * * @param {Phaser.Sprite} sprite [the sprite to attach a bitmapData as texture] */ Phaser.Plugin.PhaserSpine.prototype.attachBitmap = function (sprite) { if (sprite.texture.baseTexture.hasLoaded) { this._attachBitmap(sprite); } else { sprite.texture.on('update', this._attachBitmap.bind(this, sprite)); } } so what should I do to solved this?thanks for help