Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Hierarchy

  • LayerPixiRenderer

Index

Methods

  • add3DRendererObject(object: Object3D<Event>): void
  • Parameters

    • object: Object3D<Event>

    Returns void

  • addRendererObject(pixiChild: any, zOrder: number): void
  • 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

  • changeRendererObjectZOrder(pixiChild: any, newZOrder: number): 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

  • getLightingSprite(): null | Sprite
  • The sprite, displaying the "render texture" of the layer, to display for a lighting layer.

    Returns null | Sprite

  • getRendererObject(): Container
  • Returns Container

  • getThreeCamera(): null | PerspectiveCamera
  • Returns null | PerspectiveCamera

  • getThreeScene(): null | Scene
  • Returns null | Scene

  • has2DObjects(): boolean
  • Returns boolean

  • has3DObjects(): boolean
  • Returns boolean

  • isCameraRotatedIn3D(): null | boolean
  • Returns null | boolean

  • onCreated(): void
  • Returns void

  • onGameResolutionResized(): void
  • Returns void

  • remove3DRendererObject(object: Object3D<Event>): void
  • Parameters

    • object: Object3D<Event>

    Returns void

  • removeRendererObject(child: any): 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

  • renderOnPixiRenderTexture(pixiRenderer: Renderer): 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

  • setThreeCameraDirty(enable: boolean): void
  • Parameters

    • enable: boolean

    Returns void

  • show2DRenderingPlane(enable: boolean): void
  • Parameters

    • enable: boolean

    Returns void

  • transformTo3DWorld(screenX: number, screenY: number, worldZ: number, cameraId: number, result: FloatPoint): FloatPoint
  • Parameters

    • screenX: number
    • screenY: number
    • worldZ: number
    • cameraId: number
    • result: FloatPoint

    Returns FloatPoint

  • updateClearColor(): void
  • Returns void

  • updatePosition(): void
  • Update the position of the PIXI container. To be called after each change made to position, zoom or rotation of the camera.

    Returns void

  • updatePreRender(): void
  • Returns void

  • updateThreePlaneTextureFromPixiRenderTexture(threeRenderer: WebGLRenderer, pixiRenderer: Renderer): 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

  • updateVisibility(visible: boolean): void
  • Parameters

    • visible: boolean

    Returns void

Constructors

Properties

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

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

Generated using TypeDoc