Stage

class Stage extends Layer

The stage manages all the layers in its scene tree.

Constructor


new Stage() → {}

The stage manages all the layers in its scene tree.

Summary


Properties from Stage

Array<Layer>
_activeLayers

Found layers

boolean
isStage = true

Flags that this is a stage!

Methods from Stage

void
clear()
void
updateStage()

This should be called before rendering for resolving items in the scene tree to their layers.

Properties inherited from Layer

ArrayLike<number>
clearColor

The background color to clear the layer.

Group
group = undefined

The group of DisplayObjects that are rendered within this layer

boolean
isLayer = true

Flags that this container is a layer!

LayerTextureCache
textureCache

The texture manager used when rendering into a layer render-texture.

boolean
useDoubleBuffer

This will enable double buffering for this layer.

boolean
useRenderTexture

Flags whether this layer should render into a render-texture.

Properties inherited from Container

T[]
children
number
height

The height of the Container, setting this will actually modify the scale to achieve the value set.

boolean
interactiveChildren = true
boolean
sortableChildren
boolean
sortDirty

Should children be sorted by zIndex at the next updateTransform call.

number
width

The width of the Container, setting this will actually modify the scale to achieve the value set.

Properties inherited from DisplayObject

boolean
_accessibleActive = false
boolean
_accessibleDiv = undefined
PIXI.Bounds
_bounds

The bounds object, this is used to calculate and store the bounds of the displayObject.

PIXI.Bounds
_localBounds

Local bounds object, swapped with _bounds when using getLocalBounds().

boolean
accessible = false
boolean
accessibleChildren = true
string
accessibleHint = undefined
string
accessiblePointerEvents = 'auto'
?string
accessibleTitle = undefined
string
accessibleType = 'button'
number
alpha

The opacity of the object.

number
angle
boolean
buttonMode
boolean
cacheAsBitmap
number
cacheAsBitmapMultisample = PIXI.MSAA_QUALITY.NONE
number
cacheAsBitmapResolution = null
boolean
cullable

Should this object be rendered if the bounds of this object are out of frame?

PIXI.Rectangle
cullArea
string
cursor = undefined
boolean
destroyed

Readonly flag for destroyed display objects.

PIXI.Rectangle
filterArea
PIXI.Filter[] | null
filters
PIXI.IHitArea
hitArea = undefined
boolean
interactive = false
boolean
isMask

Does any other displayObject use this object as a mask?

boolean
isSprite

Used to fast check if a sprite is.. a sprite!

PIXI.Matrix
localTransform
PIXI.Container | PIXI.MaskData | null
mask
string
name = undefined
PIXI.Container
parent

The display object container that contains this display object.

PIXI.ObservablePoint
pivot
PIXI.ObservablePoint
position
boolean
renderable
number
rotation
PIXI.ObservablePoint
scale

The scale factors of this object along the local coordinate axes.

PIXI.ObservablePoint
skew
PIXI.DisplayObject
smartMask = undefined
PIXI.Transform
transform
boolean
visible
number
worldAlpha
PIXI.Matrix
worldTransform
boolean
worldVisible
number
x
number
y
number
zIndex

The zIndex of the displayObject.

number
protected _boundsID

Flags the cached bounds as dirty.

PIXI.Rectangle
protected _boundsRect

Cache of this display-object's bounds-rectangle.

boolean
protected _destroyed

If the object has been destroyed via destroy(). If true, it should not be used.

PIXI.Filter[]
protected _enabledFilters
number
protected _lastSortedIndex
PIXI.Rectangle
protected _localBoundsRect

Cache of this display-object's local-bounds rectangle.

PIXI.Container | PIXI.MaskData
protected _mask
PIXI.Container
protected _tempDisplayObjectParent
number
protected _zIndex

Methods inherited from Layer

void
_onBeginLayerSubtreeTraversal(stage: Stage)

