LayerPixiRenderer

LayerPixiRenderer

The renderer for a gdjs.Layer using Pixi.js.

Constructor

new LayerPixiRenderer(layer, runtimeSceneRenderer)

Parameters:
Name Type Description
layer

The layer

runtimeSceneRenderer

The scene renderer

Source:

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.

Source:

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.

Source:

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.

Source:

enableEffect(name, value)

Enable an effect.

Parameters:
Name Type Description
name

The effect name

value

Set to true to enable, false to disable

Source:

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

Source:

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

Source:

removeEffect(effectName)

Remove the effect with the specified name

Parameters:
Name Type Description
effectName

The name of the effect.

Source:

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.

Source:

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

Source:

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

Source:

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

Source:

updatePosition()

Update the position of the PIXI container. To be called after each change made to position, zoom or rotation of the camera.

Source: