Documentation
    Preparing search index...

    Class Euler

    A rotation in Euler angles.

    Hierarchy (View Summary)

    Index

    Constructors

    • Constructs a new Euler rotation.

      Parameters

      • x: number

        The X component of the rotation vector.

      • y: number

        The Y component of the rotation vector.

      • z: number

        The Z component of the rotation vector.

      • reverse: boolean

        Should this rotation be reversed?

      Returns Euler

    Properties

    reverse: boolean

    Is this rotation reversed?

    x: number

    The X component of the vector.

    y: number

    The Y component of the vector.

    z: number

    The Z component of the vector.

    Methods

    • Scales another vector and adds it to this vector.

      Parameters

      • x: number

        The value to add to the X component.

      • y: number

        The value to add to the Y component.

      • z: number

        The value to add to the Z component.

      • scale: number

        The scaling to apply to the input vector.

      Returns this

      This instance.

    • Adds another vector to this vector.

      Parameters

      • x: number

        The value to add to the X component.

      • y: number

        The value to add to the Y component.

      • z: number

        The value to add to the Z component.

      Returns this

      This instance.

    • Return the components of this vector as an array.

      Returns [number, number, number]

      The components of this vector as an array.

    • Clamps the components of the vector at the given boundary.

      Parameters

      • floor: number

        The lowest value to allow.

      • ceil: number

        The largest value to allow.

      Returns this

      This instance.

    • Divides the vector by the given scale.

      Parameters

      • scale: number

        The scaling to apply to the vector.

      Returns this

      This instance.

    • Divides this vector by another vector.

      Parameters

      • x: number

        The value to divide the X component with.

      • y: number

        The value to divide the Y component with.

      • z: number

        The value to divide the Z component with.

      Returns this

      This instance.

    • Returns the dot product between two vectors.

      Parameters

      • x: number

        The X component of the other vector.

      • y: number

        The Y component of the other vector.

      • z: number

        The Z component of the other vector.

      Returns number

      The dot product between the two vectors.

    • Calculates the reflection of this vector, based on the angle of incident into a material with the given refractive index, according to Snell's law. This vector is then set to the result.

      Parameters

      • normal: Readonly<Vector3>

        The normal against which to reflect.

      • index: number

        The refractive index of the material.

      Returns this

      This instance.

    • Multiplies the vector by the given scale.

      Parameters

      • scale: number

        The scaling to apply to the vector.

      Returns this

      This instance.

    • Multiplies this vector by another vector.

      Parameters

      • x: number

        The value to multiply with the X component.

      • y: number

        The value to multiply with the Y component.

      • z: number

        The value to multiply with the Z component.

      Returns this

      This instance.

    • Sets the vector to new coordinates.

      Parameters

      • x: number

        The new X component for the vector.

      • y: number

        The new Y component for the vector.

      • z: number

        The new Z component for the vector.

      Returns this

      This instance.

    • Subtracts another vector from this vector.

      Parameters

      • x: number

        The value to subtract from the X component.

      • y: number

        The value to subtract from the Y component.

      • z: number

        The value to subtract from the Z component.

      Returns this

      This instance.