Options
All
  • Public
  • Public/Protected
  • All
Menu

SceneObject that can have SceneObjects as children. Allows for proper scene graph.

Hierarchy

Index

Constructors

constructor

Properties

children

children: SceneObject[] = ...

modelMatrix

modelMatrix: mat4 = ...

normalMatrix

normalMatrix: mat4 = ...

parentNode

parentNode: null | SceneObject = null

position

position: vec3 = ...

Protected renderable

renderable: boolean = false

rotation

rotation: vec3 = ...

scale

scale: vec3 = ...

shouldUpdate

shouldUpdate: boolean = true

worldMatrix

worldMatrix: mat4 = ...

Methods

copyFromMatrix

setParent

setPosition

  • setPosition(position: { x?: undefined | number; y?: undefined | number; z?: undefined | number }): SceneObject
  • Parameters

    • position: { x?: undefined | number; y?: undefined | number; z?: undefined | number }
      • Optional x?: undefined | number
      • Optional y?: undefined | number
      • Optional z?: undefined | number

    Returns SceneObject

setRotation

  • setRotation(rotation: { x?: undefined | number; y?: undefined | number; z?: undefined | number }): SceneObject
  • Sets rotation

    Parameters

    • rotation: { x?: undefined | number; y?: undefined | number; z?: undefined | number }
      • Optional x?: undefined | number
      • Optional y?: undefined | number
      • Optional z?: undefined | number

    Returns SceneObject

setScale

  • setScale(scale: { x?: undefined | number; y?: undefined | number; z?: undefined | number }): SceneObject
  • Sets scale

    Parameters

    • scale: { x?: undefined | number; y?: undefined | number; z?: undefined | number }
      • Optional x?: undefined | number
      • Optional y?: undefined | number
      • Optional z?: undefined | number

    Returns SceneObject

traverseGraph

  • traverseGraph(callback: any, node?: SceneObject): this

updateModelMatrix

updateWorldMatrix

  • updateWorldMatrix(parentWorldMatrix?: null | Float32Array | readonly number[]): this
  • Parameters

    • parentWorldMatrix: null | Float32Array | readonly number[] = null

    Returns this

Generated using TypeDoc