hytopia 0.6.8 → 0.6.10

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.
Files changed (59) hide show
  1. package/bun-server.mjs +158 -158
  2. package/docs/server.collider.md +22 -1
  3. package/docs/server.collider.rawcollider.md +1 -1
  4. package/docs/server.collider.rawshape.md +13 -0
  5. package/docs/server.defaultplayerentitycontroller.faceforwardonstop.md +13 -0
  6. package/docs/server.defaultplayerentitycontroller.md +19 -0
  7. package/docs/server.defaultplayerentitycontrolleroptions.faceforwardonstop.md +13 -0
  8. package/docs/server.defaultplayerentitycontrolleroptions.md +19 -0
  9. package/docs/server.dynamicrigidbodyoptions.md +1 -3
  10. package/docs/server.dynamicrigidbodyoptions.type.md +1 -1
  11. package/docs/server.entity.md +35 -0
  12. package/docs/server.entity.modelshownnodes.md +13 -0
  13. package/docs/server.entity.setmodelshownnodes.md +53 -0
  14. package/docs/server.entityevent.md +14 -0
  15. package/docs/server.entityeventpayloads._entity.set_model_hidden_nodes_.md +1 -1
  16. package/docs/server.entityeventpayloads._entity.set_model_shown_nodes_.md +16 -0
  17. package/docs/server.entityeventpayloads.md +20 -1
  18. package/docs/server.eventrouter.emit_1.md +63 -0
  19. package/docs/server.eventrouter.emitwithglobal_1.md +63 -0
  20. package/docs/server.eventrouter.emitwithworld_1.md +77 -0
  21. package/docs/server.eventrouter.final_1.md +63 -0
  22. package/docs/server.eventrouter.globalinstance.md +13 -0
  23. package/docs/server.eventrouter.haslisteners.md +2 -2
  24. package/docs/server.eventrouter.haslisteners_1.md +49 -0
  25. package/docs/server.eventrouter.listenercount.md +2 -2
  26. package/docs/server.eventrouter.listenercount_1.md +49 -0
  27. package/docs/server.eventrouter.listeners.md +2 -2
  28. package/docs/server.eventrouter.listeners_1.md +49 -0
  29. package/docs/server.eventrouter.md +180 -0
  30. package/docs/server.eventrouter.off_1.md +63 -0
  31. package/docs/server.eventrouter.offall.md +2 -2
  32. package/docs/server.eventrouter.offall_1.md +51 -0
  33. package/docs/server.eventrouter.on_1.md +63 -0
  34. package/docs/server.eventrouter.once_1.md +63 -0
  35. package/docs/server.filteroptions.md +21 -0
  36. package/docs/server.intersectionresult.md +18 -0
  37. package/docs/server.md +44 -0
  38. package/docs/server.modelentityoptions.md +19 -0
  39. package/docs/server.modelentityoptions.modelshownnodes.md +13 -0
  40. package/docs/server.moveoptions.md +1 -0
  41. package/docs/server.pathfindingoptions.md +1 -0
  42. package/docs/server.playercamera.facingquaternion.md +13 -0
  43. package/docs/server.playercamera.md +56 -0
  44. package/docs/server.playercamera.modelshownnodes.md +13 -0
  45. package/docs/server.playercamera.setmodelshownnodes.md +53 -0
  46. package/docs/server.playercameraevent.md +14 -0
  47. package/docs/server.playercameraeventpayloads._player_camera.set_model_shown_nodes_.md +16 -0
  48. package/docs/server.playercameraeventpayloads.md +19 -0
  49. package/docs/server.playermanager.md +19 -0
  50. package/docs/server.playermanager.worldselectionhandler.md +13 -0
  51. package/docs/server.rawcollider.md +13 -0
  52. package/docs/server.rawshape.md +13 -0
  53. package/docs/server.raycastoptions.md +4 -7
  54. package/docs/server.simulation.intersectionswithrawshape.md +107 -0
  55. package/docs/server.simulation.md +14 -0
  56. package/node-server.mjs +159 -159
  57. package/package.json +1 -1
  58. package/server.api.json +1751 -217
  59. package/server.d.ts +132 -35
@@ -0,0 +1,18 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [IntersectionResult](./server.intersectionresult.md)
4
+
5
+ ## IntersectionResult type
6
+
7
+ A intersection result.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export type IntersectionResult = {
13
+ intersectedBlockType?: BlockType;
14
+ intersectedEntity?: Entity;
15
+ };
16
+ ```
17
+ **References:** [BlockType](./server.blocktype.md)<!-- -->, [Entity](./server.entity.md)
18
+
package/docs/server.md CHANGED
@@ -1569,6 +1569,28 @@ A callback function called when the entity associated with the SimpleEntityContr
1569
1569
  Options for the [SimpleEntityController.face()](./server.simpleentitycontroller.face.md) method.
1570
1570
 
1571
1571
 
1572
+ </td></tr>
1573
+ <tr><td>
1574
+
1575
+ [FilterOptions](./server.filteroptions.md)
1576
+
1577
+
1578
+ </td><td>
1579
+
1580
+ Filter options for various operations like raycasting and intersections.
1581
+
1582
+
1583
+ </td></tr>
1584
+ <tr><td>
1585
+
1586
+ [IntersectionResult](./server.intersectionresult.md)
1587
+
1588
+
1589
+ </td><td>
1590
+
1591
+ A intersection result.
1592
+
1593
+
1572
1594
  </td></tr>
1573
1595
  <tr><td>
1574
1596
 
@@ -1690,6 +1712,17 @@ Options for creating a PlayerEntity instance.
1690
1712
  The input state of a Player; keys from SUPPORTED\_INPUT\_KEYS.
1691
1713
 
1692
1714
 
1715
+ </td></tr>
1716
+ <tr><td>
1717
+
1718
+ [RawCollider](./server.rawcollider.md)
1719
+
1720
+
1721
+ </td><td>
1722
+
1723
+ A raw collider object from the Rapier physics engine.
1724
+
1725
+
1693
1726
  </td></tr>
1694
1727
  <tr><td>
1695
1728
 
@@ -1701,6 +1734,17 @@ The input state of a Player; keys from SUPPORTED\_INPUT\_KEYS.
1701
1734
  A raw set of collision groups represented as a 32-bit number.
1702
1735
 
1703
1736
 
1737
+ </td></tr>
1738
+ <tr><td>
1739
+
1740
+ [RawShape](./server.rawshape.md)
1741
+
1742
+
1743
+ </td><td>
1744
+
1745
+ A raw shape object from the Rapier physics engine.
1746
+
1747
+
1704
1748
  </td></tr>
1705
1749
  <tr><td>
1706
1750
 
@@ -130,6 +130,25 @@ number
130
130
  _(Optional)_ The scale of the entity's model.
131
131
 
132
132
 
133
+ </td></tr>
134
+ <tr><td>
135
+
136
+ [modelShownNodes?](./server.modelentityoptions.modelshownnodes.md)
137
+
138
+
139
+ </td><td>
140
+
141
+
142
+ </td><td>
143
+
144
+ string\[\]
145
+
146
+
147
+ </td><td>
148
+
149
+ _(Optional)_ The nodes to show on the entity's model, overriding hidden nodes.
150
+
151
+
133
152
  </td></tr>
134
153
  <tr><td>
135
154
 
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [ModelEntityOptions](./server.modelentityoptions.md) &gt; [modelShownNodes](./server.modelentityoptions.modelshownnodes.md)
4
+
5
+ ## ModelEntityOptions.modelShownNodes property
6
+
7
+ The nodes to show on the entity's model, overriding hidden nodes.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ modelShownNodes?: string[];
13
+ ```
@@ -19,6 +19,7 @@ export type MoveOptions = {
19
19
  };
20
20
  moveStartIdleAnimationsOnCompletion?: boolean;
21
21
  moveStoppingDistance?: number;
22
+ moveCompletesWhenStuck?: boolean;
22
23
  };
23
24
  ```
24
25
  **References:** [MoveCallback](./server.movecallback.md)<!-- -->, [MoveCompleteCallback](./server.movecompletecallback.md)
@@ -19,6 +19,7 @@ export type PathfindingOptions = {
19
19
  verticalPenalty?: number;
20
20
  waypointMoveCompleteCallback?: WaypointMoveCompleteCallback;
21
21
  waypointMoveSkippedCallback?: WaypointMoveSkippedCallback;
22
+ waypointStoppingDistance?: number;
22
23
  waypointTimeoutMs?: number;
23
24
  };
24
25
  ```
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [PlayerCamera](./server.playercamera.md) &gt; [facingQuaternion](./server.playercamera.facingquaternion.md)
4
+
5
+ ## PlayerCamera.facingQuaternion property
6
+
7
+ The quaternion representing the camera's facing direction.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ get facingQuaternion(): QuaternionLike;
13
+ ```
@@ -117,6 +117,27 @@ The position the camera is attached to.
117
117
  The facing direction vector of the camera based on its current orientation.
118
118
 
119
119
 
120
+ </td></tr>
121
+ <tr><td>
122
+
123
+ [facingQuaternion](./server.playercamera.facingquaternion.md)
124
+
125
+
126
+ </td><td>
127
+
128
+ `readonly`
129
+
130
+
131
+ </td><td>
132
+
133
+ [QuaternionLike](./server.quaternionlike.md)
134
+
135
+
136
+ </td><td>
137
+
138
+ The quaternion representing the camera's facing direction.
139
+
140
+
120
141
  </td></tr>
121
142
  <tr><td>
122
143
 
@@ -222,6 +243,27 @@ Set&lt;string&gt;
222
243
  The nodes of the model the camera is attached to that will not be rendered for the player. Uses case insensitive substring matching.
223
244
 
224
245
 
246
+ </td></tr>
247
+ <tr><td>
248
+
249
+ [modelShownNodes](./server.playercamera.modelshownnodes.md)
250
+
251
+
252
+ </td><td>
253
+
254
+ `readonly`
255
+
256
+
257
+ </td><td>
258
+
259
+ Set&lt;string&gt;
260
+
261
+
262
+ </td><td>
263
+
264
+ The nodes of the model the camera is attached to that will be rendered for the player, overriding hidden nodes. Uses case insensitive substring matching.
265
+
266
+
225
267
  </td></tr>
226
268
  <tr><td>
227
269
 
@@ -529,6 +571,20 @@ Sets the mode of the camera.
529
571
  Sets the nodes of the model the camera is attached to that will not be rendered for the player. Uses case insensitive substring matching.
530
572
 
531
573
 
574
+ </td></tr>
575
+ <tr><td>
576
+
577
+ [setModelShownNodes(modelShownNodes)](./server.playercamera.setmodelshownnodes.md)
578
+
579
+
580
+ </td><td>
581
+
582
+
583
+ </td><td>
584
+
585
+ Sets the nodes of the model the camera is attached to that will be rendered for the player, overriding hidden nodes. Uses case insensitive substring matching.
586
+
587
+
532
588
  </td></tr>
533
589
  <tr><td>
534
590
 
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [PlayerCamera](./server.playercamera.md) &gt; [modelShownNodes](./server.playercamera.modelshownnodes.md)
4
+
5
+ ## PlayerCamera.modelShownNodes property
6
+
7
+ The nodes of the model the camera is attached to that will be rendered for the player, overriding hidden nodes. Uses case insensitive substring matching.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ get modelShownNodes(): Set<string>;
13
+ ```
@@ -0,0 +1,53 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [PlayerCamera](./server.playercamera.md) &gt; [setModelShownNodes](./server.playercamera.setmodelshownnodes.md)
4
+
5
+ ## PlayerCamera.setModelShownNodes() method
6
+
7
+ Sets the nodes of the model the camera is attached to that will be rendered for the player, overriding hidden nodes. Uses case insensitive substring matching.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ setModelShownNodes(modelShownNodes: string[]): void;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ <table><thead><tr><th>
18
+
19
+ Parameter
20
+
21
+
22
+ </th><th>
23
+
24
+ Type
25
+
26
+
27
+ </th><th>
28
+
29
+ Description
30
+
31
+
32
+ </th></tr></thead>
33
+ <tbody><tr><td>
34
+
35
+ modelShownNodes
36
+
37
+
38
+ </td><td>
39
+
40
+ string\[\]
41
+
42
+
43
+ </td><td>
44
+
45
+ Determines nodes to show that match these case insensitive substrings.
46
+
47
+
48
+ </td></tr>
49
+ </tbody></table>
50
+ **Returns:**
51
+
52
+ void
53
+
@@ -155,6 +155,20 @@ SET\_MODEL\_HIDDEN\_NODES
155
155
  </td><td>
156
156
 
157
157
 
158
+ </td></tr>
159
+ <tr><td>
160
+
161
+ SET\_MODEL\_SHOWN\_NODES
162
+
163
+
164
+ </td><td>
165
+
166
+ `"PLAYER_CAMERA.SET_MODEL_SHOWN_NODES"`
167
+
168
+
169
+ </td><td>
170
+
171
+
158
172
  </td></tr>
159
173
  <tr><td>
160
174
 
@@ -0,0 +1,16 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [PlayerCameraEventPayloads](./server.playercameraeventpayloads.md) &gt; ["PLAYER\_CAMERA.SET\_MODEL\_SHOWN\_NODES"](./server.playercameraeventpayloads._player_camera.set_model_shown_nodes_.md)
4
+
5
+ ## PlayerCameraEventPayloads."PLAYER\_CAMERA.SET\_MODEL\_SHOWN\_NODES" property
6
+
7
+ Emitted when the nodes of the model the camera is attached to are set to be shown.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ [PlayerCameraEvent.SET_MODEL_SHOWN_NODES]: {
13
+ playerCamera: PlayerCamera;
14
+ modelShownNodes: Set<string>;
15
+ };
16
+ ```
@@ -205,6 +205,25 @@ Emitted when the mode of the camera is set.
205
205
  Emitted when the nodes of the model the camera is attached to are set to be hidden.
206
206
 
207
207
 
208
+ </td></tr>
209
+ <tr><td>
210
+
211
+ ["PLAYER\_CAMERA.SET\_MODEL\_SHOWN\_NODES"](./server.playercameraeventpayloads._player_camera.set_model_shown_nodes_.md)
212
+
213
+
214
+ </td><td>
215
+
216
+
217
+ </td><td>
218
+
219
+ { playerCamera: [PlayerCamera](./server.playercamera.md)<!-- -->; modelShownNodes: Set&lt;string&gt;; }
220
+
221
+
222
+ </td><td>
223
+
224
+ Emitted when the nodes of the model the camera is attached to are set to be shown.
225
+
226
+
208
227
  </td></tr>
209
228
  <tr><td>
210
229
 
@@ -98,6 +98,25 @@ number
98
98
  The number of players currently connected to the server.
99
99
 
100
100
 
101
+ </td></tr>
102
+ <tr><td>
103
+
104
+ [worldSelectionHandler?](./server.playermanager.worldselectionhandler.md)
105
+
106
+
107
+ </td><td>
108
+
109
+
110
+ </td><td>
111
+
112
+ (player: [Player](./server.player.md)<!-- -->) =&gt; Promise&lt;[World](./server.world.md) \| undefined&gt;
113
+
114
+
115
+ </td><td>
116
+
117
+ _(Optional)_ Optional handler for selecting the world a newly connected player joins. Returning no world results in the player joining the default WorldManager world.
118
+
119
+
101
120
  </td></tr>
102
121
  </tbody></table>
103
122
 
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [PlayerManager](./server.playermanager.md) &gt; [worldSelectionHandler](./server.playermanager.worldselectionhandler.md)
4
+
5
+ ## PlayerManager.worldSelectionHandler property
6
+
7
+ Optional handler for selecting the world a newly connected player joins. Returning no world results in the player joining the default WorldManager world.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ worldSelectionHandler?: (player: Player) => Promise<World | undefined>;
13
+ ```
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [RawCollider](./server.rawcollider.md)
4
+
5
+ ## RawCollider type
6
+
7
+ A raw collider object from the Rapier physics engine.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export type RawCollider = RAPIER.Collider;
13
+ ```
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [RawShape](./server.rawshape.md)
4
+
5
+ ## RawShape type
6
+
7
+ A raw shape object from the Rapier physics engine.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export type RawShape = RAPIER.Shape;
13
+ ```
@@ -10,11 +10,8 @@ Options for raycasting.
10
10
 
