@hytopia.com/server-protocol 1.0.68 → 1.0.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/schemas/RigidBody.ts +17 -8
package/package.json
CHANGED
package/schemas/RigidBody.ts
CHANGED
|
@@ -10,12 +10,16 @@ import type { QuaternionSchema } from './Quaternion';
|
|
|
10
10
|
|
|
11
11
|
export type RigidBodySchema = {
|
|
12
12
|
ad?: number; // angular dampening
|
|
13
|
-
|
|
13
|
+
ap?: { // additional mass properties
|
|
14
|
+
am: number; // additional mass
|
|
15
|
+
cm: VectorSchema; // center of mass
|
|
16
|
+
pf: QuaternionSchema; // principal angular inertia local frame
|
|
17
|
+
pi: VectorSchema; // principal angular inertia
|
|
18
|
+
},
|
|
14
19
|
as?: number; // additional solver iterations
|
|
15
20
|
av?: VectorSchema; // angular velocity
|
|
16
21
|
b?: number; // body type
|
|
17
22
|
c?: ColliderSchema[]; // collider desc
|
|
18
|
-
cm?: VectorSchema; // center of mass
|
|
19
23
|
d?: number; // dominance group
|
|
20
24
|
ce?: boolean; // ccd enabled
|
|
21
25
|
en?: boolean; // enabled
|
|
@@ -25,8 +29,6 @@ export type RigidBodySchema = {
|
|
|
25
29
|
g?: number; // gravity scaling
|
|
26
30
|
ld?: number; // linear damping
|
|
27
31
|
lv?: VectorSchema; // linear velocity
|
|
28
|
-
pf?: QuaternionSchema; // principal angular inertia local frame
|
|
29
|
-
pi?: VectorSchema; // principal angular inertia
|
|
30
32
|
r?: QuaternionSchema; // rotation
|
|
31
33
|
rm?: boolean; // removed
|
|
32
34
|
sl?: boolean; // sleeping
|
|
@@ -38,12 +40,21 @@ export const rigidBodySchema: JSONSchemaType<RigidBodySchema> = {
|
|
|
38
40
|
type: 'object',
|
|
39
41
|
properties: {
|
|
40
42
|
ad: { type: 'number', nullable: true },
|
|
41
|
-
am: {
|
|
43
|
+
am: {
|
|
44
|
+
type: 'object',
|
|
45
|
+
properties: {
|
|
46
|
+
am: { type: 'number' },
|
|
47
|
+
cm: { ...vectorSchema },
|
|
48
|
+
pf: { ...quaternionSchema },
|
|
49
|
+
pi: { ...vectorSchema },
|
|
50
|
+
},
|
|
51
|
+
required: ['am', 'cm', 'pf', 'pi'],
|
|
52
|
+
nullable: true,
|
|
53
|
+
},
|
|
42
54
|
as: { type: 'number', nullable: true },
|
|
43
55
|
av: { ...vectorSchema, nullable: true },
|
|
44
56
|
b: { type: 'number', nullable: true },
|
|
45
57
|
c: { type: 'array', items: colliderSchema, nullable: true },
|
|
46
|
-
cm: { ...vectorSchema, nullable: true },
|
|
47
58
|
d: { type: 'number', nullable: true },
|
|
48
59
|
ce: { type: 'boolean', nullable: true },
|
|
49
60
|
en: { type: 'boolean', nullable: true },
|
|
@@ -53,8 +64,6 @@ export const rigidBodySchema: JSONSchemaType<RigidBodySchema> = {
|
|
|
53
64
|
g: { type: 'number', nullable: true },
|
|
54
65
|
ld: { type: 'number', nullable: true },
|
|
55
66
|
lv: { ...vectorSchema, nullable: true },
|
|
56
|
-
pf: { ...quaternionSchema, nullable: true },
|
|
57
|
-
pi: { ...vectorSchema, nullable: true },
|
|
58
67
|
r: { ...quaternionSchema, nullable: true },
|
|
59
68
|
rm: { type: 'boolean', nullable: true },
|
|
60
69
|
sl: { type: 'boolean', nullable: true },
|