hytopia 0.1.69 → 0.1.71

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 (117) hide show
  1. package/docs/server.chatmanager.md +46 -2
  2. package/docs/server.chatmanager.onbroadcastmessage.md +13 -0
  3. package/docs/server.chatmanager.sendbroadcastmessage.md +1 -1
  4. package/docs/server.chatmanager.sendplayermessage.md +1 -1
  5. package/docs/server.light._constructor_.md +49 -0
  6. package/docs/server.light.angle.md +13 -0
  7. package/docs/server.light.attachedtoentity.md +13 -0
  8. package/docs/server.light.color.md +13 -0
  9. package/docs/server.light.despawn.md +17 -0
  10. package/docs/server.light.distance.md +13 -0
  11. package/docs/server.light.id.md +13 -0
  12. package/docs/server.light.intensity.md +13 -0
  13. package/docs/server.light.isspawned.md +13 -0
  14. package/docs/server.light.md +573 -0
  15. package/docs/server.light.offset.md +13 -0
  16. package/docs/server.light.penumbra.md +13 -0
  17. package/docs/server.light.position.md +13 -0
  18. package/docs/server.light.setangle.md +53 -0
  19. package/docs/server.light.setattachedtoentity.md +53 -0
  20. package/docs/server.light.setcolor.md +53 -0
  21. package/docs/server.light.setdistance.md +53 -0
  22. package/docs/server.light.setintensity.md +53 -0
  23. package/docs/server.light.setoffset.md +53 -0
  24. package/docs/server.light.setpenumbra.md +53 -0
  25. package/docs/server.light.setposition.md +53 -0
  26. package/docs/server.light.settrackedentity.md +53 -0
  27. package/docs/server.light.settrackedposition.md +53 -0
  28. package/docs/server.light.spawn.md +53 -0
  29. package/docs/server.light.trackedentity.md +13 -0
  30. package/docs/server.light.trackedposition.md +13 -0
  31. package/docs/server.light.type.md +13 -0
  32. package/docs/server.light.world.md +13 -0
  33. package/docs/server.lighteventpayload.despawn.light.md +11 -0
  34. package/docs/server.lighteventpayload.despawn.md +53 -0
  35. package/docs/server.lighteventpayload.md +136 -0
  36. package/docs/server.lighteventpayload.setangle.angle.md +11 -0
  37. package/docs/server.lighteventpayload.setangle.light.md +11 -0
  38. package/docs/server.lighteventpayload.setangle.md +70 -0
  39. package/docs/server.lighteventpayload.setattachedtoentity.entity.md +11 -0
  40. package/docs/server.lighteventpayload.setattachedtoentity.light.md +11 -0
  41. package/docs/server.lighteventpayload.setattachedtoentity.md +70 -0
  42. package/docs/server.lighteventpayload.setcolor.color.md +11 -0
  43. package/docs/server.lighteventpayload.setcolor.light.md +11 -0
  44. package/docs/server.lighteventpayload.setcolor.md +70 -0
  45. package/docs/server.lighteventpayload.setdistance.distance.md +11 -0
  46. package/docs/server.lighteventpayload.setdistance.light.md +11 -0
  47. package/docs/server.lighteventpayload.setdistance.md +70 -0
  48. package/docs/server.lighteventpayload.setintensity.intensity.md +11 -0
  49. package/docs/server.lighteventpayload.setintensity.light.md +11 -0
  50. package/docs/server.lighteventpayload.setintensity.md +70 -0
  51. package/docs/server.lighteventpayload.setoffset.light.md +11 -0
  52. package/docs/server.lighteventpayload.setoffset.md +70 -0
  53. package/docs/server.lighteventpayload.setoffset.offset.md +11 -0
  54. package/docs/server.lighteventpayload.setpenumbra.light.md +11 -0
  55. package/docs/server.lighteventpayload.setpenumbra.md +70 -0
  56. package/docs/server.lighteventpayload.setpenumbra.penumbra.md +11 -0
  57. package/docs/server.lighteventpayload.setposition.light.md +11 -0
  58. package/docs/server.lighteventpayload.setposition.md +70 -0
  59. package/docs/server.lighteventpayload.setposition.position.md +11 -0
  60. package/docs/server.lighteventpayload.settrackedentity.entity.md +11 -0
  61. package/docs/server.lighteventpayload.settrackedentity.light.md +11 -0
  62. package/docs/server.lighteventpayload.settrackedentity.md +70 -0
  63. package/docs/server.lighteventpayload.settrackedposition.light.md +11 -0
  64. package/docs/server.lighteventpayload.settrackedposition.md +70 -0
  65. package/docs/server.lighteventpayload.settrackedposition.position.md +11 -0
  66. package/docs/server.lighteventpayload.spawn.light.md +11 -0
  67. package/docs/server.lighteventpayload.spawn.md +53 -0
  68. package/docs/server.lighteventtype.md +215 -0
  69. package/docs/server.lightmanager.getallentityattachedlights.md +55 -0
  70. package/docs/server.lightmanager.getalllights.md +19 -0
  71. package/docs/server.lightmanager.md +113 -0
  72. package/docs/server.lightmanager.world.md +13 -0
  73. package/docs/server.lightoptions.angle.md +13 -0
  74. package/docs/server.lightoptions.attachedtoentity.md +13 -0
  75. package/docs/server.lightoptions.color.md +13 -0
  76. package/docs/server.lightoptions.distance.md +13 -0
  77. package/docs/server.lightoptions.intensity.md +13 -0
  78. package/docs/server.lightoptions.md +247 -0
  79. package/docs/server.lightoptions.offset.md +13 -0
  80. package/docs/server.lightoptions.penumbra.md +13 -0
  81. package/docs/server.lightoptions.position.md +13 -0
  82. package/docs/server.lightoptions.trackedentity.md +13 -0
  83. package/docs/server.lightoptions.trackedposition.md +13 -0
  84. package/docs/server.lightoptions.type.md +13 -0
  85. package/docs/server.lighttype.md +61 -0
  86. package/docs/server.md +66 -0
  87. package/docs/server.sceneui.attachedtoentity.md +2 -0
  88. package/docs/server.sceneui.id.md +2 -0
  89. package/docs/server.sceneui.isloaded.md +2 -0
  90. package/docs/server.sceneui.md +18 -0
  91. package/docs/server.sceneui.offset.md +2 -0
  92. package/docs/server.sceneui.position.md +2 -0
  93. package/docs/server.sceneui.state.md +2 -0
  94. package/docs/server.sceneui.templateid.md +2 -0
  95. package/docs/server.sceneui.viewdistance.md +2 -0
  96. package/docs/server.sceneui.world.md +2 -0
  97. package/docs/server.world.lightmanager.md +13 -0
  98. package/docs/server.world.md +26 -5
  99. package/docs/server.world.setambientlightcolor.md +1 -1
  100. package/docs/server.world.setambientlightintensity.md +1 -1
  101. package/docs/server.world.setdirectionallightcolor.md +1 -1
  102. package/docs/server.world.setdirectionallightintensity.md +1 -1
  103. package/docs/server.world.setdirectionallightposition.md +1 -1
  104. package/docs/server.worldoptions.ambientlightcolor.md +1 -1
  105. package/docs/server.worldoptions.ambientlightintensity.md +1 -1
  106. package/docs/server.worldoptions.directionallightcolor.md +1 -1
  107. package/docs/server.worldoptions.directionallightintensity.md +1 -1
  108. package/docs/server.worldoptions.directionallightposition.md +1 -1
  109. package/docs/server.worldoptions.md +5 -5
  110. package/examples/lighting/README.md +3 -0
  111. package/examples/lighting/assets/map.json +13153 -0
  112. package/examples/lighting/index.ts +120 -0
  113. package/examples/lighting/package.json +16 -0
  114. package/package.json +1 -1
  115. package/server.api.json +2991 -193
  116. package/server.d.ts +311 -13
  117. package/server.js +87 -87
