Class Vector3
Package: @altmp/altv-types
Syntax
Constructors
|
Improve this Doc
View Source
Vector3(number, number, number)
Declaration
Vector3(x: number, y: number, z: number): Vector3
Parameters
Type |
Name |
Description |
number |
x |
|
number |
y |
|
number |
z |
|
|
Improve this Doc
View Source
Vector3([number | number | number])
Declaration
Vector3(arr: [number | number | number]): Vector3
Parameters
Type |
Name |
Description |
[number | number | number] |
arr |
|
|
Improve this Doc
View Source
Vector3(IVector3)
Declaration
Vector3(obj: IVector3): Vector3
Parameters
|
Improve this Doc
View Source
Vector3(number)
Declaration
Vector3(value: number): Vector3
Parameters
Type |
Name |
Description |
number |
value |
|
Properties
|
Improve this Doc
View Source
x
Declaration
public readonly x: number
Property Value
|
Improve this Doc
View Source
y
Declaration
public readonly y: number
Property Value
|
Improve this Doc
View Source
z
Declaration
public readonly z: number
Property Value
|
Improve this Doc
View Source
zero
Declaration
public readonly static zero: Vector3
Property Value
|
Improve this Doc
View Source
one
Declaration
public readonly static one: Vector3
Property Value
|
Improve this Doc
View Source
forward
Declaration
public readonly static forward: Vector3
Property Value
|
Improve this Doc
View Source
back
Declaration
public readonly static back: Vector3
Property Value
|
Improve this Doc
View Source
up
Declaration
public readonly static up: Vector3
Property Value
|
Improve this Doc
View Source
down
Declaration
public readonly static down: Vector3
Property Value
|
Improve this Doc
View Source
left
Declaration
public readonly static left: Vector3
Property Value
|
Improve this Doc
View Source
right
Declaration
public readonly static right: Vector3
Property Value
|
Improve this Doc
View Source
negativeInfinity
Declaration
public readonly static negativeInfinity: Vector3
Property Value
|
Improve this Doc
View Source
positiveInfinity
Declaration
public readonly static positiveInfinity: Vector3
Property Value
Methods
|
Improve this Doc
View Source
toArray()
Declaration
public toArray(): [number | number | number]
Returns
Type |
Description |
[number | number | number] |
|
|
Improve this Doc
View Source
toFixed(number)
Declaration
public toFixed(precision: number): Vector3
Parameters
Type |
Name |
Description |
number |
precision |
|
Returns
|
Improve this Doc
View Source
toString()
Declaration
public toString(): string
Returns
|
Improve this Doc
View Source
add(number, number, number)
Declaration
public add(x: number, y: number, z: number): Vector3
Parameters
Type |
Name |
Description |
number |
x |
|
number |
y |
|
number |
z |
|
Returns
|
Improve this Doc
View Source
add(number)
Declaration
public add(value: number): Vector3
Parameters
Type |
Name |
Description |
number |
value |
|
Returns
|
Improve this Doc
View Source
add([number | number | number])
Declaration
public add(array: [number | number | number]): Vector3
Parameters
Type |
Name |
Description |
[number | number | number] |
array |
|
Returns
|
Improve this Doc
View Source
add(IVector3)
Declaration
public add(vector: IVector3): Vector3
Parameters
Returns
|
Improve this Doc
View Source
sub(number, number, number)
Declaration
public sub(x: number, y: number, z: number): Vector3
Parameters
Type |
Name |
Description |
number |
x |
|
number |
y |
|
number |
z |
|
Returns
|
Improve this Doc
View Source
sub(number)
Declaration
public sub(value: number): Vector3
Parameters
Type |
Name |
Description |
number |
value |
|
Returns
|
Improve this Doc
View Source
sub([number | number | number])
Declaration
public sub(array: [number | number | number]): Vector3
Parameters
Type |
Name |
Description |
[number | number | number] |
array |
|
Returns
|
Improve this Doc
View Source
sub(IVector3)
Declaration
public sub(vector: IVector3): Vector3
Parameters
Returns
|
Improve this Doc
View Source
div(number, number, number)
Declaration
public div(x: number, y: number, z: number): Vector3
Parameters
Type |
Name |
Description |
number |
x |
|
number |
y |
|
number |
z |
|
Returns
|
Improve this Doc
View Source
div(number)
Declaration
public div(value: number): Vector3
Parameters
Type |
Name |
Description |
number |
value |
|
Returns
|
Improve this Doc
View Source
div([number | number | number])
Declaration
public div(array: [number | number | number]): Vector3
Parameters
Type |
Name |
Description |
[number | number | number] |
array |
|
Returns
|
Improve this Doc
View Source
div(IVector3)
Declaration
public div(vector: IVector3): Vector3
Parameters
Returns
|
Improve this Doc
View Source
dot(number, number, number)
Declaration
public dot(x: number, y: number, z: number): number
Parameters
Type |
Name |
Description |
number |
x |
|
number |
y |
|
number |
z |
|
Returns
|
Improve this Doc
View Source
dot(number)
Declaration
public dot(value: number): number
Parameters
Type |
Name |
Description |
number |
value |
|
Returns
|
Improve this Doc
View Source
dot([number | number | number])
Declaration
public dot(array: [number | number | number]): number
Parameters
Type |
Name |
Description |
[number | number | number] |
array |
|
Returns
|
Improve this Doc
View Source
dot(IVector3)
Declaration
public dot(vector: IVector3): number
Parameters
Returns
|
Improve this Doc
View Source
cross(number, number, number)
Declaration
public cross(x: number, y: number, z: number): Vector3
Parameters
Type |
Name |
Description |
number |
x |
|
number |
y |
|
number |
z |
|
Returns
|
Improve this Doc
View Source
cross(number)
Declaration
public cross(value: number): Vector3
Parameters
Type |
Name |
Description |
number |
value |
|
Returns
|
Improve this Doc
View Source
cross([number | number | number])
Declaration
public cross(array: [number | number | number]): Vector3
Parameters
Type |
Name |
Description |
[number | number | number] |
array |
|
Returns
|
Improve this Doc
View Source
cross(IVector3)
Declaration
public cross(vector: IVector3): Vector3
Parameters
Returns
|
Improve this Doc
View Source
mul(number, number, number)
Declaration
public mul(x: number, y: number, z: number): Vector3
Parameters
Type |
Name |
Description |
number |
x |
|
number |
y |
|
number |
z |
|
Returns
|
Improve this Doc
View Source
mul(number)
Declaration
public mul(value: number): Vector3
Parameters
Type |
Name |
Description |
number |
value |
|
Returns
|
Improve this Doc
View Source
mul([number | number | number])
Declaration
public mul(array: [number | number | number]): Vector3
Parameters
Type |
Name |
Description |
[number | number | number] |
array |
|
Returns
|
Improve this Doc
View Source
mul(IVector3)
Declaration
public mul(vector: IVector3): Vector3
Parameters
Returns
|
Improve this Doc
View Source
negative()
Declaration
public negative(): Vector3
Returns
|
Improve this Doc
View Source
inverse()
Declaration
public inverse(): Vector3
Returns
|
Improve this Doc
View Source
normalize()
Declaration
public normalize(): Vector3
Returns
|
Improve this Doc
View Source
distanceTo(IVector3)
Declaration
public distanceTo(vector: IVector3): number
Parameters
Returns
|
Improve this Doc
View Source
distanceToSquared(IVector3)
Declaration
public distanceToSquared(vector: IVector3): number
Parameters
Returns
|
Improve this Doc
View Source
angleTo(IVector3)
Declaration
public angleTo(vector: IVector3): number
Parameters
Returns
|
Improve this Doc
View Source
angleToDegrees(IVector3)
Declaration
public angleToDegrees(vector: IVector3): number
Parameters
Returns
|
Improve this Doc
View Source
toRadians()
Declaration
public toRadians(): Vector3
Returns
|
Improve this Doc
View Source
toDegrees()
Declaration
public toDegrees(): Vector3
Returns
|
Improve this Doc
View Source
isInRange(IVector3, number)
Declaration
public isInRange(vector: IVector3, range: number): boolean
Parameters
Type |
Name |
Description |
IVector3 |
vector |
|
number |
range |
|
Returns
|
Improve this Doc
View Source
lerp(IVector3, number)
Declaration
public lerp(vector: IVector3, ratio: number): Vector3
Parameters
Type |
Name |
Description |
IVector3 |
vector |
|
number |
ratio |
|
Returns