Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Euler

A class representing Euler Angles. Euler angles describe a rotational transformation by rotating an object on its various axes in specified amounts per axis, and a specified axis order. See the ngx3js docs page for details.

Examples

css3d / orthographic webgl / custom / attributes / points3 webgl / decals webgl / instancing / performance webgl / interactive / cubes / gpu

Code Example

const a = new THREE.Euler( 0, 1, 1.57, 'XYZ' );
const b = new THREE.Vector3( 1, 0, 1 );
b.applyEuler(a);

Hierarchy

  • Euler

Index

Constructors

constructor

  • new Euler(x?: number, y?: number, z?: number, order?: string): I3JS.Euler
  • Parameters

    • Optional x: number

      The angle of the x axis in radians. Default is 0.

    • Optional y: number

      The angle of the y axis in radians. Default is 0.

    • Optional z: number

      The angle of the z axis in radians. Default is 0.

    • Optional order: string

      A string representing the order that the rotations are applied, defaults to 'XYZ' (must be upper case).

    Returns I3JS.Euler

Properties

DefaultOrder

DefaultOrder: string

RotationOrders

RotationOrders: string[]

Readonly isEuler

isEuler: true

order

order: string

The order in which to apply rotations. Default is 'XYZ', which means that the object will first be rotated around its X axis, then its Y axis and finally its Z axis. Other possibilities are: 'YZX', 'ZXY', 'XZY', 'YXZ' and 'ZYX'. These must be in upper case. Three.js uses intrinsic Tait-Bryan angles. This means that rotations are performed with respect to the local coordinate system. That is, for order 'XYZ', the rotation is first around the local-Xt axis (which is the same as the world-X axis), then around local-Y (which may now be different from the world Y-axis), then local-Z (which may be different from the world Z-axis).

x

x: number

The angle of the x axis in radians. Default is 0.

y

y: number

The angle of the y axis in radians. Default is 0.

z

z: number

The angle of the z axis in radians. Default is 0.

Methods

_onChange

_onChangeCallback

  • _onChangeCallback(): void

clone

copy

equals

fromArray

  • Assigns this euler's .x angle to array[0]. Assigns this euler's .y angle to array[1]. Assigns this euler's .z angle to array[2]. Optionally assigns this euler's .order to array[3].

    Parameters

    • xyzo: any[]

    Returns I3JS.Euler

reorder

  • Resets the euler angle with a new order by creating a quaternion from this euler angle and then setting this euler angle with the quaternion and the new order. WARNING: this discards revolution information.

    Parameters

    • newOrder: string

    Returns I3JS.Euler

set

  • set(x: number, y: number, z: number, order?: string): I3JS.Euler
  • Sets the angles of this euler transform and optionally the .order.

    Parameters

    • x: number

      The angle of the x axis in radians.

    • y: number

      The angle of the y axis in radians.

    • z: number

      The angle of the z axis in radians.

    • Optional order: string

      A string representing the order that the rotations are applied.

    Returns I3JS.Euler

setFromQuaternion

  • Sets the angles of this euler transform from a normalized quaternion based on the orientation specified by .order.

    Parameters

    • q: I3JS.Quaternion

      A normalized quaternion.

    • Optional order: string

      A string representing the order that the rotations are applied.

    • Optional update: boolean

    Returns I3JS.Euler

setFromRotationMatrix

setFromVector3

toArray

  • toArray(array?: number[], offset?: number): number[]
  • Parameters

    • Optional array: number[]

      array to store the euler in.

    • Optional offset: number

      offset in the array.

    Returns number[]

    Returns an array of the form [.x, .y, .z, .order].

toVector3

Generated using TypeDoc