hytopia 0.8.6-dev6 → 0.8.6-devtrace-1
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 +160 -160
- package/docs/server.audiomanager.getallaudios.md +1 -38
- package/docs/server.audiomanager.md +1 -1
- package/docs/server.blocktype._constructor_.md +1 -15
- package/docs/server.blocktype.md +1 -22
- package/docs/server.blocktyperegistry.getallblocktypes.md +1 -38
- package/docs/server.blocktyperegistry.md +1 -1
- package/docs/server.chunk._constructor_.md +1 -15
- package/docs/server.chunk.md +1 -22
- package/docs/server.chunklattice.getallchunks.md +1 -38
- package/docs/server.chunklattice.md +1 -22
- package/docs/server.entitymanager.getallentities.md +1 -38
- package/docs/server.entitymanager.md +1 -1
- package/docs/server.lightmanager.getalllights.md +1 -38
- package/docs/server.lightmanager.md +1 -1
- package/docs/server.md +0 -33
- package/docs/server.particleemittermanager.getallparticleemitters.md +1 -38
- package/docs/server.particleemittermanager.md +1 -1
- package/docs/server.sceneuimanager.getallsceneuis.md +1 -38
- package/docs/server.sceneuimanager.md +1 -1
- package/docs/server.world.md +0 -21
- package/node-server.mjs +163 -163
- package/package.json +1 -1
- package/server.api.json +39 -930
- package/server.d.ts +27 -164
- package/docs/server.array3number.md +0 -13
- package/docs/server.array4number.md +0 -13
- package/docs/server.blocktype.blocktyperegistry.md +0 -13
- package/docs/server.chunk.chunklattice.md +0 -13
- package/docs/server.chunklattice.world.md +0 -13
- package/docs/server.tickallocator.getarray.md +0 -72
- package/docs/server.tickallocator.getarray3number.md +0 -56
- package/docs/server.tickallocator.getarray4number.md +0 -56
- package/docs/server.tickallocator.getobject.md +0 -72
- package/docs/server.tickallocator.getset.md +0 -72
- package/docs/server.tickallocator.map.md +0 -72
- package/docs/server.tickallocator.md +0 -149
- package/docs/server.tickallocator.reset.md +0 -17
- package/docs/server.world.tickallocator.md +0 -13
package/server.d.ts
CHANGED
|
@@ -12,12 +12,6 @@ import { SdpMatrix3 } from '@dimforge/rapier3d-simd-compat';
|
|
|
12
12
|
import type { Socket } from 'net';
|
|
13
13
|
import { WebSocket as WebSocket_2 } from 'ws';
|
|
14
14
|
|
|
15
|
-
/** A 3-element number array. @public */
|
|
16
|
-
export declare type Array3Number = [number, number, number];
|
|
17
|
-
|
|
18
|
-
/** A 4-element number array. @public */
|
|
19
|
-
export declare type Array4Number = [number, number, number, number];
|
|
20
|
-
|
|
21
15
|
/**
|
|
22
16
|
* Represents a audio playback in a world.
|
|
23
17
|
*
|
|
@@ -278,14 +272,9 @@ export declare class AudioManager {
|
|
|
278
272
|
/**
|
|
279
273
|
* Retrieves all loaded audio instances for the world.
|
|
280
274
|
*
|
|
281
|
-
* @param tickAllocated - Whether to use the tick allocator to allocate the
|
|
282
|
-
* returned array of Audio instances. The allocated array will be collected
|
|
283
|
-
* and released at the end of the current tick if true. Only use this if
|
|
284
|
-
* you know what you're doing.
|
|
285
|
-
*
|
|
286
275
|
* @returns An array of audio instances.
|
|
287
276
|
*/
|
|
288
|
-
getAllAudios(
|
|
277
|
+
getAllAudios(): Audio[];
|
|
289
278
|
/**
|
|
290
279
|
* Retrieves all loaded audio instances attached to a specific entity.
|
|
291
280
|
*
|
|
@@ -614,17 +603,14 @@ export declare class BlockType extends EventRouter implements protocol.Serializa
|
|
|
614
603
|
|
|
615
604
|
|
|
616
605
|
|
|
617
|
-
|
|
618
606
|
/**
|
|
619
607
|
* Creates a new block type instance.
|
|
620
608
|
* @param world - The world the block type is for.
|
|
621
609
|
* @param options - The options for the block type.
|
|
622
610
|
*/
|
|
623
|
-
constructor(
|
|
611
|
+
constructor(options?: BlockTypeOptions);
|
|
624
612
|
/** The unique identifier for the block type. */
|
|
625
613
|
get id(): number;
|
|
626
|
-
/** The block type registry that the block type belongs to. */
|
|
627
|
-
get blockTypeRegistry(): BlockTypeRegistry;
|
|
628
614
|
/** The collider options for the block type. */
|
|
629
615
|
get colliderOptions(): VoxelsColliderOptions;
|
|
630
616
|
/** The half extents size of the block type. */
|
|
@@ -716,15 +702,9 @@ export declare class BlockTypeRegistry extends EventRouter implements protocol.S
|
|
|
716
702
|
get world(): World;
|
|
717
703
|
/**
|
|
718
704
|
* Get all registered block types.
|
|
719
|
-
*
|
|
720
|
-
* @param tickAllocated - Whether to use the tick allocator to allocate the
|
|
721
|
-
* returned array of BlockType instances. The allocated array will be collected
|
|
722
|
-
* and released at the end of the current tick if true. Only use this if
|
|
723
|
-
* you know what you're doing.
|
|
724
|
-
*
|
|
725
705
|
* @returns An array of all registered block types.
|
|
726
706
|
*/
|
|
727
|
-
getAllBlockTypes(
|
|
707
|
+
getAllBlockTypes(): BlockType[];
|
|
728
708
|
/**
|
|
729
709
|
* Get a registered block type by its id.
|
|
730
710
|
* @param id - The id of the block type to get.
|
|
@@ -882,15 +862,12 @@ export declare class ChatManager extends EventRouter {
|
|
|
882
862
|
export declare class Chunk implements protocol.Serializable {
|
|
883
863
|
|
|
884
864
|
|
|
885
|
-
|
|
886
865
|
/**
|
|
887
866
|
* Creates a new chunk instance.
|
|
888
867
|
*/
|
|
889
|
-
constructor(
|
|
868
|
+
constructor(originCoordinate: Vector3Like);
|
|
890
869
|
/** The blocks in the chunk as a flat Uint8Array[4096], each index as 0 or a block type id. */
|
|
891
870
|
get blocks(): Readonly<Uint8Array>;
|
|
892
|
-
/** The chunk lattice that the chunk belongs to. */
|
|
893
|
-
get chunkLattice(): ChunkLattice;
|
|
894
871
|
/** The origin coordinate of the chunk. */
|
|
895
872
|
get originCoordinate(): Vector3Like;
|
|
896
873
|
/**
|
|
@@ -951,8 +928,6 @@ export declare class ChunkLattice extends EventRouter {
|
|
|
951
928
|
constructor(world: World);
|
|
952
929
|
/** The number of chunks in the lattice. */
|
|
953
930
|
get chunkCount(): number;
|
|
954
|
-
/** The world that the chunk lattice belongs to. */
|
|
955
|
-
get world(): World;
|
|
956
931
|
/**
|
|
957
932
|
* Removes and clears all chunks and their blocks from the lattice.
|
|
958
933
|
*/
|
|
@@ -991,15 +966,9 @@ export declare class ChunkLattice extends EventRouter {
|
|
|
991
966
|
getOrCreateChunk(globalCoordinate: Vector3Like): Chunk;
|
|
992
967
|
/**
|
|
993
968
|
* Get all chunks in the lattice.
|
|
994
|
-
*
|
|
995
|
-
* @param tickAllocated - Whether to use the tick allocator to allocate the
|
|
996
|
-
* returned array of Chunk instances. The allocated array will be collected
|
|
997
|
-
* and released at the end of the current tick if true. Only use this if
|
|
998
|
-
* you know what you're doing.
|
|
999
|
-
*
|
|
1000
969
|
* @returns An array of all chunks in the lattice.
|
|
1001
970
|
*/
|
|
1002
|
-
getAllChunks(
|
|
971
|
+
getAllChunks(): Chunk[];
|
|
1003
972
|
/**
|
|
1004
973
|
* Check if a block exists at a specific global coordinate.
|
|
1005
974
|
* @param globalCoordinate - The global coordinate of the block to check.
|
|
@@ -2139,15 +2108,9 @@ export declare class EntityManager {
|
|
|
2139
2108
|
|
|
2140
2109
|
/**
|
|
2141
2110
|
* Gets all spawned entities in the world.
|
|
2142
|
-
*
|
|
2143
|
-
* @param tickAllocated - Whether to use the tick allocator to allocate the
|
|
2144
|
-
* returned array of Entity instances. The allocated array will be collected
|
|
2145
|
-
* and released at the end of the current tick if true. Only use this if
|
|
2146
|
-
* you know what you're doing.
|
|
2147
|
-
*
|
|
2148
2111
|
* @returns All spawned entities in the world.
|
|
2149
2112
|
*/
|
|
2150
|
-
getAllEntities(
|
|
2113
|
+
getAllEntities(): Entity[];
|
|
2151
2114
|
/**
|
|
2152
2115
|
* Gets all spawned player entities in the world.
|
|
2153
2116
|
* @returns All spawned player entities in the world.
|
|
@@ -2797,14 +2760,9 @@ export declare class LightManager {
|
|
|
2797
2760
|
/**
|
|
2798
2761
|
* Retrieves all spawned Light instances for the world.
|
|
2799
2762
|
*
|
|
2800
|
-
* @param tickAllocated - Whether to use the tick allocator to allocate the
|
|
2801
|
-
* returned array of Light instances. The allocated array will be collected
|
|
2802
|
-
* and released at the end of the current tick if true. Only use this if
|
|
2803
|
-
* you know what you're doing.
|
|
2804
|
-
*
|
|
2805
2763
|
* @returns An array of Light instances.
|
|
2806
2764
|
*/
|
|
2807
|
-
getAllLights(
|
|
2765
|
+
getAllLights(): Light[];
|
|
2808
2766
|
/**
|
|
2809
2767
|
* Retrieves all spawned Light instances attached to a specific entity.
|
|
2810
2768
|
*
|
|
@@ -4138,14 +4096,9 @@ export declare class ParticleEmitterManager {
|
|
|
4138
4096
|
/**
|
|
4139
4097
|
* Retrieves all spawned ParticleEmitter instances for the world.
|
|
4140
4098
|
*
|
|
4141
|
-
* @param tickAllocated - Whether to use the tick allocator to allocate the
|
|
4142
|
-
* returned array of ParticleEmitter instances. The allocated array will be collected
|
|
4143
|
-
* and released at the end of the current tick if true. Only use this if
|
|
4144
|
-
* you know what you're doing.
|
|
4145
|
-
*
|
|
4146
4099
|
* @returns An array of ParticleEmitter instances.
|
|
4147
4100
|
*/
|
|
4148
|
-
getAllParticleEmitters(
|
|
4101
|
+
getAllParticleEmitters(): ParticleEmitter[];
|
|
4149
4102
|
/**
|
|
4150
4103
|
* Retrieves all spawned ParticleEmitter instances attached to a specific entity.
|
|
4151
4104
|
*
|
|
@@ -5776,14 +5729,9 @@ export declare class SceneUIManager {
|
|
|
5776
5729
|
/**
|
|
5777
5730
|
* Retrieves all loaded SceneUI instances for the world.
|
|
5778
5731
|
*
|
|
5779
|
-
* @param tickAllocated - Whether to use the tick allocator to allocate the
|
|
5780
|
-
* returned array of SceneUI instances. The allocated array will be collected
|
|
5781
|
-
* and released at the end of the current tick if true. Only use this if
|
|
5782
|
-
* you know what you're doing.
|
|
5783
|
-
*
|
|
5784
5732
|
* @returns An array of SceneUI instances.
|
|
5785
5733
|
*/
|
|
5786
|
-
getAllSceneUIs(
|
|
5734
|
+
getAllSceneUIs(): SceneUI[];
|
|
5787
5735
|
/**
|
|
5788
5736
|
* Retrieves all loaded SceneUI instances attached to a specific entity.
|
|
5789
5737
|
*
|
|
@@ -6123,88 +6071,6 @@ export declare function startServer(init: ((() => void) | ((world: World) => voi
|
|
|
6123
6071
|
/** The input keys that are included in the PlayerInput. @public */
|
|
6124
6072
|
export declare const 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"];
|
|
6125
6073
|
|
|
6126
|
-
/**
|
|
6127
|
-
* High-performance tick-scoped allocator for temporary objects, arrays, and buffers.
|
|
6128
|
-
* All allocations are automatically bulk-released when reset() is called.
|
|
6129
|
-
*
|
|
6130
|
-
* @remarks
|
|
6131
|
-
* TickAllocator maintains separate pools for different data types and tracks all
|
|
6132
|
-
* allocations made during a tick cycle. Objects are reused across ticks to eliminate
|
|
6133
|
-
* garbage collection overhead in hot paths like network synchronization.
|
|
6134
|
-
*
|
|
6135
|
-
* @example
|
|
6136
|
-
* ```typescript
|
|
6137
|
-
* // Allocate during tick
|
|
6138
|
-
* const position = tickAllocator.getArray3Number();
|
|
6139
|
-
* const rotation = tickAllocator.getArray4Number();
|
|
6140
|
-
* const data = tickAllocator.getObject<EntitySchema>();
|
|
6141
|
-
*
|
|
6142
|
-
* // At end of tick - bulk release everything
|
|
6143
|
-
* tickAllocator.reset();
|
|
6144
|
-
* ```
|
|
6145
|
-
*
|
|
6146
|
-
* @public
|
|
6147
|
-
*/
|
|
6148
|
-
export declare class TickAllocator {
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
/**
|
|
6160
|
-
* Gets a generic array from the pool.
|
|
6161
|
-
* Array is reset to empty state and ready for use.
|
|
6162
|
-
* @typeParam T - The array type.
|
|
6163
|
-
* @returns A reusable array.
|
|
6164
|
-
*/
|
|
6165
|
-
getArray<T extends unknown[] = unknown[]>(copyFromA?: Iterable<unknown>, copyFromB?: Iterable<unknown>): T;
|
|
6166
|
-
/**
|
|
6167
|
-
* Gets a 3-element number array from the pool.
|
|
6168
|
-
* Array is reset to [0, 0, 0] and ready for use.
|
|
6169
|
-
* @returns A reusable 3-element array.
|
|
6170
|
-
*/
|
|
6171
|
-
getArray3Number(copyFrom?: Array3Number | Set<number>): Array3Number;
|
|
6172
|
-
/**
|
|
6173
|
-
* Gets a 4-element number array from the pool.
|
|
6174
|
-
* Array is reset to [0, 0, 0, 0] and ready for use.
|
|
6175
|
-
* @returns A reusable 4-element array.
|
|
6176
|
-
*/
|
|
6177
|
-
getArray4Number(copyFrom?: Array4Number | Set<number>): Array4Number;
|
|
6178
|
-
/**
|
|
6179
|
-
* Gets a plain object from the pool.
|
|
6180
|
-
* Object is reset to empty state and ready for use.
|
|
6181
|
-
* @typeParam T - The type interface for the object.
|
|
6182
|
-
* @returns A reusable plain object.
|
|
6183
|
-
*/
|
|
6184
|
-
getObject<T extends Record<string, unknown> = Record<string, unknown>>(copyFromA?: T, copyFromB?: T): T;
|
|
6185
|
-
/**
|
|
6186
|
-
* Gets a set from the pool.
|
|
6187
|
-
* Set is reset to empty state and ready for use.
|
|
6188
|
-
* @typeParam T - The type of the set.
|
|
6189
|
-
* @returns A reusable set.
|
|
6190
|
-
*/
|
|
6191
|
-
getSet<T>(copyFromA?: Set<T> | T[], copyFromB?: Set<T> | T[]): Set<T>;
|
|
6192
|
-
/**
|
|
6193
|
-
* Maps an array to a new array using a callback function.
|
|
6194
|
-
* @typeParam T - The type of the array.
|
|
6195
|
-
* @typeParam U - The type of the resulting array.
|
|
6196
|
-
* @param array - The array to map.
|
|
6197
|
-
* @param callback - The callback function to map the array.
|
|
6198
|
-
* @returns A new array with the mapped values.
|
|
6199
|
-
*/
|
|
6200
|
-
map<T, U>(array: T[], callback: (value: T, index: number, array: T[]) => U): U[];
|
|
6201
|
-
/**
|
|
6202
|
-
* Releases all allocated objects back to their respective pools.
|
|
6203
|
-
* This is intended to be called at the end of a tick.
|
|
6204
|
-
*/
|
|
6205
|
-
reset(): void;
|
|
6206
|
-
}
|
|
6207
|
-
|
|
6208
6074
|
/** The options for a trimesh collider. @public */
|
|
6209
6075
|
export declare interface TrimeshColliderOptions extends BaseColliderOptions {
|
|
6210
6076
|
shape: ColliderShape.TRIMESH;
|
|
@@ -6819,7 +6685,6 @@ export declare class World extends EventRouter implements protocol.Serializable
|
|
|
6819
6685
|
|
|
6820
6686
|
|
|
6821
6687
|
|
|
6822
|
-
|
|
6823
6688
|
|
|
6824
6689
|
|
|
6825
6690
|
/**
|
|
@@ -6832,32 +6697,40 @@ export declare class World extends EventRouter implements protocol.Serializable
|
|
|
6832
6697
|
get ambientLightColor(): RgbColor;
|
|
6833
6698
|
/** The intensity of the ambient light. */
|
|
6834
6699
|
get ambientLightIntensity(): number;
|
|
6835
|
-
/** The block type registry for the world. */
|
|
6836
|
-
get blockTypeRegistry(): BlockTypeRegistry;
|
|
6837
|
-
/** The chat manager for the world. */
|
|
6838
|
-
get chatManager(): ChatManager;
|
|
6839
|
-
/** The chunk lattice for the world. */
|
|
6840
|
-
get chunkLattice(): ChunkLattice;
|
|
6841
6700
|
/** The color of the directional light. */
|
|
6842
6701
|
get directionalLightColor(): RgbColor;
|
|
6843
6702
|
/** The intensity of the directional light. */
|
|
6844
6703
|
get directionalLightIntensity(): number;
|
|
6845
6704
|
/** The position the directional light originates from. */
|
|
6846
6705
|
get directionalLightPosition(): Vector3Like;
|
|
6847
|
-
/** The entity manager for the world. */
|
|
6848
|
-
get entityManager(): EntityManager;
|
|
6849
6706
|
/** The color of the fog, if not explicitly set, defaults to ambient light color. */
|
|
6850
6707
|
get fogColor(): RgbColor | undefined;
|
|
6851
6708
|
/** The maximum distance from the camera at which fog stops being applied. */
|
|
6852
6709
|
get fogFar(): number;
|
|
6853
6710
|
/** The minimum distance from the camera to start applying fog. */
|
|
6854
6711
|
get fogNear(): number;
|
|
6712
|
+
/** The name of the world. */
|
|
6713
|
+
get name(): string;
|
|
6714
|
+
/** The intensity of the world's skybox brightness. */
|
|
6715
|
+
get skyboxIntensity(): number;
|
|
6716
|
+
/** The URI of the skybox cubemap for the world. */
|
|
6717
|
+
get skyboxUri(): string;
|
|
6718
|
+
/** The audio manager for the world. */
|
|
6719
|
+
get audioManager(): AudioManager;
|
|
6720
|
+
/** An arbitrary identifier tag of the world. Useful for your own logic. */
|
|
6721
|
+
get tag(): string | undefined;
|
|
6722
|
+
/** The block type registry for the world. */
|
|
6723
|
+
get blockTypeRegistry(): BlockTypeRegistry;
|
|
6724
|
+
/** The chat manager for the world. */
|
|
6725
|
+
get chatManager(): ChatManager;
|
|
6726
|
+
/** The chunk lattice for the world. */
|
|
6727
|
+
get chunkLattice(): ChunkLattice;
|
|
6728
|
+
/** The entity manager for the world. */
|
|
6729
|
+
get entityManager(): EntityManager;
|
|
6855
6730
|
/** The light manager for the world. */
|
|
6856
6731
|
get lightManager(): LightManager;
|
|
6857
6732
|
/** The world loop for the world. */
|
|
6858
6733
|
get loop(): WorldLoop;
|
|
6859
|
-
/** The name of the world. */
|
|
6860
|
-
get name(): string;
|
|
6861
6734
|
|
|
6862
6735
|
/** The particle emitter manager for the world. */
|
|
6863
6736
|
get particleEmitterManager(): ParticleEmitterManager;
|
|
@@ -6865,16 +6738,6 @@ export declare class World extends EventRouter implements protocol.Serializable
|
|
|
6865
6738
|
get sceneUIManager(): SceneUIManager;
|
|
6866
6739
|
/** The simulation for the world. */
|
|
6867
6740
|
get simulation(): Simulation;
|
|
6868
|
-
/** The intensity of the world's skybox brightness. */
|
|
6869
|
-
get skyboxIntensity(): number;
|
|
6870
|
-
/** The URI of the skybox cubemap for the world. */
|
|
6871
|
-
get skyboxUri(): string;
|
|
6872
|
-
/** The audio manager for the world. */
|
|
6873
|
-
get audioManager(): AudioManager;
|
|
6874
|
-
/** An arbitrary identifier tag of the world. Useful for your own logic. */
|
|
6875
|
-
get tag(): string | undefined;
|
|
6876
|
-
/** The tick allocator for the world. */
|
|
6877
|
-
get tickAllocator(): TickAllocator;
|
|
6878
6741
|
/**
|
|
6879
6742
|
* Loads a map into the world, clearing any prior map.
|
|
6880
6743
|
* @param map - The map to load.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [server](./server.md) > [Array3Number](./server.array3number.md)
|
|
4
|
-
|
|
5
|
-
## Array3Number type
|
|
6
|
-
|
|
7
|
-
A 3-element number array.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
export type Array3Number = [number, number, number];
|
|
13
|
-
```
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [server](./server.md) > [Array4Number](./server.array4number.md)
|
|
4
|
-
|
|
5
|
-
## Array4Number type
|
|
6
|
-
|
|
7
|
-
A 4-element number array.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
export type Array4Number = [number, number, number, number];
|
|
13
|
-
```
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [server](./server.md) > [BlockType](./server.blocktype.md) > [blockTypeRegistry](./server.blocktype.blocktyperegistry.md)
|
|
4
|
-
|
|
5
|
-
## BlockType.blockTypeRegistry property
|
|
6
|
-
|
|
7
|
-
The block type registry that the block type belongs to.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
get blockTypeRegistry(): BlockTypeRegistry;
|
|
13
|
-
```
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [server](./server.md) > [Chunk](./server.chunk.md) > [chunkLattice](./server.chunk.chunklattice.md)
|
|
4
|
-
|
|
5
|
-
## Chunk.chunkLattice property
|
|
6
|
-
|
|
7
|
-
The chunk lattice that the chunk belongs to.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
get chunkLattice(): ChunkLattice;
|
|
13
|
-
```
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [server](./server.md) > [ChunkLattice](./server.chunklattice.md) > [world](./server.chunklattice.world.md)
|
|
4
|
-
|
|
5
|
-
## ChunkLattice.world property
|
|
6
|
-
|
|
7
|
-
The world that the chunk lattice belongs to.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
get world(): World;
|
|
13
|
-
```
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [server](./server.md) > [TickAllocator](./server.tickallocator.md) > [getArray](./server.tickallocator.getarray.md)
|
|
4
|
-
|
|
5
|
-
## TickAllocator.getArray() method
|
|
6
|
-
|
|
7
|
-
Gets a generic array from the pool. Array is reset to empty state and ready for use.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
getArray<T extends unknown[] = unknown[]>(copyFromA?: Iterable<unknown>, copyFromB?: Iterable<unknown>): T;
|
|
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
|
-
copyFromA
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
</td><td>
|
|
39
|
-
|
|
40
|
-
Iterable<unknown>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</td><td>
|
|
44
|
-
|
|
45
|
-
_(Optional)_
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
</td></tr>
|
|
49
|
-
<tr><td>
|
|
50
|
-
|
|
51
|
-
copyFromB
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
</td><td>
|
|
55
|
-
|
|
56
|
-
Iterable<unknown>
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
</td><td>
|
|
60
|
-
|
|
61
|
-
_(Optional)_
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
</td></tr>
|
|
65
|
-
</tbody></table>
|
|
66
|
-
|
|
67
|
-
**Returns:**
|
|
68
|
-
|
|
69
|
-
T
|
|
70
|
-
|
|
71
|
-
A reusable array.
|
|
72
|
-
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [server](./server.md) > [TickAllocator](./server.tickallocator.md) > [getArray3Number](./server.tickallocator.getarray3number.md)
|
|
4
|
-
|
|
5
|
-
## TickAllocator.getArray3Number() method
|
|
6
|
-
|
|
7
|
-
Gets a 3-element number array from the pool. Array is reset to \[0, 0, 0\] and ready for use.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
getArray3Number(copyFrom?: Array3Number | Set<number>): Array3Number;
|
|
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
|
-
copyFrom
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
</td><td>
|
|
39
|
-
|
|
40
|
-
[Array3Number](./server.array3number.md) \| Set<number>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</td><td>
|
|
44
|
-
|
|
45
|
-
_(Optional)_
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
</td></tr>
|
|
49
|
-
</tbody></table>
|
|
50
|
-
|
|
51
|
-
**Returns:**
|
|
52
|
-
|
|
53
|
-
[Array3Number](./server.array3number.md)
|
|
54
|
-
|
|
55
|
-
A reusable 3-element array.
|
|
56
|
-
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [server](./server.md) > [TickAllocator](./server.tickallocator.md) > [getArray4Number](./server.tickallocator.getarray4number.md)
|
|
4
|
-
|
|
5
|
-
## TickAllocator.getArray4Number() method
|
|
6
|
-
|
|
7
|
-
Gets a 4-element number array from the pool. Array is reset to \[0, 0, 0, 0\] and ready for use.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
getArray4Number(copyFrom?: Array4Number | Set<number>): Array4Number;
|
|
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
|
-
copyFrom
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
</td><td>
|
|
39
|
-
|
|
40
|
-
[Array4Number](./server.array4number.md) \| Set<number>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</td><td>
|
|
44
|
-
|
|
45
|
-
_(Optional)_
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
</td></tr>
|
|
49
|
-
</tbody></table>
|
|
50
|
-
|
|
51
|
-
**Returns:**
|
|
52
|
-
|
|
53
|
-
[Array4Number](./server.array4number.md)
|
|
54
|
-
|
|
55
|
-
A reusable 4-element array.
|
|
56
|
-
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [server](./server.md) > [TickAllocator](./server.tickallocator.md) > [getObject](./server.tickallocator.getobject.md)
|
|
4
|
-
|
|
5
|
-
## TickAllocator.getObject() method
|
|
6
|
-
|
|
7
|
-
Gets a plain object from the pool. Object is reset to empty state and ready for use.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
getObject<T extends Record<string, unknown> = Record<string, unknown>>(copyFromA?: T, copyFromB?: T): T;
|
|
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
|
-
copyFromA
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
</td><td>
|
|
39
|
-
|
|
40
|
-
T
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</td><td>
|
|
44
|
-
|
|
45
|
-
_(Optional)_
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
</td></tr>
|
|
49
|
-
<tr><td>
|
|
50
|
-
|
|
51
|
-
copyFromB
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
</td><td>
|
|
55
|
-
|
|
56
|
-
T
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
</td><td>
|
|
60
|
-
|
|
61
|
-
_(Optional)_
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
</td></tr>
|
|
65
|
-
</tbody></table>
|
|
66
|
-
|
|
67
|
-
**Returns:**
|
|
68
|
-
|
|
69
|
-
T
|
|
70
|
-
|
|
71
|
-
A reusable plain object.
|
|
72
|
-
|