hytopia 0.1.52 → 0.1.53
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/docs/server.blocktype.md +1 -1
- package/docs/server.contactforcedata.md +18 -0
- package/docs/server.contactmanifold.md +19 -0
- package/docs/server.entity.md +2 -2
- package/docs/server.md +42 -0
- package/docs/server.raycasthit.md +17 -0
- package/docs/server.raycastoptions.md +20 -0
- package/docs/server.simulation.getcontactmanifolds.md +1 -1
- package/docs/server.simulation.raycast.md +2 -2
- package/examples/payload-game/assets/ui/index.html +2 -2
- package/package.json +1 -1
- package/server.api.json +218 -6
- package/server.d.ts +4 -4
package/docs/server.blocktype.md
CHANGED
@@ -202,7 +202,7 @@ _(Optional)_ A callback function that is invoked when an entity collides with bl
|
|
202
202
|
|
203
203
|
</td><td>
|
204
204
|
|
205
|
-
(blockType: [BlockType](./server.blocktype.md)<!-- -->, entity: [Entity](./server.entity.md)<!-- -->, contactForceData: ContactForceData) => void
|
205
|
+
(blockType: [BlockType](./server.blocktype.md)<!-- -->, entity: [Entity](./server.entity.md)<!-- -->, contactForceData: [ContactForceData](./server.contactforcedata.md)<!-- -->) => void
|
206
206
|
|
207
207
|
|
208
208
|
</td><td>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [ContactForceData](./server.contactforcedata.md)
|
4
|
+
|
5
|
+
## ContactForceData type
|
6
|
+
|
7
|
+
Data for contact forces.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
export type ContactForceData = {
|
13
|
+
totalForce: RAPIER.Vector;
|
14
|
+
totalForceMagnitude: number;
|
15
|
+
maxForceDirection: RAPIER.Vector;
|
16
|
+
maxForceMagnitude: number;
|
17
|
+
};
|
18
|
+
```
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [ContactManifold](./server.contactmanifold.md)
|
4
|
+
|
5
|
+
## ContactManifold type
|
6
|
+
|
7
|
+
A contact manifold.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
export type ContactManifold = {
|
13
|
+
localNormalA: Vector3Like;
|
14
|
+
localNormalB: Vector3Like;
|
15
|
+
normal: Vector3Like;
|
16
|
+
};
|
17
|
+
```
|
18
|
+
**References:** [Vector3Like](./server.vector3like.md)
|
19
|
+
|
package/docs/server.entity.md
CHANGED
@@ -402,7 +402,7 @@ _(Optional)_ A function that is called when the entity collides with a block.
|
|
402
402
|
|
403
403
|
</td><td>
|
404
404
|
|
405
|
-
(entity: [Entity](./server.entity.md)<!-- -->, blockType: [BlockType](./server.blocktype.md)<!-- -->, contactForceData: ContactForceData) => void
|
405
|
+
(entity: [Entity](./server.entity.md)<!-- -->, blockType: [BlockType](./server.blocktype.md)<!-- -->, contactForceData: [ContactForceData](./server.contactforcedata.md)<!-- -->) => void
|
406
406
|
|
407
407
|
|
408
408
|
</td><td>
|
@@ -459,7 +459,7 @@ _(Optional)_ A function that is called when the entity collides with another ent
|
|
459
459
|
|
460
460
|
</td><td>
|
461
461
|
|
462
|
-
(entity: [Entity](./server.entity.md)<!-- -->, otherEntity: [Entity](./server.entity.md)<!-- -->, contactForceData: ContactForceData) => void
|
462
|
+
(entity: [Entity](./server.entity.md)<!-- -->, otherEntity: [Entity](./server.entity.md)<!-- -->, contactForceData: [ContactForceData](./server.contactforcedata.md)<!-- -->) => void
|
463
463
|
|
464
464
|
|
465
465
|
</td><td>
|
package/docs/server.md
CHANGED
@@ -955,6 +955,28 @@ A set of collision groups.
|
|
955
955
|
A callback function for a chat command.
|
956
956
|
|
957
957
|
|
958
|
+
</td></tr>
|
959
|
+
<tr><td>
|
960
|
+
|
961
|
+
[ContactForceData](./server.contactforcedata.md)
|
962
|
+
|
963
|
+
|
964
|
+
</td><td>
|
965
|
+
|
966
|
+
Data for contact forces.
|
967
|
+
|
968
|
+
|
969
|
+
</td></tr>
|
970
|
+
<tr><td>
|
971
|
+
|
972
|
+
[ContactManifold](./server.contactmanifold.md)
|
973
|
+
|
974
|
+
|
975
|
+
</td><td>
|
976
|
+
|
977
|
+
A contact manifold.
|
978
|
+
|
979
|
+
|
958
980
|
</td></tr>
|
959
981
|
<tr><td>
|
960
982
|
|
@@ -1065,6 +1087,26 @@ The input state of a Player; keys from SUPPORTED\_INPUT\_KEYS.
|
|
1065
1087
|
A raw set of collision groups represented as a 32-bit number.
|
1066
1088
|
|
1067
1089
|
|
1090
|
+
</td></tr>
|
1091
|
+
<tr><td>
|
1092
|
+
|
1093
|
+
[RaycastHit](./server.raycasthit.md)
|
1094
|
+
|
1095
|
+
|
1096
|
+
</td><td>
|
1097
|
+
|
1098
|
+
|
1099
|
+
</td></tr>
|
1100
|
+
<tr><td>
|
1101
|
+
|
1102
|
+
[RaycastOptions](./server.raycastoptions.md)
|
1103
|
+
|
1104
|
+
|
1105
|
+
</td><td>
|
1106
|
+
|
1107
|
+
Options for raycasting.
|
1108
|
+
|
1109
|
+
|
1068
1110
|
</td></tr>
|
1069
1111
|
<tr><td>
|
1070
1112
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [RaycastHit](./server.raycasthit.md)
|
4
|
+
|
5
|
+
## RaycastHit type
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
export type RaycastHit = {
|
11
|
+
hitObject: Block | Entity;
|
12
|
+
hitPoint: Vector3Like;
|
13
|
+
hitDistance: number;
|
14
|
+
};
|
15
|
+
```
|
16
|
+
**References:** [Block](./server.block.md)<!-- -->, [Entity](./server.entity.md)<!-- -->, [Vector3Like](./server.vector3like.md)
|
17
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [RaycastOptions](./server.raycastoptions.md)
|
4
|
+
|
5
|
+
## RaycastOptions type
|
6
|
+
|
7
|
+
Options for raycasting.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
export type RaycastOptions = {
|
13
|
+
ignoresSensors?: boolean;
|
14
|
+
filterFlags?: RAPIER.QueryFilterFlags;
|
15
|
+
filterGroups?: number;
|
16
|
+
filterExcludeCollider?: RAPIER.Collider;
|
17
|
+
filterExcludeRigidBody?: RAPIER.RigidBody;
|
18
|
+
filterPredicate?: (collider: RAPIER.Collider) => boolean;
|
19
|
+
};
|
20
|
+
```
|
@@ -85,7 +85,7 @@ options
|
|
85
85
|
|
86
86
|
</td><td>
|
87
87
|
|
88
|
-
RaycastOptions
|
88
|
+
[RaycastOptions](./server.raycastoptions.md)
|
89
89
|
|
90
90
|
|
91
91
|
</td><td>
|
@@ -97,7 +97,7 @@ _(Optional)_ The options for the raycast.
|
|
97
97
|
</tbody></table>
|
98
98
|
**Returns:**
|
99
99
|
|
100
|
-
RaycastHit \| null
|
100
|
+
[RaycastHit](./server.raycasthit.md) \| null
|
101
101
|
|
102
102
|
A RaycastHit object containing the first block or entity hit by the ray, or null if no hit.
|
103
103
|
|
package/package.json
CHANGED
package/server.api.json
CHANGED
@@ -3324,7 +3324,7 @@
|
|
3324
3324
|
{
|
3325
3325
|
"kind": "Reference",
|
3326
3326
|
"text": "ContactForceData",
|
3327
|
-
"canonicalReference": "server
|
3327
|
+
"canonicalReference": "server!ContactForceData:type"
|
3328
3328
|
},
|
3329
3329
|
{
|
3330
3330
|
"kind": "Content",
|
@@ -8434,6 +8434,103 @@
|
|
8434
8434
|
"endIndex": 4
|
8435
8435
|
}
|
8436
8436
|
},
|
8437
|
+
{
|
8438
|
+
"kind": "TypeAlias",
|
8439
|
+
"canonicalReference": "server!ContactForceData:type",
|
8440
|
+
"docComment": "/**\n * Data for contact forces.\n *\n * @public\n */\n",
|
8441
|
+
"excerptTokens": [
|
8442
|
+
{
|
8443
|
+
"kind": "Content",
|
8444
|
+
"text": "export type ContactForceData = "
|
8445
|
+
},
|
8446
|
+
{
|
8447
|
+
"kind": "Content",
|
8448
|
+
"text": "{\n totalForce: "
|
8449
|
+
},
|
8450
|
+
{
|
8451
|
+
"kind": "Reference",
|
8452
|
+
"text": "RAPIER.Vector",
|
8453
|
+
"canonicalReference": "@dimforge/rapier3d-compat!Vector:interface"
|
8454
|
+
},
|
8455
|
+
{
|
8456
|
+
"kind": "Content",
|
8457
|
+
"text": ";\n totalForceMagnitude: number;\n maxForceDirection: "
|
8458
|
+
},
|
8459
|
+
{
|
8460
|
+
"kind": "Reference",
|
8461
|
+
"text": "RAPIER.Vector",
|
8462
|
+
"canonicalReference": "@dimforge/rapier3d-compat!Vector:interface"
|
8463
|
+
},
|
8464
|
+
{
|
8465
|
+
"kind": "Content",
|
8466
|
+
"text": ";\n maxForceMagnitude: number;\n}"
|
8467
|
+
},
|
8468
|
+
{
|
8469
|
+
"kind": "Content",
|
8470
|
+
"text": ";"
|
8471
|
+
}
|
8472
|
+
],
|
8473
|
+
"fileUrlPath": "src/world/physics/Simulation.ts",
|
8474
|
+
"releaseTag": "Public",
|
8475
|
+
"name": "ContactForceData",
|
8476
|
+
"typeTokenRange": {
|
8477
|
+
"startIndex": 1,
|
8478
|
+
"endIndex": 6
|
8479
|
+
}
|
8480
|
+
},
|
8481
|
+
{
|
8482
|
+
"kind": "TypeAlias",
|
8483
|
+
"canonicalReference": "server!ContactManifold:type",
|
8484
|
+
"docComment": "/**\n * A contact manifold.\n *\n * @public\n */\n",
|
8485
|
+
"excerptTokens": [
|
8486
|
+
{
|
8487
|
+
"kind": "Content",
|
8488
|
+
"text": "export type ContactManifold = "
|
8489
|
+
},
|
8490
|
+
{
|
8491
|
+
"kind": "Content",
|
8492
|
+
"text": "{\n localNormalA: "
|
8493
|
+
},
|
8494
|
+
{
|
8495
|
+
"kind": "Reference",
|
8496
|
+
"text": "Vector3Like",
|
8497
|
+
"canonicalReference": "server!Vector3Like:interface"
|
8498
|
+
},
|
8499
|
+
{
|
8500
|
+
"kind": "Content",
|
8501
|
+
"text": ";\n localNormalB: "
|
8502
|
+
},
|
8503
|
+
{
|
8504
|
+
"kind": "Reference",
|
8505
|
+
"text": "Vector3Like",
|
8506
|
+
"canonicalReference": "server!Vector3Like:interface"
|
8507
|
+
},
|
8508
|
+
{
|
8509
|
+
"kind": "Content",
|
8510
|
+
"text": ";\n normal: "
|
8511
|
+
},
|
8512
|
+
{
|
8513
|
+
"kind": "Reference",
|
8514
|
+
"text": "Vector3Like",
|
8515
|
+
"canonicalReference": "server!Vector3Like:interface"
|
8516
|
+
},
|
8517
|
+
{
|
8518
|
+
"kind": "Content",
|
8519
|
+
"text": ";\n}"
|
8520
|
+
},
|
8521
|
+
{
|
8522
|
+
"kind": "Content",
|
8523
|
+
"text": ";"
|
8524
|
+
}
|
8525
|
+
],
|
8526
|
+
"fileUrlPath": "src/world/physics/Simulation.ts",
|
8527
|
+
"releaseTag": "Public",
|
8528
|
+
"name": "ContactManifold",
|
8529
|
+
"typeTokenRange": {
|
8530
|
+
"startIndex": 1,
|
8531
|
+
"endIndex": 8
|
8532
|
+
}
|
8533
|
+
},
|
8437
8534
|
{
|
8438
8535
|
"kind": "TypeAlias",
|
8439
8536
|
"canonicalReference": "server!DecodedCollisionGroups:type",
|
@@ -9812,7 +9909,7 @@
|
|
9812
9909
|
{
|
9813
9910
|
"kind": "Reference",
|
9814
9911
|
"text": "ContactForceData",
|
9815
|
-
"canonicalReference": "server
|
9912
|
+
"canonicalReference": "server!ContactForceData:type"
|
9816
9913
|
},
|
9817
9914
|
{
|
9818
9915
|
"kind": "Content",
|
@@ -9974,7 +10071,7 @@
|
|
9974
10071
|
{
|
9975
10072
|
"kind": "Reference",
|
9976
10073
|
"text": "ContactForceData",
|
9977
|
-
"canonicalReference": "server
|
10074
|
+
"canonicalReference": "server!ContactForceData:type"
|
9978
10075
|
},
|
9979
10076
|
{
|
9980
10077
|
"kind": "Content",
|
@@ -18583,6 +18680,121 @@
|
|
18583
18680
|
"endIndex": 2
|
18584
18681
|
}
|
18585
18682
|
},
|
18683
|
+
{
|
18684
|
+
"kind": "TypeAlias",
|
18685
|
+
"canonicalReference": "server!RaycastHit:type",
|
18686
|
+
"docComment": "",
|
18687
|
+
"excerptTokens": [
|
18688
|
+
{
|
18689
|
+
"kind": "Content",
|
18690
|
+
"text": "export type RaycastHit = "
|
18691
|
+
},
|
18692
|
+
{
|
18693
|
+
"kind": "Content",
|
18694
|
+
"text": "{\n hitObject: "
|
18695
|
+
},
|
18696
|
+
{
|
18697
|
+
"kind": "Reference",
|
18698
|
+
"text": "Block",
|
18699
|
+
"canonicalReference": "server!Block:class"
|
18700
|
+
},
|
18701
|
+
{
|
18702
|
+
"kind": "Content",
|
18703
|
+
"text": " | "
|
18704
|
+
},
|
18705
|
+
{
|
18706
|
+
"kind": "Reference",
|
18707
|
+
"text": "Entity",
|
18708
|
+
"canonicalReference": "server!Entity:class"
|
18709
|
+
},
|
18710
|
+
{
|
18711
|
+
"kind": "Content",
|
18712
|
+
"text": ";\n hitPoint: "
|
18713
|
+
},
|
18714
|
+
{
|
18715
|
+
"kind": "Reference",
|
18716
|
+
"text": "Vector3Like",
|
18717
|
+
"canonicalReference": "server!Vector3Like:interface"
|
18718
|
+
},
|
18719
|
+
{
|
18720
|
+
"kind": "Content",
|
18721
|
+
"text": ";\n hitDistance: number;\n}"
|
18722
|
+
},
|
18723
|
+
{
|
18724
|
+
"kind": "Content",
|
18725
|
+
"text": ";"
|
18726
|
+
}
|
18727
|
+
],
|
18728
|
+
"fileUrlPath": "src/world/physics/Simulation.ts",
|
18729
|
+
"releaseTag": "Public",
|
18730
|
+
"name": "RaycastHit",
|
18731
|
+
"typeTokenRange": {
|
18732
|
+
"startIndex": 1,
|
18733
|
+
"endIndex": 8
|
18734
|
+
}
|
18735
|
+
},
|
18736
|
+
{
|
18737
|
+
"kind": "TypeAlias",
|
18738
|
+
"canonicalReference": "server!RaycastOptions:type",
|
18739
|
+
"docComment": "/**\n * Options for raycasting.\n *\n * @public\n */\n",
|
18740
|
+
"excerptTokens": [
|
18741
|
+
{
|
18742
|
+
"kind": "Content",
|
18743
|
+
"text": "export type RaycastOptions = "
|
18744
|
+
},
|
18745
|
+
{
|
18746
|
+
"kind": "Content",
|
18747
|
+
"text": "{\n ignoresSensors?: boolean;\n filterFlags?: "
|
18748
|
+
},
|
18749
|
+
{
|
18750
|
+
"kind": "Reference",
|
18751
|
+
"text": "RAPIER.QueryFilterFlags",
|
18752
|
+
"canonicalReference": "@dimforge/rapier3d-compat!QueryFilterFlags:enum"
|
18753
|
+
},
|
18754
|
+
{
|
18755
|
+
"kind": "Content",
|
18756
|
+
"text": ";\n filterGroups?: number;\n filterExcludeCollider?: "
|
18757
|
+
},
|
18758
|
+
{
|
18759
|
+
"kind": "Reference",
|
18760
|
+
"text": "RAPIER.Collider",
|
18761
|
+
"canonicalReference": "@dimforge/rapier3d-compat!Collider:class"
|
18762
|
+
},
|
18763
|
+
{
|
18764
|
+
"kind": "Content",
|
18765
|
+
"text": ";\n filterExcludeRigidBody?: "
|
18766
|
+
},
|
18767
|
+
{
|
18768
|
+
"kind": "Reference",
|
18769
|
+
"text": "RAPIER.RigidBody",
|
18770
|
+
"canonicalReference": "@dimforge/rapier3d-compat!RigidBody:class"
|
18771
|
+
},
|
18772
|
+
{
|
18773
|
+
"kind": "Content",
|
18774
|
+
"text": ";\n filterPredicate?: (collider: "
|
18775
|
+
},
|
18776
|
+
{
|
18777
|
+
"kind": "Reference",
|
18778
|
+
"text": "RAPIER.Collider",
|
18779
|
+
"canonicalReference": "@dimforge/rapier3d-compat!Collider:class"
|
18780
|
+
},
|
18781
|
+
{
|
18782
|
+
"kind": "Content",
|
18783
|
+
"text": ") => boolean;\n}"
|
18784
|
+
},
|
18785
|
+
{
|
18786
|
+
"kind": "Content",
|
18787
|
+
"text": ";"
|
18788
|
+
}
|
18789
|
+
],
|
18790
|
+
"fileUrlPath": "src/world/physics/Simulation.ts",
|
18791
|
+
"releaseTag": "Public",
|
18792
|
+
"name": "RaycastOptions",
|
18793
|
+
"typeTokenRange": {
|
18794
|
+
"startIndex": 1,
|
18795
|
+
"endIndex": 10
|
18796
|
+
}
|
18797
|
+
},
|
18586
18798
|
{
|
18587
18799
|
"kind": "Interface",
|
18588
18800
|
"canonicalReference": "server!RgbColor:interface",
|
@@ -22811,7 +23023,7 @@
|
|
22811
23023
|
{
|
22812
23024
|
"kind": "Reference",
|
22813
23025
|
"text": "ContactManifold",
|
22814
|
-
"canonicalReference": "server
|
23026
|
+
"canonicalReference": "server!ContactManifold:type"
|
22815
23027
|
},
|
22816
23028
|
{
|
22817
23029
|
"kind": "Content",
|
@@ -22981,7 +23193,7 @@
|
|
22981
23193
|
{
|
22982
23194
|
"kind": "Reference",
|
22983
23195
|
"text": "RaycastOptions",
|
22984
|
-
"canonicalReference": "server
|
23196
|
+
"canonicalReference": "server!RaycastOptions:type"
|
22985
23197
|
},
|
22986
23198
|
{
|
22987
23199
|
"kind": "Content",
|
@@ -22990,7 +23202,7 @@
|
|
22990
23202
|
{
|
22991
23203
|
"kind": "Reference",
|
22992
23204
|
"text": "RaycastHit",
|
22993
|
-
"canonicalReference": "server
|
23205
|
+
"canonicalReference": "server!RaycastHit:type"
|
22994
23206
|
},
|
22995
23207
|
{
|
22996
23208
|
"kind": "Content",
|
package/server.d.ts
CHANGED
@@ -1121,7 +1121,7 @@ export declare class CollisionGroupsBuilder {
|
|
1121
1121
|
export declare type CommandCallback = (player: Player, args: string[], message: string) => void;
|
1122
1122
|
|
1123
1123
|
/** Data for contact forces. @public */
|
1124
|
-
declare type ContactForceData = {
|
1124
|
+
export declare type ContactForceData = {
|
1125
1125
|
/** The total force vector. */
|
1126
1126
|
totalForce: RAPIER.Vector;
|
1127
1127
|
/** The magnitude of the total force. */
|
@@ -1133,7 +1133,7 @@ declare type ContactForceData = {
|
|
1133
1133
|
};
|
1134
1134
|
|
1135
1135
|
/** A contact manifold. @public */
|
1136
|
-
declare type ContactManifold = {
|
1136
|
+
export declare type ContactManifold = {
|
1137
1137
|
/** The local normal vector of the first collider. */
|
1138
1138
|
localNormalA: Vector3Like;
|
1139
1139
|
/** The local normal vector of the second collider. */
|
@@ -2433,7 +2433,7 @@ export declare interface QuaternionLike {
|
|
2433
2433
|
/** A raw set of collision groups represented as a 32-bit number. @public */
|
2434
2434
|
export declare type RawCollisionGroups = RAPIER.InteractionGroups;
|
2435
2435
|
|
2436
|
-
declare type RaycastHit = {
|
2436
|
+
export declare type RaycastHit = {
|
2437
2437
|
/** The block or entity the raycast hit. */
|
2438
2438
|
hitObject: Block | Entity;
|
2439
2439
|
/** The point in global coordinate space the raycast hit the object. */
|
@@ -2443,7 +2443,7 @@ declare type RaycastHit = {
|
|
2443
2443
|
};
|
2444
2444
|
|
2445
2445
|
/** Options for raycasting. @public */
|
2446
|
-
declare type RaycastOptions = {
|
2446
|
+
export declare type RaycastOptions = {
|
2447
2447
|
/** Whether to ignore sensor colliders. */
|
2448
2448
|
ignoresSensors?: boolean;
|
2449
2449
|
/** The query filter flags. */
|