caymanbruce Posted July 30, 2017 Share Posted July 30, 2017 I am confused with the two main methods to animate objects in pixi.js. The first one is to build a sprite and put it in a PIXI.Container. I can then add this container as a child of the PIXI stage. Every tick of the animation I just need to update the sprite's position and PIXI will handle the rest for me. I can also build a sprite or a displayObject and create a RenderTexture which is about the same size of what I want to render. Then I use renderer.render(DisplayObject, RenderTexture); to render it on the screen. This works fine too. I still need to update the position on every tick so the displayObject will animate. But what is the difference between using a Container and a RenderTexture? There must be a reason we have two options to render something. What use cases are these two methods best fitted in? Quote Link to comment Share on other sites More sharing options...
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.