Options
All
  • Public
  • Public/Protected
  • All
Menu

Base transform class to handle vectors and matrices

Hierarchy

Index

Constructors

constructor

Properties

modelMatrix

modelMatrix: mat4 = ...

position

position: vec3 = ...

rotation

rotation: vec3 = ...

scale

scale: vec3 = ...

shouldUpdate

shouldUpdate: boolean = true

Methods

copyFromMatrix

  • copyFromMatrix(matrix: ReadonlyMat4): Transform

setPosition

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

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

    Returns Transform

setRotation

  • setRotation(rotation: { x?: undefined | number; y?: undefined | number; z?: undefined | number }): Transform
  • 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 Transform

setScale

  • setScale(scale: { x?: undefined | number; y?: undefined | number; z?: undefined | number }): Transform
  • 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 Transform

updateModelMatrix

Generated using TypeDoc