hytopia 0.1.78 → 0.1.80

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.
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## Entity.despawn() method
6
6
 
7
- Despawns the entity from the world.
7
+ Despawns the entity and all children from the world.
8
8
 
9
9
  **Signature:**
10
10
 
@@ -528,6 +528,48 @@ number \| undefined
528
528
  The opacity of the entity between 0 and 1. 0 is fully transparent, 1 is fully opaque.
529
529
 
530
530
 
531
+ </td></tr>
532
+ <tr><td>
533
+
534
+ [parent](./server.entity.parent.md)
535
+
536
+
537
+ </td><td>
538
+
539
+ `readonly`
540
+
541
+
542
+ </td><td>
543
+
544
+ [Entity](./server.entity.md) \| undefined
545
+
546
+
547
+ </td><td>
548
+
549
+ The parent entity of the entity.
550
+
551
+
552
+ </td></tr>
553
+ <tr><td>
554
+
555
+ [parentNodeName](./server.entity.parentnodename.md)
556
+
557
+
558
+ </td><td>
559
+
560
+ `readonly`
561
+
562
+
563
+ </td><td>
564
+
565
+ string \| undefined
566
+
567
+
568
+ </td><td>
569
+
570
+ The name of the parent's node (if parent is a model entity) this entity is attached to when spawned.
571
+
572
+
531
573
  </td></tr>
532
574
  <tr><td>
533
575
 
@@ -622,7 +664,7 @@ Description
622
664
 
623
665
  </td><td>
624
666
 
625
- Despawns the entity from the world.
667
+ Despawns the entity and all children from the world.
626
668
 
627
669
 
628
670
  </td></tr>
@@ -698,7 +740,7 @@ Sets the tint color of the entity.
698
740
  </td></tr>
699
741
  <tr><td>
700
742
 
701
- [spawn(world, coordinate)](./server.entity.spawn.md)
743
+ [spawn(world, position, rotation)](./server.entity.spawn.md)
702
744
 
703
745
 
704
746
  </td><td>
@@ -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; [Entity](./server.entity.md) &gt; [parent](./server.entity.parent.md)
4
+
5
+ ## Entity.parent property
6
+
7
+ The parent entity of the entity.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ get parent(): Entity | 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; [Entity](./server.entity.md) &gt; [parentNodeName](./server.entity.parentnodename.md)
4
+
5
+ ## Entity.parentNodeName property
6
+
7
+ The name of the parent's node (if parent is a model entity) this entity is attached to when spawned.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ get parentNodeName(): string | undefined;
13
+ ```
@@ -9,7 +9,7 @@ Spawns the entity in the world.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- spawn(world: World, coordinate: Vector3Like): void;
12
+ spawn(world: World, position: Vector3Like, rotation?: QuaternionLike): void;
13
13
  ```
14
14
 
15
15
  ## Parameters
@@ -48,7 +48,7 @@ The world to spawn the entity in.
48
48
  </td></tr>
49
49
  <tr><td>
50
50
 
51
- coordinate
51
+ position
52
52
 
53
53
 
54
54
  </td><td>
@@ -58,7 +58,23 @@ coordinate
58
58
 
59
59
  </td><td>
60
60
 
61
- The coordinate to spawn the entity at.
61
+ The position to spawn the entity at.
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
+ _(Optional)_ The optional rotation to spawn the entity with.
62
78
 
63
79
 
64
80
  </td></tr>
@@ -0,0 +1,55 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [EntityManager](./server.entitymanager.md) &gt; [getEntityChildren](./server.entitymanager.getentitychildren.md)
4
+
5
+ ## EntityManager.getEntityChildren() method
6
+
7
+ Gets all child entities of an entity.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ getEntityChildren(entity: Entity): Entity[];
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 get the children for.
46
+
47
+
48
+ </td></tr>
49
+ </tbody></table>
50
+ **Returns:**
51
+
52
+ [Entity](./server.entity.md)<!-- -->\[\]
53
+
54
+ All child entities of the entity.
55
+
@@ -160,6 +160,20 @@ Gets all spawned entities in the world with a tag that includes a specific subst
160
160
  Gets a spawned entity in the world by its id.
