Extends
Members
Flags that this is a stage!
- Default Value:
- true
Methods
clears all display lists that were used in last rendering session please clear it when you stop using this displayList, otherwise you may have problems with GC in some cases
This should be called before rendering for resolving items in the scene tree to their layers.
If your scene's root is a Stage, then the ILayerRenderer mixin will automatically call it.
Inherited Properties
From class PIXI.layers.Layer
clearColor ArrayLike<number> inherited
The background color to clear the layer.
This should be used when Layer#useRenderTexture is enabled.
group PIXI.layers.Group inherited
The group of DisplayObjects that are rendered within this layer
- Default Value:
- undefined
isLayer boolean readonly inherited
Flags that this container is a layer!
- Default Value:
- true
textureCache PIXI.layers.LayerTextureCache inherited
The texture manager used when rendering into a layer render-texture.
useDoubleBuffer boolean inherited
This will enable double buffering for this layer.
This layer will keep two render-textures to render into - choosing one each frame on a flip-flop basis. This is useful when you
Caveat: You must enable Layer#useRenderTexture to prevent framebuffer errors in rendering.
useRenderTexture boolean inherited
Flags whether this layer should render into a render-texture.
This is useful if you want to use the layer as a texture elsewhere - for example, in sprites or to apply filters. The layer's render-texture is resized to the size of the renderer's screen.
Inherited Methods
From class PIXI.layers.Layer
destroy (options) void inherited
Name | Type | Attributes | Description |
---|---|---|---|
options |
IDestroyOptions |
<optional> |
doSort () void inherited
you can override this method for this particular layer, if you want
getRenderTexture () RenderTexture inherited
The rendering into a render-texture is enabled, this will return the render-texture used by this layer.
Returns:
Type | Description |
---|---|
RenderTexture |
layerRenderCanvas (renderer) void inherited
renderCanvas named this way because of some TS mixin problem
Name | Type | Description |
---|---|---|
renderer |
any |
render (renderer) void inherited
Name | Type | Description |
---|---|---|
renderer |
Renderer |
postrender (renderer) void protected inherited
Cleans up the renderer after this layer is rendered.
It restores Renderer#_activeLayer to the parent layer and restores the canonical order of children.
Name | Type | Description |
---|---|---|
renderer |
ILayeredRenderer |
prerender (renderer) boolean protected inherited
Prepares the renderer for this layer.
It will assign PIXI.Renderer#_activeLayer to this
, and set the active layer before
this to _activeParentLayer. It will also temporarily sort the
children by z-order.
Name | Type | Description |
---|---|---|
renderer |
ILayeredRenderer |
Returns:
Type | Description |
---|---|
boolean | true , if the layer needs to be rendered; false , when the layer is invisible or has
zero alpha. |