nucleation 0.3.17 → 0.3.19
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/AnimationEffect.d.ts +44 -0
- package/AnimationEffect.mjs +204 -0
- package/BuildAnimation.d.ts +130 -0
- package/BuildAnimation.mjs +944 -0
- package/Curve3D.d.ts +27 -0
- package/Curve3D.mjs +101 -0
- package/DistanceField.d.ts +39 -0
- package/DistanceField.mjs +114 -0
- package/RenderConfig.d.ts +14 -0
- package/RenderConfig.mjs +38 -0
- package/Schematic.d.ts +134 -36
- package/Schematic.mjs +586 -42
- package/Shape.d.ts +7 -0
- package/Shape.mjs +25 -0
- package/index.d.ts +8 -0
- package/index.mjs +9 -1
- package/nucleation.wasm +0 -0
- package/package.json +1 -1
|
@@ -0,0 +1,944 @@
|
|
|
1
|
+
// generated by diplomat-tool
|
|
2
|
+
import { AnimationEffect } from "./AnimationEffect.mjs"
|
|
3
|
+
import { Brush } from "./Brush.mjs"
|
|
4
|
+
import { NucleationError } from "./NucleationError.mjs"
|
|
5
|
+
import { Schematic } from "./Schematic.mjs"
|
|
6
|
+
import { Shape } from "./Shape.mjs"
|
|
7
|
+
import wasm from "./diplomat-wasm.mjs";
|
|
8
|
+
import * as diplomatRuntime from "./diplomat-runtime.mjs";
|
|
9
|
+
|
|
10
|
+
const BuildAnimation_box_destroy_registry = new FinalizationRegistry((ptr) => {
|
|
11
|
+
wasm.BuildAnimation_destroy(ptr);
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A schematic wrapper that records construction calls as animation targets.
|
|
16
|
+
*/
|
|
17
|
+
export class BuildAnimation {
|
|
18
|
+
// Internal ptr reference:
|
|
19
|
+
#ptr = null;
|
|
20
|
+
|
|
21
|
+
// Lifetimes are only to keep dependencies alive.
|
|
22
|
+
// Since JS won't garbage collect until there are no incoming edges.
|
|
23
|
+
#selfEdge = [];
|
|
24
|
+
|
|
25
|
+
#internalConstructor(symbol, ptr, selfEdge) {
|
|
26
|
+
if (symbol !== diplomatRuntime.internalConstructor) {
|
|
27
|
+
console.error("BuildAnimation is an Opaque type. You cannot call its constructor.");
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
this.#ptr = ptr;
|
|
31
|
+
this.#selfEdge = selfEdge;
|
|
32
|
+
|
|
33
|
+
// Are we being borrowed? If not, we can register.
|
|
34
|
+
if (this.#selfEdge.length === 0) {
|
|
35
|
+
BuildAnimation_box_destroy_registry.register(this, this.#ptr);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return this;
|
|
39
|
+
}
|
|
40
|
+
/** @internal */
|
|
41
|
+
get ffiValue() {
|
|
42
|
+
return this.#ptr;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
static create(name) {
|
|
47
|
+
let functionCleanupArena = new diplomatRuntime.CleanupArena();
|
|
48
|
+
|
|
49
|
+
const nameSlice = functionCleanupArena.alloc(diplomatRuntime.DiplomatBuf.sliceWrapper(wasm, diplomatRuntime.DiplomatBuf.str8(wasm, name)));
|
|
50
|
+
|
|
51
|
+
const result = wasm.BuildAnimation_create(nameSlice.ptr);
|
|
52
|
+
|
|
53
|
+
try {
|
|
54
|
+
return new BuildAnimation(diplomatRuntime.internalConstructor, result, []);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
finally {
|
|
58
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
59
|
+
functionCleanupArena.free();
|
|
60
|
+
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
setDefaultEffect(effect) {
|
|
65
|
+
wasm.BuildAnimation_set_default_effect(this.ffiValue, effect.ffiValue);
|
|
66
|
+
|
|
67
|
+
try {}
|
|
68
|
+
|
|
69
|
+
finally {
|
|
70
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Apply an effect to exactly the next recorded operation or explicit group.
|
|
76
|
+
* The returned borrowed builder enables fluent calls in every generated binding.
|
|
77
|
+
*/
|
|
78
|
+
withEffect(effect) {
|
|
79
|
+
// This lifetime edge depends on lifetimes 'a
|
|
80
|
+
let aEdges = [this];
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
const result = wasm.BuildAnimation_with_effect(this.ffiValue, effect.ffiValue);
|
|
84
|
+
|
|
85
|
+
try {
|
|
86
|
+
return new BuildAnimation(diplomatRuntime.internalConstructor, result, aEdges);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
finally {
|
|
90
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
setStepMs(stepMs) {
|
|
95
|
+
wasm.BuildAnimation_set_step_ms(this.ffiValue, stepMs);
|
|
96
|
+
|
|
97
|
+
try {}
|
|
98
|
+
|
|
99
|
+
finally {
|
|
100
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
setStaggerTotalMs(totalMs) {
|
|
105
|
+
wasm.BuildAnimation_set_stagger_total_ms(this.ffiValue, totalMs);
|
|
106
|
+
|
|
107
|
+
try {}
|
|
108
|
+
|
|
109
|
+
finally {
|
|
110
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
clearStagger() {
|
|
115
|
+
wasm.BuildAnimation_clear_stagger(this.ffiValue);
|
|
116
|
+
|
|
117
|
+
try {}
|
|
118
|
+
|
|
119
|
+
finally {
|
|
120
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Shift every construction group's start time. Negative offsets let a
|
|
126
|
+
* repeating staggered effect cross the beginning of a loop capture.
|
|
127
|
+
*/
|
|
128
|
+
setStaggerOffsetMs(offsetMs) {
|
|
129
|
+
wasm.BuildAnimation_set_stagger_offset_ms(this.ffiValue, offsetMs);
|
|
130
|
+
|
|
131
|
+
try {}
|
|
132
|
+
|
|
133
|
+
finally {
|
|
134
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Capture exactly one loop period, excluding the duplicate endpoint.
|
|
140
|
+
* The rounded frame count evenly partitions the complete period.
|
|
141
|
+
*/
|
|
142
|
+
setLoopPeriodMs(periodMs) {
|
|
143
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
const result = wasm.BuildAnimation_set_loop_period_ms(diplomatReceive.buffer, this.ffiValue, periodMs);
|
|
147
|
+
|
|
148
|
+
try {
|
|
149
|
+
if (!diplomatReceive.resultFlag) {
|
|
150
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
151
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
finally {
|
|
156
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
157
|
+
diplomatReceive.free();
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
clearLoopPeriod() {
|
|
162
|
+
wasm.BuildAnimation_clear_loop_period(this.ffiValue);
|
|
163
|
+
|
|
164
|
+
try {}
|
|
165
|
+
|
|
166
|
+
finally {
|
|
167
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
beginGroup() {
|
|
172
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
const result = wasm.BuildAnimation_begin_group(diplomatReceive.buffer, this.ffiValue);
|
|
176
|
+
|
|
177
|
+
try {
|
|
178
|
+
if (!diplomatReceive.resultFlag) {
|
|
179
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
180
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
finally {
|
|
185
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
186
|
+
diplomatReceive.free();
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
beginKeyedGroup(key) {
|
|
191
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
const result = wasm.BuildAnimation_begin_keyed_group(diplomatReceive.buffer, this.ffiValue, key);
|
|
195
|
+
|
|
196
|
+
try {
|
|
197
|
+
if (!diplomatReceive.resultFlag) {
|
|
198
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
199
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
finally {
|
|
204
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
205
|
+
diplomatReceive.free();
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
endGroup() {
|
|
210
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
const result = wasm.BuildAnimation_end_group(diplomatReceive.buffer, this.ffiValue);
|
|
214
|
+
|
|
215
|
+
try {
|
|
216
|
+
if (!diplomatReceive.resultFlag) {
|
|
217
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
218
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
219
|
+
}
|
|
220
|
+
return (new Uint32Array(wasm.memory.buffer, diplomatReceive.buffer, 1))[0];
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
finally {
|
|
224
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
225
|
+
diplomatReceive.free();
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
setBlock(x, y, z, block) {
|
|
230
|
+
let functionCleanupArena = new diplomatRuntime.CleanupArena();
|
|
231
|
+
|
|
232
|
+
const blockSlice = functionCleanupArena.alloc(diplomatRuntime.DiplomatBuf.sliceWrapper(wasm, diplomatRuntime.DiplomatBuf.str8(wasm, block)));
|
|
233
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
const result = wasm.BuildAnimation_set_block(diplomatReceive.buffer, this.ffiValue, x, y, z, blockSlice.ptr);
|
|
237
|
+
|
|
238
|
+
try {
|
|
239
|
+
if (!diplomatReceive.resultFlag) {
|
|
240
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
241
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
242
|
+
}
|
|
243
|
+
return (new Uint32Array(wasm.memory.buffer, diplomatReceive.buffer, 1))[0];
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
finally {
|
|
247
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
248
|
+
functionCleanupArena.free();
|
|
249
|
+
|
|
250
|
+
diplomatReceive.free();
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
createRegion(name, minX, minY, minZ, maxX, maxY, maxZ) {
|
|
255
|
+
let functionCleanupArena = new diplomatRuntime.CleanupArena();
|
|
256
|
+
|
|
257
|
+
const nameSlice = functionCleanupArena.alloc(diplomatRuntime.DiplomatBuf.sliceWrapper(wasm, diplomatRuntime.DiplomatBuf.str8(wasm, name)));
|
|
258
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
const result = wasm.BuildAnimation_create_region(diplomatReceive.buffer, this.ffiValue, nameSlice.ptr, minX, minY, minZ, maxX, maxY, maxZ);
|
|
262
|
+
|
|
263
|
+
try {
|
|
264
|
+
if (!diplomatReceive.resultFlag) {
|
|
265
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
266
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
finally {
|
|
271
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
272
|
+
functionCleanupArena.free();
|
|
273
|
+
|
|
274
|
+
diplomatReceive.free();
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
setBlockInRegion(region, x, y, z, block) {
|
|
279
|
+
let functionCleanupArena = new diplomatRuntime.CleanupArena();
|
|
280
|
+
|
|
281
|
+
const regionSlice = functionCleanupArena.alloc(diplomatRuntime.DiplomatBuf.sliceWrapper(wasm, diplomatRuntime.DiplomatBuf.str8(wasm, region)));
|
|
282
|
+
const blockSlice = functionCleanupArena.alloc(diplomatRuntime.DiplomatBuf.sliceWrapper(wasm, diplomatRuntime.DiplomatBuf.str8(wasm, block)));
|
|
283
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
const result = wasm.BuildAnimation_set_block_in_region(diplomatReceive.buffer, this.ffiValue, regionSlice.ptr, x, y, z, blockSlice.ptr);
|
|
287
|
+
|
|
288
|
+
try {
|
|
289
|
+
if (!diplomatReceive.resultFlag) {
|
|
290
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
291
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
292
|
+
}
|
|
293
|
+
return (new Uint32Array(wasm.memory.buffer, diplomatReceive.buffer, 1))[0];
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
finally {
|
|
297
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
298
|
+
functionCleanupArena.free();
|
|
299
|
+
|
|
300
|
+
diplomatReceive.free();
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
translate(x, y, z, durationMs) {
|
|
305
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
const result = wasm.BuildAnimation_translate(diplomatReceive.buffer, this.ffiValue, x, y, z, durationMs);
|
|
309
|
+
|
|
310
|
+
try {
|
|
311
|
+
if (!diplomatReceive.resultFlag) {
|
|
312
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
313
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
finally {
|
|
318
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
319
|
+
diplomatReceive.free();
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
translateRegion(region, x, y, z, durationMs) {
|
|
324
|
+
let functionCleanupArena = new diplomatRuntime.CleanupArena();
|
|
325
|
+
|
|
326
|
+
const regionSlice = functionCleanupArena.alloc(diplomatRuntime.DiplomatBuf.sliceWrapper(wasm, diplomatRuntime.DiplomatBuf.str8(wasm, region)));
|
|
327
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
const result = wasm.BuildAnimation_translate_region(diplomatReceive.buffer, this.ffiValue, regionSlice.ptr, x, y, z, durationMs);
|
|
331
|
+
|
|
332
|
+
try {
|
|
333
|
+
if (!diplomatReceive.resultFlag) {
|
|
334
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
335
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
finally {
|
|
340
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
341
|
+
functionCleanupArena.free();
|
|
342
|
+
|
|
343
|
+
diplomatReceive.free();
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
translateAll(x, y, z, durationMs) {
|
|
348
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
const result = wasm.BuildAnimation_translate_all(diplomatReceive.buffer, this.ffiValue, x, y, z, durationMs);
|
|
352
|
+
|
|
353
|
+
try {
|
|
354
|
+
if (!diplomatReceive.resultFlag) {
|
|
355
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
356
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
finally {
|
|
361
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
362
|
+
diplomatReceive.free();
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
rotateX(degrees, durationMs) {
|
|
367
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
const result = wasm.BuildAnimation_rotate_x(diplomatReceive.buffer, this.ffiValue, degrees, durationMs);
|
|
371
|
+
|
|
372
|
+
try {
|
|
373
|
+
if (!diplomatReceive.resultFlag) {
|
|
374
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
375
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
finally {
|
|
380
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
381
|
+
diplomatReceive.free();
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
rotateY(degrees, durationMs) {
|
|
386
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
const result = wasm.BuildAnimation_rotate_y(diplomatReceive.buffer, this.ffiValue, degrees, durationMs);
|
|
390
|
+
|
|
391
|
+
try {
|
|
392
|
+
if (!diplomatReceive.resultFlag) {
|
|
393
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
394
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
finally {
|
|
399
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
400
|
+
diplomatReceive.free();
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
rotateZ(degrees, durationMs) {
|
|
405
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
const result = wasm.BuildAnimation_rotate_z(diplomatReceive.buffer, this.ffiValue, degrees, durationMs);
|
|
409
|
+
|
|
410
|
+
try {
|
|
411
|
+
if (!diplomatReceive.resultFlag) {
|
|
412
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
413
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
finally {
|
|
418
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
419
|
+
diplomatReceive.free();
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
rotateRegionX(region, degrees, durationMs) {
|
|
424
|
+
let functionCleanupArena = new diplomatRuntime.CleanupArena();
|
|
425
|
+
|
|
426
|
+
const regionSlice = functionCleanupArena.alloc(diplomatRuntime.DiplomatBuf.sliceWrapper(wasm, diplomatRuntime.DiplomatBuf.str8(wasm, region)));
|
|
427
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
const result = wasm.BuildAnimation_rotate_region_x(diplomatReceive.buffer, this.ffiValue, regionSlice.ptr, degrees, durationMs);
|
|
431
|
+
|
|
432
|
+
try {
|
|
433
|
+
if (!diplomatReceive.resultFlag) {
|
|
434
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
435
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
finally {
|
|
440
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
441
|
+
functionCleanupArena.free();
|
|
442
|
+
|
|
443
|
+
diplomatReceive.free();
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
rotateRegionY(region, degrees, durationMs) {
|
|
448
|
+
let functionCleanupArena = new diplomatRuntime.CleanupArena();
|
|
449
|
+
|
|
450
|
+
const regionSlice = functionCleanupArena.alloc(diplomatRuntime.DiplomatBuf.sliceWrapper(wasm, diplomatRuntime.DiplomatBuf.str8(wasm, region)));
|
|
451
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
const result = wasm.BuildAnimation_rotate_region_y(diplomatReceive.buffer, this.ffiValue, regionSlice.ptr, degrees, durationMs);
|
|
455
|
+
|
|
456
|
+
try {
|
|
457
|
+
if (!diplomatReceive.resultFlag) {
|
|
458
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
459
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
finally {
|
|
464
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
465
|
+
functionCleanupArena.free();
|
|
466
|
+
|
|
467
|
+
diplomatReceive.free();
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
rotateRegionZ(region, degrees, durationMs) {
|
|
472
|
+
let functionCleanupArena = new diplomatRuntime.CleanupArena();
|
|
473
|
+
|
|
474
|
+
const regionSlice = functionCleanupArena.alloc(diplomatRuntime.DiplomatBuf.sliceWrapper(wasm, diplomatRuntime.DiplomatBuf.str8(wasm, region)));
|
|
475
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
const result = wasm.BuildAnimation_rotate_region_z(diplomatReceive.buffer, this.ffiValue, regionSlice.ptr, degrees, durationMs);
|
|
479
|
+
|
|
480
|
+
try {
|
|
481
|
+
if (!diplomatReceive.resultFlag) {
|
|
482
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
483
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
finally {
|
|
488
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
489
|
+
functionCleanupArena.free();
|
|
490
|
+
|
|
491
|
+
diplomatReceive.free();
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
rotateAllX(degrees, durationMs) {
|
|
496
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
const result = wasm.BuildAnimation_rotate_all_x(diplomatReceive.buffer, this.ffiValue, degrees, durationMs);
|
|
500
|
+
|
|
501
|
+
try {
|
|
502
|
+
if (!diplomatReceive.resultFlag) {
|
|
503
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
504
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
finally {
|
|
509
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
510
|
+
diplomatReceive.free();
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
rotateAllY(degrees, durationMs) {
|
|
515
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
const result = wasm.BuildAnimation_rotate_all_y(diplomatReceive.buffer, this.ffiValue, degrees, durationMs);
|
|
519
|
+
|
|
520
|
+
try {
|
|
521
|
+
if (!diplomatReceive.resultFlag) {
|
|
522
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
523
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
finally {
|
|
528
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
529
|
+
diplomatReceive.free();
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
rotateAllZ(degrees, durationMs) {
|
|
534
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
const result = wasm.BuildAnimation_rotate_all_z(diplomatReceive.buffer, this.ffiValue, degrees, durationMs);
|
|
538
|
+
|
|
539
|
+
try {
|
|
540
|
+
if (!diplomatReceive.resultFlag) {
|
|
541
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
542
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
finally {
|
|
547
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
548
|
+
diplomatReceive.free();
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
flipX(durationMs) {
|
|
553
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
const result = wasm.BuildAnimation_flip_x(diplomatReceive.buffer, this.ffiValue, durationMs);
|
|
557
|
+
|
|
558
|
+
try {
|
|
559
|
+
if (!diplomatReceive.resultFlag) {
|
|
560
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
561
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
finally {
|
|
566
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
567
|
+
diplomatReceive.free();
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
flipY(durationMs) {
|
|
572
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
573
|
+
|
|
574
|
+
|
|
575
|
+
const result = wasm.BuildAnimation_flip_y(diplomatReceive.buffer, this.ffiValue, durationMs);
|
|
576
|
+
|
|
577
|
+
try {
|
|
578
|
+
if (!diplomatReceive.resultFlag) {
|
|
579
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
580
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
finally {
|
|
585
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
586
|
+
diplomatReceive.free();
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
flipZ(durationMs) {
|
|
591
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
const result = wasm.BuildAnimation_flip_z(diplomatReceive.buffer, this.ffiValue, durationMs);
|
|
595
|
+
|
|
596
|
+
try {
|
|
597
|
+
if (!diplomatReceive.resultFlag) {
|
|
598
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
599
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
finally {
|
|
604
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
605
|
+
diplomatReceive.free();
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
flipRegionX(region, durationMs) {
|
|
610
|
+
let functionCleanupArena = new diplomatRuntime.CleanupArena();
|
|
611
|
+
|
|
612
|
+
const regionSlice = functionCleanupArena.alloc(diplomatRuntime.DiplomatBuf.sliceWrapper(wasm, diplomatRuntime.DiplomatBuf.str8(wasm, region)));
|
|
613
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
const result = wasm.BuildAnimation_flip_region_x(diplomatReceive.buffer, this.ffiValue, regionSlice.ptr, durationMs);
|
|
617
|
+
|
|
618
|
+
try {
|
|
619
|
+
if (!diplomatReceive.resultFlag) {
|
|
620
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
621
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
finally {
|
|
626
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
627
|
+
functionCleanupArena.free();
|
|
628
|
+
|
|
629
|
+
diplomatReceive.free();
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
flipRegionY(region, durationMs) {
|
|
634
|
+
let functionCleanupArena = new diplomatRuntime.CleanupArena();
|
|
635
|
+
|
|
636
|
+
const regionSlice = functionCleanupArena.alloc(diplomatRuntime.DiplomatBuf.sliceWrapper(wasm, diplomatRuntime.DiplomatBuf.str8(wasm, region)));
|
|
637
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
638
|
+
|
|
639
|
+
|
|
640
|
+
const result = wasm.BuildAnimation_flip_region_y(diplomatReceive.buffer, this.ffiValue, regionSlice.ptr, durationMs);
|
|
641
|
+
|
|
642
|
+
try {
|
|
643
|
+
if (!diplomatReceive.resultFlag) {
|
|
644
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
645
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
finally {
|
|
650
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
651
|
+
functionCleanupArena.free();
|
|
652
|
+
|
|
653
|
+
diplomatReceive.free();
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
flipRegionZ(region, durationMs) {
|
|
658
|
+
let functionCleanupArena = new diplomatRuntime.CleanupArena();
|
|
659
|
+
|
|
660
|
+
const regionSlice = functionCleanupArena.alloc(diplomatRuntime.DiplomatBuf.sliceWrapper(wasm, diplomatRuntime.DiplomatBuf.str8(wasm, region)));
|
|
661
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
const result = wasm.BuildAnimation_flip_region_z(diplomatReceive.buffer, this.ffiValue, regionSlice.ptr, durationMs);
|
|
665
|
+
|
|
666
|
+
try {
|
|
667
|
+
if (!diplomatReceive.resultFlag) {
|
|
668
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
669
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
finally {
|
|
674
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
675
|
+
functionCleanupArena.free();
|
|
676
|
+
|
|
677
|
+
diplomatReceive.free();
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
flipAllX(durationMs) {
|
|
682
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
const result = wasm.BuildAnimation_flip_all_x(diplomatReceive.buffer, this.ffiValue, durationMs);
|
|
686
|
+
|
|
687
|
+
try {
|
|
688
|
+
if (!diplomatReceive.resultFlag) {
|
|
689
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
690
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
finally {
|
|
695
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
696
|
+
diplomatReceive.free();
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
flipAllY(durationMs) {
|
|
701
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
const result = wasm.BuildAnimation_flip_all_y(diplomatReceive.buffer, this.ffiValue, durationMs);
|
|
705
|
+
|
|
706
|
+
try {
|
|
707
|
+
if (!diplomatReceive.resultFlag) {
|
|
708
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
709
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
finally {
|
|
714
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
715
|
+
diplomatReceive.free();
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
flipAllZ(durationMs) {
|
|
720
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
const result = wasm.BuildAnimation_flip_all_z(diplomatReceive.buffer, this.ffiValue, durationMs);
|
|
724
|
+
|
|
725
|
+
try {
|
|
726
|
+
if (!diplomatReceive.resultFlag) {
|
|
727
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
728
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
finally {
|
|
733
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
734
|
+
diplomatReceive.free();
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
stampRegion(source, region, x, y, z, exclusions, durationMs) {
|
|
739
|
+
let functionCleanupArena = new diplomatRuntime.CleanupArena();
|
|
740
|
+
|
|
741
|
+
const regionSlice = functionCleanupArena.alloc(diplomatRuntime.DiplomatBuf.sliceWrapper(wasm, diplomatRuntime.DiplomatBuf.str8(wasm, region)));
|
|
742
|
+
const exclusionsSlice = functionCleanupArena.alloc(diplomatRuntime.DiplomatBuf.sliceWrapper(wasm, diplomatRuntime.DiplomatBuf.str8(wasm, exclusions)));
|
|
743
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
744
|
+
|
|
745
|
+
|
|
746
|
+
const result = wasm.BuildAnimation_stamp_region(diplomatReceive.buffer, this.ffiValue, source.ffiValue, regionSlice.ptr, x, y, z, exclusionsSlice.ptr, durationMs);
|
|
747
|
+
|
|
748
|
+
try {
|
|
749
|
+
if (!diplomatReceive.resultFlag) {
|
|
750
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
751
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
finally {
|
|
756
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
757
|
+
functionCleanupArena.free();
|
|
758
|
+
|
|
759
|
+
diplomatReceive.free();
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
stampBox(source, minX, minY, minZ, maxX, maxY, maxZ, x, y, z, exclusions, durationMs) {
|
|
764
|
+
let functionCleanupArena = new diplomatRuntime.CleanupArena();
|
|
765
|
+
|
|
766
|
+
const exclusionsSlice = functionCleanupArena.alloc(diplomatRuntime.DiplomatBuf.sliceWrapper(wasm, diplomatRuntime.DiplomatBuf.str8(wasm, exclusions)));
|
|
767
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
768
|
+
|
|
769
|
+
|
|
770
|
+
const result = wasm.BuildAnimation_stamp_box(diplomatReceive.buffer, this.ffiValue, source.ffiValue, minX, minY, minZ, maxX, maxY, maxZ, x, y, z, exclusionsSlice.ptr, durationMs);
|
|
771
|
+
|
|
772
|
+
try {
|
|
773
|
+
if (!diplomatReceive.resultFlag) {
|
|
774
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
775
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
finally {
|
|
780
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
781
|
+
functionCleanupArena.free();
|
|
782
|
+
|
|
783
|
+
diplomatReceive.free();
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
setOperationGizmos(enabled) {
|
|
788
|
+
wasm.BuildAnimation_set_operation_gizmos(this.ffiValue, enabled);
|
|
789
|
+
|
|
790
|
+
try {}
|
|
791
|
+
|
|
792
|
+
finally {
|
|
793
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
operationsJson() {
|
|
798
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
799
|
+
|
|
800
|
+
const write = new diplomatRuntime.DiplomatWriteBuf(wasm);
|
|
801
|
+
|
|
802
|
+
|
|
803
|
+
const result = wasm.BuildAnimation_operations_json(diplomatReceive.buffer, this.ffiValue, write.buffer);
|
|
804
|
+
|
|
805
|
+
try {
|
|
806
|
+
if (!diplomatReceive.resultFlag) {
|
|
807
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
808
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
809
|
+
}
|
|
810
|
+
return write.readString8();
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
finally {
|
|
814
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
815
|
+
diplomatReceive.free();
|
|
816
|
+
write.free();
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
frameJson(timeMs) {
|
|
821
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
822
|
+
|
|
823
|
+
const write = new diplomatRuntime.DiplomatWriteBuf(wasm);
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
const result = wasm.BuildAnimation_frame_json(diplomatReceive.buffer, this.ffiValue, timeMs, write.buffer);
|
|
827
|
+
|
|
828
|
+
try {
|
|
829
|
+
if (!diplomatReceive.resultFlag) {
|
|
830
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
831
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
832
|
+
}
|
|
833
|
+
return write.readString8();
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
finally {
|
|
837
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
838
|
+
diplomatReceive.free();
|
|
839
|
+
write.free();
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
/**
|
|
844
|
+
* Fill a parametric shape and record its voxels as ordered groups in
|
|
845
|
+
* the same transactional construction operation.
|
|
846
|
+
*/
|
|
847
|
+
fillAlongParameter(shape, brush, groupCount) {
|
|
848
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
849
|
+
|
|
850
|
+
|
|
851
|
+
const result = wasm.BuildAnimation_fill_along_parameter(diplomatReceive.buffer, this.ffiValue, shape.ffiValue, brush.ffiValue, groupCount);
|
|
852
|
+
|
|
853
|
+
try {
|
|
854
|
+
if (!diplomatReceive.resultFlag) {
|
|
855
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
856
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
857
|
+
}
|
|
858
|
+
return (new Uint32Array(wasm.memory.buffer, diplomatReceive.buffer, 1))[0];
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
finally {
|
|
862
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
863
|
+
diplomatReceive.free();
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
addArmorStand(x, y, z, yaw, armorMaterial) {
|
|
868
|
+
let functionCleanupArena = new diplomatRuntime.CleanupArena();
|
|
869
|
+
|
|
870
|
+
const armorMaterialSlice = functionCleanupArena.alloc(diplomatRuntime.DiplomatBuf.sliceWrapper(wasm, diplomatRuntime.DiplomatBuf.str8(wasm, armorMaterial)));
|
|
871
|
+
const diplomatReceive = new diplomatRuntime.DiplomatReceiveBuf(wasm, 5, 4, true);
|
|
872
|
+
|
|
873
|
+
|
|
874
|
+
const result = wasm.BuildAnimation_add_armor_stand(diplomatReceive.buffer, this.ffiValue, x, y, z, yaw, armorMaterialSlice.ptr);
|
|
875
|
+
|
|
876
|
+
try {
|
|
877
|
+
if (!diplomatReceive.resultFlag) {
|
|
878
|
+
const cause = new NucleationError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer));
|
|
879
|
+
throw new globalThis.Error('NucleationError.' + cause.value, { cause });
|
|
880
|
+
}
|
|
881
|
+
return (new Uint32Array(wasm.memory.buffer, diplomatReceive.buffer, 1))[0];
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
finally {
|
|
885
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
886
|
+
functionCleanupArena.free();
|
|
887
|
+
|
|
888
|
+
diplomatReceive.free();
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
animateCamera(effect, offsetMs) {
|
|
893
|
+
wasm.BuildAnimation_animate_camera(this.ffiValue, effect.ffiValue, offsetMs);
|
|
894
|
+
|
|
895
|
+
try {}
|
|
896
|
+
|
|
897
|
+
finally {
|
|
898
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
frameCount(fps, holdMs) {
|
|
903
|
+
|
|
904
|
+
const result = wasm.BuildAnimation_frame_count(this.ffiValue, fps, holdMs);
|
|
905
|
+
|
|
906
|
+
try {
|
|
907
|
+
return result;
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
finally {
|
|
911
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
groupCount() {
|
|
916
|
+
|
|
917
|
+
const result = wasm.BuildAnimation_group_count(this.ffiValue);
|
|
918
|
+
|
|
919
|
+
try {
|
|
920
|
+
return result;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
finally {
|
|
924
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
durationMs() {
|
|
929
|
+
|
|
930
|
+
const result = wasm.BuildAnimation_duration_ms(this.ffiValue);
|
|
931
|
+
|
|
932
|
+
try {
|
|
933
|
+
return result;
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
finally {
|
|
937
|
+
diplomatRuntime.FUNCTION_PARAM_ALLOC.clean();
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
constructor(symbol, ptr, selfEdge) {
|
|
942
|
+
return this.#internalConstructor(...arguments)
|
|
943
|
+
}
|
|
944
|
+
}
|