@moderrkowo/jsgl
Version:
Client-side JavaScript library for creating web 2D games. Focusing at objective game.
36 lines (35 loc) • 925 B
TypeScript
export declare enum RotationType {
DEGREES = "DEGREES",
RADIANS = "RADIANS"
}
export type RotationValue = {
type: RotationType;
value: number;
};
export declare class Rotation {
/**
* Stored rotation in degrees
*/
private _value;
constructor(rotation?: RotationValue);
static get right(): Rotation;
static get down(): Rotation;
static get left(): Rotation;
static get up(): Rotation;
set angles(radians: number);
get angles(): number;
set eulerAngles(degrees: number);
get eulerAngles(): number;
/**
* Converts degrees to radians.
* @param degrees The degrees
* @returns The radians
*/
static ToRadians(degrees: number): number;
/**
* Converts radians to degrees.
* @param radians The radians
* @returns The degrees
*/
static ToDegrees(radians: number): number;
}