hytopia 0.1.59 → 0.1.60
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.audio._constructor_.md +2 -0
- package/docs/server.audio.setattachedtoentity.md +1 -1
- package/docs/server.audiomanager.unregisteraudio.md +1 -1
- package/docs/server.audiomanager.unregisterentityattachedaudios.md +1 -1
- package/docs/server.md +33 -0
- package/docs/server.sceneui._constructor_.md +49 -0
- package/docs/server.sceneui.attachedtoentity.md +11 -0
- package/docs/server.sceneui.id.md +11 -0
- package/docs/server.sceneui.isloaded.md +11 -0
- package/docs/server.sceneui.load.md +53 -0
- package/docs/server.sceneui.md +344 -0
- package/docs/server.sceneui.offset.md +11 -0
- package/docs/server.sceneui.position.md +11 -0
- package/docs/server.sceneui.setattachedtoentity.md +53 -0
- package/docs/server.sceneui.setoffset.md +53 -0
- package/docs/server.sceneui.setposition.md +53 -0
- package/docs/server.sceneui.setstate.md +53 -0
- package/docs/server.sceneui.state.md +11 -0
- package/docs/server.sceneui.templateid.md +11 -0
- package/docs/server.sceneui.unload.md +17 -0
- package/docs/server.sceneui.world.md +11 -0
- package/docs/server.sceneuimanager.getallentityattachedsceneuis.md +55 -0
- package/docs/server.sceneuimanager.getallsceneuis.md +19 -0
- package/docs/server.sceneuimanager.md +127 -0
- package/docs/server.sceneuimanager.unloadentityattachedsceneuis.md +53 -0
- package/docs/server.sceneuimanager.world.md +13 -0
- package/docs/server.sceneuioptions.attachedtoentity.md +13 -0
- package/docs/server.sceneuioptions.md +133 -0
- package/docs/server.sceneuioptions.offset.md +13 -0
- package/docs/server.sceneuioptions.position.md +13 -0
- package/docs/server.sceneuioptions.state.md +13 -0
- package/docs/server.sceneuioptions.templateid.md +13 -0
- package/docs/server.world.md +21 -0
- package/docs/server.world.sceneuimanager.md +13 -0
- package/package.json +1 -1
- package/server.api.json +986 -4
- package/server.d.ts +140 -4
- package/server.js +83 -83
package/docs/server.md
CHANGED
@@ -258,6 +258,28 @@ Represents a quaternion.
|
|
258
258
|
Represents a rigid body in a world's physics simulation.
|
259
259
|
|
260
260
|
|
261
|
+
</td></tr>
|
262
|
+
<tr><td>
|
263
|
+
|
264
|
+
[SceneUI](./server.sceneui.md)
|
265
|
+
|
266
|
+
|
267
|
+
</td><td>
|
268
|
+
|
269
|
+
UI rendered within the 3D space of a world's game scene.
|
270
|
+
|
271
|
+
|
272
|
+
</td></tr>
|
273
|
+
<tr><td>
|
274
|
+
|
275
|
+
[SceneUIManager](./server.sceneuimanager.md)
|
276
|
+
|
277
|
+
|
278
|
+
</td><td>
|
279
|
+
|
280
|
+
Manages SceneUI instances in a world.
|
281
|
+
|
282
|
+
|
261
283
|
</td></tr>
|
262
284
|
<tr><td>
|
263
285
|
|
@@ -670,6 +692,17 @@ A RGB color.
|
|
670
692
|
Options for creating a RigidBody instance.
|
671
693
|
|
672
694
|
|
695
|
+
</td></tr>
|
696
|
+
<tr><td>
|
697
|
+
|
698
|
+
[SceneUIOptions](./server.sceneuioptions.md)
|
699
|
+
|
700
|
+
|
701
|
+
</td><td>
|
702
|
+
|
703
|
+
Options for creating a SceneUI instance.
|
704
|
+
|
705
|
+
|
673
706
|
</td></tr>
|
674
707
|
<tr><td>
|
675
708
|
|
@@ -0,0 +1,49 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [SceneUI](./server.sceneui.md) > [(constructor)](./server.sceneui._constructor_.md)
|
4
|
+
|
5
|
+
## SceneUI.(constructor)
|
6
|
+
|
7
|
+
Constructs a new instance of the `SceneUI` class
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
constructor(options: SceneUIOptions);
|
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
|
+
options
|
36
|
+
|
37
|
+
|
38
|
+
</td><td>
|
39
|
+
|
40
|
+
[SceneUIOptions](./server.sceneuioptions.md)
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
The options for the SceneUI instance.
|
46
|
+
|
47
|
+
|
48
|
+
</td></tr>
|
49
|
+
</tbody></table>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [SceneUI](./server.sceneui.md) > [attachedToEntity](./server.sceneui.attachedtoentity.md)
|
4
|
+
|
5
|
+
## SceneUI.attachedToEntity property
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
get attachedToEntity(): Entity | undefined;
|
11
|
+
```
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [SceneUI](./server.sceneui.md) > [id](./server.sceneui.id.md)
|
4
|
+
|
5
|
+
## SceneUI.id property
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
get id(): number | undefined;
|
11
|
+
```
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [SceneUI](./server.sceneui.md) > [isLoaded](./server.sceneui.isloaded.md)
|
4
|
+
|
5
|
+
## SceneUI.isLoaded property
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
get isLoaded(): boolean;
|
11
|
+
```
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [SceneUI](./server.sceneui.md) > [load](./server.sceneui.load.md)
|
4
|
+
|
5
|
+
## SceneUI.load() method
|
6
|
+
|
7
|
+
Loads the SceneUI into the world.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
load(world: World): 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
|
+
world
|
36
|
+
|
37
|
+
|
38
|
+
</td><td>
|
39
|
+
|
40
|
+
[World](./server.world.md)
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
The world to load the SceneUI into.
|
46
|
+
|
47
|
+
|
48
|
+
</td></tr>
|
49
|
+
</tbody></table>
|
50
|
+
**Returns:**
|
51
|
+
|
52
|
+
void
|
53
|
+
|
@@ -0,0 +1,344 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [SceneUI](./server.sceneui.md)
|
4
|
+
|
5
|
+
## SceneUI class
|
6
|
+
|
7
|
+
UI rendered within the 3D space of a world's game scene.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
export default class SceneUI implements protocol.Serializable
|
13
|
+
```
|
14
|
+
**Implements:** protocol.Serializable
|
15
|
+
|
16
|
+
## Remarks
|
17
|
+
|
18
|
+
SceneUI instances are created directly as instances. They support a variety of configuration options through the [SceneUIOptions](./server.sceneuioptions.md) constructor argument.
|
19
|
+
|
20
|
+
## Example
|
21
|
+
|
22
|
+
|
23
|
+
```typescript
|
24
|
+
const sceneUI = new SceneUI({
|
25
|
+
templateId: 'player-health-bar',
|
26
|
+
attachedToEntity: playerEntity,
|
27
|
+
offset: { x: 0, y: 1, z: 0 },
|
28
|
+
});
|
29
|
+
```
|
30
|
+
|
31
|
+
## Constructors
|
32
|
+
|
33
|
+
<table><thead><tr><th>
|
34
|
+
|
35
|
+
Constructor
|
36
|
+
|
37
|
+
|
38
|
+
</th><th>
|
39
|
+
|
40
|
+
Modifiers
|
41
|
+
|
42
|
+
|
43
|
+
</th><th>
|
44
|
+
|
45
|
+
Description
|
46
|
+
|
47
|
+
|
48
|
+
</th></tr></thead>
|
49
|
+
<tbody><tr><td>
|
50
|
+
|
51
|
+
[(constructor)(options)](./server.sceneui._constructor_.md)
|
52
|
+
|
53
|
+
|
54
|
+
</td><td>
|
55
|
+
|
56
|
+
|
57
|
+
</td><td>
|
58
|
+
|
59
|
+
Constructs a new instance of the `SceneUI` class
|
60
|
+
|
61
|
+
|
62
|
+
</td></tr>
|
63
|
+
</tbody></table>
|
64
|
+
|
65
|
+
## Properties
|
66
|
+
|
67
|
+
<table><thead><tr><th>
|
68
|
+
|
69
|
+
Property
|
70
|
+
|
71
|
+
|
72
|
+
</th><th>
|
73
|
+
|
74
|
+
Modifiers
|
75
|
+
|
76
|
+
|
77
|
+
</th><th>
|
78
|
+
|
79
|
+
Type
|
80
|
+
|
81
|
+
|
82
|
+
</th><th>
|
83
|
+
|
84
|
+
Description
|
85
|
+
|
86
|
+
|
87
|
+
</th></tr></thead>
|
88
|
+
<tbody><tr><td>
|
89
|
+
|
90
|
+
[attachedToEntity](./server.sceneui.attachedtoentity.md)
|
91
|
+
|
92
|
+
|
93
|
+
</td><td>
|
94
|
+
|
95
|
+
`readonly`
|
96
|
+
|
97
|
+
|
98
|
+
</td><td>
|
99
|
+
|
100
|
+
[Entity](./server.entity.md) \| undefined
|
101
|
+
|
102
|
+
|
103
|
+
</td><td>
|
104
|
+
|
105
|
+
|
106
|
+
</td></tr>
|
107
|
+
<tr><td>
|
108
|
+
|
109
|
+
[id](./server.sceneui.id.md)
|
110
|
+
|
111
|
+
|
112
|
+
</td><td>
|
113
|
+
|
114
|
+
`readonly`
|
115
|
+
|
116
|
+
|
117
|
+
</td><td>
|
118
|
+
|
119
|
+
number \| undefined
|
120
|
+
|
121
|
+
|
122
|
+
</td><td>
|
123
|
+
|
124
|
+
|
125
|
+
</td></tr>
|
126
|
+
<tr><td>
|
127
|
+
|
128
|
+
[isLoaded](./server.sceneui.isloaded.md)
|
129
|
+
|
130
|
+
|
131
|
+
</td><td>
|
132
|
+
|
133
|
+
`readonly`
|
134
|
+
|
135
|
+
|
136
|
+
</td><td>
|
137
|
+
|
138
|
+
boolean
|
139
|
+
|
140
|
+
|
141
|
+
</td><td>
|
142
|
+
|
143
|
+
|
144
|
+
</td></tr>
|
145
|
+
<tr><td>
|
146
|
+
|
147
|
+
[offset](./server.sceneui.offset.md)
|
148
|
+
|
149
|
+
|
150
|
+
</td><td>
|
151
|
+
|
152
|
+
`readonly`
|
153
|
+
|
154
|
+
|
155
|
+
</td><td>
|
156
|
+
|
157
|
+
[Vector3Like](./server.vector3like.md) \| undefined
|
158
|
+
|
159
|
+
|
160
|
+
</td><td>
|
161
|
+
|
162
|
+
|
163
|
+
</td></tr>
|
164
|
+
<tr><td>
|
165
|
+
|
166
|
+
[position](./server.sceneui.position.md)
|
167
|
+
|
168
|
+
|
169
|
+
</td><td>
|
170
|
+
|
171
|
+
`readonly`
|
172
|
+
|
173
|
+
|
174
|
+
</td><td>
|
175
|
+
|
176
|
+
[Vector3Like](./server.vector3like.md) \| undefined
|
177
|
+
|
178
|
+
|
179
|
+
</td><td>
|
180
|
+
|
181
|
+
|
182
|
+
</td></tr>
|
183
|
+
<tr><td>
|
184
|
+
|
185
|
+
[state](./server.sceneui.state.md)
|
186
|
+
|
187
|
+
|
188
|
+
</td><td>
|
189
|
+
|
190
|
+
`readonly`
|
191
|
+
|
192
|
+
|
193
|
+
</td><td>
|
194
|
+
|
195
|
+
Readonly<object>
|
196
|
+
|
197
|
+
|
198
|
+
</td><td>
|
199
|
+
|
200
|
+
|
201
|
+
</td></tr>
|
202
|
+
<tr><td>
|
203
|
+
|
204
|
+
[templateId](./server.sceneui.templateid.md)
|
205
|
+
|
206
|
+
|
207
|
+
</td><td>
|
208
|
+
|
209
|
+
`readonly`
|
210
|
+
|
211
|
+
|
212
|
+
</td><td>
|
213
|
+
|
214
|
+
string
|
215
|
+
|
216
|
+
|
217
|
+
</td><td>
|
218
|
+
|
219
|
+
|
220
|
+
</td></tr>
|
221
|
+
<tr><td>
|
222
|
+
|
223
|
+
[world](./server.sceneui.world.md)
|
224
|
+
|
225
|
+
|
226
|
+
</td><td>
|
227
|
+
|
228
|
+
`readonly`
|
229
|
+
|
230
|
+
|
231
|
+
</td><td>
|
232
|
+
|
233
|
+
[World](./server.world.md) \| undefined
|
234
|
+
|
235
|
+
|
236
|
+
</td><td>
|
237
|
+
|
238
|
+
|
239
|
+
</td></tr>
|
240
|
+
</tbody></table>
|
241
|
+
|
242
|
+
## Methods
|
243
|
+
|
244
|
+
<table><thead><tr><th>
|
245
|
+
|
246
|
+
Method
|
247
|
+
|
248
|
+
|
249
|
+
</th><th>
|
250
|
+
|
251
|
+
Modifiers
|
252
|
+
|
253
|
+
|
254
|
+
</th><th>
|
255
|
+
|
256
|
+
Description
|
257
|
+
|
258
|
+
|
259
|
+
</th></tr></thead>
|
260
|
+
<tbody><tr><td>
|
261
|
+
|
262
|
+
[load(world)](./server.sceneui.load.md)
|
263
|
+
|
264
|
+
|
265
|
+
</td><td>
|
266
|
+
|
267
|
+
|
268
|
+
</td><td>
|
269
|
+
|
270
|
+
Loads the SceneUI into the world.
|
271
|
+
|
272
|
+
|
273
|
+
</td></tr>
|
274
|
+
<tr><td>
|
275
|
+
|
276
|
+
[setAttachedToEntity(entity)](./server.sceneui.setattachedtoentity.md)
|
277
|
+
|
278
|
+
|
279
|
+
</td><td>
|
280
|
+
|
281
|
+
|
282
|
+
</td><td>
|
283
|
+
|
284
|
+
Sets the entity to which the SceneUI is attached, following its position.
|
285
|
+
|
286
|
+
|
287
|
+
</td></tr>
|
288
|
+
<tr><td>
|
289
|
+
|
290
|
+
[setOffset(offset)](./server.sceneui.setoffset.md)
|
291
|
+
|
292
|
+
|
293
|
+
</td><td>
|
294
|
+
|
295
|
+
|
296
|
+
</td><td>
|
297
|
+
|
298
|
+
Sets the spatial offset of the SceneUI relative to the attached entity or position.
|
299
|
+
|
300
|
+
|
301
|
+
</td></tr>
|
302
|
+
<tr><td>
|
303
|
+
|
304
|
+
[setPosition(position)](./server.sceneui.setposition.md)
|
305
|
+
|
306
|
+
|
307
|
+
</td><td>
|
308
|
+
|
309
|
+
|
310
|
+
</td><td>
|
311
|
+
|
312
|
+
Sets the position of the SceneUI. Will detach from entity if attached.
|
313
|
+
|
314
|
+
|
315
|
+
</td></tr>
|
316
|
+
<tr><td>
|
317
|
+
|
318
|
+
[setState(state)](./server.sceneui.setstate.md)
|
319
|
+
|
320
|
+
|
321
|
+
</td><td>
|
322
|
+
|
323
|
+
|
324
|
+
</td><td>
|
325
|
+
|
326
|
+
Sets the state of the SceneUI by performing a shallow merge with existing state.
|
327
|
+
|
328
|
+
|
329
|
+
</td></tr>
|
330
|
+
<tr><td>
|
331
|
+
|
332
|
+
[unload()](./server.sceneui.unload.md)
|
333
|
+
|
334
|
+
|
335
|
+
</td><td>
|
336
|
+
|
337
|
+
|
338
|
+
</td><td>
|
339
|
+
|
340
|
+
Unloads the SceneUI from the world.
|
341
|
+
|
342
|
+
|
343
|
+
</td></tr>
|
344
|
+
</tbody></table>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [SceneUI](./server.sceneui.md) > [offset](./server.sceneui.offset.md)
|
4
|
+
|
5
|
+
## SceneUI.offset property
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
get offset(): Vector3Like | undefined;
|
11
|
+
```
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [SceneUI](./server.sceneui.md) > [position](./server.sceneui.position.md)
|
4
|
+
|
5
|
+
## SceneUI.position property
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
get position(): Vector3Like | undefined;
|
11
|
+
```
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [SceneUI](./server.sceneui.md) > [setAttachedToEntity](./server.sceneui.setattachedtoentity.md)
|
4
|
+
|
5
|
+
## SceneUI.setAttachedToEntity() method
|
6
|
+
|
7
|
+
Sets the entity to which the SceneUI is attached, following its position.
|
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 SceneUI to.
|
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) > [server](./server.md) > [SceneUI](./server.sceneui.md) > [setOffset](./server.sceneui.setoffset.md)
|
4
|
+
|
5
|
+
## SceneUI.setOffset() method
|
6
|
+
|
7
|
+
Sets the spatial offset of the SceneUI relative to the attached entity or position.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
setOffset(offset: Vector3Like): 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
|
+
offset
|
36
|
+
|
37
|
+
|
38
|
+
</td><td>
|
39
|
+
|
40
|
+
[Vector3Like](./server.vector3like.md)
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
The offset in the world.
|
46
|
+
|
47
|
+
|
48
|
+
</td></tr>
|
49
|
+
</tbody></table>
|
50
|
+
**Returns:**
|
51
|
+
|
52
|
+
void
|
53
|
+
|