Class Vector3

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(x: number, y: number, z: number): Vector3

Parameters

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

Returns

Vector3

Properties

public pitch: number

public roll: number

public x: number

public y: number

public yaw: number

public z: number

Methods

public angleTo(other: Vector3): number

Parameters

Returns

number

public static backward(): Vector3

Returns

Vector3

public cross(other: Vector3): Vector3

Parameters

Returns

Vector3

public distanceTo(other: Vector3): number

Parameters

Returns

number

public divide(scalar: number): Vector3

Parameters

  • scalar: number

Returns

Vector3

public divideAssign(scalar: number): Vector3

Parameters

  • scalar: number

Returns

Vector3

public dot(other: Vector3): number

Parameters

Returns

number

public static down(): Vector3

Returns

Vector3

public static forward(): Vector3

Returns

Vector3

public static invalid(): Vector3

Returns

Vector3

public isEqualTo(other: Vector3): boolean

Parameters

Returns

boolean

public isValid(): boolean

Returns

boolean

public static left(): Vector3

Returns

Vector3

public magnitude(): number

Returns

number

public magnitudeSquared(): number

Returns

number

public minus(other: Vector3): Vector3

Parameters

Returns

Vector3

public minusAssign(other: Vector3): Vector3

Parameters

Returns

Vector3

public multiply(scalar: number): Vector3

Parameters

  • scalar: number

Returns

Vector3

public multiplyAssign(scalar: number): Vector3

Parameters

  • scalar: number

Returns

Vector3

public normalized(): Vector3

Returns

Vector3

public opposite(): Vector3

Returns

Vector3

public plus(other: Vector3): Vector3

Parameters

Returns

Vector3

public plusAssign(other: Vector3): Vector3

Parameters

Returns

Vector3

public static right(): Vector3

Returns

Vector3

public toString(): string

Returns

string

public static up(): Vector3

Returns

Vector3

public static xAxis(): Vector3

Returns

Vector3

public static yAxis(): Vector3

Returns

Vector3

public static zAxis(): Vector3

Returns

Vector3

public static zero(): Vector3

Returns

Vector3