hytopia 0.6.5 → 0.6.7
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/README.md +3 -3
- package/bun-server.mjs +141 -141
- package/docs/server.collisiongroup.md +15 -15
- package/docs/server.moveoptions.md +1 -0
- package/docs/server.pathfindingentitycontroller._constructor_.md +49 -0
- package/docs/server.pathfindingentitycontroller.md +34 -0
- package/docs/server.playercamera.md +35 -0
- package/docs/server.playercamera.setshoulderangle.md +53 -0
- package/docs/server.playercamera.shoulderangle.md +13 -0
- package/docs/server.playercameraevent.md +14 -0
- package/docs/server.playercameraeventpayloads._player_camera.set_shoulder_angle_.md +16 -0
- package/docs/server.playercameraeventpayloads.md +19 -0
- package/docs/{server.rigidbody.createandaddchildcolliderstosimulation.md → server.rigidbody.createandaddchildcolliders.md} +7 -3
- package/docs/server.rigidbody.md +1 -1
- package/docs/server.simpleentitycontroller._constructor_.md +49 -0
- package/docs/server.simpleentitycontroller.md +62 -0
- package/docs/server.simpleentitycontroller.stopface.md +17 -0
- package/docs/server.simpleentitycontroller.stopmove.md +17 -0
- package/docs/server.supported_input_keys.md +1 -1
- package/node-server.mjs +148 -148
- package/package.json +1 -1
- package/server.api.json +301 -29
- package/server.d.ts +76 -16
@@ -88,12 +88,12 @@ ENTITY\_SENSOR
|
|
88
88
|
</td></tr>
|
89
89
|
<tr><td>
|
90
90
|
|
91
|
-
|
91
|
+
ENVIRONMENT\_ENTITY
|
92
92
|
|
93
93
|
|
94
94
|
</td><td>
|
95
95
|
|
96
|
-
`
|
96
|
+
`8`
|
97
97
|
|
98
98
|
|
99
99
|
</td><td>
|
@@ -102,12 +102,12 @@ GROUP\_1
|
|
102
102
|
</td></tr>
|
103
103
|
<tr><td>
|
104
104
|
|
105
|
-
GROUP\
|
105
|
+
GROUP\_1
|
106
106
|
|
107
107
|
|
108
108
|
</td><td>
|
109
109
|
|
110
|
-
`
|
110
|
+
`32`
|
111
111
|
|
112
112
|
|
113
113
|
</td><td>
|
@@ -116,7 +116,7 @@ GROUP\_10
|
|
116
116
|
</td></tr>
|
117
117
|
<tr><td>
|
118
118
|
|
119
|
-
GROUP\
|
119
|
+
GROUP\_10
|
120
120
|
|
121
121
|
|
122
122
|
</td><td>
|
@@ -130,7 +130,7 @@ GROUP\_11
|
|
130
130
|
</td></tr>
|
131
131
|
<tr><td>
|
132
132
|
|
133
|
-
GROUP\
|
133
|
+
GROUP\_11
|
134
134
|
|
135
135
|
|
136
136
|
</td><td>
|
@@ -149,7 +149,7 @@ GROUP\_2
|
|
149
149
|
|
150
150
|
</td><td>
|
151
151
|
|
152
|
-
`
|
152
|
+
`64`
|
153
153
|
|
154
154
|
|
155
155
|
</td><td>
|
@@ -163,7 +163,7 @@ GROUP\_3
|
|
163
163
|
|
164
164
|
</td><td>
|
165
165
|
|
166
|
-
`
|
166
|
+
`128`
|
167
167
|
|
168
168
|
|
169
169
|
</td><td>
|
@@ -177,7 +177,7 @@ GROUP\_4
|
|
177
177
|
|
178
178
|
</td><td>
|
179
179
|
|
180
|
-
`
|
180
|
+
`256`
|
181
181
|
|
182
182
|
|
183
183
|
</td><td>
|
@@ -191,7 +191,7 @@ GROUP\_5
|
|
191
191
|
|
192
192
|
</td><td>
|
193
193
|
|
194
|
-
`
|
194
|
+
`512`
|
195
195
|
|
196
196
|
|
197
197
|
</td><td>
|
@@ -205,7 +205,7 @@ GROUP\_6
|
|
205
205
|
|
206
206
|
</td><td>
|
207
207
|
|
208
|
-
`
|
208
|
+
`1024`
|
209
209
|
|
210
210
|
|
211
211
|
</td><td>
|
@@ -219,7 +219,7 @@ GROUP\_7
|
|
219
219
|
|
220
220
|
</td><td>
|
221
221
|
|
222
|
-
`
|
222
|
+
`2048`
|
223
223
|
|
224
224
|
|
225
225
|
</td><td>
|
@@ -233,7 +233,7 @@ GROUP\_8
|
|
233
233
|
|
234
234
|
</td><td>
|
235
235
|
|
236
|
-
`
|
236
|
+
`4096`
|
237
237
|
|
238
238
|
|
239
239
|
</td><td>
|
@@ -247,7 +247,7 @@ GROUP\_9
|
|
247
247
|
|
248
248
|
</td><td>
|
249
249
|
|
250
|
-
`
|
250
|
+
`8192`
|
251
251
|
|
252
252
|
|
253
253
|
</td><td>
|
@@ -261,7 +261,7 @@ PLAYER
|
|
261
261
|
|
262
262
|
</td><td>
|
263
263
|
|
264
|
-
`
|
264
|
+
`16`
|
265
265
|
|
266
266
|
|
267
267
|
</td><td>
|
@@ -18,6 +18,7 @@ export type MoveOptions = {
|
|
18
18
|
z?: boolean;
|
19
19
|
};
|
20
20
|
moveStartIdleAnimationsOnCompletion?: boolean;
|
21
|
+
moveStoppingDistance?: number;
|
21
22
|
};
|
22
23
|
```
|
23
24
|
**References:** [MoveCallback](./server.movecallback.md)<!-- -->, [MoveCompleteCallback](./server.movecompletecallback.md)
|
@@ -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) > [PathfindingEntityController](./server.pathfindingentitycontroller.md) > [(constructor)](./server.pathfindingentitycontroller._constructor_.md)
|
4
|
+
|
5
|
+
## PathfindingEntityController.(constructor)
|
6
|
+
|
7
|
+
Constructs a new instance of the `PathfindingEntityController` class
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
constructor(options?: PathfindingEntityControllerOptions);
|
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
|
+
PathfindingEntityControllerOptions
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
_(Optional)_ Options for the controller.
|
46
|
+
|
47
|
+
|
48
|
+
</td></tr>
|
49
|
+
</tbody></table>
|
@@ -17,6 +17,40 @@ export default class PathfindingEntityController extends SimpleEntityController
|
|
17
17
|
|
18
18
|
This class implements pathfinding using the A\* algorithm. Pathfinding when frequently called can cause performance issues, use it sparingly. The .pathfind() method should only need to be called once in nearly all cases when attempting to move an entity to a target coordinate.
|
19
19
|
|
20
|
+
## Constructors
|
21
|
+
|
22
|
+
<table><thead><tr><th>
|
23
|
+
|
24
|
+
Constructor
|
25
|
+
|
26
|
+
|
27
|
+
</th><th>
|
28
|
+
|
29
|
+
Modifiers
|
30
|
+
|
31
|
+
|
32
|
+
</th><th>
|
33
|
+
|
34
|
+
Description
|
35
|
+
|
36
|
+
|
37
|
+
</th></tr></thead>
|
38
|
+
<tbody><tr><td>
|
39
|
+
|
40
|
+
[(constructor)(options)](./server.pathfindingentitycontroller._constructor_.md)
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
|
46
|
+
</td><td>
|
47
|
+
|
48
|
+
Constructs a new instance of the `PathfindingEntityController` class
|
49
|
+
|
50
|
+
|
51
|
+
</td></tr>
|
52
|
+
</tbody></table>
|
53
|
+
|
20
54
|
## Properties
|
21
55
|
|
22
56
|
<table><thead><tr><th>
|
@@ -285,6 +285,27 @@ The current orientation of the camera.
|
|
285
285
|
The player that the camera belongs to.
|
286
286
|
|
287
287
|
|
288
|
+
</td></tr>
|
289
|
+
<tr><td>
|
290
|
+
|
291
|
+
[shoulderAngle](./server.playercamera.shoulderangle.md)
|
292
|
+
|
293
|
+
|
294
|
+
</td><td>
|
295
|
+
|
296
|
+
`readonly`
|
297
|
+
|
298
|
+
|
299
|
+
</td><td>
|
300
|
+
|
301
|
+
number
|
302
|
+
|
303
|
+
|
304
|
+
</td><td>
|
305
|
+
|
306
|
+
The shoulder angle of the camera in degrees.
|
307
|
+
|
308
|
+
|
288
309
|
</td></tr>
|
289
310
|
<tr><td>
|
290
311
|
|
@@ -522,6 +543,20 @@ Sets the nodes of the model the camera is attached to that will not be rendered
|
|
522
543
|
Sets the relative offset of the camera from the entity or position it is attached to.
|
523
544
|
|
524
545
|
|
546
|
+
</td></tr>
|
547
|
+
<tr><td>
|
548
|
+
|
549
|
+
[setShoulderAngle(shoulderAngle)](./server.playercamera.setshoulderangle.md)
|
550
|
+
|
551
|
+
|
552
|
+
</td><td>
|
553
|
+
|
554
|
+
|
555
|
+
</td><td>
|
556
|
+
|
557
|
+
Only used in third-person mode. Sets the shoulder angle of the camera in degrees. A positive value shifts the camera to the right, a negative value shifts it to the left.
|
558
|
+
|
559
|
+
|
525
560
|
</td></tr>
|
526
561
|
<tr><td>
|
527
562
|
|
@@ -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) > [PlayerCamera](./server.playercamera.md) > [setShoulderAngle](./server.playercamera.setshoulderangle.md)
|
4
|
+
|
5
|
+
## PlayerCamera.setShoulderAngle() method
|
6
|
+
|
7
|
+
Only used in third-person mode. Sets the shoulder angle of the camera in degrees. A positive value shifts the camera to the right, a negative value shifts it to the left.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
setShoulderAngle(shoulderAngle: 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
|
+
shoulderAngle
|
36
|
+
|
37
|
+
|
38
|
+
</td><td>
|
39
|
+
|
40
|
+
number
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
The shoulder angle to set in degrees.
|
46
|
+
|
47
|
+
|
48
|
+
</td></tr>
|
49
|
+
</tbody></table>
|
50
|
+
**Returns:**
|
51
|
+
|
52
|
+
void
|
53
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [PlayerCamera](./server.playercamera.md) > [shoulderAngle](./server.playercamera.shoulderangle.md)
|
4
|
+
|
5
|
+
## PlayerCamera.shoulderAngle property
|
6
|
+
|
7
|
+
The shoulder angle of the camera in degrees.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
get shoulderAngle(): number;
|
13
|
+
```
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [PlayerCameraEventPayloads](./server.playercameraeventpayloads.md) > ["PLAYER\_CAMERA.SET\_SHOULDER\_ANGLE"](./server.playercameraeventpayloads._player_camera.set_shoulder_angle_.md)
|
4
|
+
|
5
|
+
## PlayerCameraEventPayloads."PLAYER\_CAMERA.SET\_SHOULDER\_ANGLE" property
|
6
|
+
|
7
|
+
Emitted when the shoulder angle of the camera is set.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
[PlayerCameraEvent.SET_SHOULDER_ANGLE]: {
|
13
|
+
playerCamera: PlayerCamera;
|
14
|
+
shoulderAngle: number;
|
15
|
+
};
|
16
|
+
```
|
@@ -224,6 +224,25 @@ Emitted when the nodes of the model the camera is attached to are set to be hidd
|
|
224
224
|
Emitted when the offset of the camera is set.
|
225
225
|
|
226
226
|
|
227
|
+
</td></tr>
|
228
|
+
<tr><td>
|
229
|
+
|
230
|
+
["PLAYER\_CAMERA.SET\_SHOULDER\_ANGLE"](./server.playercameraeventpayloads._player_camera.set_shoulder_angle_.md)
|
231
|
+
|
232
|
+
|
233
|
+
</td><td>
|
234
|
+
|
235
|
+
|
236
|
+
</td><td>
|
237
|
+
|
238
|
+
{ playerCamera: [PlayerCamera](./server.playercamera.md)<!-- -->; shoulderAngle: number; }
|
239
|
+
|
240
|
+
|
241
|
+
</td><td>
|
242
|
+
|
243
|
+
Emitted when the shoulder angle of the camera is set.
|
244
|
+
|
245
|
+
|
227
246
|
</td></tr>
|
228
247
|
<tr><td>
|
229
248
|
|
@@ -1,15 +1,15 @@
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
2
|
|
3
|
-
[Home](./index.md) > [server](./server.md) > [RigidBody](./server.rigidbody.md) > [
|
3
|
+
[Home](./index.md) > [server](./server.md) > [RigidBody](./server.rigidbody.md) > [createAndAddChildColliders](./server.rigidbody.createandaddchildcolliders.md)
|
4
4
|
|
5
|
-
## RigidBody.
|
5
|
+
## RigidBody.createAndAddChildColliders() method
|
6
6
|
|
7
7
|
Creates and adds multiple child colliders to the rigid body for the simulation it belongs to.
|
8
8
|
|
9
9
|
**Signature:**
|
10
10
|
|
11
11
|
```typescript
|
12
|
-
|
12
|
+
createAndAddChildColliders(colliderOptions: ColliderOptions[]): Collider[];
|
13
13
|
```
|
14
14
|
|
15
15
|
## Parameters
|
@@ -53,3 +53,7 @@ The options for the child colliders to add to the rigid body.
|
|
53
53
|
|
54
54
|
The child colliders that were added to the rigid body.
|
55
55
|
|
56
|
+
## Remarks
|
57
|
+
|
58
|
+
If the rigid body is not simulated, the colliders will be added to the rigid body as pending child colliders and also simulated when the rigid body is simulated.
|
59
|
+
|
package/docs/server.rigidbody.md
CHANGED
@@ -1069,7 +1069,7 @@ Creates and adds a child collider to the rigid body for the simulation it belong
|
|
1069
1069
|
</td></tr>
|
1070
1070
|
<tr><td>
|
1071
1071
|
|
1072
|
-
[
|
1072
|
+
[createAndAddChildColliders(colliderOptions)](./server.rigidbody.createandaddchildcolliders.md)
|
1073
1073
|
|
1074
1074
|
|
1075
1075
|
</td><td>
|
@@ -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) > [SimpleEntityController](./server.simpleentitycontroller.md) > [(constructor)](./server.simpleentitycontroller._constructor_.md)
|
4
|
+
|
5
|
+
## SimpleEntityController.(constructor)
|
6
|
+
|
7
|
+
Constructs a new instance of the `SimpleEntityController` class
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
constructor(options?: SimpleEntityControllerOptions);
|
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
|
+
SimpleEntityControllerOptions
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
_(Optional)_ Options for the controller.
|
46
|
+
|
47
|
+
|
48
|
+
</td></tr>
|
49
|
+
</tbody></table>
|
@@ -37,6 +37,40 @@ myEntity.controller.move({ x: 10, y: 1, z: 10 }, 4, {
|
|
37
37
|
});
|
38
38
|
```
|
39
39
|
|
40
|
+
## Constructors
|
41
|
+
|
42
|
+
<table><thead><tr><th>
|
43
|
+
|
44
|
+
Constructor
|
45
|
+
|
46
|
+
|
47
|
+
</th><th>
|
48
|
+
|
49
|
+
Modifiers
|
50
|
+
|
51
|
+
|
52
|
+
</th><th>
|
53
|
+
|
54
|
+
Description
|
55
|
+
|
56
|
+
|
57
|
+
</th></tr></thead>
|
58
|
+
<tbody><tr><td>
|
59
|
+
|
60
|
+
[(constructor)(options)](./server.simpleentitycontroller._constructor_.md)
|
61
|
+
|
62
|
+
|
63
|
+
</td><td>
|
64
|
+
|
65
|
+
|
66
|
+
</td><td>
|
67
|
+
|
68
|
+
Constructs a new instance of the `SimpleEntityController` class
|
69
|
+
|
70
|
+
|
71
|
+
</td></tr>
|
72
|
+
</tbody></table>
|
73
|
+
|
40
74
|
## Properties
|
41
75
|
|
42
76
|
<table><thead><tr><th>
|
@@ -249,5 +283,33 @@ Moves the entity at a given speed in a straight line to a target coordinate.
|
|
249
283
|
Override of the [BaseEntityController.spawn()](./server.baseentitycontroller.spawn.md) method. Starts the set idle animations (if any) when the entity is spawned.
|
250
284
|
|
251
285
|
|
286
|
+
</td></tr>
|
287
|
+
<tr><td>
|
288
|
+
|
289
|
+
[stopFace()](./server.simpleentitycontroller.stopface.md)
|
290
|
+
|
291
|
+
|
292
|
+
</td><td>
|
293
|
+
|
294
|
+
|
295
|
+
</td><td>
|
296
|
+
|
297
|
+
Stops the entity from attempting to face a target coordinate.
|
298
|
+
|
299
|
+
|
300
|
+
</td></tr>
|
301
|
+
<tr><td>
|
302
|
+
|
303
|
+
[stopMove()](./server.simpleentitycontroller.stopmove.md)
|
304
|
+
|
305
|
+
|
306
|
+
</td><td>
|
307
|
+
|
308
|
+
|
309
|
+
</td><td>
|
310
|
+
|
311
|
+
Stops the entity from continuing to move it's current target coordinate.
|
312
|
+
|
313
|
+
|
252
314
|
</td></tr>
|
253
315
|
</tbody></table>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [SimpleEntityController](./server.simpleentitycontroller.md) > [stopFace](./server.simpleentitycontroller.stopface.md)
|
4
|
+
|
5
|
+
## SimpleEntityController.stopFace() method
|
6
|
+
|
7
|
+
Stops the entity from attempting to face a target coordinate.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
stopFace(): void;
|
13
|
+
```
|
14
|
+
**Returns:**
|
15
|
+
|
16
|
+
void
|
17
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [SimpleEntityController](./server.simpleentitycontroller.md) > [stopMove](./server.simpleentitycontroller.stopmove.md)
|
4
|
+
|
5
|
+
## SimpleEntityController.stopMove() method
|
6
|
+
|
7
|
+
Stops the entity from continuing to move it's current target coordinate.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
stopMove(): void;
|
13
|
+
```
|
14
|
+
**Returns:**
|
15
|
+
|
16
|
+
void
|
17
|
+
|
@@ -9,5 +9,5 @@ The input keys that are included in the PlayerInput.
|
|
9
9
|
**Signature:**
|
10
10
|
|
11
11
|
```typescript
|
12
|
-
SUPPORTED_INPUT_KEYS: readonly ["w", "a", "s", "d", "sp", "sh", "tb", "ml", "mr", "q", "e", "r", "f", "z", "x", "c", "v", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0"]
|
12
|
+
SUPPORTED_INPUT_KEYS: readonly ["w", "a", "s", "d", "sp", "sh", "tb", "ml", "mr", "q", "e", "r", "f", "z", "x", "c", "v", "u", "i", "o", "j", "k", "l", "n", "m", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0"]
|
13
13
|
```
|