@@ -0,0 +1,573 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [Light](./server.light.md)
4
+
5
+ ## Light class
6
+
7
+ Represents a light in a world. Lights can be point lights or spotlights.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export default class Light implements protocol.Serializable
13
+ ```
14
+ **Implements:** protocol.Serializable
15
+
16
+ ## Remarks
17
+
18
+ Lights are created directly as instances. They support a variety of configuration options through the [LightOptions](./server.lightoptions.md) constructor argument.
19
+
20
+ ## Example
21
+
22
+
23
+ ```typescript
24
+ const light = new Light({
25
+ attachedToEntity: playerEntity,
26
+ color: { r: 255, g: 0, b: 0 },
27
+ intensity: 5,
28
+ offset: { x: 0, y: 1, z: 0 },
29
+ });
30
+
31
+ light.spawn(world);
32
+ ```
33
+
34
+ ## Constructors
35
+
36
+ <table><thead><tr><th>
37
+
38
+ Constructor
39
+
40
+
41
+ </th><th>
42
+
43
+ Modifiers
44
+
45
+
46
+ </th><th>
47
+
48
+ Description
49
+
50
+
51
+ </th></tr></thead>
52
+ <tbody><tr><td>
53
+
54
+ [(constructor)(options)](./server.light._constructor_.md)
55
+
56
+
57
+ </td><td>
58
+
59
+
60
+ </td><td>
61
+
62
+ Constructs a new instance of the `Light` class
63
+
64
+
65
+ </td></tr>
66
+ </tbody></table>
67
+
68
+ ## Properties
69
+
70
+ <table><thead><tr><th>
71
+
72
+ Property
73
+
74
+
75
+ </th><th>
76
+
77
+ Modifiers
78
+
79
+
80
+ </th><th>
81
+
82
+ Type
83
+
84
+
85
+ </th><th>
86
+
87
+ Description
88
+
89
+
90
+ </th></tr></thead>
91
+ <tbody><tr><td>
92
+
93
+ [angle](./server.light.angle.md)
94
+
95
+
96
+ </td><td>
97
+
98
+ `readonly`
99
+
100
+
101
+ </td><td>
102
+
103
+ number \| undefined
104
+
105
+
106
+ </td><td>
107
+
108
+ If type is spotlight, the angle of the spotlight.
109
+
110
+
111
+ </td></tr>
112
+ <tr><td>
113
+
114
+ [attachedToEntity](./server.light.attachedtoentity.md)
115
+
116
+
117
+ </td><td>
118
+
119
+ `readonly`
120
+
121
+
122
+ </td><td>
123
+
124
+ [Entity](./server.entity.md) \| undefined
125
+
126
+
127
+ </td><td>
128
+
129
+ The entity to which the Light is attached if explicitly set.
130
+
131
+
132
+ </td></tr>
133
+ <tr><td>
134
+
135
+ [color](./server.light.color.md)
136
+
137
+
138
+ </td><td>
139
+
140
+ `readonly`
141
+
142
+
143
+ </td><td>
144
+
145
+ [RgbColor](./server.rgbcolor.md)
146
+
147
+
148
+ </td><td>
149
+
150
+ The color of the light.
151
+
152
+
153
+ </td></tr>
154
+ <tr><td>
155
+
156
+ [distance](./server.light.distance.md)
157
+
158
+
159
+ </td><td>
160
+
161
+ `readonly`
162
+
163
+
164
+ </td><td>
165
+
166
+ number \| undefined
167
+
168
+
169
+ </td><td>
170
+
171
+ The maximum distance the light will illuminate. 0 does not limit distance. Defaults to 0.
172
+
173
+
174
+ </td></tr>
175
+ <tr><td>
176
+
177
+ [id](./server.light.id.md)
178
+
179
+
180
+ </td><td>
181
+
182
+ `readonly`
183
+
184
+
185
+ </td><td>
186
+
187
+ number \| undefined
188
+
189
+
190
+ </td><td>
191
+
192
+ The unique identifier for the Light.
193
+
194
+
195
+ </td></tr>
196
+ <tr><td>
197
+
198
+ [intensity](./server.light.intensity.md)
199
+
200
+
201
+ </td><td>
202
+
203
+ `readonly`
204
+
205
+
206
+ </td><td>
207
+
208
+ number
209
+
210
+
211
+ </td><td>
212
+
213
+ The intensity of the light in candela (cd). Defaults to 1
214
+
215
+
216
+ </td></tr>
217
+ <tr><td>
218
+
219
+ [isSpawned](./server.light.isspawned.md)
220
+
221
+
222
+ </td><td>
223
+
224
+ `readonly`
225
+
226
+
227
+ </td><td>
228
+
229
+ boolean
230
+
231
+
232
+ </td><td>
233
+
234
+ Whether the Light is spawned into the world.
235
+
236
+
237
+ </td></tr>
238
+ <tr><td>
239
+
240
+ [offset](./server.light.offset.md)
241
+
242
+
243
+ </td><td>
244
+
245
+ `readonly`
246
+
247
+
248
+ </td><td>
249
+
250
+ [Vector3Like](./server.vector3like.md) \| undefined
251
+
252
+
253
+ </td><td>
254
+
255
+ The offset of the light from the attached entity or position.
256
+
257
+
258
+ </td></tr>
259
+ <tr><td>
260
+
261
+ [penumbra](./server.light.penumbra.md)
262
+
263
+
264
+ </td><td>
265
+
266
+ `readonly`
267
+
268
+
269
+ </td><td>
270
+
271
+ number \| undefined
272
+
273
+
274
+ </td><td>
275
+
276
+ If type is spotlight, the penumbra of the spotlight.
277
+
278
+
279
+ </td></tr>
280
+ <tr><td>
281
+
282
+ [position](./server.light.position.md)
283
+
284
+
285
+ </td><td>
286
+
287
+ `readonly`
288
+
289
+
290
+ </td><td>
291
+
292
+ [Vector3Like](./server.vector3like.md) \| undefined
293
+
294
+
295
+ </td><td>
296
+
297
+ The position of the light in the world if explicitly set.
298
+
299
+
300
+ </td></tr>
301
+ <tr><td>
302
+
303
+ [trackedEntity](./server.light.trackedentity.md)
304
+
305
+
306
+ </td><td>
307
+
308
+ `readonly`
309
+
310
+
311
+ </td><td>
312
+
313
+ [Entity](./server.entity.md) \| undefined
314
+
315
+
316
+ </td><td>
317
+
318
+ If type is spotlight, the entity the spotlight will constantly point at.
319
+
320
+
321
+ </td></tr>
322
+ <tr><td>
323
+
324
+ [trackedPosition](./server.light.trackedposition.md)
325
+
326
+
327
+ </td><td>
328
+
329
+ `readonly`
330
+
331
+
332
+ </td><td>
333
+
334
+ [Vector3Like](./server.vector3like.md) \| undefined
335
+
336
+
337
+ </td><td>
338
+
339
+ If type is spotlight, the position the spotlight will constantly point at.
340
+
341
+
342
+ </td></tr>
343
+ <tr><td>
344
+
345
+ [type](./server.light.type.md)
346
+
347
+
348
+ </td><td>
349
+
350
+ `readonly`
351
+
352
+
353
+ </td><td>
354
+
355
+ [LightType](./server.lighttype.md)
356
+
357
+
358
+ </td><td>
359
+
360
+ The type of light. Defaults to point light.
361
+
362
+
363
+ </td></tr>
364
+ <tr><td>
365
+
366
+ [world](./server.light.world.md)
367
+
368
+
369
+ </td><td>
370
+
371
+ `readonly`
372
+
373
+
374
+ </td><td>
375
+
376
+ [World](./server.world.md) \| undefined
377
+
378
+
379
+ </td><td>
380
+
381
+ The world the Light is spawned into.
382
+
383
+
384
+ </td></tr>
385
+ </tbody></table>
386
+
387
+ ## Methods
388
+
389
+ <table><thead><tr><th>
390
+
391
+ Method
392
+
393
+
394
+ </th><th>
395
+
396
+ Modifiers
397
+
398
+
399
+ </th><th>
400
+
401
+ Description
402
+
403
+
404
+ </th></tr></thead>
405
+ <tbody><tr><td>
406
+
407
+ [despawn()](./server.light.despawn.md)
408
+
409
+
410
+ </td><td>
411
+
412
+
413
+ </td><td>
414
+
415
+ Despawns the Light from the world.
416
+
417
+
418
+ </td></tr>
419
+ <tr><td>
420
+
421
+ [setAngle(angle)](./server.light.setangle.md)
422
+
423
+
424
+ </td><td>
425
+
426
+
427
+ </td><td>
428
+
429
+ Sets the angle of the spotlight if the light type is spotlight.
430
+
431
+
432
+ </td></tr>
433
+ <tr><td>
434
+
435
+ [setAttachedToEntity(entity)](./server.light.setattachedtoentity.md)
436
+
437
+
438
+ </td><td>
439
+
440
+
441
+ </td><td>
442
+
443
+ Sets the entity to which the Light is attached.
444
+
445
+
446
+ </td></tr>
447
+ <tr><td>
448
+
449
+ [setColor(color)](./server.light.setcolor.md)
450
+
451
+
452
+ </td><td>
453
+
454
+
455
+ </td><td>
456
+
457
+ Sets the color of the light.
458
+
459
+
460
+ </td></tr>
461
+ <tr><td>
462
+
463
+ [setDistance(distance)](./server.light.setdistance.md)
464
+
465
+
466
+ </td><td>
467
+
468
+
469
+ </td><td>
470
+
471
+ Sets the maximum distance the light will illuminate.
472
+
473
+
474
+ </td></tr>
475
+ <tr><td>
476
+
477
+ [setIntensity(intensity)](./server.light.setintensity.md)
478
+
479
+
480
+ </td><td>
481
+
482
+
483
+ </td><td>
484
+
485
+ Sets the intensity of the light.
486
+
487
+
488
+ </td></tr>
489
+ <tr><td>
490
+
491
+ [setOffset(offset)](./server.light.setoffset.md)
492
+
493
+
494
+ </td><td>
495
+
496
+
497
+ </td><td>
498
+
499
+ Sets the offset of the light from the attached entity or position.
500
+
501
+
502
+ </td></tr>
503
+ <tr><td>
504
+
505
+ [setPenumbra(penumbra)](./server.light.setpenumbra.md)
506
+
507
+
508
+ </td><td>
509
+
510
+
511
+ </td><td>
512
+
513
+ Sets the penumbra of the spotlight if the light type is spotlight.
514
+
515
+
516
+ </td></tr>
517
+ <tr><td>
518
+
519
+ [setPosition(position)](./server.light.setposition.md)
520
+
521
+
522
+ </td><td>
523
+
524
+
525
+ </td><td>
526
+
527
+ Sets the position of the light.
528
+
529
+
530
+ </td></tr>
531
+ <tr><td>
532
+
533
+ [setTrackedEntity(entity)](./server.light.settrackedentity.md)
534
+
535
+
536
+ </td><td>
537
+
538
+
539
+ </td><td>
540
+
541
+ Sets the entity the spotlight will constantly point at if the light type is spotlight.
542
+
543
+
544
+ </td></tr>
545
+ <tr><td>
546
+
547
+ [setTrackedPosition(position)](./server.light.settrackedposition.md)
548
+
549
+
550
+ </td><td>
551
+
552
+
553
+ </td><td>
554
+
555
+ Sets the position the spotlight will constantly point at if the light type is spotlight.
556
+
557
+
558
+ </td></tr>
559
+ <tr><td>
560
+
561
+ [spawn(world)](./server.light.spawn.md)
562
+
563
+
564
+ </td><td>
565
+
566
+
567
+ </td><td>
568
+
569
+ Spawns the Light into the world.
570
+
571
+
572
+ </td></tr>
573
+ </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; [Light](./server.light.md) &gt; [offset](./server.light.offset.md)
4
+
5
+ ## Light.offset property
6
+
7
+ The offset of the light from the attached entity or position.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ get offset(): Vector3Like | 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; [Light](./server.light.md) &gt; [penumbra](./server.light.penumbra.md)
4
+
5
+ ## Light.penumbra property
6
+
7
+ If type is spotlight, the penumbra of the spotlight.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ get penumbra(): number | 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; [Light](./server.light.md) &gt; [position](./server.light.position.md)
4
+
5
+ ## Light.position property
6
+
7
+ The position of the light in the world if explicitly set.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ get position(): Vector3Like | undefined;
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; [Light](./server.light.md) &gt; [setAngle](./server.light.setangle.md)
4
+
5
+ ## Light.setAngle() method
6
+
7
+ Sets the angle of the spotlight if the light type is spotlight.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ setAngle(angle: number): 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
+ angle
36
+
37
+
38
+ </td><td>
39
+
40
+ number
41
+
42
+
43
+ </td><td>
44
+
45
+ The angle of the spotlight.
46
+
47
+
48
+ </td></tr>
49
+ </tbody></table>
50
+ **Returns:**
51
+
52
+ void
53
+
@@ -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; [Light](./server.light.md) &gt; [setAttachedToEntity](./server.light.setattachedtoentity.md)
4
+
5
+ ## Light.setAttachedToEntity() method
6
+
7
+ Sets the entity to which the Light is attached.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ setAttachedToEntity(entity: Entity): 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
+ entity
36
+
37
+
38
+ </td><td>
39
+
40
+ [Entity](./server.entity.md)
41
+
42
+
43
+ </td><td>
44
+
45
+ The entity to attach the Light to.
46
+
47
+
48
+ </td></tr>
49
+ </tbody></table>
50
+ **Returns:**
51
+
52
+ void
53
+