init
This commit is contained in:
54
structs/v3.d.ts
vendored
Normal file
54
structs/v3.d.ts
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* a 3x1 matrix
|
||||
*
|
||||
* @privateRemarks
|
||||
*
|
||||
* example directly translated from the api docs and is untested
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* let player_id = player.player_id(),
|
||||
* player_ped = player.get_player_ped(player_id),
|
||||
* pos = player.get_player_coords(player_id),
|
||||
* rot = entity.get_entity_rotation(player_ped),
|
||||
* dir = rot
|
||||
*
|
||||
* dir.transformRotToDir()
|
||||
* dir *= 4
|
||||
* pos += dir
|
||||
*
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare class v3 {
|
||||
|
||||
readonly x: float;
|
||||
readonly y: float;
|
||||
readonly z: float;
|
||||
|
||||
/**
|
||||
* **instanciating this class with `new` will break the lua**
|
||||
* @deprecated
|
||||
*/
|
||||
constructor(x: float, y: float, z: float);
|
||||
|
||||
public __add(val: v2|v3|float): v3;
|
||||
public __sub(val: v2|v3|float): v3;
|
||||
public __mul(val: v2|v3|float): v3;
|
||||
public __div(val: v2|v3|float): v3;
|
||||
public __eq(val: v2): boolean;
|
||||
public __lt(val: v2): boolean;
|
||||
public __le(val: v2): boolean;
|
||||
public __tostring(): string
|
||||
|
||||
public magnitude(val: v3|null): float;
|
||||
public transformRotToDir(): void;
|
||||
public radToDeg(): void;
|
||||
public degToRad(): void;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @noSelf
|
||||
*/
|
||||
declare function v3(x: float, y: float, z: float): v3
|
||||
Reference in New Issue
Block a user