Constructor
new StageContainer(renderer)
Creates an instance of StageContainer.
Parameters:
Name | Type | Description |
---|---|---|
renderer |
BatchRenderer |
Properties:
Name | Type | Description |
---|---|---|
renderer |
BatchRenderer |
- Source:
Extends
Classes
Members
callbackAfterRender :function
Set/Get after render callback - It will be called after the Item rendered
Type:
- function
- Overrides:
- Source:
callbackBeforeRender :function
Set/Get before render callback - It will be called before the Item rendered
Type:
- function
- Overrides:
- Source:
parent :Container
Set/Get parent
Type:
- Overrides:
- Source:
(readonly) stage :StageContainer
Get stage container
Type:
- Overrides:
- Source:
Methods
addChild(child)
Add Item to the container
Parameters:
Name | Type | Description |
---|---|---|
child |
Item |
- Overrides:
- Source:
addChildAt(child, index)
Add Item to a specific index
Parameters:
Name | Type | Description |
---|---|---|
child |
Item | |
index |
number |
- Overrides:
- Source:
callEventHandler(event)
Handle event - It can handle mouse events if the item is interactive and has [ onPointerOver, onPointerOut, onPointerMove, onPointerDown, onPointerUp, onPointerClick ] function
Parameters:
Name | Type | Description |
---|---|---|
event |
* |
- Overrides:
- Source:
contains(child) → {boolean}
Returns true, if the container contains the Item
Parameters:
Name | Type | Description |
---|---|---|
child |
Item |
- Overrides:
- Source:
Returns:
- Type
- boolean
destruct()
Destruct class
- Overrides:
- Source:
empty()
Emptying the container
- Overrides:
- Source:
getBounds() → {Rectangle}
Returns with the bounds of the container
- Overrides:
- Source:
Returns:
- Type
- Rectangle
getChildAt(index) → {Item}
Returns with a Item from a specific index
Parameters:
Name | Type | Description |
---|---|---|
index |
number |
- Overrides:
- Source:
Returns:
- Type
- Item
getChildIndex(child) → {number}
Returns with the child element index
Parameters:
Name | Type | Description |
---|---|---|
child |
Item |
- Overrides:
- Source:
Returns:
- Type
- number
getPremultipliedAlpha()
Get premultiplied alpha
- Overrides:
- Source:
getPremultipliedUseTint()
Get premultiplied useTint value
- Overrides:
- Source:
remove()
Remove Item from parent
- Overrides:
- Source:
removeChild(child)
Removes the Item from the container
Parameters:
Name | Type | Description |
---|---|---|
child |
Item |
- Overrides:
- Source:
removeChildAt(index)
Removes Item from index
Parameters:
Name | Type | Description |
---|---|---|
index |
number |
- Overrides:
- Source:
setChildIndex(child, index)
Set child element index
Parameters:
Name | Type | Description |
---|---|---|
child |
Item | |
index |
number |
- Overrides:
- Source:
swapChildren(childA, childB)
Swap two children
Parameters:
Name | Type | Description |
---|---|---|
childA |
Item | |
childB |
Item |
- Overrides:
- Source:
update()
Update color and transform values
- Overrides:
- Source: