hytopia 0.3.11 → 0.3.13

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 (44) hide show
  1. package/docs/server.baseentityoptions.controller.md +13 -0
  2. package/docs/server.baseentityoptions.md +190 -0
  3. package/docs/server.baseentityoptions.name.md +13 -0
  4. package/docs/{server.entityoptions.opacity.md → server.baseentityoptions.opacity.md} +2 -2
  5. package/docs/{server.entityoptions.parent.md → server.baseentityoptions.parent.md} +2 -2
  6. package/docs/{server.entityoptions.parentnodename.md → server.baseentityoptions.parentnodename.md} +2 -2
  7. package/docs/server.baseentityoptions.rigidbodyoptions.md +13 -0
  8. package/docs/{server.entityoptions.tag.md → server.baseentityoptions.tag.md} +2 -2
  9. package/docs/server.baseentityoptions.tintcolor.md +13 -0
  10. package/docs/{server.entityoptions.blockhalfextents.md → server.blockentityoptions.blockhalfextents.md} +2 -2
  11. package/docs/{server.entityoptions.blocktextureuri.md → server.blockentityoptions.blocktextureuri.md} +2 -2
  12. package/docs/server.blockentityoptions.md +77 -0
  13. package/docs/server.entityoptions.md +4 -312
  14. package/docs/server.md +52 -19
  15. package/docs/server.modelentityoptions.md +134 -0
  16. package/docs/server.modelentityoptions.modelanimationsplaybackrate.md +13 -0
  17. package/docs/server.modelentityoptions.modelhiddennodes.md +13 -0
  18. package/docs/server.modelentityoptions.modelloopedanimations.md +13 -0
  19. package/docs/server.modelentityoptions.modelscale.md +13 -0
  20. package/docs/server.modelentityoptions.modeluri.md +13 -0
  21. package/docs/server.playerentityoptions.md +5 -46
  22. package/docs/server.playerui.lockpointer.md +1 -1
  23. package/docs/server.playerui.md +1 -1
  24. package/examples/entity-spawn/index.ts +4 -3
  25. package/examples/hygrounds/classes/ChestEntity.ts +2 -2
  26. package/examples/hygrounds/classes/GunEntity.ts +3 -3
  27. package/examples/hygrounds/classes/ItemEntity.ts +13 -9
  28. package/examples/hygrounds/classes/MeleeWeaponEntity.ts +3 -3
  29. package/examples/zombies-fps/classes/EnemyEntity.ts +2 -2
  30. package/examples/zombies-fps/classes/GunEntity.ts +3 -3
  31. package/package.json +1 -1
  32. package/server.api.json +614 -534
  33. package/server.d.ts +51 -36
  34. package/server.js +1 -1
  35. package/docs/server.entityoptions.controller.md +0 -13
  36. package/docs/server.entityoptions.modelanimationsplaybackrate.md +0 -13
  37. package/docs/server.entityoptions.modelhiddennodes.md +0 -13
  38. package/docs/server.entityoptions.modelloopedanimations.md +0 -13
  39. package/docs/server.entityoptions.modelscale.md +0 -13
  40. package/docs/server.entityoptions.modeluri.md +0 -13
  41. package/docs/server.entityoptions.name.md +0 -13
  42. package/docs/server.entityoptions.rigidbodyoptions.md +0 -13
  43. package/docs/server.entityoptions.tintcolor.md +0 -13
  44. package/docs/server.playerentityoptions.player.md +0 -13
@@ -2,322 +2,14 @@
2
2
 
3
3
  [Home](./index.md) > [server](./server.md) > [EntityOptions](./server.entityoptions.md)
4
4
 
5
- ## EntityOptions interface
5
+ ## EntityOptions type
6
6
 
7
- Options for creating an Entity instance.
7
+ The options for creating an Entity instance.
8
8
 
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- export interface EntityOptions
12
+ export type EntityOptions = BlockEntityOptions | ModelEntityOptions;
13
13
  ```
14
+ **References:** [BlockEntityOptions](./server.blockentityoptions.md)<!-- -->, [ModelEntityOptions](./server.modelentityoptions.md)
14
15
 
15
- ## Properties
16
-
17
- <table><thead><tr><th>
18
-
19
- Property
20
-
21
-
22
- </th><th>
23
-
24
- Modifiers
25
-
26
-
27
- </th><th>
28
-
29
- Type
30
-
31
-
32
- </th><th>
33
-
34
- Description
35
-
36
-
37
- </th></tr></thead>
38
- <tbody><tr><td>
39
-
40
- [blockHalfExtents?](./server.entityoptions.blockhalfextents.md)
41
-
42
-
43
- </td><td>
44
-
45
-
46
- </td><td>
47
-
48
- [Vector3Like](./server.vector3like.md)
49
-
50
-
51
- </td><td>
52
-
53
- _(Optional)_ The half extents of the visual size of the block entity when blockTextureUri is set. If no rigidBodyOptions.colliders are provided, a block collider with the size of the half extents will be created.
54
-
55
-
56
- </td></tr>
57
- <tr><td>
58
-
59
- [blockTextureUri?](./server.entityoptions.blocktextureuri.md)
60
-
61
-
62
- </td><td>
63
-
64
-
65
- </td><td>
66
-
67
- string
68
-
69
-
70
- </td><td>
71
-
72
- _(Optional)_ The texture uri of a entity if the entity is a block entity, if set rigidBodyOptions collider shape \[0\] must be a block
73
-
74
-
75
- </td></tr>
76
- <tr><td>
77
-
78
- [controller?](./server.entityoptions.controller.md)
79
-
80
-
81
- </td><td>
82
-
83
-
84
- </td><td>
85
-
86
- [BaseEntityController](./server.baseentitycontroller.md)
87
-
88
-
89
- </td><td>
90
-
91
- _(Optional)_ The entity controller to use for the entity.
92
-
93
-
94
- </td></tr>
95
- <tr><td>
96
-
97
- [modelAnimationsPlaybackRate?](./server.entityoptions.modelanimationsplaybackrate.md)
98
-
99
-
100
- </td><td>
101
-
102
-
103
- </td><td>
104
-
105
- number
106
-
107
-
108
- </td><td>
109
-
110
- _(Optional)_ The playback rate of the entity's model animations.
111
-
112
-
113
- </td></tr>
114
- <tr><td>
115
-
116
- [modelHiddenNodes?](./server.entityoptions.modelhiddennodes.md)
117
-
118
-
119
- </td><td>
120
-
121
-
122
- </td><td>
123
-
124
- string\[\]
125
-
126
-
127
- </td><td>
128
-
129
- _(Optional)_ The nodes to hide on the entity's model.
130
-
131
-
132
- </td></tr>
133
- <tr><td>
134
-
135
- [modelLoopedAnimations?](./server.entityoptions.modelloopedanimations.md)
136
-
137
-
138
- </td><td>
139
-
140
-
141
- </td><td>
142
-
143
- string\[\]
144
-
145
-
146
- </td><td>
147
-
148
- _(Optional)_ The looped animations to start when the entity is spawned.
149
-
150
-
151
- </td></tr>
152
- <tr><td>
153
-
154
- [modelScale?](./server.entityoptions.modelscale.md)
155
-
156
-
157
- </td><td>
158
-
159
-
160
- </td><td>
161
-
162
- number
163
-
164
-
165
- </td><td>
166
-
167
- _(Optional)_ The scale of the entity's model.
168
-
169
-
170
- </td></tr>
171
- <tr><td>
172
-
173
- [modelUri?](./server.entityoptions.modeluri.md)
174
-
175
-
176
- </td><td>
177
-
178
-
179
- </td><td>
180
-
181
- string
182
-
183
-
184
- </td><td>
185
-
186
- _(Optional)_ The URI or path to the .gltf model asset to be used for the entity.
187
-
188
-
189
- </td></tr>
190
- <tr><td>
191
-
192
- [name?](./server.entityoptions.name.md)
193
-
194
-
195
- </td><td>
196
-
197
-
198
- </td><td>
199
-
200
- string
201
-
202
-
203
- </td><td>
204
-
205
- _(Optional)_ The name of the entity.
206
-
207
-
208
- </td></tr>
209
- <tr><td>
210
-
211
- [opacity?](./server.entityoptions.opacity.md)
212
-
213
-
214
- </td><td>
215
-
216
-
217
- </td><td>
218
-
219
- number
220
-
221
-
222
- </td><td>
223
-
224
- _(Optional)_ The opacity of the entity between 0 and 1. 0 is fully transparent, 1 is fully opaque.
225
-
226
-
227
- </td></tr>
228
- <tr><td>
229
-
230
- [parent?](./server.entityoptions.parent.md)
231
-
232
-
233
- </td><td>
234
-
235
-
236
- </td><td>
237
-
238
- [Entity](./server.entity.md)
239
-
240
-
241
- </td><td>
242
-
243
- _(Optional)_ The parent entity of the entity, entities with a parent will ignore creating their own colliders.
244
-
245
-
246
- </td></tr>
247
- <tr><td>
248
-
249
- [parentNodeName?](./server.entityoptions.parentnodename.md)
250
-
251
-
252
- </td><td>
253
-
254
-
255
- </td><td>
256
-
257
- string
258
-
259
-
260
- </td><td>
261
-
262
- _(Optional)_ The name of the parent's node (if parent is a model entity) to attach the entity to.
263
-
264
-
265
- </td></tr>
266
- <tr><td>
267
-
268
- [rigidBodyOptions?](./server.entityoptions.rigidbodyoptions.md)
269
-
270
-
271
- </td><td>
272
-
273
-
274
- </td><td>
275
-
276
- [RigidBodyOptions](./server.rigidbodyoptions.md)
277
-
278
-
279
- </td><td>
280
-
281
- _(Optional)_ The rigid body options for the entity.
282
-
283
-
284
- </td></tr>
285
- <tr><td>
286
-
287
- [tag?](./server.entityoptions.tag.md)
288
-
289
-
290
- </td><td>
291
-
292
-
293
- </td><td>
294
-
295
- string
296
-
297
-
298
- </td><td>
299
-
300
- _(Optional)_ An arbitrary identifier tag of the entity. Useful for your own logic.
301
-
302
-
303
- </td></tr>
304
- <tr><td>
305
-
306
- [tintColor?](./server.entityoptions.tintcolor.md)
307
-
308
-
309
- </td><td>
310
-
311
-
312
- </td><td>
313
-
314
- [RgbColor](./server.rgbcolor.md)
315
-
316
-
317
- </td><td>
318
-
319
- _(Optional)_ The tint color of the entity as a hex code.
320
-
321
-
322
- </td></tr>
323
- </tbody></table>
package/docs/server.md CHANGED
@@ -824,6 +824,17 @@ The base options for a collider.
824
824
  Event payloads for BaseEntityController emitted events.
825
825
 
826
826
 
827
+ </td></tr>
828
+ <tr><td>
829
+
830
+ [BaseEntityOptions](./server.baseentityoptions.md)
831
+
832
+
833
+ </td><td>
834
+
835
+ The base options for an entity.
836
+
837
+
827
838
  </td></tr>
828
839
  <tr><td>
829
840
 
@@ -846,6 +857,17 @@ The base options for a rigid body.
846
857
  The options for a block collider.
847
858
 
848
859
 
860
+ </td></tr>
861
+ <tr><td>
862
+
863
+ [BlockEntityOptions](./server.blockentityoptions.md)
864
+
865
+
866
+ </td><td>
867
+
868
+ The options for creating a block entity.
869
+
870
+
849
871
  </td></tr>
850
872
  <tr><td>
851
873
 
@@ -956,17 +978,6 @@ The options for a dynamic rigid body, also the default type.
956
978
  Event payloads for Entity emitted events.
957
979
 
958
980
 
959
- </td></tr>
960
- <tr><td>
961
-
962
- [EntityOptions](./server.entityoptions.md)
963
-
964
-
965
- </td><td>
966
-
967
- Options for creating an Entity instance.
968
-
969
-
970
981
  </td></tr>
971
982
  <tr><td>
972
983
 
@@ -1047,45 +1058,45 @@ Options for creating a Light instance.
1047
1058
  </td></tr>
1048
1059
  <tr><td>
1049
1060
 
1050
- [NoneColliderOptions](./server.nonecollideroptions.md)
1061
+ [ModelEntityOptions](./server.modelentityoptions.md)
1051
1062
 
1052
1063
 
1053
1064
  </td><td>
1054
1065
 
1055
- The options for an error type "none" collider.
1066
+ The options for creating a model entity.
1056
1067
 
1057
1068
 
1058
1069
  </td></tr>
1059
1070
  <tr><td>
1060
1071
 
1061
- [PlayerCameraEventPayloads](./server.playercameraeventpayloads.md)
1072
+ [NoneColliderOptions](./server.nonecollideroptions.md)
1062
1073
 
1063
1074
 
1064
1075
  </td><td>
1065
1076
 
1066
- Event payloads for PlayerCamera emitted events.
1077
+ The options for an error type "none" collider.
1067
1078
 
1068
1079
 
1069
1080
  </td></tr>
1070
1081
  <tr><td>
1071
1082
 
1072
- [PlayerEntityControllerOptions](./server.playerentitycontrolleroptions.md)
1083
+ [PlayerCameraEventPayloads](./server.playercameraeventpayloads.md)
1073
1084
 
1074
1085
 
1075
1086
  </td><td>
1076
1087
 
1077
- Options for creating a PlayerEntityController instance.
1088
+ Event payloads for PlayerCamera emitted events.
1078
1089
 
1079
1090
 
1080
1091
  </td></tr>
1081
1092
  <tr><td>
1082
1093
 
1083
- [PlayerEntityOptions](./server.playerentityoptions.md)
1094
+ [PlayerEntityControllerOptions](./server.playerentitycontrolleroptions.md)
1084
1095
 
1085
1096
 
1086
1097
  </td><td>
1087
1098
 
1088
- Options for creating a PlayerEntity instance.
1099
+ Options for creating a PlayerEntityController instance.
1089
1100
 
1090
1101
 
1091
1102
  </td></tr>
@@ -1437,6 +1448,17 @@ A contact manifold.
1437
1448
  A decoded set of collision groups represented as their string equivalents.
1438
1449
 
1439
1450
 
1451
+ </td></tr>
1452
+ <tr><td>
1453
+
1454
+ [EntityOptions](./server.entityoptions.md)
1455
+
1456
+
1457
+ </td><td>
1458
+
1459
+ The options for creating an Entity instance.
1460
+
1461
+
1440
1462
  </td></tr>
1441
1463
  <tr><td>
1442
1464
 
@@ -1547,6 +1569,17 @@ Options for the [PathfindingEntityController.pathfind()](./server.pathfindingent
1547
1569
  The camera orientation state of a Player.
1548
1570
 
1549
1571
 
1572
+ </td></tr>
1573
+ <tr><td>
1574
+
1575
+ [PlayerEntityOptions](./server.playerentityoptions.md)
1576
+
1577
+
1578
+ </td><td>
1579
+
1580
+ Options for creating a PlayerEntity instance.
1581
+
1582
+
1550
1583
  </td></tr>
1551
1584
  <tr><td>
1552
1585
 
@@ -0,0 +1,134 @@
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)
4
+
5
+ ## ModelEntityOptions interface
6
+
7
+ The options for creating a model entity.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export interface ModelEntityOptions extends BaseEntityOptions
13
+ ```
14
+ **Extends:** [BaseEntityOptions](./server.baseentityoptions.md)
15
+
16
+ ## Properties
17
+
18
+ <table><thead><tr><th>
19
+
20
+ Property
21
+
22
+
23
+ </th><th>
24
+
25
+ Modifiers
26
+
27
+
28
+ </th><th>
29
+
30
+ Type
31
+
32
+
33
+ </th><th>
34
+
35
+ Description
36
+
37
+
38
+ </th></tr></thead>
39
+ <tbody><tr><td>
40
+
41
+ [modelAnimationsPlaybackRate?](./server.modelentityoptions.modelanimationsplaybackrate.md)
42
+
43
+
44
+ </td><td>
45
+
46
+
47
+ </td><td>
48
+
49
+ number
50
+
51
+
52
+ </td><td>
53
+
54
+ _(Optional)_ The playback rate of the entity's model animations.
55
+
56
+
57
+ </td></tr>
58
+ <tr><td>
59
+
60
+ [modelHiddenNodes?](./server.modelentityoptions.modelhiddennodes.md)
61
+
62
+
63
+ </td><td>
64
+
65
+
66
+ </td><td>
67
+
68
+ string\[\]
69
+
70
+
71
+ </td><td>
72
+
73
+ _(Optional)_ The nodes to hide on the entity's model.
74
+
75
+
76
+ </td></tr>
77
+ <tr><td>
78
+
79
+ [modelLoopedAnimations?](./server.modelentityoptions.modelloopedanimations.md)
80
+
81
+
82
+ </td><td>
83
+
84
+
85
+ </td><td>
86
+
87
+ string\[\]
88
+
89
+
90
+ </td><td>
91
+
92
+ _(Optional)_ The looped animations to start when the entity is spawned.
93
+
94
+
95
+ </td></tr>
96
+ <tr><td>
97
+
98
+ [modelScale?](./server.modelentityoptions.modelscale.md)
99
+
100
+
101
+ </td><td>
102
+
103
+
104
+ </td><td>
105
+
106
+ number
107
+
108
+
109
+ </td><td>
110
+
111
+ _(Optional)_ The scale of the entity's model.
112
+
113
+
114
+ </td></tr>
115
+ <tr><td>
116
+
117
+ [modelUri?](./server.modelentityoptions.modeluri.md)
118
+
119
+
120
+ </td><td>
121
+
122
+
123
+ </td><td>
124
+
125
+ string
126
+
127
+
128
+ </td><td>
129
+
130
+ _(Optional)_ The URI or path to the .gltf model asset to be used for the entity.
131
+
132
+
133
+ </td></tr>
134
+ </tbody></table>
@@ -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; [modelAnimationsPlaybackRate](./server.modelentityoptions.modelanimationsplaybackrate.md)
4
+
5
+ ## ModelEntityOptions.modelAnimationsPlaybackRate property
6
+
7
+ The playback rate of the entity's model animations.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ modelAnimationsPlaybackRate?: number;
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; [ModelEntityOptions](./server.modelentityoptions.md) &gt; [modelHiddenNodes](./server.modelentityoptions.modelhiddennodes.md)
4
+
5
+ ## ModelEntityOptions.modelHiddenNodes property
6
+
7
+ The nodes to hide on the entity's model.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ modelHiddenNodes?: string[];
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; [ModelEntityOptions](./server.modelentityoptions.md) &gt; [modelLoopedAnimations](./server.modelentityoptions.modelloopedanimations.md)
4
+
5
+ ## ModelEntityOptions.modelLoopedAnimations property
6
+
7
+ The looped animations to start when the entity is spawned.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ modelLoopedAnimations?: string[];
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; [ModelEntityOptions](./server.modelentityoptions.md) &gt; [modelScale](./server.modelentityoptions.modelscale.md)
4
+
5
+ ## ModelEntityOptions.modelScale property
6
+
7
+ The scale of the entity's model.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ modelScale?: number;
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; [ModelEntityOptions](./server.modelentityoptions.md) &gt; [modelUri](./server.modelentityoptions.modeluri.md)
4
+
5
+ ## ModelEntityOptions.modelUri property
6
+
7
+ The URI or path to the .gltf model asset to be used for the entity.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ modelUri?: string;
13
+ ```