bvalosek Posted December 15, 2014 Share Posted December 15, 2014 I am in the process of bolting PixiJS onto an existing JS game engine. Currently the engine uses object pooling comprehensively for all components and game entities, and I was planning on having the engine's Sprite component contain a PIXI.js sprite that is used during rendering. My main question is this: What is the proper way to go about "re-initializing" A PixiJS sprite if I were to pool them? Are theres some general pooling strategies that I should use (e.g, only re-use Sprite objects if the Texture is going to be the same, make sure to reset some underlying cached state... etc). I know I'll have to (re)set the position, rotation, etc properties, but was wondering if there are some larger caveats I need to be aware of. I am only using the WebGL renderer and not making any use of interactivity, if it matters. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.