11
11
  ```typescript
12
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
- };
13
+ solidMode?: boolean;
14
+ } & FilterOptions;
20
15
  ```
16
+ **References:** [FilterOptions](./server.filteroptions.md)
17
+
@@ -0,0 +1,107 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [Simulation](./server.simulation.md) &gt; [intersectionsWithRawShape](./server.simulation.intersectionswithrawshape.md)
4
+
5
+ ## Simulation.intersectionsWithRawShape() method
6
+
7
+ Gets the intersections with a raw shape.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ intersectionsWithRawShape(rawShape: RawShape, position: Vector3Like, rotation: QuaternionLike, options?: FilterOptions): IntersectionResult[];
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ <table><thead><tr><th>
18
+
19
+ Parameter
20
+
21
+
22
+ </th><th>
23
+
24
+ Type
25
+
26
+
27
+ </th><th>
28
+
29
+ Description
30
+
31
+
32
+ </th></tr></thead>
33
+ <tbody><tr><td>
34
+
35
+ rawShape
36
+
37
+
38
+ </td><td>
39
+
40
+ [RawShape](./server.rawshape.md)
41
+
42
+
43
+ </td><td>
44
+
45
+ The raw shape to get intersections with.
46
+
47
+
48
+ </td></tr>
49
+ <tr><td>
50
+
51
+ position
52
+
53
+
54
+ </td><td>
55
+
56
+ [Vector3Like](./server.vector3like.md)
57
+
58
+
59
+ </td><td>
60
+
61
+ The position of the shape.
62
+
63
+
64
+ </td></tr>
65
+ <tr><td>
66
+
67
+ rotation
68
+
69
+
70
+ </td><td>
71
+
72
+ [QuaternionLike](./server.quaternionlike.md)
73
+
74
+
75
+ </td><td>
76
+
77
+ The rotation of the shape.
78
+
79
+
80
+ </td></tr>
81
+ <tr><td>
82
+
83
+ options
84
+
85
+
86
+ </td><td>
87
+
88
+ [FilterOptions](./server.filteroptions.md)
89
+
90
+
91
+ </td><td>
92
+
93
+ _(Optional)_ The options for the intersections.
94
+
95
+
96
+ </td></tr>
97
+ </tbody></table>
98
+ **Returns:**
99
+
100
+ [IntersectionResult](./server.intersectionresult.md)<!-- -->\[\]
101
+
102
+ The intersections.
103
+
104
+ ## Remarks
105
+
106
+ rawShape can be retrieved from a simulated or unsimulated collider using [Collider.rawShape](./server.collider.rawshape.md)<!-- -->.
107
+
@@ -212,6 +212,20 @@ Enables or disables debug rendering for the simulation. When enabled, all collid
212
212
  Gets the contact manifolds for a pair of colliders.
213
213
 
214
214
 
215
+ </td></tr>
216
+ <tr><td>
217
+
218
+ [intersectionsWithRawShape(rawShape, position, rotation, options)](./server.simulation.intersectionswithrawshape.md)
219
+
220
+
221
+ </td><td>
222
+
223
+
224
+ </td><td>
225
+
226
+ Gets the intersections with a raw shape.
227
+
228
+
215
229
  </td></tr>
216
230
  <tr><td>
217
231