Daevid66 Posted December 5, 2016 Share Posted December 5, 2016 Hi, I'm trying to migrate a quite large project to PIXI 4, and has managed to get most of it running fine. I have one issue still though, and have tried to reproduce it here: http://codepen.io/anon/pen/VmXPGa?editors=0010 What I do in the example: 1. create a container and add three graphics objects (circles) 2. create a renderTexture, and render the conatiner to it. 3. create a sprite and with the new renderTexture (this is shown correctly) 4. create a new renderTexture and render the sprite to it 5. create a new sprite with the new renderTexture The last sprite is invisible... When looking at the data for the textures they look the same, so I guess it's the actual bitmap that is incorrect. In my larger project I can sometimes see flickering artifacts od the texture in wrong places, indicating that the rendered texture might be shared between different sprites. Has anyone seen anything similar? /David Quote Link to comment Share on other sites More sharing options...
Daevid66 Posted December 5, 2016 Author Share Posted December 5, 2016 OK, I think I get it now. I have offset the the image so that it is drawn outside the texture. Makes sense, I will solve my problem by creating a helper function that: - gets the bounds of the target - save parent - create a new container, and move it to compensate for the targets position - re-parent to previous parent Cheers, /David 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.