Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type Aliases

EulerOrder: "xyz" | "yzx" | "zxy" | "xzy" | "yxz" | "zyx"

A string representing the axis order of rotation.

Functions

  • Creates a new euler angle where each axis of rotation is defined by an angle, in radians. If no value is given, then {x: 0, y: 0, z: 0, order: 'xyz'} is returned.

    Parameters

    • value: Partial<Euler> = {}

      The values to populate the euler angle with.

    Returns Euler

    A euler angle.

  • Creates a new euler angle where each axis of rotation is defined by an angle, in degrees. If no value is given, then {x: 0, y: 0, z: 0, order: 'xyz'} is returned.

    Parameters

    • value: Partial<Euler> = {}

      The values to populate the euler angle with.

    Returns Euler

    A euler angle.

  • fromJson(json: string): Euler
  • Returns a euler angle that was decoded from a JSON string. Supports either extracting values from an array [x, y, z, order] or object {x, y, z, order}.

    Parameters

    • json: string

      A JSON object.

    Returns Euler

    A euler angle.

  • Creates a euler angle from the rotation components of a 4x4 matrix. The rotation components are represented by the upper 3x3 of the matrix.

    Parameters

    • matrix: Matrix4

      A pure rotation matrix, unscaled.

    • order: EulerOrder = 'xyz'

      The order that the rotations are applied.

    Returns Euler

  • isType(obj: unknown): obj is Euler