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

Constructors

Properties

vectorForProjections: null | Vector3 = null
zeroZOrderForPixi: number = ...

Pixi doesn't sort children with zIndex == 0.

Methods

  • 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

    • pixiChild: any

      The child (PIXI object) to be added.

    • zOrder: number

      The z order of the associated object.

    Returns void

  • Change the z order of a child associated to an object.

    Parameters

    • pixiChild: any

      The child (PIXI object) to be modified.

    • newZOrder: number

      The z order of the associated object.

    Returns void

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

    Parameters

    • child: any

      The child (PIXI object) to be removed.

    Returns void

  • Render the layer of the PixiJS RenderTexture, so that it can be then displayed with a blend mode (for a lighting layer) or consumed by Three.js (for 2D+3D layers).

    Parameters

    • pixiRenderer: Renderer

    Returns void

  • Set the texture of the 2D plane in the 3D world to be the same WebGL texture as the PixiJS RenderTexture - so that the 2D rendering can be shown in the 3D world.

    Parameters

    • threeRenderer: WebGLRenderer
    • pixiRenderer: Renderer

    Returns void