-
Notifications
You must be signed in to change notification settings - Fork 21
/
constants.js
82 lines (82 loc) · 1.81 KB
/
constants.js
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
module.exports = {
GRAVITY: -9.8,
MAX_INTERVAL: 4 / 60,
ITERATIONS: 10,
SIMULATION_RATE: 8.333, // 8.333ms / 120hz
ACTIVATION_STATE: {
ACTIVE_TAG: "active",
ISLAND_SLEEPING: "islandSleeping",
WANTS_DEACTIVATION: "wantsDeactivation",
DISABLE_DEACTIVATION: "disableDeactivation",
DISABLE_SIMULATION: "disableSimulation"
},
COLLISION_FLAG: {
STATIC_OBJECT: 1,
KINEMATIC_OBJECT: 2,
NO_CONTACT_RESPONSE: 4,
CUSTOM_MATERIAL_CALLBACK: 8, //this allows per-triangle material (friction/restitution)
CHARACTER_OBJECT: 16,
DISABLE_VISUALIZE_OBJECT: 32, //disable debug drawing
DISABLE_SPU_COLLISION_PROCESSING: 64 //disable parallel/SPU processing
},
TYPE: {
STATIC: "static",
DYNAMIC: "dynamic",
KINEMATIC: "kinematic"
},
SHAPE: {
BOX: "box",
CYLINDER: "cylinder",
SPHERE: "sphere",
CAPSULE: "capsule",
CONE: "cone",
HULL: "hull",
HACD: "hacd",
VHACD: "vhacd",
MESH: "mesh",
HEIGHTFIELD: "heightfield"
},
FIT: {
ALL: "all",
MANUAL: "manual"
},
CONSTRAINT: {
LOCK: "lock",
FIXED: "fixed",
SPRING: "spring",
SLIDER: "slider",
HINGE: "hinge",
CONE_TWIST: "coneTwist",
POINT_TO_POINT: "pointToPoint"
},
MESSAGE_TYPES: {
INIT: 0,
READY: 1,
ADD_BODY: 2,
BODY_READY: 3,
UPDATE_BODY: 4,
REMOVE_BODY: 5,
ADD_SHAPES: 6,
REMOVE_SHAPES: 7,
ADD_CONSTRAINT: 8,
REMOVE_CONSTRAINT: 9,
ENABLE_DEBUG: 10,
RESET_DYNAMIC_BODY: 11,
ACTIVATE_BODY: 12,
TRANSFER_DATA: 13
},
BUFFER_CONFIG: {
HEADER_LENGTH: 2,
MAX_BODIES: 10000,
MATRIX_OFFSET: 0,
LINEAR_VELOCITY_OFFSET: 16,
ANGULAR_VELOCITY_OFFSET: 17,
COLLISIONS_OFFSET: 18,
BODY_DATA_SIZE: 26
},
BUFFER_STATE: {
UNINITIALIZED: 0,
READY: 1,
CONSUMED: 2
}
};