Constructor
new LayerPixiRenderer(layer, runtimeSceneRenderer)
Parameters:
Name | Type | Description |
---|---|---|
layer |
The layer |
|
runtimeSceneRenderer |
The scene renderer |
Methods
addEffect(effectData)
Add a new effect, or replace the one with the same name.
Parameters:
Name | Type | Description |
---|---|---|
effectData |
The data of the effect to add. |
addRendererObject(child, zOrder)
Add a child to the pixi container associated to the layer. All objects which are on this layer must be children of this container.
Parameters:
Name | Type | Description |
---|---|---|
child |
The child (PIXI object) to be added. |
|
zOrder |
The z order of the associated object. |
changeRendererObjectZOrder(child, newZOrder)
Change the z order of a child associated to an object.
Parameters:
Name | Type | Description |
---|---|---|
child |
The child (PIXI object) to be modified. |
|
newZOrder |
The z order of the associated object. |
enableEffect(name, value)
Enable an effect.
Parameters:
Name | Type | Description |
---|---|---|
name |
The effect name |
|
value |
Set to true to enable, false to disable |
hasEffect(name)
Check if an effect exists.
Parameters:
Name | Type | Description |
---|---|---|
name |
The effect name |
Returns:
Type | Description |
---|---|
True if the effect exists, false otherwise |
isEffectEnabled(name)
Check if an effect is enabled.
Parameters:
Name | Type | Description |
---|---|---|
name |
The effect name |
Returns:
Type | Description |
---|---|
true if the filter is enabled |
removeEffect(effectName)
Remove the effect with the specified name
Parameters:
Name | Type | Description |
---|---|---|
effectName |
The name of the effect. |
removeRendererObject(child)
Remove a child from the internal pixi container. Should be called when an object is deleted or removed from the layer.
Parameters:
Name | Type | Description |
---|---|---|
child |
The child (PIXI object) to be removed. |
setEffectBooleanParameter(name, parameterName, value)
Enable or disable the parameter of an effect (boolean).
Parameters:
Name | Type | Description |
---|---|---|
name |
The effect name |
|
parameterName |
The parameter name |
|
value |
The new value for the parameter |
setEffectDoubleParameter(name, parameterName, value)
Update the parameter of an effect (with a number).
Parameters:
Name | Type | Description |
---|---|---|
name |
The effect name |
|
parameterName |
The parameter name |
|
value |
The new value for the parameter |
setEffectStringParameter(name, parameterName, value)
Update the parameter of an effect (with a string).
Parameters:
Name | Type | Description |
---|---|---|
name |
The effect name |
|
parameterName |
The parameter name |
|
value |
The new value for the parameter |
updatePosition()
Update the position of the PIXI container. To be called after each change made to position, zoom or rotation of the camera.