hytopia 0.8.6-devtrace-1 → 0.8.6-devtrace-allocs
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 +168 -166
- package/docs/server.array3number.md +13 -0
- package/docs/server.array4number.md +13 -0
- package/docs/server.audiomanager.getallaudios.md +38 -1
- package/docs/server.audiomanager.getallentityattachedaudios.md +17 -1
- package/docs/server.audiomanager.getallloopedaudios.md +38 -1
- package/docs/server.audiomanager.getalloneshotaudios.md +38 -1
- package/docs/server.audiomanager.md +4 -4
- package/docs/server.blocktype._constructor_.md +15 -1
- package/docs/server.blocktype.blocktyperegistry.md +13 -0
- package/docs/server.blocktype.md +22 -1
- package/docs/server.blocktyperegistry.getallblocktypes.md +38 -1
- package/docs/server.blocktyperegistry.md +1 -1
- package/docs/server.chunk._constructor_.md +15 -1
- package/docs/server.chunk.chunklattice.md +13 -0
- package/docs/server.chunk.md +22 -1
- package/docs/server.chunklattice.getallchunks.md +38 -1
- package/docs/server.chunklattice.md +22 -1
- package/docs/server.chunklattice.world.md +13 -0
- 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.entitymanager.getallentities.md +38 -1
- package/docs/server.entitymanager.md +1 -1
- package/docs/server.lightmanager.getalllights.md +38 -1
- package/docs/server.lightmanager.md +1 -1
- package/docs/server.md +67 -1
- package/docs/server.particleemitter.burst.md +54 -0
- package/docs/server.particleemitter.md +14 -0
- package/docs/server.particleemitterevent.md +14 -0
- package/docs/server.particleemittereventpayloads._particle_emitter.burst_.md +16 -0
- package/docs/server.particleemittereventpayloads.md +19 -0
- package/docs/server.particleemittermanager.getallparticleemitters.md +38 -1
- package/docs/server.particleemittermanager.md +1 -1
- package/docs/server.rgbcolor.md +1 -1
- package/docs/server.sceneuimanager.getallsceneuis.md +38 -1
- package/docs/server.sceneuimanager.md +1 -1
- package/docs/server.telemetry.getprocessstats.md +56 -0
- package/docs/server.telemetry.initializesentry.md +74 -0
- package/docs/server.telemetry.md +126 -0
- package/docs/server.telemetry.sentry.md +23 -0
- package/docs/server.telemetry.startspan.md +91 -0
- package/docs/server.telemetryspanoperation.md +258 -0
- package/docs/server.telemetryspanoptions.md +18 -0
- package/docs/server.tickallocator.filter.md +72 -0
- package/docs/server.tickallocator.getarray.md +72 -0
- package/docs/server.tickallocator.getarray3number.md +56 -0
- package/docs/server.tickallocator.getarray4number.md +56 -0
- package/docs/server.tickallocator.getobject.md +72 -0
- package/docs/server.tickallocator.getset.md +72 -0
- package/docs/server.tickallocator.map.md +72 -0
- package/docs/server.tickallocator.md +163 -0
- package/docs/server.tickallocator.reset.md +17 -0
- package/docs/server.world.md +21 -0
- package/docs/server.world.tickallocator.md +13 -0
- package/node-server.mjs +173 -171
- package/package.json +1 -1
- package/server.api.json +2175 -312
- package/server.d.ts +328 -32
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Telemetry](./server.telemetry.md) > [startSpan](./server.telemetry.startspan.md)
|
|
4
|
+
|
|
5
|
+
## Telemetry.startSpan() method
|
|
6
|
+
|
|
7
|
+
Executes a callback function within a performance monitoring span.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
static startSpan<T>(options: TelemetrySpanOptions, callback: (span?: Sentry.Span) => 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
|
+
options
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
[TelemetrySpanOptions](./server.telemetryspanoptions.md)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
Configuration for the telemetry span including operation type and attributes.
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</td></tr>
|
|
49
|
+
<tr><td>
|
|
50
|
+
|
|
51
|
+
callback
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
</td><td>
|
|
55
|
+
|
|
56
|
+
(span?: Sentry.Span) => T
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
</td><td>
|
|
60
|
+
|
|
61
|
+
The function to execute within the performance span.
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
</td></tr>
|
|
65
|
+
</tbody></table>
|
|
66
|
+
|
|
67
|
+
**Returns:**
|
|
68
|
+
|
|
69
|
+
T
|
|
70
|
+
|
|
71
|
+
The return value of the callback function.
|
|
72
|
+
|
|
73
|
+
## Remarks
|
|
74
|
+
|
|
75
|
+
This method provides zero-overhead performance monitoring in development environments. In production with Sentry enabled and `SENTRY_ENABLE_TRACING=true`<!-- -->, it creates performance spans for monitoring. The span data is only transmitted to Sentry when performance issues are detected.
|
|
76
|
+
|
|
77
|
+
## Example
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
```typescript
|
|
81
|
+
const result = Telemetry.startSpan({
|
|
82
|
+
operation: TelemetrySpanOperation.ENTITIES_TICK,
|
|
83
|
+
attributes: {
|
|
84
|
+
entityCount: entities.length,
|
|
85
|
+
worldId: world.id,
|
|
86
|
+
},
|
|
87
|
+
}, () => {
|
|
88
|
+
return processEntities(entities);
|
|
89
|
+
});
|
|
90
|
+
```
|
|
91
|
+
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [server](./server.md) > [TelemetrySpanOperation](./server.telemetryspanoperation.md)
|
|
4
|
+
|
|
5
|
+
## TelemetrySpanOperation enum
|
|
6
|
+
|
|
7
|
+
Performance telemetry span operation types.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare enum TelemetrySpanOperation
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Enumeration Members
|
|
16
|
+
|
|
17
|
+
<table><thead><tr><th>
|
|
18
|
+
|
|
19
|
+
Member
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
</th><th>
|
|
23
|
+
|
|
24
|
+
Value
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
</th><th>
|
|
28
|
+
|
|
29
|
+
Description
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
</th></tr></thead>
|
|
33
|
+
<tbody><tr><td>
|
|
34
|
+
|
|
35
|
+
BUILD\_PACKETS
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
`"build_packets"`
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
</td></tr>
|
|
47
|
+
<tr><td>
|
|
48
|
+
|
|
49
|
+
ENTITIES\_EMIT\_UPDATES
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
</td><td>
|
|
53
|
+
|
|
54
|
+
`"entities_emit_updates"`
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
</td><td>
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
</td></tr>
|
|
61
|
+
<tr><td>
|
|
62
|
+
|
|
63
|
+
ENTITIES\_TICK
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
</td><td>
|
|
67
|
+
|
|
68
|
+
`"entities_tick"`
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
</td><td>
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
</td></tr>
|
|
75
|
+
<tr><td>
|
|
76
|
+
|
|
77
|
+
NETWORK\_SYNCHRONIZE
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
</td><td>
|
|
81
|
+
|
|
82
|
+
`"network_synchronize"`
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
</td><td>
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
</td></tr>
|
|
89
|
+
<tr><td>
|
|
90
|
+
|
|
91
|
+
NETWORK\_SYNCHRONIZE\_CLEANUP
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
</td><td>
|
|
95
|
+
|
|
96
|
+
`"network_synchronize_cleanup"`
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
</td><td>
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
</td></tr>
|
|
103
|
+
<tr><td>
|
|
104
|
+
|
|
105
|
+
PHYSICS\_CLEANUP
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
</td><td>
|
|
109
|
+
|
|
110
|
+
`"physics_cleanup"`
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
</td><td>
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
</td></tr>
|
|
117
|
+
<tr><td>
|
|
118
|
+
|
|
119
|
+
PHYSICS\_STEP
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
</td><td>
|
|
123
|
+
|
|
124
|
+
`"physics_step"`
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
</td><td>
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
</td></tr>
|
|
131
|
+
<tr><td>
|
|
132
|
+
|
|
133
|
+
RELEASE\_TICK\_ALLOCATION
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
</td><td>
|
|
137
|
+
|
|
138
|
+
`"release_tick_allocation"`
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
</td><td>
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
</td></tr>
|
|
145
|
+
<tr><td>
|
|
146
|
+
|
|
147
|
+
SEND\_ALL\_PACKETS
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
</td><td>
|
|
151
|
+
|
|
152
|
+
`"send_all_packets"`
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
</td><td>
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
</td></tr>
|
|
159
|
+
<tr><td>
|
|
160
|
+
|
|
161
|
+
SEND\_PACKETS
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
</td><td>
|
|
165
|
+
|
|
166
|
+
`"send_packets"`
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
</td><td>
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
</td></tr>
|
|
173
|
+
<tr><td>
|
|
174
|
+
|
|
175
|
+
SERIALIZE\_FREE\_BUFFERS
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
</td><td>
|
|
179
|
+
|
|
180
|
+
`"serialize_free_buffers"`
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
</td><td>
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
</td></tr>
|
|
187
|
+
<tr><td>
|
|
188
|
+
|
|
189
|
+
SERIALIZE\_PACKETS
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
</td><td>
|
|
193
|
+
|
|
194
|
+
`"serialize_packets"`
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
</td><td>
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
</td></tr>
|
|
201
|
+
<tr><td>
|
|
202
|
+
|
|
203
|
+
SERIALIZE\_PACKETS\_ENCODE
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
</td><td>
|
|
207
|
+
|
|
208
|
+
`"serialize_packets_encode"`
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
</td><td>
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
</td></tr>
|
|
215
|
+
<tr><td>
|
|
216
|
+
|
|
217
|
+
SIMULATION\_STEP
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
</td><td>
|
|
221
|
+
|
|
222
|
+
`"simulation_step"`
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
</td><td>
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
</td></tr>
|
|
229
|
+
<tr><td>
|
|
230
|
+
|
|
231
|
+
TICKER\_TICK
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
</td><td>
|
|
235
|
+
|
|
236
|
+
`"ticker_tick"`
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
</td><td>
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
</td></tr>
|
|
243
|
+
<tr><td>
|
|
244
|
+
|
|
245
|
+
WORLD\_TICK
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
</td><td>
|
|
249
|
+
|
|
250
|
+
`"world_tick"`
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
</td><td>
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
</td></tr>
|
|
257
|
+
</tbody></table>
|
|
258
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [server](./server.md) > [TelemetrySpanOptions](./server.telemetryspanoptions.md)
|
|
4
|
+
|
|
5
|
+
## TelemetrySpanOptions type
|
|
6
|
+
|
|
7
|
+
Options for creating a telemetry span.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export type TelemetrySpanOptions = {
|
|
13
|
+
operation: TelemetrySpanOperation | string;
|
|
14
|
+
attributes?: Record<string, string | number>;
|
|
15
|
+
};
|
|
16
|
+
```
|
|
17
|
+
**References:** [TelemetrySpanOperation](./server.telemetryspanoperation.md)
|
|
18
|
+
|
|
@@ -0,0 +1,72 @@
|
|
|
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) > [filter](./server.tickallocator.filter.md)
|
|
4
|
+
|
|
5
|
+
## TickAllocator.filter() method
|
|
6
|
+
|
|
7
|
+
Filters an array using a callback function.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
filter<T>(array: T[], callback: (value: T, index: number, array: T[]) => boolean): 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
|
+
array
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
T\[\]
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
The array to filter.
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</td></tr>
|
|
49
|
+
<tr><td>
|
|
50
|
+
|
|
51
|
+
callback
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
</td><td>
|
|
55
|
+
|
|
56
|
+
(value: T, index: number, array: T\[\]) => boolean
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
</td><td>
|
|
60
|
+
|
|
61
|
+
The callback function to filter the array.
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
</td></tr>
|
|
65
|
+
</tbody></table>
|
|
66
|
+
|
|
67
|
+
**Returns:**
|
|
68
|
+
|
|
69
|
+
T\[\]
|
|
70
|
+
|
|
71
|
+
A new array with the filtered values.
|
|
72
|
+
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
|