-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy pathindex.d.ts
46 lines (37 loc) · 1.17 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import * as CANNON from 'cannon';
import * as THREE from 'three';
declare class MeshWithBody extends THREE.Mesh {
body: CANNON.Body;
}
declare interface DiceValuePair {
dice: DiceObject;
value: number;
}
declare class DiceManagerClass {
world: CANNON.World;
diceBodyMaterial: CANNON.Material;
floorBodyMaterial: CANNON.Material;
barrierBodyMaterial: CANNON.Material;
setWorld(world: CANNON.World): void;
prepareValues(diceValues: DiceValuePair[]): void;
}
declare interface DiceOptions {
size?: number;
fontColor?: string | number;
backColor?: string | number;
}
declare class DiceObject {
constructor(options: DiceOptions);
getObject(): MeshWithBody;
updateMeshFromBody(): void;
updateBodyFromMesh(): void;
isFinished(): boolean;
getUpsideValue(): number;
}
export declare class DiceD4 extends DiceObject { }
export declare class DiceD6 extends DiceObject { }
export declare class DiceD8 extends DiceObject { }
export declare class DiceD10 extends DiceObject { }
export declare class DiceD12 extends DiceObject { }
export declare class DiceD20 extends DiceObject { }
export declare const DiceManager: DiceManagerClass;