Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • YVector3

Index

Constructors

constructor

Accessors

cloned

  • Returns a clone of the specified vector.

    Returns YVector3

magnitude

  • get magnitude(): number
  • Allows to get the magnitude (length) of a vector.

    Returns number

sqrMagnitude

  • get sqrMagnitude(): number
  • Allows to get the square magnitude (or a dot product of itself) of a vector.

    Returns number

x

  • get x(): number
  • set x(value: number): any
  • Allows to get / set the X component of a vector.

    Returns number

  • Allows to get / set the X component of a vector.

    Parameters

    • value: number

    Returns any

y

  • get y(): number
  • set y(value: number): any
  • Allows to get / set the Y component of a vector.

    Returns number

  • Allows to get / set the Y component of a vector.

    Parameters

    • value: number

    Returns any

z

  • get z(): number
  • set z(value: number): any
  • Allows to get / set the ** Z component** of a vector.

    Returns number

  • Allows to get / set the ** Z component** of a vector.

    Parameters

    • value: number

    Returns any

Methods

Static angle

  • Returns angle between two vectors.

    Parameters

    Returns number

Static create

  • create(x: number, y: number, z: number): YVector3
  • Returns new vector composed from input values.

    Parameters

    • x: number
    • y: number
    • z: number

    Returns YVector3

Static cross

Static distance

  • Returns distance between two points.

    Parameters

    Returns number

Static dot

  • Returns dot product of two vectors.

    Parameters

    Returns number

Static fromToRotation

  • Creates a rotation from direction Vector A to direction Vector B.

    Parameters

    Returns YVector3

Static getLookRotation

  • Returns the rotation vector that points from the first entity to the second one.

    Parameters

    Returns YVector3

Static inverseRotation

  • Returns the inverse rotation of the selected rotation.

    Parameters

    Returns YVector3

Static lerp

  • Linear interpolation between two vectors by the interpolant.

    Parameters

    Returns YVector3

Static lerpRotation

  • Linear interpolation between two rotation vectors by the interpolant.

    Parameters

    Returns YVector3

Static max

Static min

Static moveTowards

  • Moves point A in a straight line towards target point B, limited by maximum distance (meters).

    Parameters

    Returns YVector3

Static normalize

  • Returns normalized variant of input vector*.

    Parameters

    Returns YVector3

Static project

Static randomPointInUnitCircle

  • Returns random vector positioned on a unit circle.

    Returns YVector3

Static randomPointInUnitSphere

  • Returns random vector positioned inside a unit sphere.

    Returns YVector3

Static randomPointOnUnitSphere

  • Returns random vector positioned on a unit sphere.

    Returns YVector3

Static randomRotation

  • Returns random rotation vector.

    Returns YVector3

Static rotateRotation

  • Allows to transform rotation vector by specified rotation.

    Parameters

    Returns YVector3

Static rotateVector

Static rotationAngle

  • Returns the angle in degrees between two rotation vectors.

    Parameters

    Returns number

Static rotationAngleAxis

  • Returns vector of angle rotation around selected axis.

    Parameters

    Returns YVector3

Static rotationTowards

  • Transforms rotation vector A towards vector B by provided angle step.

    Parameters

    Returns YVector3

Static scale

Static slerpRotation

  • Spherical interpolation between two rotation vectors by the interpolant.

    Parameters

    Returns YVector3

Generated using TypeDoc