This should be called when the layer is found while traversing the scene for updating object-layer association.

void
_onEndLayerSubtreeTraversal()

This should be called when the full subtree of the layer has been traversed while updating the stage's scene.

void
destroy(options: IDestroyOptions)
void
doSort()

you can override this method for this particular layer, if you want

PIXI.RenderTexture
getRenderTexture()
void
layerRenderCanvas(renderer: any)
void
render(renderer: PIXI.Renderer)
void
protected postrender(renderer: ILayeredRenderer)

Cleans up the renderer after this layer is rendered.

boolean
protected prerender(renderer: ILayeredRenderer)

Prepares the renderer for this layer.

Inherited Events from Container

Inherited Events from DisplayObject

added
childRemoved
click
clickcapture

Capture phase equivalent of click.

destroyed
mousedown
mousedowncapture

Capture phase equivalent of mousedown.

mouseenter

Fired when the mouse pointer is moved over a DisplayObject and its descendant's hit testing boundaries.

mouseentercapture

Capture phase equivalent of mouseenter

mouseleave

Fired when the mouse pointer exits a DisplayObject and its descendants.

mouseleavecapture

Capture phase equivalent of mouseleave.

mousemove
mousemovecature

Capture phase equivalent of mousemove.

mouseout
mouseoutcapture

Capture phase equivalent of mouseout.

mouseover
mouseovercapture

Capture phase equivalent of mouseover.

mouseup
mouseupcature

Capture phase equivalent of mouseup.

mouseupoutside
mouseupoutsidecapture

Capture phase equivalent of mouseupoutside.

pointercancel
pointercancelcapture

Capture phase equivalent of pointercancel.

pointerdown
pointerdowncapture

Capture phase equivalent of pointerdown.

pointerenter

Fired when the pointer is moved over a DisplayObject and its descendant's hit testing boundaries.

pointerentercapture

Capture phase equivalent of pointerenter

pointerleave

Fired when the pointer leaves the hit testing boundaries of a DisplayObject and its descendants.

pointerleavecapture

Capture phase equivalent of pointerleave.

pointermove
pointermovecapture

Capture phase equivalent of pointermove.

pointerout
pointeroutcapture

Capture phase equivalent of pointerout.

pointerover
pointerovercapture

Capture phase equivalent of pointerover.

pointertap
pointertapcapture

Capture phase equivalent of pointertap.

pointerup
pointerupcapture

Capture phase equivalent of pointerup.

pointerupoutside
pointerupoutsidecapture

Capture phase equivalent of pointerupoutside.

removed
rightclick
rightclickcapture

Capture phase equivalent of rightclick.

rightdown
rightdowncapture

Capture phase equivalent of rightdown.

rightup
rightupcapture

Capture phase equivalent of rightup.

rightupoutside
rightupoutsidecapture

Capture phase equivalent of rightupoutside.

tap
tapcapture

Capture phase equivalent of tap.

touchcancel
touchcancelcapture

Capture phase equivalent of touchcancel.

touchend
touchendcapture

Capture phase equivalent of touchend.

touchendoutside
touchendoutsidecapture

Capture phase equivalent of touchendoutside.

touchmove
touchmovecapture

Capture phase equivalent of touchmove.

touchstart
touchstartcapture

Capture phase equivalent of touchstart.

PIXI.FederatedWheelEvent
wheel

Fired when a the user scrolls with the mouse cursor over a DisplayObject.

PIXI.FederatedWheelEvent
wheelcapture

Capture phase equivalent of wheel.

Public Properties


_activeLayers Stage.ts:19
_activeLayers: Array<Layer>

Found layers

isStage Stage.ts:14
isStage: boolean = true

Flags that this is a stage!

Public Methods


clear Stage.ts:26
clear() → {void}

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

Returns:
Type Description
void
updateStage Stage.ts:43
updateStage() → {void}

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.

Returns:
Type Description
void

Powered by webdoc!