hytopia 0.7.6 → 0.7.8
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/bun-server.mjs +4 -4
- package/docs/server.audiomanager.getallaudios.md +1 -1
- package/docs/server.audiomanager.getallentityattachedaudios.md +17 -1
- package/docs/server.audiomanager.getallloopedaudios.md +37 -1
- package/docs/server.audiomanager.getalloneshotaudios.md +37 -1
- package/docs/server.audiomanager.md +3 -3
- package/docs/server.chunklatticeevent.md +14 -0
- package/docs/server.chunklatticeeventpayloads._chunk_lattice.add_chunk_.md +16 -0
- package/docs/server.chunklatticeeventpayloads.md +19 -0
- package/docs/server.tickallocator.filter.md +71 -0
- package/docs/server.tickallocator.md +14 -0
- package/node-server.mjs +4 -4
- package/package.json +1 -1
- package/server.api.json +216 -14
- package/server.d.ts +28 -7
package/package.json
CHANGED
package/server.api.json
CHANGED
|
@@ -2139,7 +2139,7 @@
|
|
|
2139
2139
|
{
|
|
2140
2140
|
"kind": "Method",
|
|
2141
2141
|
"canonicalReference": "server!AudioManager#getAllAudios:member(1)",
|
|
2142
|
-
"docComment": "/**\n * Retrieves all loaded audio instances for the world.\n *\n * @param tickAllocated -
|
|
2142
|
+
"docComment": "/**\n * Retrieves all loaded audio instances for the world.\n *\n * @param tickAllocated - If true, uses the tick allocator and frees the allocated array at the end of the current tick. false by default.\n *\n * @returns An array of audio instances.\n */\n",
|
|
2143
2143
|
"excerptTokens": [
|
|
2144
2144
|
{
|
|
2145
2145
|
"kind": "Content",
|
|
@@ -2192,7 +2192,7 @@
|
|
|
2192
2192
|
{
|
|
2193
2193
|
"kind": "Method",
|
|
2194
2194
|
"canonicalReference": "server!AudioManager#getAllEntityAttachedAudios:member(1)",
|
|
2195
|
-
"docComment": "/**\n * Retrieves all loaded audio instances attached to a specific entity.\n *\n * @param entity - The entity to get attached audio instances for.\n *\n * @returns An array of audio instances.\n */\n",
|
|
2195
|
+
"docComment": "/**\n * Retrieves all loaded audio instances attached to a specific entity.\n *\n * @param entity - The entity to get attached audio instances for.\n *\n * @param tickAllocated - If true, uses the tick allocator and frees the allocated array at the end of the current tick. false by default.\n *\n * @returns An array of audio instances.\n */\n",
|
|
2196
2196
|
"excerptTokens": [
|
|
2197
2197
|
{
|
|
2198
2198
|
"kind": "Content",
|
|
@@ -2203,6 +2203,14 @@
|
|
|
2203
2203
|
"text": "Entity",
|
|
2204
2204
|
"canonicalReference": "server!Entity:class"
|
|
2205
2205
|
},
|
|
2206
|
+
{
|
|
2207
|
+
"kind": "Content",
|
|
2208
|
+
"text": ", tickAllocated?: "
|
|
2209
|
+
},
|
|
2210
|
+
{
|
|
2211
|
+
"kind": "Content",
|
|
2212
|
+
"text": "boolean"
|
|
2213
|
+
},
|
|
2206
2214
|
{
|
|
2207
2215
|
"kind": "Content",
|
|
2208
2216
|
"text": "): "
|
|
@@ -2223,8 +2231,8 @@
|
|
|
2223
2231
|
],
|
|
2224
2232
|
"isStatic": false,
|
|
2225
2233
|
"returnTypeTokenRange": {
|
|
2226
|
-
"startIndex":
|
|
2227
|
-
"endIndex":
|
|
2234
|
+
"startIndex": 5,
|
|
2235
|
+
"endIndex": 7
|
|
2228
2236
|
},
|
|
2229
2237
|
"releaseTag": "Public",
|
|
2230
2238
|
"isProtected": false,
|
|
@@ -2237,6 +2245,14 @@
|
|
|
2237
2245
|
"endIndex": 2
|
|
2238
2246
|
},
|
|
2239
2247
|
"isOptional": false
|
|
2248
|
+
},
|
|
2249
|
+
{
|
|
2250
|
+
"parameterName": "tickAllocated",
|
|
2251
|
+
"parameterTypeTokenRange": {
|
|
2252
|
+
"startIndex": 3,
|
|
2253
|
+
"endIndex": 4
|
|
2254
|
+
},
|
|
2255
|
+
"isOptional": true
|
|
2240
2256
|
}
|
|
2241
2257
|
],
|
|
2242
2258
|
"isOptional": false,
|
|
@@ -2246,11 +2262,19 @@
|
|
|
2246
2262
|
{
|
|
2247
2263
|
"kind": "Method",
|
|
2248
2264
|
"canonicalReference": "server!AudioManager#getAllLoopedAudios:member(1)",
|
|
2249
|
-
"docComment": "/**\n * Retrieves all looped audio instances for the world.\n *\n * @returns An array of audio instances.\n */\n",
|
|
2265
|
+
"docComment": "/**\n * Retrieves all looped audio instances for the world.\n *\n * @param tickAllocated - If true, uses the tick allocator and frees the allocated array at the end of the current tick. false by default.\n *\n * @returns An array of audio instances.\n */\n",
|
|
2250
2266
|
"excerptTokens": [
|
|
2251
2267
|
{
|
|
2252
2268
|
"kind": "Content",
|
|
2253
|
-
"text": "getAllLoopedAudios(
|
|
2269
|
+
"text": "getAllLoopedAudios(tickAllocated?: "
|
|
2270
|
+
},
|
|
2271
|
+
{
|
|
2272
|
+
"kind": "Content",
|
|
2273
|
+
"text": "boolean"
|
|
2274
|
+
},
|
|
2275
|
+
{
|
|
2276
|
+
"kind": "Content",
|
|
2277
|
+
"text": "): "
|
|
2254
2278
|
},
|
|
2255
2279
|
{
|
|
2256
2280
|
"kind": "Reference",
|
|
@@ -2268,13 +2292,22 @@
|
|
|
2268
2292
|
],
|
|
2269
2293
|
"isStatic": false,
|
|
2270
2294
|
"returnTypeTokenRange": {
|
|
2271
|
-
"startIndex":
|
|
2272
|
-
"endIndex":
|
|
2295
|
+
"startIndex": 3,
|
|
2296
|
+
"endIndex": 5
|
|
2273
2297
|
},
|
|
2274
2298
|
"releaseTag": "Public",
|
|
2275
2299
|
"isProtected": false,
|
|
2276
2300
|
"overloadIndex": 1,
|
|
2277
|
-
"parameters": [
|
|
2301
|
+
"parameters": [
|
|
2302
|
+
{
|
|
2303
|
+
"parameterName": "tickAllocated",
|
|
2304
|
+
"parameterTypeTokenRange": {
|
|
2305
|
+
"startIndex": 1,
|
|
2306
|
+
"endIndex": 2
|
|
2307
|
+
},
|
|
2308
|
+
"isOptional": true
|
|
2309
|
+
}
|
|
2310
|
+
],
|
|
2278
2311
|
"isOptional": false,
|
|
2279
2312
|
"isAbstract": false,
|
|
2280
2313
|
"name": "getAllLoopedAudios"
|
|
@@ -2282,11 +2315,19 @@
|
|
|
2282
2315
|
{
|
|
2283
2316
|
"kind": "Method",
|
|
2284
2317
|
"canonicalReference": "server!AudioManager#getAllOneshotAudios:member(1)",
|
|
2285
|
-
"docComment": "/**\n * Retrieves all oneshot (non-looped) audio instances for the world.\n *\n * @returns An array of audio instances.\n */\n",
|
|
2318
|
+
"docComment": "/**\n * Retrieves all oneshot (non-looped) audio instances for the world.\n *\n * @param tickAllocated - If true, uses the tick allocator and frees the allocated array at the end of the current tick. false by default.\n *\n * @returns An array of audio instances.\n */\n",
|
|
2286
2319
|
"excerptTokens": [
|
|
2287
2320
|
{
|
|
2288
2321
|
"kind": "Content",
|
|
2289
|
-
"text": "getAllOneshotAudios(
|
|
2322
|
+
"text": "getAllOneshotAudios(tickAllocated?: "
|
|
2323
|
+
},
|
|
2324
|
+
{
|
|
2325
|
+
"kind": "Content",
|
|
2326
|
+
"text": "boolean"
|
|
2327
|
+
},
|
|
2328
|
+
{
|
|
2329
|
+
"kind": "Content",
|
|
2330
|
+
"text": "): "
|
|
2290
2331
|
},
|
|
2291
2332
|
{
|
|
2292
2333
|
"kind": "Reference",
|
|
@@ -2304,13 +2345,22 @@
|
|
|
2304
2345
|
],
|
|
2305
2346
|
"isStatic": false,
|
|
2306
2347
|
"returnTypeTokenRange": {
|
|
2307
|
-
"startIndex":
|
|
2308
|
-
"endIndex":
|
|
2348
|
+
"startIndex": 3,
|
|
2349
|
+
"endIndex": 5
|
|
2309
2350
|
},
|
|
2310
2351
|
"releaseTag": "Public",
|
|
2311
2352
|
"isProtected": false,
|
|
2312
2353
|
"overloadIndex": 1,
|
|
2313
|
-
"parameters": [
|
|
2354
|
+
"parameters": [
|
|
2355
|
+
{
|
|
2356
|
+
"parameterName": "tickAllocated",
|
|
2357
|
+
"parameterTypeTokenRange": {
|
|
2358
|
+
"startIndex": 1,
|
|
2359
|
+
"endIndex": 2
|
|
2360
|
+
},
|
|
2361
|
+
"isOptional": true
|
|
2362
|
+
}
|
|
2363
|
+
],
|
|
2314
2364
|
"isOptional": false,
|
|
2315
2365
|
"isAbstract": false,
|
|
2316
2366
|
"name": "getAllOneshotAudios"
|
|
@@ -7722,6 +7772,27 @@
|
|
|
7722
7772
|
"name": "ChunkLatticeEvent",
|
|
7723
7773
|
"preserveMemberOrder": false,
|
|
7724
7774
|
"members": [
|
|
7775
|
+
{
|
|
7776
|
+
"kind": "EnumMember",
|
|
7777
|
+
"canonicalReference": "server!ChunkLatticeEvent.ADD_CHUNK:member",
|
|
7778
|
+
"docComment": "",
|
|
7779
|
+
"excerptTokens": [
|
|
7780
|
+
{
|
|
7781
|
+
"kind": "Content",
|
|
7782
|
+
"text": "ADD_CHUNK = "
|
|
7783
|
+
},
|
|
7784
|
+
{
|
|
7785
|
+
"kind": "Content",
|
|
7786
|
+
"text": "\"CHUNK_LATTICE.ADD_CHUNK\""
|
|
7787
|
+
}
|
|
7788
|
+
],
|
|
7789
|
+
"initializerTokenRange": {
|
|
7790
|
+
"startIndex": 1,
|
|
7791
|
+
"endIndex": 2
|
|
7792
|
+
},
|
|
7793
|
+
"releaseTag": "Public",
|
|
7794
|
+
"name": "ADD_CHUNK"
|
|
7795
|
+
},
|
|
7725
7796
|
{
|
|
7726
7797
|
"kind": "EnumMember",
|
|
7727
7798
|
"canonicalReference": "server!ChunkLatticeEvent.REMOVE_CHUNK:member",
|
|
@@ -7781,6 +7852,60 @@
|
|
|
7781
7852
|
"name": "ChunkLatticeEventPayloads",
|
|
7782
7853
|
"preserveMemberOrder": false,
|
|
7783
7854
|
"members": [
|
|
7855
|
+
{
|
|
7856
|
+
"kind": "PropertySignature",
|
|
7857
|
+
"canonicalReference": "server!ChunkLatticeEventPayloads#\"CHUNK_LATTICE.ADD_CHUNK\":member",
|
|
7858
|
+
"docComment": "/**\n * Emitted when a chunk is added to the lattice.\n */\n",
|
|
7859
|
+
"excerptTokens": [
|
|
7860
|
+
{
|
|
7861
|
+
"kind": "Content",
|
|
7862
|
+
"text": "["
|
|
7863
|
+
},
|
|
7864
|
+
{
|
|
7865
|
+
"kind": "Reference",
|
|
7866
|
+
"text": "ChunkLatticeEvent.ADD_CHUNK",
|
|
7867
|
+
"canonicalReference": "server!ChunkLatticeEvent.ADD_CHUNK:member"
|
|
7868
|
+
},
|
|
7869
|
+
{
|
|
7870
|
+
"kind": "Content",
|
|
7871
|
+
"text": "]: "
|
|
7872
|
+
},
|
|
7873
|
+
{
|
|
7874
|
+
"kind": "Content",
|
|
7875
|
+
"text": "{\n chunkLattice: "
|
|
7876
|
+
},
|
|
7877
|
+
{
|
|
7878
|
+
"kind": "Reference",
|
|
7879
|
+
"text": "ChunkLattice",
|
|
7880
|
+
"canonicalReference": "server!ChunkLattice:class"
|
|
7881
|
+
},
|
|
7882
|
+
{
|
|
7883
|
+
"kind": "Content",
|
|
7884
|
+
"text": ";\n chunk: "
|
|
7885
|
+
},
|
|
7886
|
+
{
|
|
7887
|
+
"kind": "Reference",
|
|
7888
|
+
"text": "Chunk",
|
|
7889
|
+
"canonicalReference": "server!Chunk:class"
|
|
7890
|
+
},
|
|
7891
|
+
{
|
|
7892
|
+
"kind": "Content",
|
|
7893
|
+
"text": ";\n }"
|
|
7894
|
+
},
|
|
7895
|
+
{
|
|
7896
|
+
"kind": "Content",
|
|
7897
|
+
"text": ";"
|
|
7898
|
+
}
|
|
7899
|
+
],
|
|
7900
|
+
"isReadonly": false,
|
|
7901
|
+
"isOptional": false,
|
|
7902
|
+
"releaseTag": "Public",
|
|
7903
|
+
"name": "\"CHUNK_LATTICE.ADD_CHUNK\"",
|
|
7904
|
+
"propertyTypeTokenRange": {
|
|
7905
|
+
"startIndex": 3,
|
|
7906
|
+
"endIndex": 8
|
|
7907
|
+
}
|
|
7908
|
+
},
|
|
7784
7909
|
{
|
|
7785
7910
|
"kind": "PropertySignature",
|
|
7786
7911
|
"canonicalReference": "server!ChunkLatticeEventPayloads#\"CHUNK_LATTICE.REMOVE_CHUNK\":member",
|
|
@@ -49574,6 +49699,83 @@
|
|
|
49574
49699
|
"name": "TickAllocator",
|
|
49575
49700
|
"preserveMemberOrder": false,
|
|
49576
49701
|
"members": [
|
|
49702
|
+
{
|
|
49703
|
+
"kind": "Method",
|
|
49704
|
+
"canonicalReference": "server!TickAllocator#filter:member(1)",
|
|
49705
|
+
"docComment": "/**\n * Filters an array using a callback function.\n *\n * @param array - The array to filter.\n *\n * @param callback - The callback function to filter the array.\n *\n * @typeParam T - The type of the array.\n *\n * @returns A new array with the filtered values.\n */\n",
|
|
49706
|
+
"excerptTokens": [
|
|
49707
|
+
{
|
|
49708
|
+
"kind": "Content",
|
|
49709
|
+
"text": "filter<T>(array: "
|
|
49710
|
+
},
|
|
49711
|
+
{
|
|
49712
|
+
"kind": "Content",
|
|
49713
|
+
"text": "T[]"
|
|
49714
|
+
},
|
|
49715
|
+
{
|
|
49716
|
+
"kind": "Content",
|
|
49717
|
+
"text": ", callback: "
|
|
49718
|
+
},
|
|
49719
|
+
{
|
|
49720
|
+
"kind": "Content",
|
|
49721
|
+
"text": "(value: T, index: number, array: T[]) => boolean"
|
|
49722
|
+
},
|
|
49723
|
+
{
|
|
49724
|
+
"kind": "Content",
|
|
49725
|
+
"text": "): "
|
|
49726
|
+
},
|
|
49727
|
+
{
|
|
49728
|
+
"kind": "Content",
|
|
49729
|
+
"text": "T[]"
|
|
49730
|
+
},
|
|
49731
|
+
{
|
|
49732
|
+
"kind": "Content",
|
|
49733
|
+
"text": ";"
|
|
49734
|
+
}
|
|
49735
|
+
],
|
|
49736
|
+
"typeParameters": [
|
|
49737
|
+
{
|
|
49738
|
+
"typeParameterName": "T",
|
|
49739
|
+
"constraintTokenRange": {
|
|
49740
|
+
"startIndex": 0,
|
|
49741
|
+
"endIndex": 0
|
|
49742
|
+
},
|
|
49743
|
+
"defaultTypeTokenRange": {
|
|
49744
|
+
"startIndex": 0,
|
|
49745
|
+
"endIndex": 0
|
|
49746
|
+
}
|
|
49747
|
+
}
|
|
49748
|
+
],
|
|
49749
|
+
"isStatic": false,
|
|
49750
|
+
"returnTypeTokenRange": {
|
|
49751
|
+
"startIndex": 5,
|
|
49752
|
+
"endIndex": 6
|
|
49753
|
+
},
|
|
49754
|
+
"releaseTag": "Public",
|
|
49755
|
+
"isProtected": false,
|
|
49756
|
+
"overloadIndex": 1,
|
|
49757
|
+
"parameters": [
|
|
49758
|
+
{
|
|
49759
|
+
"parameterName": "array",
|
|
49760
|
+
"parameterTypeTokenRange": {
|
|
49761
|
+
"startIndex": 1,
|
|
49762
|
+
"endIndex": 2
|
|
49763
|
+
},
|
|
49764
|
+
"isOptional": false
|
|
49765
|
+
},
|
|
49766
|
+
{
|
|
49767
|
+
"parameterName": "callback",
|
|
49768
|
+
"parameterTypeTokenRange": {
|
|
49769
|
+
"startIndex": 3,
|
|
49770
|
+
"endIndex": 4
|
|
49771
|
+
},
|
|
49772
|
+
"isOptional": false
|
|
49773
|
+
}
|
|
49774
|
+
],
|
|
49775
|
+
"isOptional": false,
|
|
49776
|
+
"isAbstract": false,
|
|
49777
|
+
"name": "filter"
|
|
49778
|
+
},
|
|
49577
49779
|
{
|
|
49578
49780
|
"kind": "Method",
|
|
49579
49781
|
"canonicalReference": "server!TickAllocator#getArray:member(1)",
|
package/server.d.ts
CHANGED
|
@@ -279,10 +279,8 @@ export declare class AudioManager {
|
|
|
279
279
|
/**
|
|
280
280
|
* Retrieves all loaded audio instances for the world.
|
|
281
281
|
*
|
|
282
|
-
* @param tickAllocated -
|
|
283
|
-
*
|
|
284
|
-
* and released at the end of the current tick if true. Only use this if
|
|
285
|
-
* you know what you're doing.
|
|
282
|
+
* @param tickAllocated - If true, uses the tick allocator and frees
|
|
283
|
+
* the allocated array at the end of the current tick. false by default.
|
|
286
284
|
*
|
|
287
285
|
* @returns An array of audio instances.
|
|
288
286
|
*/
|
|
@@ -291,21 +289,30 @@ export declare class AudioManager {
|
|
|
291
289
|
* Retrieves all loaded audio instances attached to a specific entity.
|
|
292
290
|
*
|
|
293
291
|
* @param entity - The entity to get attached audio instances for.
|
|
292
|
+
* @param tickAllocated - If true, uses the tick allocator and frees
|
|
293
|
+
* the allocated array at the end of the current tick. false by default.
|
|
294
|
+
|
|
294
295
|
* @returns An array of audio instances.
|
|
295
296
|
*/
|
|
296
|
-
getAllEntityAttachedAudios(entity: Entity): Audio[];
|
|
297
|
+
getAllEntityAttachedAudios(entity: Entity, tickAllocated?: boolean): Audio[];
|
|
297
298
|
/**
|
|
298
299
|
* Retrieves all looped audio instances for the world.
|
|
299
300
|
*
|
|
301
|
+
* @param tickAllocated - If true, uses the tick allocator and frees
|
|
302
|
+
* the allocated array at the end of the current tick. false by default.
|
|
303
|
+
*
|
|
300
304
|
* @returns An array of audio instances.
|
|
301
305
|
*/
|
|
302
|
-
getAllLoopedAudios(): Audio[];
|
|
306
|
+
getAllLoopedAudios(tickAllocated?: boolean): Audio[];
|
|
303
307
|
/**
|
|
304
308
|
* Retrieves all oneshot (non-looped) audio instances for the world.
|
|
305
309
|
*
|
|
310
|
+
* @param tickAllocated - If true, uses the tick allocator and frees
|
|
311
|
+
* the allocated array at the end of the current tick. false by default.
|
|
312
|
+
*
|
|
306
313
|
* @returns An array of audio instances.
|
|
307
314
|
*/
|
|
308
|
-
getAllOneshotAudios(): Audio[];
|
|
315
|
+
getAllOneshotAudios(tickAllocated?: boolean): Audio[];
|
|
309
316
|
|
|
310
317
|
/**
|
|
311
318
|
* Unregisters and stops an audio instance from the audio manager.
|
|
@@ -1027,12 +1034,18 @@ export declare class ChunkLattice extends EventRouter {
|
|
|
1027
1034
|
|
|
1028
1035
|
/** Event types a ChunkLattice instance can emit. See {@link ChunkLatticeEventPayloads} for the payloads. @public */
|
|
1029
1036
|
export declare enum ChunkLatticeEvent {
|
|
1037
|
+
ADD_CHUNK = "CHUNK_LATTICE.ADD_CHUNK",
|
|
1030
1038
|
REMOVE_CHUNK = "CHUNK_LATTICE.REMOVE_CHUNK",
|
|
1031
1039
|
SET_BLOCK = "CHUNK_LATTICE.SET_BLOCK"
|
|
1032
1040
|
}
|
|
1033
1041
|
|
|
1034
1042
|
/** Event payloads for ChunkLattice emitted events. @public */
|
|
1035
1043
|
export declare interface ChunkLatticeEventPayloads {
|
|
1044
|
+
/** Emitted when a chunk is added to the lattice. */
|
|
1045
|
+
[ChunkLatticeEvent.ADD_CHUNK]: {
|
|
1046
|
+
chunkLattice: ChunkLattice;
|
|
1047
|
+
chunk: Chunk;
|
|
1048
|
+
};
|
|
1036
1049
|
/** Emitted when a chunk is removed from the lattice. */
|
|
1037
1050
|
[ChunkLatticeEvent.REMOVE_CHUNK]: {
|
|
1038
1051
|
chunkLattice: ChunkLattice;
|
|
@@ -6282,6 +6295,14 @@ export declare class TickAllocator {
|
|
|
6282
6295
|
|
|
6283
6296
|
|
|
6284
6297
|
|
|
6298
|
+
/**
|
|
6299
|
+
* Filters an array using a callback function.
|
|
6300
|
+
* @typeParam T - The type of the array.
|
|
6301
|
+
* @param array - The array to filter.
|
|
6302
|
+
* @param callback - The callback function to filter the array.
|
|
6303
|
+
* @returns A new array with the filtered values.
|
|
6304
|
+
*/
|
|
6305
|
+
filter<T>(array: T[], callback: (value: T, index: number, array: T[]) => boolean): T[];
|
|
6285
6306
|
/**
|
|
6286
6307
|
* Gets a generic array from the pool.
|
|
6287
6308
|
* Array is reset to empty state and ready for use.
|