161
161
 
162
162
 
163
+ </td></tr>
164
+ <tr><td>
165
+
166
+ [getEntityChildren(entity)](./server.entitymanager.getentitychildren.md)
167
+
168
+
169
+ </td><td>
170
+
171
+
172
+ </td><td>
173
+
174
+ Gets all child entities of an entity.
175
+
176
+
163
177
  </td></tr>
164
178
  <tr><td>
165
179
 
@@ -224,6 +224,44 @@ number
224
224
  _(Optional)_ The opacity of the entity between 0 and 1. 0 is fully transparent, 1 is fully opaque.
225
225
 
226
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
+
227
265
  </td></tr>
228
266
  <tr><td>
229
267
 
@@ -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; [EntityOptions](./server.entityoptions.md) &gt; [parent](./server.entityoptions.parent.md)
4
+
5
+ ## EntityOptions.parent property
6
+
7
+ The parent entity of the entity, entities with a parent will ignore creating their own colliders.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ parent?: Entity;
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; [EntityOptions](./server.entityoptions.md) &gt; [parentNodeName](./server.entityoptions.parentnodename.md)
4
+
5
+ ## EntityOptions.parentNodeName property
6
+
7
+ The name of the parent's node (if parent is a model entity) to attach the entity to.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ parentNodeName?: string;
13
+ ```
@@ -0,0 +1,55 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [ModelRegistry](./server.modelregistry.md) &gt; [getNodeNames](./server.modelregistry.getnodenames.md)
4
+
5
+ ## ModelRegistry.getNodeNames() method
6
+
7
+ Retrieves the names of all nodes in a model.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ getNodeNames(modelUri: string): string[];
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
+ modelUri
36
+
37
+
38
+ </td><td>
39
+
40
+ string
41
+
42
+
43
+ </td><td>
44
+
45
+ The URI of the model to retrieve the node names for.
46
+
47
+
48
+ </td></tr>
49
+ </tbody></table>
50
+ **Returns:**
51
+
52
+ string\[\]
53
+
54
+ The names of all nodes in the model.
55
+
@@ -107,5 +107,33 @@ Description
107
107
  Retrieves the bounding box of a model.
108
108
 
109
109
 
110
+ </td></tr>
111
+ <tr><td>
112
+
113
+ [getNodeNames(modelUri)](./server.modelregistry.getnodenames.md)
114
+
115
+
116
+ </td><td>
117
+
118
+
119
+ </td><td>
120
+
121
+ Retrieves the names of all nodes in a model.
122
+
123
+
124
+ </td></tr>
125
+ <tr><td>
126
+
127
+ [modelHasNode(modelUri, nodeName)](./server.modelregistry.modelhasnode.md)
128
+
129
+
130
+ </td><td>
131
+
132
+
133
+ </td><td>
134
+
135
+ Checks if a model has a node with the given name.
136
+
137
+
110
138
  </td></tr>
111
139
  </tbody></table>
@@ -0,0 +1,71 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [ModelRegistry](./server.modelregistry.md) &gt; [modelHasNode](./server.modelregistry.modelhasnode.md)
4
+
5
+ ## ModelRegistry.modelHasNode() method
6
+
7
+ Checks if a model has a node with the given name.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ modelHasNode(modelUri: string, nodeName: string): boolean;
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
+ modelUri
36
+
37
+
38
+ </td><td>
39
+
40
+ string
41
+
42
+
43
+ </td><td>
44
+
45
+ The URI of the model to check.
46
+
47
+
48
+ </td></tr>
49
+ <tr><td>
50
+
51
+ nodeName
52
+
53
+
54
+ </td><td>
55
+
56
+ string
57
+
58
+
59
+ </td><td>
60
+
61
+ The name of the node to check for.
62
+
63
+
64
+ </td></tr>
65
+ </tbody></table>
66
+ **Returns:**
67
+
68
+ boolean
69
+
70
+ Whether the model has a node with the given name.
71
+
@@ -0,0 +1,3 @@
1
+ # child-entity
2
+
3
+ An example showing how to spawn an entity as a child of another entity. In this example, we spawn a sword entity in the hand of the player entity.