Eugenius Posted June 3, 2014 Share Posted June 3, 2014 Hello guys! Here is short code example doc = new PIXI.DisplayObjectContainer();/*draw something on the doc*/spr = new PIXI.Sprite(doc.generateTexture());stage.addChild(spr);renderer.render(stage); this is how we normally create sprite out of DOC. but what I'd like to do is doc = new PIXI.DisplayObjectContainer();/*draw something on the doc*/doc.scale.x = 2;doc.scale.y = 2;spr = new PIXI.Sprite(doc.generateTexture());stage.addChild(spr);renderer.render(stage); that the sprite is drawn out of scaled doc even I did not render it before generating the texture. My application contains a lot of Graphics and DOCs and rendering one frame takes around 200ms to render at some levels. So I'd like to cache some of the levels that have many objects at the start of the application. little example for a better explanationlevel 1 - 1000 objects (takes a few ms to render)level 2 - 60000 objects (disaster)and I need animation from level 1 to level 2. cacheAsBitmap may not be an option for me because transition from level 1 to 2 will be very slow unless it's already cached but it starts from level 1, so i cannot cache the level 2 before I actually render it on the screen. is there any buffer option I can use? Thanks for reading! 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.