NewGuy Posted July 6, 2017 Share Posted July 6, 2017 g'day g'day I've been lurking around a few forum posts addressing anchoring with Phaser Graphics objects and why you can't do it. I gathered it was something to do with it being a lower level issue with Pixi (don't quote me on that) the solution for dealing with this seemed to come down to either using pivot or generateTexture() and loading into image / sprite. Since it looks like post 2.5.0 we've lost Phaser.Graphics.pivot, I was wondering if there was any performance loss / gain by calling generateTexture() and loading into a Phaser.Image / Phaser.Sprite and anchoring from there? I guess simply put, is it cheaper to have 10 Phaser.Graphics or 10 Phaser.Images? ( bonus points for shedding light on what happened to pivot ) Link to comment Share on other sites More sharing options...
samme Posted July 6, 2017 Share Posted July 6, 2017 Graphics#pivot is working for me. generateTexture() is probably fine too. Link to comment Share on other sites More sharing options...
NewGuy Posted July 6, 2017 Author Share Posted July 6, 2017 Hmm, my bad, looks like Pivot does still exist but it's PIXI.DisplayObject.pivot. Anywho, it'd still be interesting to hear anyone's performance related experience with Phaser.Graphics / Phaser.Images? Link to comment Share on other sites More sharing options...
Recommended Posts