Class: LayerPixiRenderer

LayerPixiRenderer

new gdjs.LayerPixiRenderer(layer, runtimeSceneRenderer)

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

Name Type Description
layer gdjs.Layer

The layer

runtimeSceneRenderer gdjs.RuntimeScenePixiRenderer

The scene renderer

Methods

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.

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.

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.

Name Type Description
name string

The effect name

value boolean

Set to true to enable, false to disable

isEffectEnabled(name){boolean}

Check if an effect is enabled.

Name Type Description
name string

The effect name

Returns:
Type Description
boolean true if the filter is enabled

removeRendererObject(child)

Remove a child from the internal pixi container. Should be called when an object is deleted or removed from the layer.

Name Type Description
child

The child (PIXI object) to be removed.

setEffectBooleanParameter(name, parameterName, value)

Enable or disable the parameter of an effect (boolean).

Name Type Description
name string

The effect name

parameterName string

The parameter name

value boolean

The new value for the parameter

setEffectDoubleParameter(name, parameterName, value)

Update the parameter of an effect (with a number).

Name Type Description
name string

The effect name

parameterName string

The parameter name

value number

The new value for the parameter

setEffectStringParameter(name, parameterName, value)

Update the parameter of an effect (with a string).

Name Type Description
name string

The effect name

parameterName string

The parameter name

value string

The new value for the parameter