hytopia 0.1.95 → 0.1.97
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.md +66 -0
- package/docs/server.pathfindabortcallback.md +13 -0
- package/docs/server.pathfindcompletecallback.md +13 -0
- package/docs/server.pathfindingentitycontroller.debug.md +13 -0
- package/docs/server.pathfindingentitycontroller.maxfall.md +13 -0
- package/docs/server.pathfindingentitycontroller.maxjump.md +13 -0
- package/docs/server.pathfindingentitycontroller.maxopensetiterations.md +13 -0
- package/docs/server.pathfindingentitycontroller.md +287 -0
- package/docs/server.pathfindingentitycontroller.pathfind.md +87 -0
- package/docs/server.pathfindingentitycontroller.speed.md +13 -0
- package/docs/server.pathfindingentitycontroller.target.md +13 -0
- package/docs/server.pathfindingentitycontroller.verticalpenalty.md +13 -0
- package/docs/server.pathfindingentitycontroller.waypointnextindex.md +13 -0
- package/docs/server.pathfindingentitycontroller.waypoints.md +13 -0
- package/docs/server.pathfindingentitycontroller.waypointtimeoutms.md +13 -0
- package/docs/server.pathfindingoptions.md +26 -0
- package/docs/server.playerentitycontroller.autocancelmouseleftclick.md +13 -0
- package/docs/server.playerentitycontroller.idleloopedanimations.md +13 -0
- package/docs/server.playerentitycontroller.interactoneshotanimations.md +13 -0
- package/docs/server.playerentitycontroller.jumponeshotanimations.md +13 -0
- package/docs/server.playerentitycontroller.md +114 -0
- package/docs/server.playerentitycontroller.runloopedanimations.md +13 -0
- package/docs/server.playerentitycontroller.walkloopedanimations.md +13 -0
- package/docs/server.playerentitycontrolleroptions.autocancelmouseleftclick.md +13 -0
- package/docs/server.playerentitycontrolleroptions.idleloopedanimations.md +13 -0
- package/docs/server.playerentitycontrolleroptions.interactoneshotanimations.md +13 -0
- package/docs/server.playerentitycontrolleroptions.jumponeshotanimations.md +13 -0
- package/docs/server.playerentitycontrolleroptions.md +114 -0
- package/docs/server.playerentitycontrolleroptions.runloopedanimations.md +13 -0
- package/docs/server.playerentitycontrolleroptions.walkloopedanimations.md +13 -0
- package/docs/server.simpleentitycontroller.jump.md +53 -0
- package/docs/server.simpleentitycontroller.md +14 -0
- package/docs/server.waypointmovecompletecallback.md +15 -0
- package/docs/server.waypointmoveskippedcallback.md +15 -0
- package/examples/ai-agents/.env.example +2 -0
- package/examples/ai-agents/README.md +17 -0
- package/examples/ai-agents/bun.lockb +0 -0
- package/examples/big-world/bun.lockb +0 -0
- package/examples/block-entity/bun.lockb +0 -0
- package/examples/child-entity/bun.lockb +0 -0
- package/examples/child-entity/package-lock.json +30 -0
- package/examples/custom-ui/bun.lockb +0 -0
- package/examples/entity-controller/bun.lockb +0 -0
- package/examples/entity-spawn/bun.lockb +0 -0
- package/examples/hole-in-wall-game/bun.lockb +0 -0
- package/examples/lighting/bun.lockb +0 -0
- package/examples/pathfinding/README.md +3 -0
- package/examples/pathfinding/assets/map.json +25828 -0
- package/examples/pathfinding/bun.lockb +0 -0
- package/examples/pathfinding/index.ts +113 -0
- package/examples/pathfinding/package.json +16 -0
- package/examples/payload-game/bun.lockb +0 -0
- package/examples/wall-dodge-game/bun.lockb +0 -0
- package/examples/wall-dodge-game/package-lock.json +30 -0
- package/examples/zombies-fps/assets/audio/sfx/pistol-shoot-1.mp3 +0 -0
- package/examples/zombies-fps/assets/audio/sfx/pistol-shoot-2.mp3 +0 -0
- package/examples/zombies-fps/assets/audio/sfx/pistol-shoot.mp3 +0 -0
- package/examples/zombies-fps/assets/maps/terrain.json +0 -12
- package/examples/zombies-fps/assets/models/items/pistol.glb +0 -0
- package/examples/zombies-fps/assets/ui/index.html +35 -0
- package/examples/zombies-fps/bun.lockb +0 -0
- package/examples/zombies-fps/classes/GamePlayerEntity.ts +62 -5
- package/examples/zombies-fps/classes/GunEntity.ts +66 -0
- package/examples/zombies-fps/classes/PurchaseBarrierEntity.ts +1 -1
- package/examples/zombies-fps/classes/guns/BulletEntity.ts +0 -0
- package/examples/zombies-fps/classes/guns/PistolEntity.ts +49 -0
- package/examples/zombies-fps/gameConfig.ts +8 -9
- package/examples/zombies-fps/index.ts +5 -1
- package/package.json +1 -1
- package/server.api.json +1006 -8
- package/server.d.ts +156 -0
- package/server.js +87 -87
@@ -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) > [PlayerEntityController](./server.playerentitycontroller.md) > [interactOneshotAnimations](./server.playerentitycontroller.interactoneshotanimations.md)
|
4
|
+
|
5
|
+
## PlayerEntityController.interactOneshotAnimations property
|
6
|
+
|
7
|
+
The oneshot animation(s) that will play when the entity interacts (left click)
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
interactOneshotAnimations: string[];
|
13
|
+
```
|
@@ -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) > [PlayerEntityController](./server.playerentitycontroller.md) > [jumpOneshotAnimations](./server.playerentitycontroller.jumponeshotanimations.md)
|
4
|
+
|
5
|
+
## PlayerEntityController.jumpOneshotAnimations property
|
6
|
+
|
7
|
+
The oneshot animation(s) that will play when the entity is jumping.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
jumpOneshotAnimations: string[];
|
13
|
+
```
|
@@ -91,6 +91,25 @@ Description
|
|
91
91
|
</th></tr></thead>
|
92
92
|
<tbody><tr><td>
|
93
93
|
|
94
|
+
[autoCancelMouseLeftClick](./server.playerentitycontroller.autocancelmouseleftclick.md)
|
95
|
+
|
96
|
+
|
97
|
+
</td><td>
|
98
|
+
|
99
|
+
|
100
|
+
</td><td>
|
101
|
+
|
102
|
+
boolean
|
103
|
+
|
104
|
+
|
105
|
+
</td><td>
|
106
|
+
|
107
|
+
Whether to automatically cancel left click input after first processed tick, defaults to true.
|
108
|
+
|
109
|
+
|
110
|
+
</td></tr>
|
111
|
+
<tr><td>
|
112
|
+
|
94
113
|
[canJump](./server.playerentitycontroller.canjump.md)
|
95
114
|
|
96
115
|
|
@@ -145,6 +164,44 @@ A function allowing custom logic to determine if the entity can run.
|
|
145
164
|
A function allowing custom logic to determine if the entity can walk.
|
146
165
|
|
147
166
|
|
167
|
+
</td></tr>
|
168
|
+
<tr><td>
|
169
|
+
|
170
|
+
[idleLoopedAnimations](./server.playerentitycontroller.idleloopedanimations.md)
|
171
|
+
|
172
|
+
|
173
|
+
</td><td>
|
174
|
+
|
175
|
+
|
176
|
+
</td><td>
|
177
|
+
|
178
|
+
string\[\]
|
179
|
+
|
180
|
+
|
181
|
+
</td><td>
|
182
|
+
|
183
|
+
The looped animation(s) that will play when the entity is idle.
|
184
|
+
|
185
|
+
|
186
|
+
</td></tr>
|
187
|
+
<tr><td>
|
188
|
+
|
189
|
+
[interactOneshotAnimations](./server.playerentitycontroller.interactoneshotanimations.md)
|
190
|
+
|
191
|
+
|
192
|
+
</td><td>
|
193
|
+
|
194
|
+
|
195
|
+
</td><td>
|
196
|
+
|
197
|
+
string\[\]
|
198
|
+
|
199
|
+
|
200
|
+
</td><td>
|
201
|
+
|
202
|
+
The oneshot animation(s) that will play when the entity interacts (left click)
|
203
|
+
|
204
|
+
|
148
205
|
</td></tr>
|
149
206
|
<tr><td>
|
150
207
|
|
@@ -187,6 +244,25 @@ boolean
|
|
187
244
|
Whether the entity is on a platform, a platform is any entity with a kinematic rigid body.
|
188
245
|
|
189
246
|
|
247
|
+
</td></tr>
|
248
|
+
<tr><td>
|
249
|
+
|
250
|
+
[jumpOneshotAnimations](./server.playerentitycontroller.jumponeshotanimations.md)
|
251
|
+
|
252
|
+
|
253
|
+
</td><td>
|
254
|
+
|
255
|
+
|
256
|
+
</td><td>
|
257
|
+
|
258
|
+
string\[\]
|
259
|
+
|
260
|
+
|
261
|
+
</td><td>
|
262
|
+
|
263
|
+
The oneshot animation(s) that will play when the entity is jumping.
|
264
|
+
|
265
|
+
|
190
266
|
</td></tr>
|
191
267
|
<tr><td>
|
192
268
|
|
@@ -227,6 +303,25 @@ The upward velocity applied to the entity when it jumps.
|
|
227
303
|
The platform the entity is on, if any.
|
228
304
|
|
229
305
|
|
306
|
+
</td></tr>
|
307
|
+
<tr><td>
|
308
|
+
|
309
|
+
[runLoopedAnimations](./server.playerentitycontroller.runloopedanimations.md)
|
310
|
+
|
311
|
+
|
312
|
+
</td><td>
|
313
|
+
|
314
|
+
|
315
|
+
</td><td>
|
316
|
+
|
317
|
+
string\[\]
|
318
|
+
|
319
|
+
|
320
|
+
</td><td>
|
321
|
+
|
322
|
+
The looped animation(s) that will play when the entity is running.
|
323
|
+
|
324
|
+
|
230
325
|
</td></tr>
|
231
326
|
<tr><td>
|
232
327
|
|
@@ -265,6 +360,25 @@ boolean
|
|
265
360
|
Whether the entity sticks to platforms.
|
266
361
|
|
267
362
|
|
363
|
+
</td></tr>
|
364
|
+
<tr><td>
|
365
|
+
|
366
|
+
[walkLoopedAnimations](./server.playerentitycontroller.walkloopedanimations.md)
|
367
|
+
|
368
|
+
|
369
|
+
</td><td>
|
370
|
+
|
371
|
+
|
372
|
+
</td><td>
|
373
|
+
|
374
|
+
string\[\]
|
375
|
+
|
376
|
+
|
377
|
+
</td><td>
|
378
|
+
|
379
|
+
The looped animation(s) that will play when the entity is walking.
|
380
|
+
|
381
|
+
|
268
382
|
</td></tr>
|
269
383
|
<tr><td>
|
270
384
|
|
@@ -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) > [PlayerEntityController](./server.playerentitycontroller.md) > [runLoopedAnimations](./server.playerentitycontroller.runloopedanimations.md)
|
4
|
+
|
5
|
+
## PlayerEntityController.runLoopedAnimations property
|
6
|
+
|
7
|
+
The looped animation(s) that will play when the entity is running.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
runLoopedAnimations: string[];
|
13
|
+
```
|
@@ -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) > [PlayerEntityController](./server.playerentitycontroller.md) > [walkLoopedAnimations](./server.playerentitycontroller.walkloopedanimations.md)
|
4
|
+
|
5
|
+
## PlayerEntityController.walkLoopedAnimations property
|
6
|
+
|
7
|
+
The looped animation(s) that will play when the entity is walking.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
walkLoopedAnimations: string[];
|
13
|
+
```
|
@@ -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) > [PlayerEntityControllerOptions](./server.playerentitycontrolleroptions.md) > [autoCancelMouseLeftClick](./server.playerentitycontrolleroptions.autocancelmouseleftclick.md)
|
4
|
+
|
5
|
+
## PlayerEntityControllerOptions.autoCancelMouseLeftClick property
|
6
|
+
|
7
|
+
Whether to automatically cancel left click input after first processed tick, defaults to true.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
autoCancelMouseLeftClick?: boolean;
|
13
|
+
```
|
@@ -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) > [PlayerEntityControllerOptions](./server.playerentitycontrolleroptions.md) > [idleLoopedAnimations](./server.playerentitycontrolleroptions.idleloopedanimations.md)
|
4
|
+
|
5
|
+
## PlayerEntityControllerOptions.idleLoopedAnimations property
|
6
|
+
|
7
|
+
Overrides the animation(s) that will play when the entity is idle.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
idleLoopedAnimations?: string[];
|
13
|
+
```
|
@@ -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) > [PlayerEntityControllerOptions](./server.playerentitycontrolleroptions.md) > [interactOneshotAnimations](./server.playerentitycontrolleroptions.interactoneshotanimations.md)
|
4
|
+
|
5
|
+
## PlayerEntityControllerOptions.interactOneshotAnimations property
|
6
|
+
|
7
|
+
Overrides the animation(s) that will play when the entity interacts (left click)
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
interactOneshotAnimations?: string[];
|
13
|
+
```
|
@@ -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) > [PlayerEntityControllerOptions](./server.playerentitycontrolleroptions.md) > [jumpOneshotAnimations](./server.playerentitycontrolleroptions.jumponeshotanimations.md)
|
4
|
+
|
5
|
+
## PlayerEntityControllerOptions.jumpOneshotAnimations property
|
6
|
+
|
7
|
+
Overrides the animation(s) that will play when the entity is jumping.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
jumpOneshotAnimations?: string[];
|
13
|
+
```
|
@@ -37,6 +37,25 @@ Description
|
|
37
37
|
</th></tr></thead>
|
38
38
|
<tbody><tr><td>
|
39
39
|
|
40
|
+
[autoCancelMouseLeftClick?](./server.playerentitycontrolleroptions.autocancelmouseleftclick.md)
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
|
46
|
+
</td><td>
|
47
|
+
|
48
|
+
boolean
|
49
|
+
|
50
|
+
|
51
|
+
</td><td>
|
52
|
+
|
53
|
+
_(Optional)_ Whether to automatically cancel left click input after first processed tick, defaults to true.
|
54
|
+
|
55
|
+
|
56
|
+
</td></tr>
|
57
|
+
<tr><td>
|
58
|
+
|
40
59
|
[canJump?](./server.playerentitycontrolleroptions.canjump.md)
|
41
60
|
|
42
61
|
|
@@ -91,6 +110,63 @@ _(Optional)_ A function allowing custom logic to determine if the entity can run
|
|
91
110
|
_(Optional)_ A function allowing custom logic to determine if the entity can walk.
|
92
111
|
|
93
112
|
|
113
|
+
</td></tr>
|
114
|
+
<tr><td>
|
115
|
+
|
116
|
+
[idleLoopedAnimations?](./server.playerentitycontrolleroptions.idleloopedanimations.md)
|
117
|
+
|
118
|
+
|
119
|
+
</td><td>
|
120
|
+
|
121
|
+
|
122
|
+
</td><td>
|
123
|
+
|
124
|
+
string\[\]
|
125
|
+
|
126
|
+
|
127
|
+
</td><td>
|
128
|
+
|
129
|
+
_(Optional)_ Overrides the animation(s) that will play when the entity is idle.
|
130
|
+
|
131
|
+
|
132
|
+
</td></tr>
|
133
|
+
<tr><td>
|
134
|
+
|
135
|
+
[interactOneshotAnimations?](./server.playerentitycontrolleroptions.interactoneshotanimations.md)
|
136
|
+
|
137
|
+
|
138
|
+
</td><td>
|
139
|
+
|
140
|
+
|
141
|
+
</td><td>
|
142
|
+
|
143
|
+
string\[\]
|
144
|
+
|
145
|
+
|
146
|
+
</td><td>
|
147
|
+
|
148
|
+
_(Optional)_ Overrides the animation(s) that will play when the entity interacts (left click)
|
149
|
+
|
150
|
+
|
151
|
+
</td></tr>
|
152
|
+
<tr><td>
|
153
|
+
|
154
|
+
[jumpOneshotAnimations?](./server.playerentitycontrolleroptions.jumponeshotanimations.md)
|
155
|
+
|
156
|
+
|
157
|
+
</td><td>
|
158
|
+
|
159
|
+
|
160
|
+
</td><td>
|
161
|
+
|
162
|
+
string\[\]
|
163
|
+
|
164
|
+
|
165
|
+
</td><td>
|
166
|
+
|
167
|
+
_(Optional)_ Overrides the animation(s) that will play when the entity is jumping.
|
168
|
+
|
169
|
+
|
94
170
|
</td></tr>
|
95
171
|
<tr><td>
|
96
172
|
|
@@ -110,6 +186,25 @@ number
|
|
110
186
|
_(Optional)_ The upward velocity applied to the entity when it jumps.
|
111
187
|
|
112
188
|
|
189
|
+
</td></tr>
|
190
|
+
<tr><td>
|
191
|
+
|
192
|
+
[runLoopedAnimations?](./server.playerentitycontrolleroptions.runloopedanimations.md)
|
193
|
+
|
194
|
+
|
195
|
+
</td><td>
|
196
|
+
|
197
|
+
|
198
|
+
</td><td>
|
199
|
+
|
200
|
+
string\[\]
|
201
|
+
|
202
|
+
|
203
|
+
</td><td>
|
204
|
+
|
205
|
+
_(Optional)_ Overrides the animation(s) that will play when the entity is running.
|
206
|
+
|
207
|
+
|
113
208
|
</td></tr>
|
114
209
|
<tr><td>
|
115
210
|
|
@@ -148,6 +243,25 @@ boolean
|
|
148
243
|
_(Optional)_ Whether the entity sticks to platforms, defaults to true.
|
149
244
|
|
150
245
|
|
246
|
+
</td></tr>
|
247
|
+
<tr><td>
|
248
|
+
|
249
|
+
[walkLoopedAnimations?](./server.playerentitycontrolleroptions.walkloopedanimations.md)
|
250
|
+
|
251
|
+
|
252
|
+
</td><td>
|
253
|
+
|
254
|
+
|
255
|
+
</td><td>
|
256
|
+
|
257
|
+
string\[\]
|
258
|
+
|
259
|
+
|
260
|
+
</td><td>
|
261
|
+
|
262
|
+
_(Optional)_ Overrides the animation(s) that will play when the entity is walking.
|
263
|
+
|
264
|
+
|
151
265
|
</td></tr>
|
152
266
|
<tr><td>
|
153
267
|
|
@@ -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) > [PlayerEntityControllerOptions](./server.playerentitycontrolleroptions.md) > [runLoopedAnimations](./server.playerentitycontrolleroptions.runloopedanimations.md)
|
4
|
+
|
5
|
+
## PlayerEntityControllerOptions.runLoopedAnimations property
|
6
|
+
|
7
|
+
Overrides the animation(s) that will play when the entity is running.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
runLoopedAnimations?: string[];
|
13
|
+
```
|
@@ -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) > [PlayerEntityControllerOptions](./server.playerentitycontrolleroptions.md) > [walkLoopedAnimations](./server.playerentitycontrolleroptions.walkloopedanimations.md)
|
4
|
+
|
5
|
+
## PlayerEntityControllerOptions.walkLoopedAnimations property
|
6
|
+
|
7
|
+
Overrides the animation(s) that will play when the entity is walking.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
walkLoopedAnimations?: string[];
|
13
|
+
```
|
@@ -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) > [SimpleEntityController](./server.simpleentitycontroller.md) > [jump](./server.simpleentitycontroller.jump.md)
|
4
|
+
|
5
|
+
## SimpleEntityController.jump() method
|
6
|
+
|
7
|
+
Applies an upwards impulse to the entity to simulate a jump, only supported for entities with dynamic rigid body types.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
jump(height: 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
|
+
height
|
36
|
+
|
37
|
+
|
38
|
+
</td><td>
|
39
|
+
|
40
|
+
number
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
The height to jump to.
|
46
|
+
|
47
|
+
|
48
|
+
</td></tr>
|
49
|
+
</tbody></table>
|
50
|
+
**Returns:**
|
51
|
+
|
52
|
+
void
|
53
|
+
|
@@ -68,6 +68,20 @@ Description
|
|
68
68
|
Rotates the entity at a given speed to face a target coordinate.
|
69
69
|
|
70
70
|
|
71
|
+
</td></tr>
|
72
|
+
<tr><td>
|
73
|
+
|
74
|
+
[jump(height)](./server.simpleentitycontroller.jump.md)
|
75
|
+
|
76
|
+
|
77
|
+
</td><td>
|
78
|
+
|
79
|
+
|
80
|
+
</td><td>
|
81
|
+
|
82
|
+
Applies an upwards impulse to the entity to simulate a jump, only supported for entities with dynamic rigid body types.
|
83
|
+
|
84
|
+
|
71
85
|
</td></tr>
|
72
86
|
<tr><td>
|
73
87
|
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [WaypointMoveCompleteCallback](./server.waypointmovecompletecallback.md)
|
4
|
+
|
5
|
+
## WaypointMoveCompleteCallback type
|
6
|
+
|
7
|
+
A callback function called when the entity associated with the PathfindingEntityController finishes moving to a calculate waypoint of its current path.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
export type WaypointMoveCompleteCallback = (waypoint: Vector3Like, waypointIndex: number) => void;
|
13
|
+
```
|
14
|
+
**References:** [Vector3Like](./server.vector3like.md)
|
15
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [WaypointMoveSkippedCallback](./server.waypointmoveskippedcallback.md)
|
4
|
+
|
5
|
+
## WaypointMoveSkippedCallback type
|
6
|
+
|
7
|
+
A callback function called when the entity associated with the PathfindingEntityController skips a waypoint because it took too long to reach.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
export type WaypointMoveSkippedCallback = (waypoint: Vector3Like, waypointIndex: number) => void;
|
13
|
+
```
|
14
|
+
**References:** [Vector3Like](./server.vector3like.md)
|
15
|
+
|
@@ -5,6 +5,23 @@ This demo codebase provides an example for building multi Agent AI systems in Hy
|
|
5
5
|
- Chat bubbles for agent speech
|
6
6
|
- Side bar UI for viewing Agent actions
|
7
7
|
|
8
|
+
## Setup
|
9
|
+
|
10
|
+
### Environment Variables
|
11
|
+
This demo requires an OpenAI API key to function. Create a `.env` file in the ai-agents directory with the following variables:
|
12
|
+
|
13
|
+
```env
|
14
|
+
OPENAI_API_KEY=your_openai_api_key_here
|
15
|
+
```
|
16
|
+
|
17
|
+
You can copy the `.env.example` file and fill in your API key:
|
18
|
+
```bash
|
19
|
+
cd examples/ai-agents
|
20
|
+
cp .env.example .env
|
21
|
+
```
|
22
|
+
|
23
|
+
The OpenAI API key is used for agent inference - the agents use GPT-4o to make decisions and respond to interactions. Make sure your OpenAI account has access to GPT-4o API.
|
24
|
+
|
8
25
|
## How do Agents work in Hytopia?
|
9
26
|
Game Agents are driven by a combination of game-specific action logic, world state representation, and Large Language Models.
|
10
27
|
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,30 @@
|
|
1
|
+
{
|
2
|
+
"name": "child-entity",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"lockfileVersion": 3,
|
5
|
+
"requires": true,
|
6
|
+
"packages": {
|
7
|
+
"": {
|
8
|
+
"name": "child-entity",
|
9
|
+
"version": "1.0.0",
|
10
|
+
"license": "ISC",
|
11
|
+
"dependencies": {
|
12
|
+
"@hytopia.com/assets": "latest",
|
13
|
+
"hytopia": "latest"
|
14
|
+
}
|
15
|
+
},
|
16
|
+
"node_modules/@hytopia.com/assets": {
|
17
|
+
"version": "0.1.7",
|
18
|
+
"resolved": "https://registry.npmjs.org/@hytopia.com/assets/-/assets-0.1.7.tgz",
|
19
|
+
"integrity": "sha512-gC113cIIVKp97cDX3u9n3ats8qS1kuaKPStQXOf1wNxuRs36yBvHM8NJWArfzzk8SG3ilfSZtc7qMYHod2ngcg=="
|
20
|
+
},
|
21
|
+
"node_modules/hytopia": {
|
22
|
+
"version": "0.1.80",
|
23
|
+
"resolved": "https://registry.npmjs.org/hytopia/-/hytopia-0.1.80.tgz",
|
24
|
+
"integrity": "sha512-Teu+dfY/24k8AfkeZYBtNue4KxIPFJsQEKwiG2LPOlS/ecosedqidxiehmSGS4ujyKH+zJZy0MqJnqNNIA9R3A==",
|
25
|
+
"bin": {
|
26
|
+
"hytopia": "bin/scripts.js"
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
30
|
+
}
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|