Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a transformation matrix for rendering operations.

Hierarchy

  • Transform

Index

Constructors

constructor

Properties

matrix

matrix: number[][]

Provides direct access to the 4x4 matrix cells of this transform.

Methods

compose

  • Composes another transform with this one. The result is the same as if the two were applied consecutively.

    Parameters

    • transform: Transform

      The transform to be applied after this one.

    Returns Transform

identity

project2D

  • project2D(left: number, top: number, right: number, bottom: number, near?: number, far?: number): Transform
  • Add a 2D orthographic projection to the transform.

    Parameters

    • left: number
    • top: number
    • right: number
    • bottom: number
    • Optional near: number
    • Optional far: number

    Returns Transform

project3D

  • project3D(fov: number, aspect: number, near: number, far: number): Transform
  • Add a 3D frustum projection to the transform.

    Parameters

    • fov: number
    • aspect: number
    • near: number
    • far: number

    Returns Transform

rotate

  • rotate(angle: number): Transform
  • rotate(angle: number, vx: number, vy: number, vz: number): Transform
  • Add a 2D rotation (i.e. rotation about the Z axis) to the transform.

    Parameters

    • angle: number

      The angle of rotation, in radians.

    Returns Transform

  • Add a rotation to the transform.

    Parameters

    • angle: number

      The angle of rotation, in radians.

    • vx: number

      The X component of the vector to rotate around.

    • vy: number

      The Y component of the vector to rotate around.

    • vz: number

      The Z component of the vector to rotate around.

    Returns Transform

scale

  • scale(sx: number, sy: number, sz?: number): Transform
  • Add a scaling transformation to the transform.

    Parameters

    • sx: number

      The scaling factor for the X axis.

    • sy: number

      The scaling factor for the Y axis.

    • Optional sz: number

      The scaling factor for the Z axis.

    Returns Transform

translate

  • translate(tx: number, ty: number, tz?: number): Transform
  • Add a translation (slide) to the transform.

    Parameters

    • tx: number

      The amount to move the X axis.

    • ty: number

      The amount to move the Y axis.

    • Optional tz: number

      The amount to move the Z axis.

    Returns Transform

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc