goudengine 0.0.821

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.
Files changed (52) hide show
  1. package/README.md +202 -0
  2. package/dist/generated/index.g.d.ts +4 -0
  3. package/dist/generated/index.g.d.ts.map +1 -0
  4. package/dist/generated/index.g.js +12 -0
  5. package/dist/generated/index.g.js.map +1 -0
  6. package/dist/generated/node/index.g.d.ts +103 -0
  7. package/dist/generated/node/index.g.d.ts.map +1 -0
  8. package/dist/generated/node/index.g.js +278 -0
  9. package/dist/generated/node/index.g.js.map +1 -0
  10. package/dist/generated/types/engine.g.d.ts +154 -0
  11. package/dist/generated/types/engine.g.d.ts.map +1 -0
  12. package/dist/generated/types/engine.g.js +4 -0
  13. package/dist/generated/types/engine.g.js.map +1 -0
  14. package/dist/generated/types/input.g.d.ts +121 -0
  15. package/dist/generated/types/input.g.d.ts.map +1 -0
  16. package/dist/generated/types/input.g.js +128 -0
  17. package/dist/generated/types/input.g.js.map +1 -0
  18. package/dist/generated/types/math.g.d.ts +61 -0
  19. package/dist/generated/types/math.g.d.ts.map +1 -0
  20. package/dist/generated/types/math.g.js +74 -0
  21. package/dist/generated/types/math.g.js.map +1 -0
  22. package/dist/web/generated/types/engine.g.d.ts +154 -0
  23. package/dist/web/generated/types/engine.g.d.ts.map +1 -0
  24. package/dist/web/generated/types/engine.g.js +3 -0
  25. package/dist/web/generated/types/engine.g.js.map +1 -0
  26. package/dist/web/generated/types/input.g.d.ts +121 -0
  27. package/dist/web/generated/types/input.g.d.ts.map +1 -0
  28. package/dist/web/generated/types/input.g.js +125 -0
  29. package/dist/web/generated/types/input.g.js.map +1 -0
  30. package/dist/web/generated/types/math.g.d.ts +61 -0
  31. package/dist/web/generated/types/math.g.d.ts.map +1 -0
  32. package/dist/web/generated/types/math.g.js +67 -0
  33. package/dist/web/generated/types/math.g.js.map +1 -0
  34. package/dist/web/generated/web/index.g.d.ts +113 -0
  35. package/dist/web/generated/web/index.g.d.ts.map +1 -0
  36. package/dist/web/generated/web/index.g.js +242 -0
  37. package/dist/web/generated/web/index.g.js.map +1 -0
  38. package/dist/web/generated/web/input.g.d.ts +12 -0
  39. package/dist/web/generated/web/input.g.d.ts.map +1 -0
  40. package/dist/web/generated/web/input.g.js +151 -0
  41. package/dist/web/generated/web/input.g.js.map +1 -0
  42. package/goud-engine-node.darwin-arm64.node +0 -0
  43. package/goud-engine-node.darwin-x64.node +0 -0
  44. package/goud-engine-node.linux-x64-gnu.node +0 -0
  45. package/goud-engine-node.win32-x64-msvc.node +0 -0
  46. package/index.d.ts +185 -0
  47. package/index.js +337 -0
  48. package/package.json +101 -0
  49. package/wasm/goud_engine.d.ts +182 -0
  50. package/wasm/goud_engine.js +1789 -0
  51. package/wasm/goud_engine_bg.wasm +0 -0
  52. package/wasm/goud_engine_bg.wasm.d.ts +72 -0
@@ -0,0 +1,1789 @@
1
+ let wasm;
2
+
3
+ function addToExternrefTable0(obj) {
4
+ const idx = wasm.__externref_table_alloc();
5
+ wasm.__wbindgen_externrefs.set(idx, obj);
6
+ return idx;
7
+ }
8
+
9
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
10
+ ? { register: () => {}, unregister: () => {} }
11
+ : new FinalizationRegistry(state => state.dtor(state.a, state.b));
12
+
13
+ function debugString(val) {
14
+ // primitive types
15
+ const type = typeof val;
16
+ if (type == 'number' || type == 'boolean' || val == null) {
17
+ return `${val}`;
18
+ }
19
+ if (type == 'string') {
20
+ return `"${val}"`;
21
+ }
22
+ if (type == 'symbol') {
23
+ const description = val.description;
24
+ if (description == null) {
25
+ return 'Symbol';
26
+ } else {
27
+ return `Symbol(${description})`;
28
+ }
29
+ }
30
+ if (type == 'function') {
31
+ const name = val.name;
32
+ if (typeof name == 'string' && name.length > 0) {
33
+ return `Function(${name})`;
34
+ } else {
35
+ return 'Function';
36
+ }
37
+ }
38
+ // objects
39
+ if (Array.isArray(val)) {
40
+ const length = val.length;
41
+ let debug = '[';
42
+ if (length > 0) {
43
+ debug += debugString(val[0]);
44
+ }
45
+ for(let i = 1; i < length; i++) {
46
+ debug += ', ' + debugString(val[i]);
47
+ }
48
+ debug += ']';
49
+ return debug;
50
+ }
51
+ // Test for built-in
52
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
53
+ let className;
54
+ if (builtInMatches && builtInMatches.length > 1) {
55
+ className = builtInMatches[1];
56
+ } else {
57
+ // Failed to match the standard '[object ClassName]'
58
+ return toString.call(val);
59
+ }
60
+ if (className == 'Object') {
61
+ // we're a user defined class or Object
62
+ // JSON.stringify avoids problems with cycles, and is generally much
63
+ // easier than looping through ownProperties of `val`.
64
+ try {
65
+ return 'Object(' + JSON.stringify(val) + ')';
66
+ } catch (_) {
67
+ return 'Object';
68
+ }
69
+ }
70
+ // errors
71
+ if (val instanceof Error) {
72
+ return `${val.name}: ${val.message}\n${val.stack}`;
73
+ }
74
+ // TODO we could test for more things here, like `Set`s and `Map`s.
75
+ return className;
76
+ }
77
+
78
+ function getArrayU32FromWasm0(ptr, len) {
79
+ ptr = ptr >>> 0;
80
+ return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
81
+ }
82
+
83
+ function getArrayU64FromWasm0(ptr, len) {
84
+ ptr = ptr >>> 0;
85
+ return getBigUint64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
86
+ }
87
+
88
+ function getArrayU8FromWasm0(ptr, len) {
89
+ ptr = ptr >>> 0;
90
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
91
+ }
92
+
93
+ let cachedBigUint64ArrayMemory0 = null;
94
+ function getBigUint64ArrayMemory0() {
95
+ if (cachedBigUint64ArrayMemory0 === null || cachedBigUint64ArrayMemory0.byteLength === 0) {
96
+ cachedBigUint64ArrayMemory0 = new BigUint64Array(wasm.memory.buffer);
97
+ }
98
+ return cachedBigUint64ArrayMemory0;
99
+ }
100
+
101
+ let cachedDataViewMemory0 = null;
102
+ function getDataViewMemory0() {
103
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
104
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
105
+ }
106
+ return cachedDataViewMemory0;
107
+ }
108
+
109
+ function getStringFromWasm0(ptr, len) {
110
+ ptr = ptr >>> 0;
111
+ return decodeText(ptr, len);
112
+ }
113
+
114
+ let cachedUint32ArrayMemory0 = null;
115
+ function getUint32ArrayMemory0() {
116
+ if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
117
+ cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
118
+ }
119
+ return cachedUint32ArrayMemory0;
120
+ }
121
+
122
+ let cachedUint8ArrayMemory0 = null;
123
+ function getUint8ArrayMemory0() {
124
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
125
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
126
+ }
127
+ return cachedUint8ArrayMemory0;
128
+ }
129
+
130
+ function handleError(f, args) {
131
+ try {
132
+ return f.apply(this, args);
133
+ } catch (e) {
134
+ const idx = addToExternrefTable0(e);
135
+ wasm.__wbindgen_exn_store(idx);
136
+ }
137
+ }
138
+
139
+ function isLikeNone(x) {
140
+ return x === undefined || x === null;
141
+ }
142
+
143
+ function makeMutClosure(arg0, arg1, dtor, f) {
144
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
145
+ const real = (...args) => {
146
+
147
+ // First up with a closure we increment the internal reference
148
+ // count. This ensures that the Rust closure environment won't
149
+ // be deallocated while we're invoking it.
150
+ state.cnt++;
151
+ const a = state.a;
152
+ state.a = 0;
153
+ try {
154
+ return f(a, state.b, ...args);
155
+ } finally {
156
+ state.a = a;
157
+ real._wbg_cb_unref();
158
+ }
159
+ };
160
+ real._wbg_cb_unref = () => {
161
+ if (--state.cnt === 0) {
162
+ state.dtor(state.a, state.b);
163
+ state.a = 0;
164
+ CLOSURE_DTORS.unregister(state);
165
+ }
166
+ };
167
+ CLOSURE_DTORS.register(real, state, state);
168
+ return real;
169
+ }
170
+
171
+ function passStringToWasm0(arg, malloc, realloc) {
172
+ if (realloc === undefined) {
173
+ const buf = cachedTextEncoder.encode(arg);
174
+ const ptr = malloc(buf.length, 1) >>> 0;
175
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
176
+ WASM_VECTOR_LEN = buf.length;
177
+ return ptr;
178
+ }
179
+
180
+ let len = arg.length;
181
+ let ptr = malloc(len, 1) >>> 0;
182
+
183
+ const mem = getUint8ArrayMemory0();
184
+
185
+ let offset = 0;
186
+
187
+ for (; offset < len; offset++) {
188
+ const code = arg.charCodeAt(offset);
189
+ if (code > 0x7F) break;
190
+ mem[ptr + offset] = code;
191
+ }
192
+ if (offset !== len) {
193
+ if (offset !== 0) {
194
+ arg = arg.slice(offset);
195
+ }
196
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
197
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
198
+ const ret = cachedTextEncoder.encodeInto(arg, view);
199
+
200
+ offset += ret.written;
201
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
202
+ }
203
+
204
+ WASM_VECTOR_LEN = offset;
205
+ return ptr;
206
+ }
207
+
208
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
209
+ cachedTextDecoder.decode();
210
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
211
+ let numBytesDecoded = 0;
212
+ function decodeText(ptr, len) {
213
+ numBytesDecoded += len;
214
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
215
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
216
+ cachedTextDecoder.decode();
217
+ numBytesDecoded = len;
218
+ }
219
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
220
+ }
221
+
222
+ const cachedTextEncoder = new TextEncoder();
223
+
224
+ if (!('encodeInto' in cachedTextEncoder)) {
225
+ cachedTextEncoder.encodeInto = function (arg, view) {
226
+ const buf = cachedTextEncoder.encode(arg);
227
+ view.set(buf);
228
+ return {
229
+ read: arg.length,
230
+ written: buf.length
231
+ };
232
+ }
233
+ }
234
+
235
+ let WASM_VECTOR_LEN = 0;
236
+
237
+ function wasm_bindgen__convert__closures_____invoke__hea5223c55c1708a8(arg0, arg1, arg2) {
238
+ wasm.wasm_bindgen__convert__closures_____invoke__hea5223c55c1708a8(arg0, arg1, arg2);
239
+ }
240
+
241
+ function wasm_bindgen__convert__closures_____invoke__h1c1a44fa2edf53c0(arg0, arg1, arg2, arg3) {
242
+ wasm.wasm_bindgen__convert__closures_____invoke__h1c1a44fa2edf53c0(arg0, arg1, arg2, arg3);
243
+ }
244
+
245
+ const __wbindgen_enum_GpuAddressMode = ["clamp-to-edge", "repeat", "mirror-repeat"];
246
+
247
+ const __wbindgen_enum_GpuBlendFactor = ["zero", "one", "src", "one-minus-src", "src-alpha", "one-minus-src-alpha", "dst", "one-minus-dst", "dst-alpha", "one-minus-dst-alpha", "src-alpha-saturated", "constant", "one-minus-constant", "src1", "one-minus-src1", "src1-alpha", "one-minus-src1-alpha"];
248
+
249
+ const __wbindgen_enum_GpuBlendOperation = ["add", "subtract", "reverse-subtract", "min", "max"];
250
+
251
+ const __wbindgen_enum_GpuBufferBindingType = ["uniform", "storage", "read-only-storage"];
252
+
253
+ const __wbindgen_enum_GpuCanvasAlphaMode = ["opaque", "premultiplied"];
254
+
255
+ const __wbindgen_enum_GpuCompareFunction = ["never", "less", "equal", "less-equal", "greater", "not-equal", "greater-equal", "always"];
256
+
257
+ const __wbindgen_enum_GpuCullMode = ["none", "front", "back"];
258
+
259
+ const __wbindgen_enum_GpuFilterMode = ["nearest", "linear"];
260
+
261
+ const __wbindgen_enum_GpuFrontFace = ["ccw", "cw"];
262
+
263
+ const __wbindgen_enum_GpuIndexFormat = ["uint16", "uint32"];
264
+
265
+ const __wbindgen_enum_GpuLoadOp = ["load", "clear"];
266
+
267
+ const __wbindgen_enum_GpuMipmapFilterMode = ["nearest", "linear"];
268
+
269
+ const __wbindgen_enum_GpuPowerPreference = ["low-power", "high-performance"];
270
+
271
+ const __wbindgen_enum_GpuPrimitiveTopology = ["point-list", "line-list", "line-strip", "triangle-list", "triangle-strip"];
272
+
273
+ const __wbindgen_enum_GpuSamplerBindingType = ["filtering", "non-filtering", "comparison"];
274
+
275
+ const __wbindgen_enum_GpuStencilOperation = ["keep", "zero", "replace", "invert", "increment-clamp", "decrement-clamp", "increment-wrap", "decrement-wrap"];
276
+
277
+ const __wbindgen_enum_GpuStorageTextureAccess = ["write-only", "read-only", "read-write"];
278
+
279
+ const __wbindgen_enum_GpuStoreOp = ["store", "discard"];
280
+
281
+ const __wbindgen_enum_GpuTextureAspect = ["all", "stencil-only", "depth-only"];
282
+
283
+ const __wbindgen_enum_GpuTextureDimension = ["1d", "2d", "3d"];
284
+
285
+ const __wbindgen_enum_GpuTextureFormat = ["r8unorm", "r8snorm", "r8uint", "r8sint", "r16uint", "r16sint", "r16float", "rg8unorm", "rg8snorm", "rg8uint", "rg8sint", "r32uint", "r32sint", "r32float", "rg16uint", "rg16sint", "rg16float", "rgba8unorm", "rgba8unorm-srgb", "rgba8snorm", "rgba8uint", "rgba8sint", "bgra8unorm", "bgra8unorm-srgb", "rgb9e5ufloat", "rgb10a2uint", "rgb10a2unorm", "rg11b10ufloat", "rg32uint", "rg32sint", "rg32float", "rgba16uint", "rgba16sint", "rgba16float", "rgba32uint", "rgba32sint", "rgba32float", "stencil8", "depth16unorm", "depth24plus", "depth24plus-stencil8", "depth32float", "depth32float-stencil8", "bc1-rgba-unorm", "bc1-rgba-unorm-srgb", "bc2-rgba-unorm", "bc2-rgba-unorm-srgb", "bc3-rgba-unorm", "bc3-rgba-unorm-srgb", "bc4-r-unorm", "bc4-r-snorm", "bc5-rg-unorm", "bc5-rg-snorm", "bc6h-rgb-ufloat", "bc6h-rgb-float", "bc7-rgba-unorm", "bc7-rgba-unorm-srgb", "etc2-rgb8unorm", "etc2-rgb8unorm-srgb", "etc2-rgb8a1unorm", "etc2-rgb8a1unorm-srgb", "etc2-rgba8unorm", "etc2-rgba8unorm-srgb", "eac-r11unorm", "eac-r11snorm", "eac-rg11unorm", "eac-rg11snorm", "astc-4x4-unorm", "astc-4x4-unorm-srgb", "astc-5x4-unorm", "astc-5x4-unorm-srgb", "astc-5x5-unorm", "astc-5x5-unorm-srgb", "astc-6x5-unorm", "astc-6x5-unorm-srgb", "astc-6x6-unorm", "astc-6x6-unorm-srgb", "astc-8x5-unorm", "astc-8x5-unorm-srgb", "astc-8x6-unorm", "astc-8x6-unorm-srgb", "astc-8x8-unorm", "astc-8x8-unorm-srgb", "astc-10x5-unorm", "astc-10x5-unorm-srgb", "astc-10x6-unorm", "astc-10x6-unorm-srgb", "astc-10x8-unorm", "astc-10x8-unorm-srgb", "astc-10x10-unorm", "astc-10x10-unorm-srgb", "astc-12x10-unorm", "astc-12x10-unorm-srgb", "astc-12x12-unorm", "astc-12x12-unorm-srgb"];
286
+
287
+ const __wbindgen_enum_GpuTextureSampleType = ["float", "unfilterable-float", "depth", "sint", "uint"];
288
+
289
+ const __wbindgen_enum_GpuTextureViewDimension = ["1d", "2d", "2d-array", "cube", "cube-array", "3d"];
290
+
291
+ const __wbindgen_enum_GpuVertexFormat = ["uint8", "uint8x2", "uint8x4", "sint8", "sint8x2", "sint8x4", "unorm8", "unorm8x2", "unorm8x4", "snorm8", "snorm8x2", "snorm8x4", "uint16", "uint16x2", "uint16x4", "sint16", "sint16x2", "sint16x4", "unorm16", "unorm16x2", "unorm16x4", "snorm16", "snorm16x2", "snorm16x4", "float16", "float16x2", "float16x4", "float32", "float32x2", "float32x3", "float32x4", "uint32", "uint32x2", "uint32x3", "uint32x4", "sint32", "sint32x2", "sint32x3", "sint32x4", "unorm10-10-10-2", "unorm8x4-bgra"];
292
+
293
+ const __wbindgen_enum_GpuVertexStepMode = ["vertex", "instance"];
294
+
295
+ const WasmGameFinalization = (typeof FinalizationRegistry === 'undefined')
296
+ ? { register: () => {}, unregister: () => {} }
297
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmgame_free(ptr >>> 0, 1));
298
+
299
+ const WasmTransform2DFinalization = (typeof FinalizationRegistry === 'undefined')
300
+ ? { register: () => {}, unregister: () => {} }
301
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmtransform2d_free(ptr >>> 0, 1));
302
+
303
+ export class WasmGame {
304
+ static __wrap(ptr) {
305
+ ptr = ptr >>> 0;
306
+ const obj = Object.create(WasmGame.prototype);
307
+ obj.__wbg_ptr = ptr;
308
+ WasmGameFinalization.register(obj, obj.__wbg_ptr, obj);
309
+ return obj;
310
+ }
311
+ __destroy_into_raw() {
312
+ const ptr = this.__wbg_ptr;
313
+ this.__wbg_ptr = 0;
314
+ WasmGameFinalization.unregister(this);
315
+ return ptr;
316
+ }
317
+ free() {
318
+ const ptr = this.__destroy_into_raw();
319
+ wasm.__wbg_wasmgame_free(ptr, 0);
320
+ }
321
+ /**
322
+ * @returns {number}
323
+ */
324
+ get delta_time() {
325
+ const ret = wasm.wasmgame_delta_time(this.__wbg_ptr);
326
+ return ret;
327
+ }
328
+ /**
329
+ * @returns {number}
330
+ */
331
+ get total_time() {
332
+ const ret = wasm.wasmgame_total_time(this.__wbg_ptr);
333
+ return ret;
334
+ }
335
+ /**
336
+ * @param {number} delta_time
337
+ */
338
+ begin_frame(delta_time) {
339
+ wasm.wasmgame_begin_frame(this.__wbg_ptr, delta_time);
340
+ }
341
+ /**
342
+ * @param {number} texture
343
+ * @param {number} x
344
+ * @param {number} y
345
+ * @param {number} w
346
+ * @param {number} h
347
+ * @param {number} rotation
348
+ * @param {number} r
349
+ * @param {number} g
350
+ * @param {number} b
351
+ * @param {number} a
352
+ */
353
+ draw_sprite(texture, x, y, w, h, rotation, r, g, b, a) {
354
+ wasm.wasmgame_draw_sprite(this.__wbg_ptr, texture, x, y, w, h, rotation, r, g, b, a);
355
+ }
356
+ /**
357
+ * @returns {bigint}
358
+ */
359
+ get frame_count() {
360
+ const ret = wasm.wasmgame_frame_count(this.__wbg_ptr);
361
+ return BigInt.asUintN(64, ret);
362
+ }
363
+ /**
364
+ * @param {number} key_code
365
+ */
366
+ release_key(key_code) {
367
+ wasm.wasmgame_release_key(this.__wbg_ptr, key_code);
368
+ }
369
+ /**
370
+ * @param {bigint} entity_bits
371
+ * @returns {boolean}
372
+ */
373
+ remove_name(entity_bits) {
374
+ const ret = wasm.wasmgame_remove_name(this.__wbg_ptr, entity_bits);
375
+ return ret !== 0;
376
+ }
377
+ /**
378
+ * @param {number} count
379
+ * @returns {BigUint64Array}
380
+ */
381
+ spawn_batch(count) {
382
+ const ret = wasm.wasmgame_spawn_batch(this.__wbg_ptr, count);
383
+ var v1 = getArrayU64FromWasm0(ret[0], ret[1]).slice();
384
+ wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
385
+ return v1;
386
+ }
387
+ /**
388
+ * @returns {bigint}
389
+ */
390
+ spawn_empty() {
391
+ const ret = wasm.wasmgame_spawn_empty(this.__wbg_ptr);
392
+ return BigInt.asUintN(64, ret);
393
+ }
394
+ /**
395
+ * @returns {number}
396
+ */
397
+ entity_count() {
398
+ const ret = wasm.wasmgame_entity_count(this.__wbg_ptr);
399
+ return ret >>> 0;
400
+ }
401
+ /**
402
+ * Whether wgpu rendering is active.
403
+ * @returns {boolean}
404
+ */
405
+ has_renderer() {
406
+ const ret = wasm.wasmgame_has_renderer(this.__wbg_ptr);
407
+ return ret !== 0;
408
+ }
409
+ /**
410
+ * Loads a texture from a URL. Returns the texture handle (1-based;
411
+ * 0 is reserved for the white fallback texture used by draw_quad).
412
+ * @param {string} url
413
+ * @returns {Promise<number>}
414
+ */
415
+ load_texture(url) {
416
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
417
+ const len0 = WASM_VECTOR_LEN;
418
+ const ret = wasm.wasmgame_load_texture(this.__wbg_ptr, ptr0, len0);
419
+ return ret;
420
+ }
421
+ /**
422
+ * @returns {number}
423
+ */
424
+ get window_width() {
425
+ const ret = wasm.wasmgame_window_width(this.__wbg_ptr);
426
+ return ret >>> 0;
427
+ }
428
+ /**
429
+ * @returns {number}
430
+ */
431
+ get window_height() {
432
+ const ret = wasm.wasmgame_window_height(this.__wbg_ptr);
433
+ return ret >>> 0;
434
+ }
435
+ /**
436
+ * @param {number} key_code
437
+ * @returns {boolean}
438
+ */
439
+ is_key_pressed(key_code) {
440
+ const ret = wasm.wasmgame_is_key_pressed(this.__wbg_ptr, key_code);
441
+ return ret !== 0;
442
+ }
443
+ /**
444
+ * @param {bigint} entity_bits
445
+ * @param {number} px
446
+ * @param {number} py
447
+ * @param {number} rotation
448
+ * @param {number} sx
449
+ * @param {number} sy
450
+ */
451
+ add_transform2d(entity_bits, px, py, rotation, sx, sy) {
452
+ wasm.wasmgame_add_transform2d(this.__wbg_ptr, entity_bits, px, py, rotation, sx, sy);
453
+ }
454
+ /**
455
+ * @param {number} handle
456
+ */
457
+ destroy_texture(handle) {
458
+ wasm.wasmgame_destroy_texture(this.__wbg_ptr, handle);
459
+ }
460
+ /**
461
+ * @param {bigint} entity_bits
462
+ * @returns {WasmTransform2D | undefined}
463
+ */
464
+ get_transform2d(entity_bits) {
465
+ const ret = wasm.wasmgame_get_transform2d(this.__wbg_ptr, entity_bits);
466
+ return ret === 0 ? undefined : WasmTransform2D.__wrap(ret);
467
+ }
468
+ /**
469
+ * @param {bigint} entity_bits
470
+ * @returns {boolean}
471
+ */
472
+ has_transform2d(entity_bits) {
473
+ const ret = wasm.wasmgame_has_transform2d(this.__wbg_ptr, entity_bits);
474
+ return ret !== 0;
475
+ }
476
+ /**
477
+ * Reconfigures the wgpu surface after a canvas resize.
478
+ * @param {number} width
479
+ * @param {number} height
480
+ */
481
+ set_canvas_size(width, height) {
482
+ wasm.wasmgame_set_canvas_size(this.__wbg_ptr, width, height);
483
+ }
484
+ /**
485
+ * Sets the background clear color (called before begin_frame or via
486
+ * the TypeScript SDK's beginFrame parameters).
487
+ * @param {number} r
488
+ * @param {number} g
489
+ * @param {number} b
490
+ * @param {number} a
491
+ */
492
+ set_clear_color(r, g, b, a) {
493
+ wasm.wasmgame_set_clear_color(this.__wbg_ptr, r, g, b, a);
494
+ }
495
+ /**
496
+ * @param {bigint} entity_bits
497
+ * @param {number} px
498
+ * @param {number} py
499
+ * @param {number} rotation
500
+ * @param {number} sx
501
+ * @param {number} sy
502
+ */
503
+ set_transform2d(entity_bits, px, py, rotation, sx, sy) {
504
+ wasm.wasmgame_set_transform2d(this.__wbg_ptr, entity_bits, px, py, rotation, sx, sy);
505
+ }
506
+ /**
507
+ * @param {number} dx
508
+ * @param {number} dy
509
+ */
510
+ add_scroll_delta(dx, dy) {
511
+ wasm.wasmgame_add_scroll_delta(this.__wbg_ptr, dx, dy);
512
+ }
513
+ /**
514
+ * Creates a game instance with wgpu rendering attached to a canvas.
515
+ * @param {HTMLCanvasElement} canvas
516
+ * @param {number} width
517
+ * @param {number} height
518
+ * @param {string} title
519
+ * @returns {Promise<WasmGame>}
520
+ */
521
+ static createWithCanvas(canvas, width, height, title) {
522
+ const ptr0 = passStringToWasm0(title, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
523
+ const len0 = WASM_VECTOR_LEN;
524
+ const ret = wasm.wasmgame_createWithCanvas(canvas, width, height, ptr0, len0);
525
+ return ret;
526
+ }
527
+ /**
528
+ * @param {number} button
529
+ */
530
+ press_mouse_button(button) {
531
+ wasm.wasmgame_press_mouse_button(this.__wbg_ptr, button);
532
+ }
533
+ /**
534
+ * @param {bigint} entity_bits
535
+ * @returns {boolean}
536
+ */
537
+ remove_transform2d(entity_bits) {
538
+ const ret = wasm.wasmgame_remove_transform2d(this.__wbg_ptr, entity_bits);
539
+ return ret !== 0;
540
+ }
541
+ /**
542
+ * @param {number} x
543
+ * @param {number} y
544
+ */
545
+ set_mouse_position(x, y) {
546
+ wasm.wasmgame_set_mouse_position(this.__wbg_ptr, x, y);
547
+ }
548
+ /**
549
+ * @param {number} key_code
550
+ * @returns {boolean}
551
+ */
552
+ is_key_just_pressed(key_code) {
553
+ const ret = wasm.wasmgame_is_key_just_pressed(this.__wbg_ptr, key_code);
554
+ return ret !== 0;
555
+ }
556
+ /**
557
+ * @param {number} key_code
558
+ * @returns {boolean}
559
+ */
560
+ is_key_just_released(key_code) {
561
+ const ret = wasm.wasmgame_is_key_just_released(this.__wbg_ptr, key_code);
562
+ return ret !== 0;
563
+ }
564
+ /**
565
+ * @param {number} button
566
+ */
567
+ release_mouse_button(button) {
568
+ wasm.wasmgame_release_mouse_button(this.__wbg_ptr, button);
569
+ }
570
+ /**
571
+ * @param {number} button
572
+ * @returns {boolean}
573
+ */
574
+ is_mouse_button_pressed(button) {
575
+ const ret = wasm.wasmgame_is_mouse_button_pressed(this.__wbg_ptr, button);
576
+ return ret !== 0;
577
+ }
578
+ /**
579
+ * @param {number} button
580
+ * @returns {boolean}
581
+ */
582
+ is_mouse_button_just_pressed(button) {
583
+ const ret = wasm.wasmgame_is_mouse_button_just_pressed(this.__wbg_ptr, button);
584
+ return ret !== 0;
585
+ }
586
+ /**
587
+ * @returns {number}
588
+ */
589
+ get fps() {
590
+ const ret = wasm.wasmgame_fps(this.__wbg_ptr);
591
+ return ret;
592
+ }
593
+ /**
594
+ * Creates a new game instance without rendering (ECS-only mode).
595
+ * @param {number} width
596
+ * @param {number} height
597
+ * @param {string} title
598
+ */
599
+ constructor(width, height, title) {
600
+ const ptr0 = passStringToWasm0(title, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
601
+ const len0 = WASM_VECTOR_LEN;
602
+ const ret = wasm.wasmgame_new(width, height, ptr0, len0);
603
+ this.__wbg_ptr = ret >>> 0;
604
+ WasmGameFinalization.register(this, this.__wbg_ptr, this);
605
+ return this;
606
+ }
607
+ /**
608
+ * @returns {string}
609
+ */
610
+ get title() {
611
+ let deferred1_0;
612
+ let deferred1_1;
613
+ try {
614
+ const ret = wasm.wasmgame_title(this.__wbg_ptr);
615
+ deferred1_0 = ret[0];
616
+ deferred1_1 = ret[1];
617
+ return getStringFromWasm0(ret[0], ret[1]);
618
+ } finally {
619
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
620
+ }
621
+ }
622
+ /**
623
+ * @param {bigint} entity_bits
624
+ * @returns {boolean}
625
+ */
626
+ despawn(entity_bits) {
627
+ const ret = wasm.wasmgame_despawn(this.__wbg_ptr, entity_bits);
628
+ return ret !== 0;
629
+ }
630
+ /**
631
+ * @returns {number}
632
+ */
633
+ mouse_x() {
634
+ const ret = wasm.wasmgame_mouse_x(this.__wbg_ptr);
635
+ return ret;
636
+ }
637
+ /**
638
+ * @returns {number}
639
+ */
640
+ mouse_y() {
641
+ const ret = wasm.wasmgame_mouse_y(this.__wbg_ptr);
642
+ return ret;
643
+ }
644
+ /**
645
+ * @param {bigint} entity_bits
646
+ * @param {string} name
647
+ */
648
+ add_name(entity_bits, name) {
649
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
650
+ const len0 = WASM_VECTOR_LEN;
651
+ wasm.wasmgame_add_name(this.__wbg_ptr, entity_bits, ptr0, len0);
652
+ }
653
+ /**
654
+ * @param {bigint} entity_bits
655
+ * @returns {string | undefined}
656
+ */
657
+ get_name(entity_bits) {
658
+ const ret = wasm.wasmgame_get_name(this.__wbg_ptr, entity_bits);
659
+ let v1;
660
+ if (ret[0] !== 0) {
661
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
662
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
663
+ }
664
+ return v1;
665
+ }
666
+ /**
667
+ * @param {bigint} entity_bits
668
+ * @returns {boolean}
669
+ */
670
+ has_name(entity_bits) {
671
+ const ret = wasm.wasmgame_has_name(this.__wbg_ptr, entity_bits);
672
+ return ret !== 0;
673
+ }
674
+ /**
675
+ * @param {bigint} entity_bits
676
+ * @returns {boolean}
677
+ */
678
+ is_alive(entity_bits) {
679
+ const ret = wasm.wasmgame_is_alive(this.__wbg_ptr, entity_bits);
680
+ return ret !== 0;
681
+ }
682
+ /**
683
+ * @param {number} x
684
+ * @param {number} y
685
+ * @param {number} w
686
+ * @param {number} h
687
+ * @param {number} r
688
+ * @param {number} g
689
+ * @param {number} b
690
+ * @param {number} a
691
+ */
692
+ draw_quad(x, y, w, h, r, g, b, a) {
693
+ wasm.wasmgame_draw_quad(this.__wbg_ptr, x, y, w, h, r, g, b, a);
694
+ }
695
+ end_frame() {
696
+ wasm.wasmgame_end_frame(this.__wbg_ptr);
697
+ }
698
+ /**
699
+ * @param {number} key_code
700
+ */
701
+ press_key(key_code) {
702
+ wasm.wasmgame_press_key(this.__wbg_ptr, key_code);
703
+ }
704
+ /**
705
+ * @returns {number}
706
+ */
707
+ scroll_dx() {
708
+ const ret = wasm.wasmgame_scroll_dx(this.__wbg_ptr);
709
+ return ret;
710
+ }
711
+ /**
712
+ * @returns {number}
713
+ */
714
+ scroll_dy() {
715
+ const ret = wasm.wasmgame_scroll_dy(this.__wbg_ptr);
716
+ return ret;
717
+ }
718
+ }
719
+ if (Symbol.dispose) WasmGame.prototype[Symbol.dispose] = WasmGame.prototype.free;
720
+
721
+ export class WasmTransform2D {
722
+ static __wrap(ptr) {
723
+ ptr = ptr >>> 0;
724
+ const obj = Object.create(WasmTransform2D.prototype);
725
+ obj.__wbg_ptr = ptr;
726
+ WasmTransform2DFinalization.register(obj, obj.__wbg_ptr, obj);
727
+ return obj;
728
+ }
729
+ __destroy_into_raw() {
730
+ const ptr = this.__wbg_ptr;
731
+ this.__wbg_ptr = 0;
732
+ WasmTransform2DFinalization.unregister(this);
733
+ return ptr;
734
+ }
735
+ free() {
736
+ const ptr = this.__destroy_into_raw();
737
+ wasm.__wbg_wasmtransform2d_free(ptr, 0);
738
+ }
739
+ /**
740
+ * @returns {number}
741
+ */
742
+ get position_x() {
743
+ const ret = wasm.__wbg_get_wasmtransform2d_position_x(this.__wbg_ptr);
744
+ return ret;
745
+ }
746
+ /**
747
+ * @param {number} arg0
748
+ */
749
+ set position_x(arg0) {
750
+ wasm.__wbg_set_wasmtransform2d_position_x(this.__wbg_ptr, arg0);
751
+ }
752
+ /**
753
+ * @returns {number}
754
+ */
755
+ get position_y() {
756
+ const ret = wasm.__wbg_get_wasmtransform2d_position_y(this.__wbg_ptr);
757
+ return ret;
758
+ }
759
+ /**
760
+ * @param {number} arg0
761
+ */
762
+ set position_y(arg0) {
763
+ wasm.__wbg_set_wasmtransform2d_position_y(this.__wbg_ptr, arg0);
764
+ }
765
+ /**
766
+ * @returns {number}
767
+ */
768
+ get rotation() {
769
+ const ret = wasm.__wbg_get_wasmtransform2d_rotation(this.__wbg_ptr);
770
+ return ret;
771
+ }
772
+ /**
773
+ * @param {number} arg0
774
+ */
775
+ set rotation(arg0) {
776
+ wasm.__wbg_set_wasmtransform2d_rotation(this.__wbg_ptr, arg0);
777
+ }
778
+ /**
779
+ * @returns {number}
780
+ */
781
+ get scale_x() {
782
+ const ret = wasm.__wbg_get_wasmtransform2d_scale_x(this.__wbg_ptr);
783
+ return ret;
784
+ }
785
+ /**
786
+ * @param {number} arg0
787
+ */
788
+ set scale_x(arg0) {
789
+ wasm.__wbg_set_wasmtransform2d_scale_x(this.__wbg_ptr, arg0);
790
+ }
791
+ /**
792
+ * @returns {number}
793
+ */
794
+ get scale_y() {
795
+ const ret = wasm.__wbg_get_wasmtransform2d_scale_y(this.__wbg_ptr);
796
+ return ret;
797
+ }
798
+ /**
799
+ * @param {number} arg0
800
+ */
801
+ set scale_y(arg0) {
802
+ wasm.__wbg_set_wasmtransform2d_scale_y(this.__wbg_ptr, arg0);
803
+ }
804
+ }
805
+ if (Symbol.dispose) WasmTransform2D.prototype[Symbol.dispose] = WasmTransform2D.prototype.free;
806
+
807
+ const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
808
+
809
+ async function __wbg_load(module, imports) {
810
+ if (typeof Response === 'function' && module instanceof Response) {
811
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
812
+ try {
813
+ return await WebAssembly.instantiateStreaming(module, imports);
814
+ } catch (e) {
815
+ const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
816
+
817
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
818
+ console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
819
+
820
+ } else {
821
+ throw e;
822
+ }
823
+ }
824
+ }
825
+
826
+ const bytes = await module.arrayBuffer();
827
+ return await WebAssembly.instantiate(bytes, imports);
828
+ } else {
829
+ const instance = await WebAssembly.instantiate(module, imports);
830
+
831
+ if (instance instanceof WebAssembly.Instance) {
832
+ return { instance, module };
833
+ } else {
834
+ return instance;
835
+ }
836
+ }
837
+ }
838
+
839
+ function __wbg_get_imports() {
840
+ const imports = {};
841
+ imports.wbg = {};
842
+ imports.wbg.__wbg_Window_7b2011a6368164ef = function(arg0) {
843
+ const ret = arg0.Window;
844
+ return ret;
845
+ };
846
+ imports.wbg.__wbg_WorkerGlobalScope_4bddbcb12b3f5a28 = function(arg0) {
847
+ const ret = arg0.WorkerGlobalScope;
848
+ return ret;
849
+ };
850
+ imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
851
+ const ret = debugString(arg1);
852
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
853
+ const len1 = WASM_VECTOR_LEN;
854
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
855
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
856
+ };
857
+ imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
858
+ const ret = typeof(arg0) === 'function';
859
+ return ret;
860
+ };
861
+ imports.wbg.__wbg___wbindgen_is_null_dfda7d66506c95b5 = function(arg0) {
862
+ const ret = arg0 === null;
863
+ return ret;
864
+ };
865
+ imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
866
+ const ret = arg0 === undefined;
867
+ return ret;
868
+ };
869
+ imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
870
+ throw new Error(getStringFromWasm0(arg0, arg1));
871
+ };
872
+ imports.wbg.__wbg__wbg_cb_unref_87dfb5aaa0cbcea7 = function(arg0) {
873
+ arg0._wbg_cb_unref();
874
+ };
875
+ imports.wbg.__wbg_arrayBuffer_c04af4fce566092d = function() { return handleError(function (arg0) {
876
+ const ret = arg0.arrayBuffer();
877
+ return ret;
878
+ }, arguments) };
879
+ imports.wbg.__wbg_beginRenderPass_599b98d9a6ba5692 = function() { return handleError(function (arg0, arg1) {
880
+ const ret = arg0.beginRenderPass(arg1);
881
+ return ret;
882
+ }, arguments) };
883
+ imports.wbg.__wbg_buffer_6cb2fecb1f253d71 = function(arg0) {
884
+ const ret = arg0.buffer;
885
+ return ret;
886
+ };
887
+ imports.wbg.__wbg_call_3020136f7a2d6e44 = function() { return handleError(function (arg0, arg1, arg2) {
888
+ const ret = arg0.call(arg1, arg2);
889
+ return ret;
890
+ }, arguments) };
891
+ imports.wbg.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {
892
+ const ret = arg0.call(arg1);
893
+ return ret;
894
+ }, arguments) };
895
+ imports.wbg.__wbg_configure_bee5e0250d8526d5 = function() { return handleError(function (arg0, arg1) {
896
+ arg0.configure(arg1);
897
+ }, arguments) };
898
+ imports.wbg.__wbg_createBindGroupLayout_f543b79f894eed2e = function() { return handleError(function (arg0, arg1) {
899
+ const ret = arg0.createBindGroupLayout(arg1);
900
+ return ret;
901
+ }, arguments) };
902
+ imports.wbg.__wbg_createBindGroup_06db01d96df151a7 = function(arg0, arg1) {
903
+ const ret = arg0.createBindGroup(arg1);
904
+ return ret;
905
+ };
906
+ imports.wbg.__wbg_createBuffer_6e69283608e8f98f = function() { return handleError(function (arg0, arg1) {
907
+ const ret = arg0.createBuffer(arg1);
908
+ return ret;
909
+ }, arguments) };
910
+ imports.wbg.__wbg_createCommandEncoder_88e8ef64b19cdb2c = function(arg0, arg1) {
911
+ const ret = arg0.createCommandEncoder(arg1);
912
+ return ret;
913
+ };
914
+ imports.wbg.__wbg_createPipelineLayout_0f960a922b66be56 = function(arg0, arg1) {
915
+ const ret = arg0.createPipelineLayout(arg1);
916
+ return ret;
917
+ };
918
+ imports.wbg.__wbg_createRenderPipeline_725209221f17f288 = function() { return handleError(function (arg0, arg1) {
919
+ const ret = arg0.createRenderPipeline(arg1);
920
+ return ret;
921
+ }, arguments) };
922
+ imports.wbg.__wbg_createSampler_36aca895fb724d8b = function(arg0, arg1) {
923
+ const ret = arg0.createSampler(arg1);
924
+ return ret;
925
+ };
926
+ imports.wbg.__wbg_createShaderModule_714b17aece65828e = function(arg0, arg1) {
927
+ const ret = arg0.createShaderModule(arg1);
928
+ return ret;
929
+ };
930
+ imports.wbg.__wbg_createTexture_63195fd0d63c3a24 = function() { return handleError(function (arg0, arg1) {
931
+ const ret = arg0.createTexture(arg1);
932
+ return ret;
933
+ }, arguments) };
934
+ imports.wbg.__wbg_createView_79f49fbd3fb5f94f = function() { return handleError(function (arg0, arg1) {
935
+ const ret = arg0.createView(arg1);
936
+ return ret;
937
+ }, arguments) };
938
+ imports.wbg.__wbg_document_5b745e82ba551ca5 = function(arg0) {
939
+ const ret = arg0.document;
940
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
941
+ };
942
+ imports.wbg.__wbg_drawIndexed_c47b56e3bafadecb = function(arg0, arg1, arg2, arg3, arg4, arg5) {
943
+ arg0.drawIndexed(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4, arg5 >>> 0);
944
+ };
945
+ imports.wbg.__wbg_end_8bb194afb9988691 = function(arg0) {
946
+ arg0.end();
947
+ };
948
+ imports.wbg.__wbg_error_7bc7d576a6aaf855 = function(arg0) {
949
+ console.error(arg0);
950
+ };
951
+ imports.wbg.__wbg_fetch_417ef4c9a8dfcd8f = function(arg0, arg1, arg2) {
952
+ const ret = arg0.fetch(getStringFromWasm0(arg1, arg2));
953
+ return ret;
954
+ };
955
+ imports.wbg.__wbg_finish_08e2d7b08c066b25 = function(arg0, arg1) {
956
+ const ret = arg0.finish(arg1);
957
+ return ret;
958
+ };
959
+ imports.wbg.__wbg_finish_5ebfba3167b3092c = function(arg0) {
960
+ const ret = arg0.finish();
961
+ return ret;
962
+ };
963
+ imports.wbg.__wbg_getContext_01f42b234e833f0a = function() { return handleError(function (arg0, arg1, arg2) {
964
+ const ret = arg0.getContext(getStringFromWasm0(arg1, arg2));
965
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
966
+ }, arguments) };
967
+ imports.wbg.__wbg_getContext_2f210d0a58d43d95 = function() { return handleError(function (arg0, arg1, arg2) {
968
+ const ret = arg0.getContext(getStringFromWasm0(arg1, arg2));
969
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
970
+ }, arguments) };
971
+ imports.wbg.__wbg_getCurrentTexture_6dc4d0ea8555e374 = function() { return handleError(function (arg0) {
972
+ const ret = arg0.getCurrentTexture();
973
+ return ret;
974
+ }, arguments) };
975
+ imports.wbg.__wbg_getMappedRange_3cb6354f7963e27e = function() { return handleError(function (arg0, arg1, arg2) {
976
+ const ret = arg0.getMappedRange(arg1, arg2);
977
+ return ret;
978
+ }, arguments) };
979
+ imports.wbg.__wbg_getPreferredCanvasFormat_06854455b835cf40 = function(arg0) {
980
+ const ret = arg0.getPreferredCanvasFormat();
981
+ return (__wbindgen_enum_GpuTextureFormat.indexOf(ret) + 1 || 96) - 1;
982
+ };
983
+ imports.wbg.__wbg_get_c53d381635aa3929 = function(arg0, arg1) {
984
+ const ret = arg0[arg1 >>> 0];
985
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
986
+ };
987
+ imports.wbg.__wbg_gpu_653e59c6ae8028a8 = function(arg0) {
988
+ const ret = arg0.gpu;
989
+ return ret;
990
+ };
991
+ imports.wbg.__wbg_instanceof_GpuAdapter_b2c1300e425af95c = function(arg0) {
992
+ let result;
993
+ try {
994
+ result = arg0 instanceof GPUAdapter;
995
+ } catch (_) {
996
+ result = false;
997
+ }
998
+ const ret = result;
999
+ return ret;
1000
+ };
1001
+ imports.wbg.__wbg_instanceof_GpuCanvasContext_c9b75b4b7dc7555e = function(arg0) {
1002
+ let result;
1003
+ try {
1004
+ result = arg0 instanceof GPUCanvasContext;
1005
+ } catch (_) {
1006
+ result = false;
1007
+ }
1008
+ const ret = result;
1009
+ return ret;
1010
+ };
1011
+ imports.wbg.__wbg_instanceof_Response_cd74d1c2ac92cb0b = function(arg0) {
1012
+ let result;
1013
+ try {
1014
+ result = arg0 instanceof Response;
1015
+ } catch (_) {
1016
+ result = false;
1017
+ }
1018
+ const ret = result;
1019
+ return ret;
1020
+ };
1021
+ imports.wbg.__wbg_instanceof_Window_b5cf7783caa68180 = function(arg0) {
1022
+ let result;
1023
+ try {
1024
+ result = arg0 instanceof Window;
1025
+ } catch (_) {
1026
+ result = false;
1027
+ }
1028
+ const ret = result;
1029
+ return ret;
1030
+ };
1031
+ imports.wbg.__wbg_label_f279af9fe090b53f = function(arg0, arg1) {
1032
+ const ret = arg1.label;
1033
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1034
+ const len1 = WASM_VECTOR_LEN;
1035
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1036
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1037
+ };
1038
+ imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) {
1039
+ const ret = arg0.length;
1040
+ return ret;
1041
+ };
1042
+ imports.wbg.__wbg_mapAsync_e89ffbd0722e6025 = function(arg0, arg1, arg2, arg3) {
1043
+ const ret = arg0.mapAsync(arg1 >>> 0, arg2, arg3);
1044
+ return ret;
1045
+ };
1046
+ imports.wbg.__wbg_navigator_11b7299bb7886507 = function(arg0) {
1047
+ const ret = arg0.navigator;
1048
+ return ret;
1049
+ };
1050
+ imports.wbg.__wbg_navigator_b49edef831236138 = function(arg0) {
1051
+ const ret = arg0.navigator;
1052
+ return ret;
1053
+ };
1054
+ imports.wbg.__wbg_new_1ba21ce319a06297 = function() {
1055
+ const ret = new Object();
1056
+ return ret;
1057
+ };
1058
+ imports.wbg.__wbg_new_25f239778d6112b9 = function() {
1059
+ const ret = new Array();
1060
+ return ret;
1061
+ };
1062
+ imports.wbg.__wbg_new_6421f6084cc5bc5a = function(arg0) {
1063
+ const ret = new Uint8Array(arg0);
1064
+ return ret;
1065
+ };
1066
+ imports.wbg.__wbg_new_ff12d2b041fb48f1 = function(arg0, arg1) {
1067
+ try {
1068
+ var state0 = {a: arg0, b: arg1};
1069
+ var cb0 = (arg0, arg1) => {
1070
+ const a = state0.a;
1071
+ state0.a = 0;
1072
+ try {
1073
+ return wasm_bindgen__convert__closures_____invoke__h1c1a44fa2edf53c0(a, state0.b, arg0, arg1);
1074
+ } finally {
1075
+ state0.a = a;
1076
+ }
1077
+ };
1078
+ const ret = new Promise(cb0);
1079
+ return ret;
1080
+ } finally {
1081
+ state0.a = state0.b = 0;
1082
+ }
1083
+ };
1084
+ imports.wbg.__wbg_new_from_slice_f9c22b9153b26992 = function(arg0, arg1) {
1085
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
1086
+ return ret;
1087
+ };
1088
+ imports.wbg.__wbg_new_no_args_cb138f77cf6151ee = function(arg0, arg1) {
1089
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
1090
+ return ret;
1091
+ };
1092
+ imports.wbg.__wbg_new_with_byte_offset_and_length_d85c3da1fd8df149 = function(arg0, arg1, arg2) {
1093
+ const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
1094
+ return ret;
1095
+ };
1096
+ imports.wbg.__wbg_ok_dd98ecb60d721e20 = function(arg0) {
1097
+ const ret = arg0.ok;
1098
+ return ret;
1099
+ };
1100
+ imports.wbg.__wbg_onSubmittedWorkDone_babe5ab237e856ff = function(arg0) {
1101
+ const ret = arg0.onSubmittedWorkDone();
1102
+ return ret;
1103
+ };
1104
+ imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
1105
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
1106
+ };
1107
+ imports.wbg.__wbg_push_7d9be8f38fc13975 = function(arg0, arg1) {
1108
+ const ret = arg0.push(arg1);
1109
+ return ret;
1110
+ };
1111
+ imports.wbg.__wbg_querySelectorAll_aa1048eae18f6f1a = function() { return handleError(function (arg0, arg1, arg2) {
1112
+ const ret = arg0.querySelectorAll(getStringFromWasm0(arg1, arg2));
1113
+ return ret;
1114
+ }, arguments) };
1115
+ imports.wbg.__wbg_queueMicrotask_9b549dfce8865860 = function(arg0) {
1116
+ const ret = arg0.queueMicrotask;
1117
+ return ret;
1118
+ };
1119
+ imports.wbg.__wbg_queueMicrotask_fca69f5bfad613a5 = function(arg0) {
1120
+ queueMicrotask(arg0);
1121
+ };
1122
+ imports.wbg.__wbg_queue_13a5c48e3c54a28c = function(arg0) {
1123
+ const ret = arg0.queue;
1124
+ return ret;
1125
+ };
1126
+ imports.wbg.__wbg_requestAdapter_cc9a9924f72519ab = function(arg0, arg1) {
1127
+ const ret = arg0.requestAdapter(arg1);
1128
+ return ret;
1129
+ };
1130
+ imports.wbg.__wbg_requestDevice_295504649d1da14c = function(arg0, arg1) {
1131
+ const ret = arg0.requestDevice(arg1);
1132
+ return ret;
1133
+ };
1134
+ imports.wbg.__wbg_resolve_fd5bfbaa4ce36e1e = function(arg0) {
1135
+ const ret = Promise.resolve(arg0);
1136
+ return ret;
1137
+ };
1138
+ imports.wbg.__wbg_setBindGroup_bf7233e51ee0fd56 = function(arg0, arg1, arg2) {
1139
+ arg0.setBindGroup(arg1 >>> 0, arg2);
1140
+ };
1141
+ imports.wbg.__wbg_setBindGroup_c532d9e80c3b863a = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
1142
+ arg0.setBindGroup(arg1 >>> 0, arg2, getArrayU32FromWasm0(arg3, arg4), arg5, arg6 >>> 0);
1143
+ }, arguments) };
1144
+ imports.wbg.__wbg_setIndexBuffer_d6851b016152211a = function(arg0, arg1, arg2, arg3, arg4) {
1145
+ arg0.setIndexBuffer(arg1, __wbindgen_enum_GpuIndexFormat[arg2], arg3, arg4);
1146
+ };
1147
+ imports.wbg.__wbg_setPipeline_b632e313f54b1cb1 = function(arg0, arg1) {
1148
+ arg0.setPipeline(arg1);
1149
+ };
1150
+ imports.wbg.__wbg_setVertexBuffer_c8234139ead62a61 = function(arg0, arg1, arg2, arg3, arg4) {
1151
+ arg0.setVertexBuffer(arg1 >>> 0, arg2, arg3, arg4);
1152
+ };
1153
+ imports.wbg.__wbg_set_781438a03c0c3c81 = function() { return handleError(function (arg0, arg1, arg2) {
1154
+ const ret = Reflect.set(arg0, arg1, arg2);
1155
+ return ret;
1156
+ }, arguments) };
1157
+ imports.wbg.__wbg_set_a_e87a2053d5fccb4c = function(arg0, arg1) {
1158
+ arg0.a = arg1;
1159
+ };
1160
+ imports.wbg.__wbg_set_access_69d91e9d4e4ceac2 = function(arg0, arg1) {
1161
+ arg0.access = __wbindgen_enum_GpuStorageTextureAccess[arg1];
1162
+ };
1163
+ imports.wbg.__wbg_set_address_mode_u_17e91ba6701d7cdf = function(arg0, arg1) {
1164
+ arg0.addressModeU = __wbindgen_enum_GpuAddressMode[arg1];
1165
+ };
1166
+ imports.wbg.__wbg_set_address_mode_v_83cff33885b49fd0 = function(arg0, arg1) {
1167
+ arg0.addressModeV = __wbindgen_enum_GpuAddressMode[arg1];
1168
+ };
1169
+ imports.wbg.__wbg_set_address_mode_w_2445963d0feae757 = function(arg0, arg1) {
1170
+ arg0.addressModeW = __wbindgen_enum_GpuAddressMode[arg1];
1171
+ };
1172
+ imports.wbg.__wbg_set_alpha_a7a68e5ec04efe77 = function(arg0, arg1) {
1173
+ arg0.alpha = arg1;
1174
+ };
1175
+ imports.wbg.__wbg_set_alpha_mode_60f87267fa3d95d0 = function(arg0, arg1) {
1176
+ arg0.alphaMode = __wbindgen_enum_GpuCanvasAlphaMode[arg1];
1177
+ };
1178
+ imports.wbg.__wbg_set_alpha_to_coverage_enabled_67782b8fff854d06 = function(arg0, arg1) {
1179
+ arg0.alphaToCoverageEnabled = arg1 !== 0;
1180
+ };
1181
+ imports.wbg.__wbg_set_array_layer_count_2bd74e56899b603a = function(arg0, arg1) {
1182
+ arg0.arrayLayerCount = arg1 >>> 0;
1183
+ };
1184
+ imports.wbg.__wbg_set_array_stride_acb85bd3848529a6 = function(arg0, arg1) {
1185
+ arg0.arrayStride = arg1;
1186
+ };
1187
+ imports.wbg.__wbg_set_aspect_82ca9caa27a4c533 = function(arg0, arg1) {
1188
+ arg0.aspect = __wbindgen_enum_GpuTextureAspect[arg1];
1189
+ };
1190
+ imports.wbg.__wbg_set_aspect_b78bd0b34ebfe19b = function(arg0, arg1) {
1191
+ arg0.aspect = __wbindgen_enum_GpuTextureAspect[arg1];
1192
+ };
1193
+ imports.wbg.__wbg_set_attributes_4d5de6c80e3a7e73 = function(arg0, arg1) {
1194
+ arg0.attributes = arg1;
1195
+ };
1196
+ imports.wbg.__wbg_set_b_87725d82ac69a631 = function(arg0, arg1) {
1197
+ arg0.b = arg1;
1198
+ };
1199
+ imports.wbg.__wbg_set_base_array_layer_064977086530f2e7 = function(arg0, arg1) {
1200
+ arg0.baseArrayLayer = arg1 >>> 0;
1201
+ };
1202
+ imports.wbg.__wbg_set_base_mip_level_845abe28a57bd901 = function(arg0, arg1) {
1203
+ arg0.baseMipLevel = arg1 >>> 0;
1204
+ };
1205
+ imports.wbg.__wbg_set_bc3a432bdcd60886 = function(arg0, arg1, arg2) {
1206
+ arg0.set(arg1, arg2 >>> 0);
1207
+ };
1208
+ imports.wbg.__wbg_set_beginning_of_pass_write_index_18bb7ab9fb16de02 = function(arg0, arg1) {
1209
+ arg0.beginningOfPassWriteIndex = arg1 >>> 0;
1210
+ };
1211
+ imports.wbg.__wbg_set_bind_group_layouts_db65f9787380e242 = function(arg0, arg1) {
1212
+ arg0.bindGroupLayouts = arg1;
1213
+ };
1214
+ imports.wbg.__wbg_set_binding_35fa28beda49ff83 = function(arg0, arg1) {
1215
+ arg0.binding = arg1 >>> 0;
1216
+ };
1217
+ imports.wbg.__wbg_set_binding_3b4abee15b11f6ec = function(arg0, arg1) {
1218
+ arg0.binding = arg1 >>> 0;
1219
+ };
1220
+ imports.wbg.__wbg_set_blend_21337ec514ad2280 = function(arg0, arg1) {
1221
+ arg0.blend = arg1;
1222
+ };
1223
+ imports.wbg.__wbg_set_buffer_a9223dfcc0e34853 = function(arg0, arg1) {
1224
+ arg0.buffer = arg1;
1225
+ };
1226
+ imports.wbg.__wbg_set_buffer_d49e95bb5349d827 = function(arg0, arg1) {
1227
+ arg0.buffer = arg1;
1228
+ };
1229
+ imports.wbg.__wbg_set_buffers_68609a5d48c31b27 = function(arg0, arg1) {
1230
+ arg0.buffers = arg1;
1231
+ };
1232
+ imports.wbg.__wbg_set_bytes_per_row_4a52bbf4cdbfe78b = function(arg0, arg1) {
1233
+ arg0.bytesPerRow = arg1 >>> 0;
1234
+ };
1235
+ imports.wbg.__wbg_set_clear_value_8fc3623594df71b2 = function(arg0, arg1) {
1236
+ arg0.clearValue = arg1;
1237
+ };
1238
+ imports.wbg.__wbg_set_code_20093e29960281f8 = function(arg0, arg1, arg2) {
1239
+ arg0.code = getStringFromWasm0(arg1, arg2);
1240
+ };
1241
+ imports.wbg.__wbg_set_color_64a633bf7b4cf6fe = function(arg0, arg1) {
1242
+ arg0.color = arg1;
1243
+ };
1244
+ imports.wbg.__wbg_set_color_attachments_4d4c71d7eeba8e2f = function(arg0, arg1) {
1245
+ arg0.colorAttachments = arg1;
1246
+ };
1247
+ imports.wbg.__wbg_set_compare_0376672b0c0bbfd8 = function(arg0, arg1) {
1248
+ arg0.compare = __wbindgen_enum_GpuCompareFunction[arg1];
1249
+ };
1250
+ imports.wbg.__wbg_set_compare_f3fb77a9bf3f0f7e = function(arg0, arg1) {
1251
+ arg0.compare = __wbindgen_enum_GpuCompareFunction[arg1];
1252
+ };
1253
+ imports.wbg.__wbg_set_count_8cf9a3dd1ffc7b7d = function(arg0, arg1) {
1254
+ arg0.count = arg1 >>> 0;
1255
+ };
1256
+ imports.wbg.__wbg_set_cull_mode_41c12526410d3e05 = function(arg0, arg1) {
1257
+ arg0.cullMode = __wbindgen_enum_GpuCullMode[arg1];
1258
+ };
1259
+ imports.wbg.__wbg_set_depth_bias_31554aeaaa675954 = function(arg0, arg1) {
1260
+ arg0.depthBias = arg1;
1261
+ };
1262
+ imports.wbg.__wbg_set_depth_bias_clamp_8cf5f4f0d80e8cba = function(arg0, arg1) {
1263
+ arg0.depthBiasClamp = arg1;
1264
+ };
1265
+ imports.wbg.__wbg_set_depth_bias_slope_scale_310ae406f2d3a055 = function(arg0, arg1) {
1266
+ arg0.depthBiasSlopeScale = arg1;
1267
+ };
1268
+ imports.wbg.__wbg_set_depth_clear_value_8760aafb583d5312 = function(arg0, arg1) {
1269
+ arg0.depthClearValue = arg1;
1270
+ };
1271
+ imports.wbg.__wbg_set_depth_compare_8831904ce3173063 = function(arg0, arg1) {
1272
+ arg0.depthCompare = __wbindgen_enum_GpuCompareFunction[arg1];
1273
+ };
1274
+ imports.wbg.__wbg_set_depth_fail_op_62ec602580477afc = function(arg0, arg1) {
1275
+ arg0.depthFailOp = __wbindgen_enum_GpuStencilOperation[arg1];
1276
+ };
1277
+ imports.wbg.__wbg_set_depth_load_op_102d57f3ddf95461 = function(arg0, arg1) {
1278
+ arg0.depthLoadOp = __wbindgen_enum_GpuLoadOp[arg1];
1279
+ };
1280
+ imports.wbg.__wbg_set_depth_or_array_layers_d7b93db07c5da69d = function(arg0, arg1) {
1281
+ arg0.depthOrArrayLayers = arg1 >>> 0;
1282
+ };
1283
+ imports.wbg.__wbg_set_depth_read_only_aebc24a542debafd = function(arg0, arg1) {
1284
+ arg0.depthReadOnly = arg1 !== 0;
1285
+ };
1286
+ imports.wbg.__wbg_set_depth_stencil_5627e73aaf33912c = function(arg0, arg1) {
1287
+ arg0.depthStencil = arg1;
1288
+ };
1289
+ imports.wbg.__wbg_set_depth_stencil_attachment_04b936535778e362 = function(arg0, arg1) {
1290
+ arg0.depthStencilAttachment = arg1;
1291
+ };
1292
+ imports.wbg.__wbg_set_depth_store_op_610b0a50dbb00eb8 = function(arg0, arg1) {
1293
+ arg0.depthStoreOp = __wbindgen_enum_GpuStoreOp[arg1];
1294
+ };
1295
+ imports.wbg.__wbg_set_depth_write_enabled_f94217df9ff2d60c = function(arg0, arg1) {
1296
+ arg0.depthWriteEnabled = arg1 !== 0;
1297
+ };
1298
+ imports.wbg.__wbg_set_device_dab18ead7bfc077b = function(arg0, arg1) {
1299
+ arg0.device = arg1;
1300
+ };
1301
+ imports.wbg.__wbg_set_dimension_2a75a794a0bfcc94 = function(arg0, arg1) {
1302
+ arg0.dimension = __wbindgen_enum_GpuTextureViewDimension[arg1];
1303
+ };
1304
+ imports.wbg.__wbg_set_dimension_a3c50fb6d43f6cec = function(arg0, arg1) {
1305
+ arg0.dimension = __wbindgen_enum_GpuTextureDimension[arg1];
1306
+ };
1307
+ imports.wbg.__wbg_set_dst_factor_cf872fec841747ac = function(arg0, arg1) {
1308
+ arg0.dstFactor = __wbindgen_enum_GpuBlendFactor[arg1];
1309
+ };
1310
+ imports.wbg.__wbg_set_end_of_pass_write_index_02ee5189026c1d3a = function(arg0, arg1) {
1311
+ arg0.endOfPassWriteIndex = arg1 >>> 0;
1312
+ };
1313
+ imports.wbg.__wbg_set_entries_1472deaee7053fb7 = function(arg0, arg1) {
1314
+ arg0.entries = arg1;
1315
+ };
1316
+ imports.wbg.__wbg_set_entries_b2258b5ef29810b0 = function(arg0, arg1) {
1317
+ arg0.entries = arg1;
1318
+ };
1319
+ imports.wbg.__wbg_set_entry_point_11f912102ade99b1 = function(arg0, arg1, arg2) {
1320
+ arg0.entryPoint = getStringFromWasm0(arg1, arg2);
1321
+ };
1322
+ imports.wbg.__wbg_set_entry_point_f9224cdb29cbe5df = function(arg0, arg1, arg2) {
1323
+ arg0.entryPoint = getStringFromWasm0(arg1, arg2);
1324
+ };
1325
+ imports.wbg.__wbg_set_external_texture_613e4434100d63ee = function(arg0, arg1) {
1326
+ arg0.externalTexture = arg1;
1327
+ };
1328
+ imports.wbg.__wbg_set_fail_op_73a4e194f4bc914a = function(arg0, arg1) {
1329
+ arg0.failOp = __wbindgen_enum_GpuStencilOperation[arg1];
1330
+ };
1331
+ imports.wbg.__wbg_set_format_1670e760e18ac001 = function(arg0, arg1) {
1332
+ arg0.format = __wbindgen_enum_GpuTextureFormat[arg1];
1333
+ };
1334
+ imports.wbg.__wbg_set_format_2141a8a1fd36fb9c = function(arg0, arg1) {
1335
+ arg0.format = __wbindgen_enum_GpuTextureFormat[arg1];
1336
+ };
1337
+ imports.wbg.__wbg_set_format_25e4aacc74949e38 = function(arg0, arg1) {
1338
+ arg0.format = __wbindgen_enum_GpuTextureFormat[arg1];
1339
+ };
1340
+ imports.wbg.__wbg_set_format_3f7008e9e568f0fc = function(arg0, arg1) {
1341
+ arg0.format = __wbindgen_enum_GpuVertexFormat[arg1];
1342
+ };
1343
+ imports.wbg.__wbg_set_format_4a4fccdfc45bc409 = function(arg0, arg1) {
1344
+ arg0.format = __wbindgen_enum_GpuTextureFormat[arg1];
1345
+ };
1346
+ imports.wbg.__wbg_set_format_7696f8290da8a36b = function(arg0, arg1) {
1347
+ arg0.format = __wbindgen_enum_GpuTextureFormat[arg1];
1348
+ };
1349
+ imports.wbg.__wbg_set_format_974a01725f579c5d = function(arg0, arg1) {
1350
+ arg0.format = __wbindgen_enum_GpuTextureFormat[arg1];
1351
+ };
1352
+ imports.wbg.__wbg_set_fragment_f7ce64feaf1cd7dc = function(arg0, arg1) {
1353
+ arg0.fragment = arg1;
1354
+ };
1355
+ imports.wbg.__wbg_set_front_face_09e32557f8852301 = function(arg0, arg1) {
1356
+ arg0.frontFace = __wbindgen_enum_GpuFrontFace[arg1];
1357
+ };
1358
+ imports.wbg.__wbg_set_g_c31c959457596456 = function(arg0, arg1) {
1359
+ arg0.g = arg1;
1360
+ };
1361
+ imports.wbg.__wbg_set_has_dynamic_offset_fbc1bb343939ed0b = function(arg0, arg1) {
1362
+ arg0.hasDynamicOffset = arg1 !== 0;
1363
+ };
1364
+ imports.wbg.__wbg_set_height_6f8f8ef4cb40e496 = function(arg0, arg1) {
1365
+ arg0.height = arg1 >>> 0;
1366
+ };
1367
+ imports.wbg.__wbg_set_height_710b87344b3d6748 = function(arg0, arg1) {
1368
+ arg0.height = arg1 >>> 0;
1369
+ };
1370
+ imports.wbg.__wbg_set_height_afe09c24165867f7 = function(arg0, arg1) {
1371
+ arg0.height = arg1 >>> 0;
1372
+ };
1373
+ imports.wbg.__wbg_set_label_0ec13ba975f77124 = function(arg0, arg1, arg2) {
1374
+ arg0.label = getStringFromWasm0(arg1, arg2);
1375
+ };
1376
+ imports.wbg.__wbg_set_label_3b658d9ce970552c = function(arg0, arg1, arg2) {
1377
+ arg0.label = getStringFromWasm0(arg1, arg2);
1378
+ };
1379
+ imports.wbg.__wbg_set_label_48883f5f49e4ec47 = function(arg0, arg1, arg2) {
1380
+ arg0.label = getStringFromWasm0(arg1, arg2);
1381
+ };
1382
+ imports.wbg.__wbg_set_label_4bbbc289ddddebd7 = function(arg0, arg1, arg2) {
1383
+ arg0.label = getStringFromWasm0(arg1, arg2);
1384
+ };
1385
+ imports.wbg.__wbg_set_label_4d609666f09cfdfb = function(arg0, arg1, arg2) {
1386
+ arg0.label = getStringFromWasm0(arg1, arg2);
1387
+ };
1388
+ imports.wbg.__wbg_set_label_4f4264b0041180e2 = function(arg0, arg1, arg2) {
1389
+ arg0.label = getStringFromWasm0(arg1, arg2);
1390
+ };
1391
+ imports.wbg.__wbg_set_label_5b46e419b9e88c5e = function(arg0, arg1, arg2) {
1392
+ arg0.label = getStringFromWasm0(arg1, arg2);
1393
+ };
1394
+ imports.wbg.__wbg_set_label_95423cd2e1f4b5dd = function(arg0, arg1, arg2) {
1395
+ arg0.label = getStringFromWasm0(arg1, arg2);
1396
+ };
1397
+ imports.wbg.__wbg_set_label_c3fc0a66f4ecc82b = function(arg0, arg1, arg2) {
1398
+ arg0.label = getStringFromWasm0(arg1, arg2);
1399
+ };
1400
+ imports.wbg.__wbg_set_label_c857f45a8485236a = function(arg0, arg1, arg2) {
1401
+ arg0.label = getStringFromWasm0(arg1, arg2);
1402
+ };
1403
+ imports.wbg.__wbg_set_label_dc8df9969898889c = function(arg0, arg1, arg2) {
1404
+ arg0.label = getStringFromWasm0(arg1, arg2);
1405
+ };
1406
+ imports.wbg.__wbg_set_label_e3709fe3e82429b5 = function(arg0, arg1, arg2) {
1407
+ arg0.label = getStringFromWasm0(arg1, arg2);
1408
+ };
1409
+ imports.wbg.__wbg_set_label_fb5d28b3ba7af11f = function(arg0, arg1, arg2) {
1410
+ arg0.label = getStringFromWasm0(arg1, arg2);
1411
+ };
1412
+ imports.wbg.__wbg_set_layout_7f76289be3294b4a = function(arg0, arg1) {
1413
+ arg0.layout = arg1;
1414
+ };
1415
+ imports.wbg.__wbg_set_layout_c20d48b352b24c1b = function(arg0, arg1) {
1416
+ arg0.layout = arg1;
1417
+ };
1418
+ imports.wbg.__wbg_set_load_op_c71d200e998908b0 = function(arg0, arg1) {
1419
+ arg0.loadOp = __wbindgen_enum_GpuLoadOp[arg1];
1420
+ };
1421
+ imports.wbg.__wbg_set_lod_max_clamp_aaac5daaecca96d4 = function(arg0, arg1) {
1422
+ arg0.lodMaxClamp = arg1;
1423
+ };
1424
+ imports.wbg.__wbg_set_lod_min_clamp_ed2162d4b198abba = function(arg0, arg1) {
1425
+ arg0.lodMinClamp = arg1;
1426
+ };
1427
+ imports.wbg.__wbg_set_mag_filter_c8a8c1218cd38da6 = function(arg0, arg1) {
1428
+ arg0.magFilter = __wbindgen_enum_GpuFilterMode[arg1];
1429
+ };
1430
+ imports.wbg.__wbg_set_mapped_at_creation_2d003ce549611385 = function(arg0, arg1) {
1431
+ arg0.mappedAtCreation = arg1 !== 0;
1432
+ };
1433
+ imports.wbg.__wbg_set_mask_a933ba2e61c7610a = function(arg0, arg1) {
1434
+ arg0.mask = arg1 >>> 0;
1435
+ };
1436
+ imports.wbg.__wbg_set_max_anisotropy_fb4bae64cb5acf57 = function(arg0, arg1) {
1437
+ arg0.maxAnisotropy = arg1;
1438
+ };
1439
+ imports.wbg.__wbg_set_min_binding_size_308360802ae7a9ba = function(arg0, arg1) {
1440
+ arg0.minBindingSize = arg1;
1441
+ };
1442
+ imports.wbg.__wbg_set_min_filter_2dafbdeb188fd817 = function(arg0, arg1) {
1443
+ arg0.minFilter = __wbindgen_enum_GpuFilterMode[arg1];
1444
+ };
1445
+ imports.wbg.__wbg_set_mip_level_babe1ff64201f0ea = function(arg0, arg1) {
1446
+ arg0.mipLevel = arg1 >>> 0;
1447
+ };
1448
+ imports.wbg.__wbg_set_mip_level_count_cd3197411f4f2432 = function(arg0, arg1) {
1449
+ arg0.mipLevelCount = arg1 >>> 0;
1450
+ };
1451
+ imports.wbg.__wbg_set_mip_level_count_fdc72450a94244ef = function(arg0, arg1) {
1452
+ arg0.mipLevelCount = arg1 >>> 0;
1453
+ };
1454
+ imports.wbg.__wbg_set_mipmap_filter_79f552c459e63aa6 = function(arg0, arg1) {
1455
+ arg0.mipmapFilter = __wbindgen_enum_GpuMipmapFilterMode[arg1];
1456
+ };
1457
+ imports.wbg.__wbg_set_module_18d541838665d831 = function(arg0, arg1) {
1458
+ arg0.module = arg1;
1459
+ };
1460
+ imports.wbg.__wbg_set_module_20641353ebb28712 = function(arg0, arg1) {
1461
+ arg0.module = arg1;
1462
+ };
1463
+ imports.wbg.__wbg_set_multisample_e0f310ea9e40c2d9 = function(arg0, arg1) {
1464
+ arg0.multisample = arg1;
1465
+ };
1466
+ imports.wbg.__wbg_set_multisampled_cd50d8f6709cea1a = function(arg0, arg1) {
1467
+ arg0.multisampled = arg1 !== 0;
1468
+ };
1469
+ imports.wbg.__wbg_set_offset_2e78915f5d65d704 = function(arg0, arg1) {
1470
+ arg0.offset = arg1;
1471
+ };
1472
+ imports.wbg.__wbg_set_offset_405017033a936d89 = function(arg0, arg1) {
1473
+ arg0.offset = arg1;
1474
+ };
1475
+ imports.wbg.__wbg_set_offset_e7ce8b8eaaf46b95 = function(arg0, arg1) {
1476
+ arg0.offset = arg1;
1477
+ };
1478
+ imports.wbg.__wbg_set_operation_b96fabca3716aaa3 = function(arg0, arg1) {
1479
+ arg0.operation = __wbindgen_enum_GpuBlendOperation[arg1];
1480
+ };
1481
+ imports.wbg.__wbg_set_origin_c5f017d3f09ad7ff = function(arg0, arg1) {
1482
+ arg0.origin = arg1;
1483
+ };
1484
+ imports.wbg.__wbg_set_pass_op_765be90bb2f27220 = function(arg0, arg1) {
1485
+ arg0.passOp = __wbindgen_enum_GpuStencilOperation[arg1];
1486
+ };
1487
+ imports.wbg.__wbg_set_power_preference_39b347bf0d236ce6 = function(arg0, arg1) {
1488
+ arg0.powerPreference = __wbindgen_enum_GpuPowerPreference[arg1];
1489
+ };
1490
+ imports.wbg.__wbg_set_primitive_d6456d7efe6b4fe5 = function(arg0, arg1) {
1491
+ arg0.primitive = arg1;
1492
+ };
1493
+ imports.wbg.__wbg_set_query_set_20ecd7f9a16f3ec6 = function(arg0, arg1) {
1494
+ arg0.querySet = arg1;
1495
+ };
1496
+ imports.wbg.__wbg_set_r_07bd987697069496 = function(arg0, arg1) {
1497
+ arg0.r = arg1;
1498
+ };
1499
+ imports.wbg.__wbg_set_required_features_650c9e5dafbaa395 = function(arg0, arg1) {
1500
+ arg0.requiredFeatures = arg1;
1501
+ };
1502
+ imports.wbg.__wbg_set_resolve_target_c18cd4048765732a = function(arg0, arg1) {
1503
+ arg0.resolveTarget = arg1;
1504
+ };
1505
+ imports.wbg.__wbg_set_resource_8cea0fe2c8745c3e = function(arg0, arg1) {
1506
+ arg0.resource = arg1;
1507
+ };
1508
+ imports.wbg.__wbg_set_rows_per_image_2f7969031c71f0d8 = function(arg0, arg1) {
1509
+ arg0.rowsPerImage = arg1 >>> 0;
1510
+ };
1511
+ imports.wbg.__wbg_set_sample_count_07aedd28692aeae8 = function(arg0, arg1) {
1512
+ arg0.sampleCount = arg1 >>> 0;
1513
+ };
1514
+ imports.wbg.__wbg_set_sample_type_601a744a4bd6ea07 = function(arg0, arg1) {
1515
+ arg0.sampleType = __wbindgen_enum_GpuTextureSampleType[arg1];
1516
+ };
1517
+ imports.wbg.__wbg_set_sampler_1a2729c0aa194081 = function(arg0, arg1) {
1518
+ arg0.sampler = arg1;
1519
+ };
1520
+ imports.wbg.__wbg_set_shader_location_bdcfdc1009d351b1 = function(arg0, arg1) {
1521
+ arg0.shaderLocation = arg1 >>> 0;
1522
+ };
1523
+ imports.wbg.__wbg_set_size_7a392ee585f87da8 = function(arg0, arg1) {
1524
+ arg0.size = arg1;
1525
+ };
1526
+ imports.wbg.__wbg_set_size_c6bf409f70f4420f = function(arg0, arg1) {
1527
+ arg0.size = arg1;
1528
+ };
1529
+ imports.wbg.__wbg_set_size_f902b266d636bf6e = function(arg0, arg1) {
1530
+ arg0.size = arg1;
1531
+ };
1532
+ imports.wbg.__wbg_set_src_factor_50cef27aa8aece91 = function(arg0, arg1) {
1533
+ arg0.srcFactor = __wbindgen_enum_GpuBlendFactor[arg1];
1534
+ };
1535
+ imports.wbg.__wbg_set_stencil_back_e740415a5c0b637a = function(arg0, arg1) {
1536
+ arg0.stencilBack = arg1;
1537
+ };
1538
+ imports.wbg.__wbg_set_stencil_clear_value_6be76b512040398d = function(arg0, arg1) {
1539
+ arg0.stencilClearValue = arg1 >>> 0;
1540
+ };
1541
+ imports.wbg.__wbg_set_stencil_front_03185e1c3bafa411 = function(arg0, arg1) {
1542
+ arg0.stencilFront = arg1;
1543
+ };
1544
+ imports.wbg.__wbg_set_stencil_load_op_084f44352b978b3d = function(arg0, arg1) {
1545
+ arg0.stencilLoadOp = __wbindgen_enum_GpuLoadOp[arg1];
1546
+ };
1547
+ imports.wbg.__wbg_set_stencil_read_mask_e2736fc4af9399e4 = function(arg0, arg1) {
1548
+ arg0.stencilReadMask = arg1 >>> 0;
1549
+ };
1550
+ imports.wbg.__wbg_set_stencil_read_only_31f3d99299373c12 = function(arg0, arg1) {
1551
+ arg0.stencilReadOnly = arg1 !== 0;
1552
+ };
1553
+ imports.wbg.__wbg_set_stencil_store_op_428fb4955e4899d6 = function(arg0, arg1) {
1554
+ arg0.stencilStoreOp = __wbindgen_enum_GpuStoreOp[arg1];
1555
+ };
1556
+ imports.wbg.__wbg_set_stencil_write_mask_b1d3e1655305a187 = function(arg0, arg1) {
1557
+ arg0.stencilWriteMask = arg1 >>> 0;
1558
+ };
1559
+ imports.wbg.__wbg_set_step_mode_98e49f7877daf1c5 = function(arg0, arg1) {
1560
+ arg0.stepMode = __wbindgen_enum_GpuVertexStepMode[arg1];
1561
+ };
1562
+ imports.wbg.__wbg_set_storage_texture_6ee0cbeb50698110 = function(arg0, arg1) {
1563
+ arg0.storageTexture = arg1;
1564
+ };
1565
+ imports.wbg.__wbg_set_store_op_e761080d541a10cc = function(arg0, arg1) {
1566
+ arg0.storeOp = __wbindgen_enum_GpuStoreOp[arg1];
1567
+ };
1568
+ imports.wbg.__wbg_set_strip_index_format_16df9e33c7aa97e6 = function(arg0, arg1) {
1569
+ arg0.stripIndexFormat = __wbindgen_enum_GpuIndexFormat[arg1];
1570
+ };
1571
+ imports.wbg.__wbg_set_targets_9fd1ec0b8edc895c = function(arg0, arg1) {
1572
+ arg0.targets = arg1;
1573
+ };
1574
+ imports.wbg.__wbg_set_texture_f03807916f70dcc6 = function(arg0, arg1) {
1575
+ arg0.texture = arg1;
1576
+ };
1577
+ imports.wbg.__wbg_set_texture_f8ae0bb4bb159354 = function(arg0, arg1) {
1578
+ arg0.texture = arg1;
1579
+ };
1580
+ imports.wbg.__wbg_set_timestamp_writes_3998dbfa21e48dbe = function(arg0, arg1) {
1581
+ arg0.timestampWrites = arg1;
1582
+ };
1583
+ imports.wbg.__wbg_set_topology_036632318a24227d = function(arg0, arg1) {
1584
+ arg0.topology = __wbindgen_enum_GpuPrimitiveTopology[arg1];
1585
+ };
1586
+ imports.wbg.__wbg_set_type_0cb4cdb5eff87f31 = function(arg0, arg1) {
1587
+ arg0.type = __wbindgen_enum_GpuBufferBindingType[arg1];
1588
+ };
1589
+ imports.wbg.__wbg_set_type_d05fa8415ad0761f = function(arg0, arg1) {
1590
+ arg0.type = __wbindgen_enum_GpuSamplerBindingType[arg1];
1591
+ };
1592
+ imports.wbg.__wbg_set_unclipped_depth_17a5ab83d4e7cadc = function(arg0, arg1) {
1593
+ arg0.unclippedDepth = arg1 !== 0;
1594
+ };
1595
+ imports.wbg.__wbg_set_usage_3d569e7b02227032 = function(arg0, arg1) {
1596
+ arg0.usage = arg1 >>> 0;
1597
+ };
1598
+ imports.wbg.__wbg_set_usage_ac222ece73f994b7 = function(arg0, arg1) {
1599
+ arg0.usage = arg1 >>> 0;
1600
+ };
1601
+ imports.wbg.__wbg_set_usage_ca00520767c8a475 = function(arg0, arg1) {
1602
+ arg0.usage = arg1 >>> 0;
1603
+ };
1604
+ imports.wbg.__wbg_set_usage_fe13088353b65bee = function(arg0, arg1) {
1605
+ arg0.usage = arg1 >>> 0;
1606
+ };
1607
+ imports.wbg.__wbg_set_vertex_76b7ac4bdfbb06f4 = function(arg0, arg1) {
1608
+ arg0.vertex = arg1;
1609
+ };
1610
+ imports.wbg.__wbg_set_view_1ef41eeb26eaf718 = function(arg0, arg1) {
1611
+ arg0.view = arg1;
1612
+ };
1613
+ imports.wbg.__wbg_set_view_46b654a12649c6f6 = function(arg0, arg1) {
1614
+ arg0.view = arg1;
1615
+ };
1616
+ imports.wbg.__wbg_set_view_dimension_12c332494a2697dc = function(arg0, arg1) {
1617
+ arg0.viewDimension = __wbindgen_enum_GpuTextureViewDimension[arg1];
1618
+ };
1619
+ imports.wbg.__wbg_set_view_dimension_31b9fd7126132e82 = function(arg0, arg1) {
1620
+ arg0.viewDimension = __wbindgen_enum_GpuTextureViewDimension[arg1];
1621
+ };
1622
+ imports.wbg.__wbg_set_view_formats_152cb995add2ee4e = function(arg0, arg1) {
1623
+ arg0.viewFormats = arg1;
1624
+ };
1625
+ imports.wbg.__wbg_set_view_formats_cc77650da6c3b25b = function(arg0, arg1) {
1626
+ arg0.viewFormats = arg1;
1627
+ };
1628
+ imports.wbg.__wbg_set_visibility_6d1fc94552f22ac3 = function(arg0, arg1) {
1629
+ arg0.visibility = arg1 >>> 0;
1630
+ };
1631
+ imports.wbg.__wbg_set_width_0a22c810f06a5152 = function(arg0, arg1) {
1632
+ arg0.width = arg1 >>> 0;
1633
+ };
1634
+ imports.wbg.__wbg_set_width_5ee1e2d4a0fd929b = function(arg0, arg1) {
1635
+ arg0.width = arg1 >>> 0;
1636
+ };
1637
+ imports.wbg.__wbg_set_width_7ff7a22c6e9f423e = function(arg0, arg1) {
1638
+ arg0.width = arg1 >>> 0;
1639
+ };
1640
+ imports.wbg.__wbg_set_write_mask_c92743022356850e = function(arg0, arg1) {
1641
+ arg0.writeMask = arg1 >>> 0;
1642
+ };
1643
+ imports.wbg.__wbg_set_x_0771b0f86d56cdf9 = function(arg0, arg1) {
1644
+ arg0.x = arg1 >>> 0;
1645
+ };
1646
+ imports.wbg.__wbg_set_y_668d1578881576dd = function(arg0, arg1) {
1647
+ arg0.y = arg1 >>> 0;
1648
+ };
1649
+ imports.wbg.__wbg_set_z_3e24a918a76c816d = function(arg0, arg1) {
1650
+ arg0.z = arg1 >>> 0;
1651
+ };
1652
+ imports.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
1653
+ const ret = typeof global === 'undefined' ? null : global;
1654
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1655
+ };
1656
+ imports.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
1657
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
1658
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1659
+ };
1660
+ imports.wbg.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
1661
+ const ret = typeof self === 'undefined' ? null : self;
1662
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1663
+ };
1664
+ imports.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
1665
+ const ret = typeof window === 'undefined' ? null : window;
1666
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1667
+ };
1668
+ imports.wbg.__wbg_status_9bfc680efca4bdfd = function(arg0) {
1669
+ const ret = arg0.status;
1670
+ return ret;
1671
+ };
1672
+ imports.wbg.__wbg_submit_a1850a1cb6baf64a = function(arg0, arg1) {
1673
+ arg0.submit(arg1);
1674
+ };
1675
+ imports.wbg.__wbg_then_429f7caf1026411d = function(arg0, arg1, arg2) {
1676
+ const ret = arg0.then(arg1, arg2);
1677
+ return ret;
1678
+ };
1679
+ imports.wbg.__wbg_then_4f95312d68691235 = function(arg0, arg1) {
1680
+ const ret = arg0.then(arg1);
1681
+ return ret;
1682
+ };
1683
+ imports.wbg.__wbg_unmap_ab94ab04cfb14bee = function(arg0) {
1684
+ arg0.unmap();
1685
+ };
1686
+ imports.wbg.__wbg_wasmgame_new = function(arg0) {
1687
+ const ret = WasmGame.__wrap(arg0);
1688
+ return ret;
1689
+ };
1690
+ imports.wbg.__wbg_writeBuffer_b203cf79b98d6dd8 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
1691
+ arg0.writeBuffer(arg1, arg2, arg3, arg4, arg5);
1692
+ }, arguments) };
1693
+ imports.wbg.__wbg_writeTexture_0466bf7d7d35e04e = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1694
+ arg0.writeTexture(arg1, arg2, arg3, arg4);
1695
+ }, arguments) };
1696
+ imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
1697
+ // Cast intrinsic for `Ref(String) -> Externref`.
1698
+ const ret = getStringFromWasm0(arg0, arg1);
1699
+ return ret;
1700
+ };
1701
+ imports.wbg.__wbindgen_cast_882eece33d9122b0 = function(arg0, arg1) {
1702
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 633, function: Function { arguments: [Externref], shim_idx: 634, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1703
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h918525bae50cf890, wasm_bindgen__convert__closures_____invoke__hea5223c55c1708a8);
1704
+ return ret;
1705
+ };
1706
+ imports.wbg.__wbindgen_cast_cb9088102bce6b30 = function(arg0, arg1) {
1707
+ // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
1708
+ const ret = getArrayU8FromWasm0(arg0, arg1);
1709
+ return ret;
1710
+ };
1711
+ imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
1712
+ // Cast intrinsic for `F64 -> Externref`.
1713
+ const ret = arg0;
1714
+ return ret;
1715
+ };
1716
+ imports.wbg.__wbindgen_init_externref_table = function() {
1717
+ const table = wasm.__wbindgen_externrefs;
1718
+ const offset = table.grow(4);
1719
+ table.set(0, undefined);
1720
+ table.set(offset + 0, undefined);
1721
+ table.set(offset + 1, null);
1722
+ table.set(offset + 2, true);
1723
+ table.set(offset + 3, false);
1724
+ };
1725
+
1726
+ return imports;
1727
+ }
1728
+
1729
+ function __wbg_finalize_init(instance, module) {
1730
+ wasm = instance.exports;
1731
+ __wbg_init.__wbindgen_wasm_module = module;
1732
+ cachedBigUint64ArrayMemory0 = null;
1733
+ cachedDataViewMemory0 = null;
1734
+ cachedUint32ArrayMemory0 = null;
1735
+ cachedUint8ArrayMemory0 = null;
1736
+
1737
+
1738
+ wasm.__wbindgen_start();
1739
+ return wasm;
1740
+ }
1741
+
1742
+ function initSync(module) {
1743
+ if (wasm !== undefined) return wasm;
1744
+
1745
+
1746
+ if (typeof module !== 'undefined') {
1747
+ if (Object.getPrototypeOf(module) === Object.prototype) {
1748
+ ({module} = module)
1749
+ } else {
1750
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
1751
+ }
1752
+ }
1753
+
1754
+ const imports = __wbg_get_imports();
1755
+ if (!(module instanceof WebAssembly.Module)) {
1756
+ module = new WebAssembly.Module(module);
1757
+ }
1758
+ const instance = new WebAssembly.Instance(module, imports);
1759
+ return __wbg_finalize_init(instance, module);
1760
+ }
1761
+
1762
+ async function __wbg_init(module_or_path) {
1763
+ if (wasm !== undefined) return wasm;
1764
+
1765
+
1766
+ if (typeof module_or_path !== 'undefined') {
1767
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
1768
+ ({module_or_path} = module_or_path)
1769
+ } else {
1770
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
1771
+ }
1772
+ }
1773
+
1774
+ if (typeof module_or_path === 'undefined') {
1775
+ module_or_path = new URL('goud_engine_bg.wasm', import.meta.url);
1776
+ }
1777
+ const imports = __wbg_get_imports();
1778
+
1779
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
1780
+ module_or_path = fetch(module_or_path);
1781
+ }
1782
+
1783
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
1784
+
1785
+ return __wbg_finalize_init(instance, module);
1786
+ }
1787
+
1788
+ export { initSync };
1789
+ export default __wbg_init;