CanvasRenderer#clearBeforeRender

clearBeforeRender : boolean

This sets if the CanvasRenderer will clear the canvas or not before the new render pass.
If the Stage is NOT transparent Pixi will use a canvas sized fillRect operation every frame to set the canvas background color.
If the Stage is transparent Pixi will use clearRect to clear the canvas every frame.
Disable this by setting this to false. For example if your game has a canvas filling background image you often don't need this set.

Source code: pixi/renderers/canvas/CanvasRenderer.js (Line 41)
doc_phaser
2017-02-14 10:41:11
Comments
Leave a Comment

Please login to continue.