Configures a custom projection for a Camera .

Hierarchy

  • Component
    • CustomProjection

Implements

Properties

camera: Camera

The Camera this CustomProjection belongs to.

destroyed: boolean

True once this Component has been destroyed.

Don't use this Component if this is true.

dirty: boolean
id: string

Unique ID of this Component.

type: number = CustomProjectionType

The type of this projection.

Accessors

  • get projMatrix(): FloatArrayParam
  • Gets the CustomProjection's projection transform matrix.

    Default value is [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1].

    Returns FloatArrayParam

    New value for the CustomProjection's matrix.

  • set projMatrix(projMatrix): void
  • Sets the CustomProjection's projection transform matrix.

    Default value is [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1].

    Parameters

    • projMatrix: FloatArrayParam

      New value for the CustomProjection's matrix.

    Returns void

Methods

  • Forces this component to action any deferred state updates.

    Returns void

  • Gives this component an opportunity to action any defered state updates.

    Returns void

  • Protected

    Logs an error for this component to the JavaScript console.

    The console message will have this format: [ERROR] [<component type> =<component id>: <message>

    Parameters

    • message: string

      The error message to log

    Returns void

  • Protected

    Logs a message for this component.

    The message will have this format: [LOG] [<component type> <component id>: <message>

    Parameters

    • message: string

      The message to log

    Returns void

  • Flags this component as having a defered state updates it needs to perform.

    Returns void

  • Un-projects the given View-space coordinates, using this CustomProjection.

    Parameters

    • canvasPos: FloatArrayParam

      Inputs 2D View-space coordinates.

    • screenZ: number

      Inputs Screen-space Z coordinate.

    • screenPos: FloatArrayParam

      Outputs 3D Screen/Clip-space coordinates.

    • viewPos: FloatArrayParam

      Outputs un-projected 3D View-space coordinates.

    • worldPos: FloatArrayParam

      Outputs un-projected 3D World-space coordinates.

    Returns FloatArrayParam

  • Protected

    Logs a warning for this component to the JavaScript console.

    The console message will have this format: [WARN] [<component type> =<component id>: <message>

    Parameters

    • message: string

      The warning message to log

    Returns void

Events

onDestroyed: EventEmitter<Component, null>

Emits an event when the Component has been destroyed.

onProjMatrix: EventEmitter<CustomProjection, FloatArrayParam>

Emits an event each time CustomProjection.projMatrix updates.