hytopia 0.8.5 → 0.8.6-dev2
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 +171 -171
- package/docs/server.audiomanager.getallaudios.md +1 -38
- package/docs/server.audiomanager.getallentityattachedaudios.md +2 -18
- package/docs/server.audiomanager.getallloopedaudios.md +1 -38
- package/docs/server.audiomanager.getalloneshotaudios.md +1 -38
- package/docs/server.audiomanager.md +4 -4
- 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.telemetryspanoperation.md +0 -14
- package/docs/server.world.md +0 -21
- package/node-server.mjs +167 -167
- package/package.json +1 -1
- package/server.api.json +52 -1091
- package/server.d.ts +30 -181
- 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.filter.md +0 -72
- 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 -163
- package/docs/server.tickallocator.reset.md +0 -17
- package/docs/server.world.tickallocator.md +0 -13
|
@@ -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
|
-
|
|
@@ -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) > [getSet](./server.tickallocator.getset.md)
|
|
4
|
-
|
|
5
|
-
## TickAllocator.getSet() method
|
|
6
|
-
|
|
7
|
-
Gets a set from the pool. Set is reset to empty state and ready for use.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
getSet<T>(copyFromA?: Set<T> | T[], copyFromB?: Set<T> | T[]): Set<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
|
-
Set<T> \| 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
|
-
Set<T> \| T\[\]
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
</td><td>
|
|
60
|
-
|
|
61
|
-
_(Optional)_
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
</td></tr>
|
|
65
|
-
</tbody></table>
|
|
66
|
-
|
|
67
|
-
**Returns:**
|
|
68
|
-
|
|
69
|
-
Set<T>
|
|
70
|
-
|
|
71
|
-
A reusable set.
|
|
72
|
-
|
|
@@ -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) > [map](./server.tickallocator.map.md)
|
|
4
|
-
|
|
5
|
-
## TickAllocator.map() method
|
|
6
|
-
|
|
7
|
-
Maps an array to a new array using a callback function.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
map<T, U>(array: T[], callback: (value: T, index: number, array: T[]) => U): U[];
|
|
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
|
-
array
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
</td><td>
|
|
39
|
-
|
|
40
|
-
T\[\]
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</td><td>
|
|
44
|
-
|
|
45
|
-
The array to map.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
</td></tr>
|
|
49
|
-
<tr><td>
|
|
50
|
-
|
|
51
|
-
callback
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
</td><td>
|
|
55
|
-
|
|
56
|
-
(value: T, index: number, array: T\[\]) => U
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
</td><td>
|
|
60
|
-
|
|
61
|
-
The callback function to map the array.
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
</td></tr>
|
|
65
|
-
</tbody></table>
|
|
66
|
-
|
|
67
|
-
**Returns:**
|
|
68
|
-
|
|
69
|
-
U\[\]
|
|
70
|
-
|
|
71
|
-
A new array with the mapped values.
|
|
72
|
-
|
|
@@ -1,163 +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)
|
|
4
|
-
|
|
5
|
-
## TickAllocator class
|
|
6
|
-
|
|
7
|
-
High-performance tick-scoped allocator for temporary objects, arrays, and buffers. All allocations are automatically bulk-released when reset() is called.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
export default class TickAllocator
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Remarks
|
|
16
|
-
|
|
17
|
-
TickAllocator maintains separate pools for different data types and tracks all allocations made during a tick cycle. Objects are reused across ticks to eliminate garbage collection overhead in hot paths like network synchronization.
|
|
18
|
-
|
|
19
|
-
## Example
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
```typescript
|
|
23
|
-
// Allocate during tick
|
|
24
|
-
const position = tickAllocator.getArray3Number();
|
|
25
|
-
const rotation = tickAllocator.getArray4Number();
|
|
26
|
-
const data = tickAllocator.getObject<EntitySchema>();
|
|
27
|
-
|
|
28
|
-
// At end of tick - bulk release everything
|
|
29
|
-
tickAllocator.reset();
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Methods
|
|
33
|
-
|
|
34
|
-
<table><thead><tr><th>
|
|
35
|
-
|
|
36
|
-
Method
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
</th><th>
|
|
40
|
-
|
|
41
|
-
Modifiers
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
</th><th>
|
|
45
|
-
|
|
46
|
-
Description
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
</th></tr></thead>
|
|
50
|
-
<tbody><tr><td>
|
|
51
|
-
|
|
52
|
-
[filter(array, callback)](./server.tickallocator.filter.md)
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
</td><td>
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
</td><td>
|
|
59
|
-
|
|
60
|
-
Filters an array using a callback function.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
</td></tr>
|
|
64
|
-
<tr><td>
|
|
65
|
-
|
|
66
|
-
[getArray(copyFromA, copyFromB)](./server.tickallocator.getarray.md)
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
</td><td>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
</td><td>
|
|
73
|
-
|
|
74
|
-
Gets a generic array from the pool. Array is reset to empty state and ready for use.
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
</td></tr>
|
|
78
|
-
<tr><td>
|
|
79
|
-
|
|
80
|
-
[getArray3Number(copyFrom)](./server.tickallocator.getarray3number.md)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
</td><td>
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
</td><td>
|
|
87
|
-
|
|
88
|
-
Gets a 3-element number array from the pool. Array is reset to \[0, 0, 0\] and ready for use.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
</td></tr>
|
|
92
|
-
<tr><td>
|
|
93
|
-
|
|
94
|
-
[getArray4Number(copyFrom)](./server.tickallocator.getarray4number.md)
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
</td><td>
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
</td><td>
|
|
101
|
-
|
|
102
|
-
Gets a 4-element number array from the pool. Array is reset to \[0, 0, 0, 0\] and ready for use.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
</td></tr>
|
|
106
|
-
<tr><td>
|
|
107
|
-
|
|
108
|
-
[getObject(copyFromA, copyFromB)](./server.tickallocator.getobject.md)
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
</td><td>
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
</td><td>
|
|
115
|
-
|
|
116
|
-
Gets a plain object from the pool. Object is reset to empty state and ready for use.
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
</td></tr>
|
|
120
|
-
<tr><td>
|
|
121
|
-
|
|
122
|
-
[getSet(copyFromA, copyFromB)](./server.tickallocator.getset.md)
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
</td><td>
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
</td><td>
|
|
129
|
-
|
|
130
|
-
Gets a set from the pool. Set is reset to empty state and ready for use.
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
</td></tr>
|
|
134
|
-
<tr><td>
|
|
135
|
-
|
|
136
|
-
[map(array, callback)](./server.tickallocator.map.md)
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
</td><td>
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
</td><td>
|
|
143
|
-
|
|
144
|
-
Maps an array to a new array using a callback function.
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
</td></tr>
|
|
148
|
-
<tr><td>
|
|
149
|
-
|
|
150
|
-
[reset()](./server.tickallocator.reset.md)
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
</td><td>
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
</td><td>
|
|
157
|
-
|
|
158
|
-
Releases all allocated objects back to their respective pools. This is intended to be called at the end of a tick.
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
</td></tr>
|
|
162
|
-
</tbody></table>
|
|
163
|
-
|
|
@@ -1,17 +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) > [reset](./server.tickallocator.reset.md)
|
|
4
|
-
|
|
5
|
-
## TickAllocator.reset() method
|
|
6
|
-
|
|
7
|
-
Releases all allocated objects back to their respective pools. This is intended to be called at the end of a tick.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
reset(): void;
|
|
13
|
-
```
|
|
14
|
-
**Returns:**
|
|
15
|
-
|
|
16
|
-
void
|
|
17
|
-
|
|
@@ -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) > [World](./server.world.md) > [tickAllocator](./server.world.tickallocator.md)
|
|
4
|
-
|
|
5
|
-
## World.tickAllocator property
|
|
6
|
-
|
|
7
|
-
The tick allocator for the world.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
get tickAllocator(): TickAllocator;
|
|
13
|
-
```
|