@hytopia.com/server-protocol 1.0.40 → 1.0.42
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 +8 -0
package/package.json
CHANGED
package/schemas/RigidBody.ts
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { colliderSchema } from './Collider';
|
|
2
|
+
import { quaternionSchema } from './Quaternion';
|
|
2
3
|
import { vectorSchema } from './Vector';
|
|
3
4
|
import { vectorBooleanSchema } from './VectorBoolean'
|
|
4
5
|
import type { JSONSchemaType } from 'ajv';
|
|
5
6
|
import type { ColliderSchema } from './Collider';
|
|
6
7
|
import type { VectorSchema } from './Vector';
|
|
7
8
|
import type { VectorBooleanSchema } from './VectorBoolean';
|
|
9
|
+
import { QuaternionSchema } from './Quaternion';
|
|
8
10
|
|
|
9
11
|
export type RigidBodySchema = {
|
|
10
12
|
ad?: number; // angular dampening
|
|
13
|
+
am?: number; // additional mass
|
|
14
|
+
as?: number; // additional solver iterations
|
|
11
15
|
av?: VectorSchema; // angular velocity
|
|
12
16
|
b?: number; // body type
|
|
13
17
|
c?: ColliderSchema[]; // collider desc
|
|
@@ -19,6 +23,7 @@ export type RigidBodySchema = {
|
|
|
19
23
|
g?: number; // gravity scaling
|
|
20
24
|
ld?: number; // linear damping
|
|
21
25
|
lv?: VectorSchema; // linear velocity
|
|
26
|
+
r?: QuaternionSchema; // rotation
|
|
22
27
|
sl?: boolean; // sleeping
|
|
23
28
|
scp?: number; // soft ccd prediction
|
|
24
29
|
t?: VectorSchema; // translation
|
|
@@ -28,6 +33,8 @@ export const rigidBodySchema: JSONSchemaType<RigidBodySchema> = {
|
|
|
28
33
|
type: 'object',
|
|
29
34
|
properties: {
|
|
30
35
|
ad: { type: 'number', nullable: true },
|
|
36
|
+
am: { type: 'number', nullable: true },
|
|
37
|
+
as: { type: 'number', nullable: true },
|
|
31
38
|
av: { ...vectorSchema, nullable: true },
|
|
32
39
|
b: { type: 'number', nullable: true },
|
|
33
40
|
c: { type: 'array', items: colliderSchema, nullable: true },
|
|
@@ -39,6 +46,7 @@ export const rigidBodySchema: JSONSchemaType<RigidBodySchema> = {
|
|
|
39
46
|
g: { type: 'number', nullable: true },
|
|
40
47
|
ld: { type: 'number', nullable: true },
|
|
41
48
|
lv: { ...vectorSchema, nullable: true },
|
|
49
|
+
r: { ...quaternionSchema, nullable: true },
|
|
42
50
|
sl: { type: 'boolean', nullable: true },
|
|
43
51
|
scp: { type: 'number', nullable: true },
|
|
44
52
|
t: { ...vectorSchema, nullable: true },
|