Search the Community
Showing results for tags 'offscreen render'.
-
Hi Drawing invisible objects on a canvas causes performance loss. What's the best way you know to prevent this? I think there are two options: adding a mask to the all-encompassing container and changing the renderable property to false. I may have misunderstood the masking feature. I wonder which one is more logical to prevent unseen elements from being drawn in the scene? To change the Renderable property, it is necessary to loop through and check each element with a for loop. Wouldn't that be compelling for each frame?
-
- pixi
- save render time
-
(and 1 more)
Tagged with:
-
Hi all, I'm looking to optimize our game by rendering chunks of our game grid offscreen and only redrawing them when something inside them animates/dies. The way i do it at the moment is as follows: Creating the render texture and adding it to a group: var renderTexture = game.add.renderTexture(name, width, height);var renderSprite = new phaser.Sprite(game, x, y, renderTexture);renderSprite.parent = undefined;var index = parent.getIndex(replaceChild);parent.addAt(renderSprite, index);return renderSprite;And rendering it: target.renderXY(object, object.x, object.y, clear);Note that I have to set the renderSprite's parent to undefined, otherwise Phaser 1.1.5 crashes trying to disconnect the sprite from its current parent. This was not an issue in 1.1.4. However, on Android stock browser ( note, not the Galaxy S4 which uses a Chromium fork ), it just refuses to render anything. Any ideas on this? Thanks in advance, David Goemans
-
- rendertexture
- android
-
(and 1 more)
Tagged with: