Sondro
April 25, 2021, 10:08am
1
Hi,
So there is no longer a Pixi.Texture.fromImage('path')
– what is the alternative now?
Do I have to use (?):
game.load.image('img_id', 'path');
img = new PIXI.Texture(game.cache.getBaseTexture('img_id');
The data doesn’t seem to be the same & is erroring out for me with :
"PIXI.Float32Array is not a constructor"
Any ideas?
Milton
April 26, 2021, 4:18am
2
Could you put the code online somewhere?
It works for me on 2.17.0.
Sondro
April 26, 2021, 4:34am
3
Milton
April 26, 2021, 4:55am
4
It fails at
this.verticies = new PIXI.Float32Array(this.pack_renderer.render_points.length);
in
var creature_renderer = new Phaser.CreaturePackDraw
The PIXI.Texture constructor works fine, so maybe create a new topic why CreaturePackDraw fails.
Sondro
April 26, 2021, 5:07am
5
In 2.8 I can just use Pixi.Texture.fromImage(‘path’) and it works.
Milton
April 26, 2021, 5:12am
6
Yeah, but then 2.8 probably uses an other Pixi version…
Maybe try a newer version of CreaturePack.
(as a quick fix you can try just changing PIXI.Float32Array to Float32Array)
Sondro
April 28, 2021, 5:38am
7
Didn’t really want to change that, but if I doubt there is much of a performance difference between PIXI.Float32Array & Float32Array.