Construct a CachedContainer.
Optional
sprite: anyA specific sprite to bind to this CachedContainer and its renderTexture.
An RGBA array used to define the clear color of the RenderTexture
Should our Container also be displayed on screen, in addition to being drawn to the cached RenderTexture?
If true, the Container is rendered every frame. If false, the Container is rendered only if CachedContainer#renderDirty is true.
Does the Container need to be rendered? Set to false after the Container is rendered.
Protected
_renderA map of render textures, linked to their render function and an optional RGBA clear color.
Private
#onA bound resize function which fires on the renderer resize event.
Private
#backupAn object which stores a reference to the normal renderer target and source frame. We track this so we can restore them after rendering our cached texture.
Private
#renderPrivate
#spriteStatic
textureThe texture configuration to use for this cached container
A PIXI.Sprite or SpriteMesh which is bound to this CachedContainer. The RenderTexture from this Container is associated with the Sprite which is automatically rendered.
The primary render texture bound to this cached container.
Set the alpha mode of the cached container render texture.
Create a render texture, provide a render method and an optional clear color.
Optional
options: { Optional parameters.
Render function that will be called to render into the RT.
An optional clear color to clear the RT before rendering into it.
A reference to the created render texture.
Clear the cached container, removing its current contents.
Optional
destroy: boolean = trueTell children that we should destroy texture as well.
A reference to the cleared container for chaining.
Protected
#renderProtected
#bindProtected
Bind a render texture to this renderer. Must be called after bindPrimaryBuffer and before bindInitialBuffer.
The active canvas renderer.
The texture to bind.
Optional
clearColor: number[]A custom clear color.
Private
#bindPrivate
#bindPrivate
#resizeStatic
resize
A special type of PIXI.Container which draws its contents to a cached RenderTexture. This is accomplished by overriding the Container#render method to draw to our own special RenderTexture.