goudengine 0.0.825 → 0.0.827

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 (40) hide show
  1. package/README.md +18 -0
  2. package/dist/generated/node/index.g.d.ts +86 -0
  3. package/dist/generated/node/index.g.d.ts.map +1 -1
  4. package/dist/generated/node/index.g.js +86 -0
  5. package/dist/generated/node/index.g.js.map +1 -1
  6. package/dist/generated/types/engine.g.d.ts +95 -0
  7. package/dist/generated/types/engine.g.d.ts.map +1 -1
  8. package/dist/generated/types/input.g.d.ts +3 -0
  9. package/dist/generated/types/input.g.d.ts.map +1 -1
  10. package/dist/generated/types/input.g.js +3 -0
  11. package/dist/generated/types/input.g.js.map +1 -1
  12. package/dist/generated/types/math.g.d.ts +4 -0
  13. package/dist/generated/types/math.g.d.ts.map +1 -1
  14. package/dist/generated/types/math.g.js +4 -0
  15. package/dist/generated/types/math.g.js.map +1 -1
  16. package/dist/web/generated/types/engine.g.d.ts +95 -0
  17. package/dist/web/generated/types/engine.g.d.ts.map +1 -1
  18. package/dist/web/generated/types/input.g.d.ts +3 -0
  19. package/dist/web/generated/types/input.g.d.ts.map +1 -1
  20. package/dist/web/generated/types/input.g.js +3 -0
  21. package/dist/web/generated/types/input.g.js.map +1 -1
  22. package/dist/web/generated/types/math.g.d.ts +4 -0
  23. package/dist/web/generated/types/math.g.d.ts.map +1 -1
  24. package/dist/web/generated/types/math.g.js +4 -0
  25. package/dist/web/generated/types/math.g.js.map +1 -1
  26. package/dist/web/generated/web/index.g.d.ts +66 -0
  27. package/dist/web/generated/web/index.g.d.ts.map +1 -1
  28. package/dist/web/generated/web/index.g.js +107 -13
  29. package/dist/web/generated/web/index.g.js.map +1 -1
  30. package/goud-engine-node.darwin-arm64.node +0 -0
  31. package/goud-engine-node.darwin-x64.node +0 -0
  32. package/goud-engine-node.linux-x64-gnu.node +0 -0
  33. package/goud-engine-node.win32-x64-msvc.node +0 -0
  34. package/index.d.ts +113 -85
  35. package/index.js +542 -278
  36. package/package.json +15 -15
  37. package/wasm/goud_engine.d.ts +357 -161
  38. package/wasm/goud_engine.js +2078 -1450
  39. package/wasm/goud_engine_bg.wasm +0 -0
  40. package/wasm/goud_engine_bg.wasm.d.ts +74 -12
@@ -1,455 +1,277 @@
1
- let wasm;
1
+ /* @ts-self-types="./goud_engine.d.ts" */
2
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}`;
3
+ export class WasmContact {
4
+ static __wrap(ptr) {
5
+ ptr = ptr >>> 0;
6
+ const obj = Object.create(WasmContact.prototype);
7
+ obj.__wbg_ptr = ptr;
8
+ WasmContactFinalization.register(obj, obj.__wbg_ptr, obj);
9
+ return obj;
18
10
  }
19
- if (type == 'string') {
20
- return `"${val}"`;
11
+ __destroy_into_raw() {
12
+ const ptr = this.__wbg_ptr;
13
+ this.__wbg_ptr = 0;
14
+ WasmContactFinalization.unregister(this);
15
+ return ptr;
21
16
  }
22
- if (type == 'symbol') {
23
- const description = val.description;
24
- if (description == null) {
25
- return 'Symbol';
26
- } else {
27
- return `Symbol(${description})`;
28
- }
17
+ free() {
18
+ const ptr = this.__destroy_into_raw();
19
+ wasm.__wbg_wasmcontact_free(ptr, 0);
29
20
  }
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
- }
21
+ /**
22
+ * @returns {number}
23
+ */
24
+ get normal_x() {
25
+ const ret = wasm.__wbg_get_wasmcontact_normal_x(this.__wbg_ptr);
26
+ return ret;
37
27
  }
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;
28
+ /**
29
+ * @returns {number}
30
+ */
31
+ get normal_y() {
32
+ const ret = wasm.__wbg_get_wasmcontact_normal_y(this.__wbg_ptr);
33
+ return ret;
50
34
  }
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);
35
+ /**
36
+ * @returns {number}
37
+ */
38
+ get penetration() {
39
+ const ret = wasm.__wbg_get_wasmcontact_penetration(this.__wbg_ptr);
40
+ return ret;
59
41
  }
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
- }
42
+ /**
43
+ * @returns {number}
44
+ */
45
+ get point_x() {
46
+ const ret = wasm.__wbg_get_wasmcontact_point_x(this.__wbg_ptr);
47
+ return ret;
69
48
  }
70
- // errors
71
- if (val instanceof Error) {
72
- return `${val.name}: ${val.message}\n${val.stack}`;
49
+ /**
50
+ * @returns {number}
51
+ */
52
+ get point_y() {
53
+ const ret = wasm.__wbg_get_wasmcontact_point_y(this.__wbg_ptr);
54
+ return ret;
73
55
  }
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);
56
+ /**
57
+ * @param {number} arg0
58
+ */
59
+ set normal_x(arg0) {
60
+ wasm.__wbg_set_wasmcontact_normal_x(this.__wbg_ptr, arg0);
97
61
  }
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);
62
+ /**
63
+ * @param {number} arg0
64
+ */
65
+ set normal_y(arg0) {
66
+ wasm.__wbg_set_wasmcontact_normal_y(this.__wbg_ptr, arg0);
105
67
  }
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);
68
+ /**
69
+ * @param {number} arg0
70
+ */
71
+ set penetration(arg0) {
72
+ wasm.__wbg_set_wasmcontact_penetration(this.__wbg_ptr, arg0);
118
73
  }
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);
74
+ /**
75
+ * @param {number} arg0
76
+ */
77
+ set point_x(arg0) {
78
+ wasm.__wbg_set_wasmcontact_point_x(this.__wbg_ptr, arg0);
126
79
  }
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);
80
+ /**
81
+ * @param {number} arg0
82
+ */
83
+ set point_y(arg0) {
84
+ wasm.__wbg_set_wasmcontact_point_y(this.__wbg_ptr, arg0);
136
85
  }
137
86
  }
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;
87
+ if (Symbol.dispose) WasmContact.prototype[Symbol.dispose] = WasmContact.prototype.free;
88
+
89
+ /**
90
+ * The primary game handle for browser-based games.
91
+ *
92
+ * Owns the ECS world, input state, frame timing, and an optional wgpu
93
+ * rendering backend attached to an HTML canvas element.
94
+ */
95
+ export class WasmGame {
96
+ static __wrap(ptr) {
97
+ ptr = ptr >>> 0;
98
+ const obj = Object.create(WasmGame.prototype);
99
+ obj.__wbg_ptr = ptr;
100
+ WasmGameFinalization.register(obj, obj.__wbg_ptr, obj);
101
+ return obj;
102
+ }
103
+ __destroy_into_raw() {
104
+ const ptr = this.__wbg_ptr;
105
+ this.__wbg_ptr = 0;
106
+ WasmGameFinalization.unregister(this);
177
107
  return ptr;
178
108
  }
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;
109
+ free() {
110
+ const ptr = this.__destroy_into_raw();
111
+ wasm.__wbg_wasmgame_free(ptr, 0);
191
112
  }
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);
113
+ /**
114
+ * @param {number} min_ax
115
+ * @param {number} min_ay
116
+ * @param {number} max_ax
117
+ * @param {number} max_ay
118
+ * @param {number} min_bx
119
+ * @param {number} min_by
120
+ * @param {number} max_bx
121
+ * @param {number} max_by
122
+ * @returns {boolean}
123
+ */
124
+ aabb_overlap(min_ax, min_ay, max_ax, max_ay, min_bx, min_by, max_bx, max_by) {
125
+ const ret = wasm.wasmgame_aabb_overlap(this.__wbg_ptr, min_ax, min_ay, max_ax, max_ay, min_bx, min_by, max_bx, max_by);
126
+ return ret !== 0;
320
127
  }
321
128
  /**
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}
129
+ * @param {bigint} entity_bits
130
+ * @param {string} name
330
131
  */
331
- get total_time() {
332
- const ret = wasm.wasmgame_total_time(this.__wbg_ptr);
333
- return ret;
132
+ add_name(entity_bits, name) {
133
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
134
+ const len0 = WASM_VECTOR_LEN;
135
+ wasm.wasmgame_add_name(this.__wbg_ptr, entity_bits, ptr0, len0);
334
136
  }
335
137
  /**
336
- * @param {number} delta_time
138
+ * @param {number} dx
139
+ * @param {number} dy
337
140
  */
338
- begin_frame(delta_time) {
339
- wasm.wasmgame_begin_frame(this.__wbg_ptr, delta_time);
141
+ add_scroll_delta(dx, dy) {
142
+ wasm.wasmgame_add_scroll_delta(this.__wbg_ptr, dx, dy);
340
143
  }
341
144
  /**
342
- * @param {number} texture
343
- * @param {number} x
344
- * @param {number} y
345
- * @param {number} w
346
- * @param {number} h
347
- * @param {number} rotation
145
+ * @param {bigint} entity_bits
146
+ * @param {number} texture_handle
348
147
  * @param {number} r
349
148
  * @param {number} g
350
149
  * @param {number} b
351
150
  * @param {number} a
151
+ * @param {boolean} flip_x
152
+ * @param {boolean} flip_y
153
+ * @param {number} anchor_x
154
+ * @param {number} anchor_y
352
155
  */
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);
156
+ add_sprite(entity_bits, texture_handle, r, g, b, a, flip_x, flip_y, anchor_x, anchor_y) {
157
+ wasm.wasmgame_add_sprite(this.__wbg_ptr, entity_bits, texture_handle, r, g, b, a, flip_x, flip_y, anchor_x, anchor_y);
355
158
  }
356
159
  /**
357
- * @returns {bigint}
160
+ * @param {bigint} entity_bits
161
+ * @param {number} px
162
+ * @param {number} py
163
+ * @param {number} rotation
164
+ * @param {number} sx
165
+ * @param {number} sy
358
166
  */
359
- get frame_count() {
360
- const ret = wasm.wasmgame_frame_count(this.__wbg_ptr);
361
- return BigInt.asUintN(64, ret);
167
+ add_transform2d(entity_bits, px, py, rotation, sx, sy) {
168
+ wasm.wasmgame_add_transform2d(this.__wbg_ptr, entity_bits, px, py, rotation, sx, sy);
362
169
  }
363
170
  /**
364
- * @param {number} key_code
171
+ * Advances frame timing and prepares the wgpu surface for drawing.
172
+ *
173
+ * Call this at the start of each `requestAnimationFrame` callback.
174
+ * @param {number} delta_time
365
175
  */
366
- release_key(key_code) {
367
- wasm.wasmgame_release_key(this.__wbg_ptr, key_code);
176
+ begin_frame(delta_time) {
177
+ wasm.wasmgame_begin_frame(this.__wbg_ptr, delta_time);
368
178
  }
369
179
  /**
370
- * @param {bigint} entity_bits
180
+ * @param {number} x1
181
+ * @param {number} y1
182
+ * @param {number} r1
183
+ * @param {number} x2
184
+ * @param {number} y2
185
+ * @param {number} r2
371
186
  * @returns {boolean}
372
187
  */
373
- remove_name(entity_bits) {
374
- const ret = wasm.wasmgame_remove_name(this.__wbg_ptr, entity_bits);
188
+ circle_overlap(x1, y1, r1, x2, y2, r2) {
189
+ const ret = wasm.wasmgame_circle_overlap(this.__wbg_ptr, x1, y1, r1, x2, y2, r2);
375
190
  return ret !== 0;
376
191
  }
377
192
  /**
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}
193
+ * @param {number} center_ax
194
+ * @param {number} center_ay
195
+ * @param {number} half_wa
196
+ * @param {number} half_ha
197
+ * @param {number} center_bx
198
+ * @param {number} center_by
199
+ * @param {number} half_wb
200
+ * @param {number} half_hb
201
+ * @returns {WasmContact | undefined}
389
202
  */
390
- spawn_empty() {
391
- const ret = wasm.wasmgame_spawn_empty(this.__wbg_ptr);
392
- return BigInt.asUintN(64, ret);
203
+ collision_aabb_aabb(center_ax, center_ay, half_wa, half_ha, center_bx, center_by, half_wb, half_hb) {
204
+ const ret = wasm.wasmgame_collision_aabb_aabb(this.__wbg_ptr, center_ax, center_ay, half_wa, half_ha, center_bx, center_by, half_wb, half_hb);
205
+ return ret === 0 ? undefined : WasmContact.__wrap(ret);
393
206
  }
394
207
  /**
395
- * @returns {number}
208
+ * @param {number} cx
209
+ * @param {number} cy
210
+ * @param {number} cr
211
+ * @param {number} bx
212
+ * @param {number} by
213
+ * @param {number} bhw
214
+ * @param {number} bhh
215
+ * @returns {WasmContact | undefined}
396
216
  */
397
- entity_count() {
398
- const ret = wasm.wasmgame_entity_count(this.__wbg_ptr);
399
- return ret >>> 0;
217
+ collision_circle_aabb(cx, cy, cr, bx, by, bhw, bhh) {
218
+ const ret = wasm.wasmgame_collision_circle_aabb(this.__wbg_ptr, cx, cy, cr, bx, by, bhw, bhh);
219
+ return ret === 0 ? undefined : WasmContact.__wrap(ret);
400
220
  }
401
221
  /**
402
- * Whether wgpu rendering is active.
403
- * @returns {boolean}
222
+ * @param {number} center_ax
223
+ * @param {number} center_ay
224
+ * @param {number} radius_a
225
+ * @param {number} center_bx
226
+ * @param {number} center_by
227
+ * @param {number} radius_b
228
+ * @returns {WasmContact | undefined}
404
229
  */
405
- has_renderer() {
406
- const ret = wasm.wasmgame_has_renderer(this.__wbg_ptr);
407
- return ret !== 0;
230
+ collision_circle_circle(center_ax, center_ay, radius_a, center_bx, center_by, radius_b) {
231
+ const ret = wasm.wasmgame_collision_circle_circle(this.__wbg_ptr, center_ax, center_ay, radius_a, center_bx, center_by, radius_b);
232
+ return ret === 0 ? undefined : WasmContact.__wrap(ret);
408
233
  }
409
234
  /**
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>}
235
+ * Creates a game instance with wgpu rendering attached to a canvas.
236
+ * @param {HTMLCanvasElement} canvas
237
+ * @param {number} width
238
+ * @param {number} height
239
+ * @param {string} title
240
+ * @returns {Promise<WasmGame>}
414
241
  */
415
- load_texture(url) {
416
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
242
+ static createWithCanvas(canvas, width, height, title) {
243
+ const ptr0 = passStringToWasm0(title, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
417
244
  const len0 = WASM_VECTOR_LEN;
418
- const ret = wasm.wasmgame_load_texture(this.__wbg_ptr, ptr0, len0);
245
+ const ret = wasm.wasmgame_createWithCanvas(canvas, width, height, ptr0, len0);
419
246
  return ret;
420
247
  }
421
248
  /**
249
+ * Seconds elapsed since the previous frame.
422
250
  * @returns {number}
423
251
  */
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;
252
+ get delta_time() {
253
+ const ret = wasm.wasmgame_delta_time(this.__wbg_ptr);
254
+ return ret;
434
255
  }
435
256
  /**
436
- * @param {number} key_code
257
+ * @param {bigint} entity_bits
437
258
  * @returns {boolean}
438
259
  */
439
- is_key_pressed(key_code) {
440
- const ret = wasm.wasmgame_is_key_pressed(this.__wbg_ptr, key_code);
260
+ despawn(entity_bits) {
261
+ const ret = wasm.wasmgame_despawn(this.__wbg_ptr, entity_bits);
441
262
  return ret !== 0;
442
263
  }
443
264
  /**
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
265
+ * Despawns multiple entities at once. Returns the number of entities
266
+ * successfully despawned.
267
+ * @param {BigUint64Array} entity_bits
268
+ * @returns {number}
450
269
  */
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);
270
+ despawn_batch(entity_bits) {
271
+ const ptr0 = passArray64ToWasm0(entity_bits, wasm.__wbindgen_malloc);
272
+ const len0 = WASM_VECTOR_LEN;
273
+ const ret = wasm.wasmgame_despawn_batch(this.__wbg_ptr, ptr0, len0);
274
+ return ret >>> 0;
453
275
  }
454
276
  /**
455
277
  * @param {number} handle
@@ -458,92 +280,220 @@ export class WasmGame {
458
280
  wasm.wasmgame_destroy_texture(this.__wbg_ptr, handle);
459
281
  }
460
282
  /**
461
- * @param {bigint} entity_bits
462
- * @returns {WasmTransform2D | undefined}
283
+ * @param {number} x1
284
+ * @param {number} y1
285
+ * @param {number} x2
286
+ * @param {number} y2
287
+ * @returns {number}
463
288
  */
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);
289
+ distance(x1, y1, x2, y2) {
290
+ const ret = wasm.wasmgame_distance(this.__wbg_ptr, x1, y1, x2, y2);
291
+ return ret;
467
292
  }
468
293
  /**
469
- * @param {bigint} entity_bits
470
- * @returns {boolean}
294
+ * @param {number} x1
295
+ * @param {number} y1
296
+ * @param {number} x2
297
+ * @param {number} y2
298
+ * @returns {number}
471
299
  */
472
- has_transform2d(entity_bits) {
473
- const ret = wasm.wasmgame_has_transform2d(this.__wbg_ptr, entity_bits);
474
- return ret !== 0;
300
+ distance_squared(x1, y1, x2, y2) {
301
+ const ret = wasm.wasmgame_distance_squared(this.__wbg_ptr, x1, y1, x2, y2);
302
+ return ret;
475
303
  }
476
304
  /**
477
- * Reconfigures the wgpu surface after a canvas resize.
478
- * @param {number} width
479
- * @param {number} height
305
+ * @param {number} x
306
+ * @param {number} y
307
+ * @param {number} w
308
+ * @param {number} h
309
+ * @param {number} r
310
+ * @param {number} g
311
+ * @param {number} b
312
+ * @param {number} a
480
313
  */
481
- set_canvas_size(width, height) {
482
- wasm.wasmgame_set_canvas_size(this.__wbg_ptr, width, height);
314
+ draw_quad(x, y, w, h, r, g, b, a) {
315
+ wasm.wasmgame_draw_quad(this.__wbg_ptr, x, y, w, h, r, g, b, a);
483
316
  }
484
317
  /**
485
- * Sets the background clear color (called before begin_frame or via
486
- * the TypeScript SDK's beginFrame parameters).
318
+ * @param {number} texture
319
+ * @param {number} x
320
+ * @param {number} y
321
+ * @param {number} w
322
+ * @param {number} h
323
+ * @param {number} rotation
487
324
  * @param {number} r
488
325
  * @param {number} g
489
326
  * @param {number} b
490
327
  * @param {number} a
491
328
  */
492
- set_clear_color(r, g, b, a) {
493
- wasm.wasmgame_set_clear_color(this.__wbg_ptr, r, g, b, a);
329
+ draw_sprite(texture, x, y, w, h, rotation, r, g, b, a) {
330
+ wasm.wasmgame_draw_sprite(this.__wbg_ptr, texture, x, y, w, h, rotation, r, g, b, a);
494
331
  }
495
332
  /**
496
- * @param {bigint} entity_bits
497
- * @param {number} px
498
- * @param {number} py
333
+ * @param {number} texture
334
+ * @param {number} x
335
+ * @param {number} y
336
+ * @param {number} w
337
+ * @param {number} h
499
338
  * @param {number} rotation
500
- * @param {number} sx
501
- * @param {number} sy
339
+ * @param {number} src_x
340
+ * @param {number} src_y
341
+ * @param {number} src_w
342
+ * @param {number} src_h
343
+ * @param {number} r
344
+ * @param {number} g
345
+ * @param {number} b
346
+ * @param {number} a
347
+ * @returns {boolean}
502
348
  */
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);
349
+ draw_sprite_rect(texture, x, y, w, h, rotation, src_x, src_y, src_w, src_h, r, g, b, a) {
350
+ const ret = wasm.wasmgame_draw_sprite_rect(this.__wbg_ptr, texture, x, y, w, h, rotation, src_x, src_y, src_w, src_h, r, g, b, a);
351
+ return ret !== 0;
505
352
  }
506
353
  /**
507
- * @param {number} dx
508
- * @param {number} dy
354
+ * Flushes queued draw calls and presents the frame to the canvas.
355
+ *
356
+ * Call this at the end of each `requestAnimationFrame` callback.
509
357
  */
510
- add_scroll_delta(dx, dy) {
511
- wasm.wasmgame_add_scroll_delta(this.__wbg_ptr, dx, dy);
358
+ end_frame() {
359
+ wasm.wasmgame_end_frame(this.__wbg_ptr);
512
360
  }
513
361
  /**
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>}
362
+ * @returns {number}
520
363
  */
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);
364
+ entity_count() {
365
+ const ret = wasm.wasmgame_entity_count(this.__wbg_ptr);
366
+ return ret >>> 0;
367
+ }
368
+ /**
369
+ * Approximate frames per second based on the most recent delta.
370
+ * @returns {number}
371
+ */
372
+ get fps() {
373
+ const ret = wasm.wasmgame_fps(this.__wbg_ptr);
525
374
  return ret;
526
375
  }
527
376
  /**
528
- * @param {number} button
377
+ * Number of frames rendered since the game started.
378
+ * @returns {bigint}
529
379
  */
530
- press_mouse_button(button) {
531
- wasm.wasmgame_press_mouse_button(this.__wbg_ptr, button);
380
+ get frame_count() {
381
+ const ret = wasm.wasmgame_frame_count(this.__wbg_ptr);
382
+ return BigInt.asUintN(64, ret);
383
+ }
384
+ /**
385
+ * @param {bigint} entity_bits
386
+ * @returns {string | undefined}
387
+ */
388
+ get_name(entity_bits) {
389
+ const ret = wasm.wasmgame_get_name(this.__wbg_ptr, entity_bits);
390
+ let v1;
391
+ if (ret[0] !== 0) {
392
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
393
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
394
+ }
395
+ return v1;
396
+ }
397
+ /**
398
+ * Returns render statistics for the current frame, or `None` if
399
+ * rendering is not active.
400
+ * @returns {WasmRenderStats | undefined}
401
+ */
402
+ get_render_stats() {
403
+ const ret = wasm.wasmgame_get_render_stats(this.__wbg_ptr);
404
+ return ret === 0 ? undefined : WasmRenderStats.__wrap(ret);
405
+ }
406
+ /**
407
+ * @param {bigint} entity_bits
408
+ * @returns {WasmSprite | undefined}
409
+ */
410
+ get_sprite(entity_bits) {
411
+ const ret = wasm.wasmgame_get_sprite(this.__wbg_ptr, entity_bits);
412
+ return ret === 0 ? undefined : WasmSprite.__wrap(ret);
413
+ }
414
+ /**
415
+ * @param {bigint} entity_bits
416
+ * @returns {WasmTransform2D | undefined}
417
+ */
418
+ get_transform2d(entity_bits) {
419
+ const ret = wasm.wasmgame_get_transform2d(this.__wbg_ptr, entity_bits);
420
+ return ret === 0 ? undefined : WasmTransform2D.__wrap(ret);
532
421
  }
533
422
  /**
534
423
  * @param {bigint} entity_bits
535
424
  * @returns {boolean}
536
425
  */
537
- remove_transform2d(entity_bits) {
538
- const ret = wasm.wasmgame_remove_transform2d(this.__wbg_ptr, entity_bits);
426
+ has_name(entity_bits) {
427
+ const ret = wasm.wasmgame_has_name(this.__wbg_ptr, entity_bits);
539
428
  return ret !== 0;
540
429
  }
541
430
  /**
542
- * @param {number} x
543
- * @param {number} y
431
+ * Returns `true` when wgpu rendering is active (canvas was provided at
432
+ * construction time).
433
+ * @returns {boolean}
544
434
  */
545
- set_mouse_position(x, y) {
546
- wasm.wasmgame_set_mouse_position(this.__wbg_ptr, x, y);
435
+ has_renderer() {
436
+ const ret = wasm.wasmgame_has_renderer(this.__wbg_ptr);
437
+ return ret !== 0;
438
+ }
439
+ /**
440
+ * @param {bigint} entity_bits
441
+ * @returns {boolean}
442
+ */
443
+ has_sprite(entity_bits) {
444
+ const ret = wasm.wasmgame_has_sprite(this.__wbg_ptr, entity_bits);
445
+ return ret !== 0;
446
+ }
447
+ /**
448
+ * @param {bigint} entity_bits
449
+ * @returns {boolean}
450
+ */
451
+ has_transform2d(entity_bits) {
452
+ const ret = wasm.wasmgame_has_transform2d(this.__wbg_ptr, entity_bits);
453
+ return ret !== 0;
454
+ }
455
+ /**
456
+ * Returns `true` if any key mapped to the given action was just pressed
457
+ * this frame (not held from previous frame).
458
+ * @param {string} action
459
+ * @returns {boolean}
460
+ */
461
+ is_action_just_pressed(action) {
462
+ const ptr0 = passStringToWasm0(action, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
463
+ const len0 = WASM_VECTOR_LEN;
464
+ const ret = wasm.wasmgame_is_action_just_pressed(this.__wbg_ptr, ptr0, len0);
465
+ return ret !== 0;
466
+ }
467
+ /**
468
+ * Returns `true` if any key mapped to the given action was just released
469
+ * this frame (held previous frame but not current).
470
+ * @param {string} action
471
+ * @returns {boolean}
472
+ */
473
+ is_action_just_released(action) {
474
+ const ptr0 = passStringToWasm0(action, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
475
+ const len0 = WASM_VECTOR_LEN;
476
+ const ret = wasm.wasmgame_is_action_just_released(this.__wbg_ptr, ptr0, len0);
477
+ return ret !== 0;
478
+ }
479
+ /**
480
+ * Returns `true` if any key mapped to the given action is currently held.
481
+ * @param {string} action
482
+ * @returns {boolean}
483
+ */
484
+ is_action_pressed(action) {
485
+ const ptr0 = passStringToWasm0(action, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
486
+ const len0 = WASM_VECTOR_LEN;
487
+ const ret = wasm.wasmgame_is_action_pressed(this.__wbg_ptr, ptr0, len0);
488
+ return ret !== 0;
489
+ }
490
+ /**
491
+ * @param {bigint} entity_bits
492
+ * @returns {boolean}
493
+ */
494
+ is_alive(entity_bits) {
495
+ const ret = wasm.wasmgame_is_alive(this.__wbg_ptr, entity_bits);
496
+ return ret !== 0;
547
497
  }
548
498
  /**
549
499
  * @param {number} key_code
@@ -561,11 +511,29 @@ export class WasmGame {
561
511
  const ret = wasm.wasmgame_is_key_just_released(this.__wbg_ptr, key_code);
562
512
  return ret !== 0;
563
513
  }
514
+ /**
515
+ * @param {number} key_code
516
+ * @returns {boolean}
517
+ */
518
+ is_key_pressed(key_code) {
519
+ const ret = wasm.wasmgame_is_key_pressed(this.__wbg_ptr, key_code);
520
+ return ret !== 0;
521
+ }
564
522
  /**
565
523
  * @param {number} button
524
+ * @returns {boolean}
566
525
  */
567
- release_mouse_button(button) {
568
- wasm.wasmgame_release_mouse_button(this.__wbg_ptr, button);
526
+ is_mouse_button_just_pressed(button) {
527
+ const ret = wasm.wasmgame_is_mouse_button_just_pressed(this.__wbg_ptr, button);
528
+ return ret !== 0;
529
+ }
530
+ /**
531
+ * @param {number} button
532
+ * @returns {boolean}
533
+ */
534
+ is_mouse_button_just_released(button) {
535
+ const ret = wasm.wasmgame_is_mouse_button_just_released(this.__wbg_ptr, button);
536
+ return ret !== 0;
569
537
  }
570
538
  /**
571
539
  * @param {number} button
@@ -576,18 +544,30 @@ export class WasmGame {
576
544
  return ret !== 0;
577
545
  }
578
546
  /**
579
- * @param {number} button
547
+ * Maps an action name to a key code. Multiple keys can be mapped
548
+ * to the same action. Returns `true` on success.
549
+ * @param {string} action
550
+ * @param {number} key
580
551
  * @returns {boolean}
581
552
  */
582
- is_mouse_button_just_pressed(button) {
583
- const ret = wasm.wasmgame_is_mouse_button_just_pressed(this.__wbg_ptr, button);
553
+ map_action_key(action, key) {
554
+ const ptr0 = passStringToWasm0(action, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
555
+ const len0 = WASM_VECTOR_LEN;
556
+ const ret = wasm.wasmgame_map_action_key(this.__wbg_ptr, ptr0, len0, key);
584
557
  return ret !== 0;
585
558
  }
586
559
  /**
587
560
  * @returns {number}
588
561
  */
589
- get fps() {
590
- const ret = wasm.wasmgame_fps(this.__wbg_ptr);
562
+ mouse_x() {
563
+ const ret = wasm.wasmgame_mouse_x(this.__wbg_ptr);
564
+ return ret;
565
+ }
566
+ /**
567
+ * @returns {number}
568
+ */
569
+ mouse_y() {
570
+ const ret = wasm.wasmgame_mouse_y(this.__wbg_ptr);
591
571
  return ret;
592
572
  }
593
573
  /**
@@ -605,104 +585,99 @@ export class WasmGame {
605
585
  return this;
606
586
  }
607
587
  /**
608
- * @returns {string}
588
+ * @param {number} px
589
+ * @param {number} py
590
+ * @param {number} cx
591
+ * @param {number} cy
592
+ * @param {number} r
593
+ * @returns {boolean}
609
594
  */
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
- }
595
+ point_in_circle(px, py, cx, cy, r) {
596
+ const ret = wasm.wasmgame_point_in_circle(this.__wbg_ptr, px, py, cx, cy, r);
597
+ return ret !== 0;
621
598
  }
622
599
  /**
623
- * @param {bigint} entity_bits
600
+ * @param {number} px
601
+ * @param {number} py
602
+ * @param {number} rx
603
+ * @param {number} ry
604
+ * @param {number} rw
605
+ * @param {number} rh
624
606
  * @returns {boolean}
625
607
  */
626
- despawn(entity_bits) {
627
- const ret = wasm.wasmgame_despawn(this.__wbg_ptr, entity_bits);
608
+ point_in_rect(px, py, rx, ry, rw, rh) {
609
+ const ret = wasm.wasmgame_point_in_rect(this.__wbg_ptr, px, py, rx, ry, rw, rh);
628
610
  return ret !== 0;
629
611
  }
630
612
  /**
631
- * @returns {number}
613
+ * @param {number} key_code
632
614
  */
633
- mouse_x() {
634
- const ret = wasm.wasmgame_mouse_x(this.__wbg_ptr);
635
- return ret;
615
+ press_key(key_code) {
616
+ wasm.wasmgame_press_key(this.__wbg_ptr, key_code);
636
617
  }
637
618
  /**
638
- * @returns {number}
619
+ * @param {number} button
639
620
  */
640
- mouse_y() {
641
- const ret = wasm.wasmgame_mouse_y(this.__wbg_ptr);
642
- return ret;
621
+ press_mouse_button(button) {
622
+ wasm.wasmgame_press_mouse_button(this.__wbg_ptr, button);
643
623
  }
644
624
  /**
645
- * @param {bigint} entity_bits
646
- * @param {string} name
625
+ * Registers a texture from raw image bytes (PNG, JPG, etc.).
626
+ *
627
+ * The browser-side SDK fetches the image data asynchronously, then
628
+ * passes the raw bytes here for synchronous decode + GPU upload.
629
+ * Returns the texture handle (1-based; 0 is reserved for the white
630
+ * fallback texture used by `draw_quad`).
631
+ * @param {Uint8Array} data
632
+ * @returns {number}
647
633
  */
648
- add_name(entity_bits, name) {
649
- const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
634
+ register_texture_from_bytes(data) {
635
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
650
636
  const len0 = WASM_VECTOR_LEN;
651
- wasm.wasmgame_add_name(this.__wbg_ptr, entity_bits, ptr0, len0);
637
+ const ret = wasm.wasmgame_register_texture_from_bytes(this.__wbg_ptr, ptr0, len0);
638
+ if (ret[2]) {
639
+ throw takeFromExternrefTable0(ret[1]);
640
+ }
641
+ return ret[0] >>> 0;
652
642
  }
653
643
  /**
654
- * @param {bigint} entity_bits
655
- * @returns {string | undefined}
644
+ * @param {number} key_code
656
645
  */
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;
646
+ release_key(key_code) {
647
+ wasm.wasmgame_release_key(this.__wbg_ptr, key_code);
648
+ }
649
+ /**
650
+ * @param {number} button
651
+ */
652
+ release_mouse_button(button) {
653
+ wasm.wasmgame_release_mouse_button(this.__wbg_ptr, button);
665
654
  }
666
655
  /**
667
656
  * @param {bigint} entity_bits
668
657
  * @returns {boolean}
669
658
  */
670
- has_name(entity_bits) {
671
- const ret = wasm.wasmgame_has_name(this.__wbg_ptr, entity_bits);
659
+ remove_name(entity_bits) {
660
+ const ret = wasm.wasmgame_remove_name(this.__wbg_ptr, entity_bits);
672
661
  return ret !== 0;
673
662
  }
674
663
  /**
675
664
  * @param {bigint} entity_bits
676
665
  * @returns {boolean}
677
666
  */
678
- is_alive(entity_bits) {
679
- const ret = wasm.wasmgame_is_alive(this.__wbg_ptr, entity_bits);
667
+ remove_sprite(entity_bits) {
668
+ const ret = wasm.wasmgame_remove_sprite(this.__wbg_ptr, entity_bits);
680
669
  return ret !== 0;
681
670
  }
682
671
  /**
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
672
+ * @param {bigint} entity_bits
673
+ * @returns {boolean}
691
674
  */
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);
675
+ remove_transform2d(entity_bits) {
676
+ const ret = wasm.wasmgame_remove_transform2d(this.__wbg_ptr, entity_bits);
677
+ return ret !== 0;
697
678
  }
698
679
  /**
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}
680
+ * @returns {number}
706
681
  */
707
682
  scroll_dx() {
708
683
  const ret = wasm.wasmgame_scroll_dx(this.__wbg_ptr);
@@ -715,1035 +690,1689 @@ export class WasmGame {
715
690
  const ret = wasm.wasmgame_scroll_dy(this.__wbg_ptr);
716
691
  return ret;
717
692
  }
693
+ /**
694
+ * Reconfigures the wgpu surface after a canvas resize.
695
+ * @param {number} width
696
+ * @param {number} height
697
+ */
698
+ set_canvas_size(width, height) {
699
+ wasm.wasmgame_set_canvas_size(this.__wbg_ptr, width, height);
700
+ }
701
+ /**
702
+ * Sets the background clear color.
703
+ *
704
+ * Takes effect on the next `begin_frame` / `end_frame` pair.
705
+ * @param {number} r
706
+ * @param {number} g
707
+ * @param {number} b
708
+ * @param {number} a
709
+ */
710
+ set_clear_color(r, g, b, a) {
711
+ wasm.wasmgame_set_clear_color(this.__wbg_ptr, r, g, b, a);
712
+ }
713
+ /**
714
+ * @param {number} x
715
+ * @param {number} y
716
+ */
717
+ set_mouse_position(x, y) {
718
+ wasm.wasmgame_set_mouse_position(this.__wbg_ptr, x, y);
719
+ }
720
+ /**
721
+ * @param {bigint} entity_bits
722
+ * @param {number} texture_handle
723
+ * @param {number} r
724
+ * @param {number} g
725
+ * @param {number} b
726
+ * @param {number} a
727
+ * @param {boolean} flip_x
728
+ * @param {boolean} flip_y
729
+ * @param {number} anchor_x
730
+ * @param {number} anchor_y
731
+ */
732
+ set_sprite(entity_bits, texture_handle, r, g, b, a, flip_x, flip_y, anchor_x, anchor_y) {
733
+ wasm.wasmgame_set_sprite(this.__wbg_ptr, entity_bits, texture_handle, r, g, b, a, flip_x, flip_y, anchor_x, anchor_y);
734
+ }
735
+ /**
736
+ * @param {bigint} entity_bits
737
+ * @param {number} px
738
+ * @param {number} py
739
+ * @param {number} rotation
740
+ * @param {number} sx
741
+ * @param {number} sy
742
+ */
743
+ set_transform2d(entity_bits, px, py, rotation, sx, sy) {
744
+ wasm.wasmgame_set_transform2d(this.__wbg_ptr, entity_bits, px, py, rotation, sx, sy);
745
+ }
746
+ /**
747
+ * @param {number} count
748
+ * @returns {BigUint64Array}
749
+ */
750
+ spawn_batch(count) {
751
+ const ret = wasm.wasmgame_spawn_batch(this.__wbg_ptr, count);
752
+ var v1 = getArrayU64FromWasm0(ret[0], ret[1]).slice();
753
+ wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
754
+ return v1;
755
+ }
756
+ /**
757
+ * @returns {bigint}
758
+ */
759
+ spawn_empty() {
760
+ const ret = wasm.wasmgame_spawn_empty(this.__wbg_ptr);
761
+ return BigInt.asUintN(64, ret);
762
+ }
763
+ /**
764
+ * The title string passed at construction time.
765
+ * @returns {string}
766
+ */
767
+ get title() {
768
+ let deferred1_0;
769
+ let deferred1_1;
770
+ try {
771
+ const ret = wasm.wasmgame_title(this.__wbg_ptr);
772
+ deferred1_0 = ret[0];
773
+ deferred1_1 = ret[1];
774
+ return getStringFromWasm0(ret[0], ret[1]);
775
+ } finally {
776
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
777
+ }
778
+ }
779
+ /**
780
+ * Total seconds elapsed since the game started.
781
+ * @returns {number}
782
+ */
783
+ get total_time() {
784
+ const ret = wasm.wasmgame_total_time(this.__wbg_ptr);
785
+ return ret;
786
+ }
787
+ /**
788
+ * Logical canvas height in pixels.
789
+ * @returns {number}
790
+ */
791
+ get window_height() {
792
+ const ret = wasm.wasmgame_window_height(this.__wbg_ptr);
793
+ return ret >>> 0;
794
+ }
795
+ /**
796
+ * Logical canvas width in pixels.
797
+ * @returns {number}
798
+ */
799
+ get window_width() {
800
+ const ret = wasm.wasmgame_window_width(this.__wbg_ptr);
801
+ return ret >>> 0;
802
+ }
718
803
  }
719
804
  if (Symbol.dispose) WasmGame.prototype[Symbol.dispose] = WasmGame.prototype.free;
720
805
 
721
- export class WasmTransform2D {
806
+ /**
807
+ * Per-frame rendering statistics exposed to JavaScript.
808
+ */
809
+ export class WasmRenderStats {
722
810
  static __wrap(ptr) {
723
811
  ptr = ptr >>> 0;
724
- const obj = Object.create(WasmTransform2D.prototype);
812
+ const obj = Object.create(WasmRenderStats.prototype);
725
813
  obj.__wbg_ptr = ptr;
726
- WasmTransform2DFinalization.register(obj, obj.__wbg_ptr, obj);
814
+ WasmRenderStatsFinalization.register(obj, obj.__wbg_ptr, obj);
727
815
  return obj;
728
816
  }
729
817
  __destroy_into_raw() {
730
818
  const ptr = this.__wbg_ptr;
731
819
  this.__wbg_ptr = 0;
732
- WasmTransform2DFinalization.unregister(this);
820
+ WasmRenderStatsFinalization.unregister(this);
733
821
  return ptr;
734
822
  }
735
823
  free() {
736
824
  const ptr = this.__destroy_into_raw();
737
- wasm.__wbg_wasmtransform2d_free(ptr, 0);
825
+ wasm.__wbg_wasmrenderstats_free(ptr, 0);
738
826
  }
739
827
  /**
740
828
  * @returns {number}
741
829
  */
742
- get position_x() {
743
- const ret = wasm.__wbg_get_wasmtransform2d_position_x(this.__wbg_ptr);
744
- return ret;
830
+ get draw_calls() {
831
+ const ret = wasm.__wbg_get_wasmrenderstats_draw_calls(this.__wbg_ptr);
832
+ return ret >>> 0;
745
833
  }
746
834
  /**
747
- * @param {number} arg0
835
+ * @returns {number}
748
836
  */
749
- set position_x(arg0) {
750
- wasm.__wbg_set_wasmtransform2d_position_x(this.__wbg_ptr, arg0);
837
+ get texture_binds() {
838
+ const ret = wasm.__wbg_get_wasmrenderstats_texture_binds(this.__wbg_ptr);
839
+ return ret >>> 0;
751
840
  }
752
841
  /**
753
842
  * @returns {number}
754
843
  */
755
- get position_y() {
756
- const ret = wasm.__wbg_get_wasmtransform2d_position_y(this.__wbg_ptr);
757
- return ret;
844
+ get triangles() {
845
+ const ret = wasm.__wbg_get_wasmrenderstats_triangles(this.__wbg_ptr);
846
+ return ret >>> 0;
758
847
  }
759
848
  /**
760
849
  * @param {number} arg0
761
850
  */
762
- set position_y(arg0) {
763
- wasm.__wbg_set_wasmtransform2d_position_y(this.__wbg_ptr, arg0);
851
+ set draw_calls(arg0) {
852
+ wasm.__wbg_set_wasmrenderstats_draw_calls(this.__wbg_ptr, arg0);
853
+ }
854
+ /**
855
+ * @param {number} arg0
856
+ */
857
+ set texture_binds(arg0) {
858
+ wasm.__wbg_set_wasmrenderstats_texture_binds(this.__wbg_ptr, arg0);
859
+ }
860
+ /**
861
+ * @param {number} arg0
862
+ */
863
+ set triangles(arg0) {
864
+ wasm.__wbg_set_wasmrenderstats_triangles(this.__wbg_ptr, arg0);
865
+ }
866
+ }
867
+ if (Symbol.dispose) WasmRenderStats.prototype[Symbol.dispose] = WasmRenderStats.prototype.free;
868
+
869
+ /**
870
+ * A plain-data snapshot of a `Sprite` component, safe to pass across
871
+ * the wasm-bindgen boundary.
872
+ */
873
+ export class WasmSprite {
874
+ static __wrap(ptr) {
875
+ ptr = ptr >>> 0;
876
+ const obj = Object.create(WasmSprite.prototype);
877
+ obj.__wbg_ptr = ptr;
878
+ WasmSpriteFinalization.register(obj, obj.__wbg_ptr, obj);
879
+ return obj;
880
+ }
881
+ __destroy_into_raw() {
882
+ const ptr = this.__wbg_ptr;
883
+ this.__wbg_ptr = 0;
884
+ WasmSpriteFinalization.unregister(this);
885
+ return ptr;
886
+ }
887
+ free() {
888
+ const ptr = this.__destroy_into_raw();
889
+ wasm.__wbg_wasmsprite_free(ptr, 0);
764
890
  }
765
891
  /**
766
892
  * @returns {number}
767
893
  */
768
- get rotation() {
769
- const ret = wasm.__wbg_get_wasmtransform2d_rotation(this.__wbg_ptr);
894
+ get a() {
895
+ const ret = wasm.__wbg_get_wasmsprite_a(this.__wbg_ptr);
770
896
  return ret;
771
897
  }
772
898
  /**
773
- * @param {number} arg0
899
+ * @returns {number}
774
900
  */
775
- set rotation(arg0) {
776
- wasm.__wbg_set_wasmtransform2d_rotation(this.__wbg_ptr, arg0);
901
+ get anchor_x() {
902
+ const ret = wasm.__wbg_get_wasmsprite_anchor_x(this.__wbg_ptr);
903
+ return ret;
777
904
  }
778
905
  /**
779
906
  * @returns {number}
780
907
  */
781
- get scale_x() {
782
- const ret = wasm.__wbg_get_wasmtransform2d_scale_x(this.__wbg_ptr);
908
+ get anchor_y() {
909
+ const ret = wasm.__wbg_get_wasmsprite_anchor_y(this.__wbg_ptr);
783
910
  return ret;
784
911
  }
785
912
  /**
786
- * @param {number} arg0
913
+ * @returns {number}
787
914
  */
788
- set scale_x(arg0) {
789
- wasm.__wbg_set_wasmtransform2d_scale_x(this.__wbg_ptr, arg0);
915
+ get b() {
916
+ const ret = wasm.__wbg_get_wasmsprite_b(this.__wbg_ptr);
917
+ return ret;
918
+ }
919
+ /**
920
+ * @returns {boolean}
921
+ */
922
+ get flip_x() {
923
+ const ret = wasm.__wbg_get_wasmsprite_flip_x(this.__wbg_ptr);
924
+ return ret !== 0;
925
+ }
926
+ /**
927
+ * @returns {boolean}
928
+ */
929
+ get flip_y() {
930
+ const ret = wasm.__wbg_get_wasmsprite_flip_y(this.__wbg_ptr);
931
+ return ret !== 0;
790
932
  }
791
933
  /**
792
934
  * @returns {number}
793
935
  */
794
- get scale_y() {
795
- const ret = wasm.__wbg_get_wasmtransform2d_scale_y(this.__wbg_ptr);
936
+ get g() {
937
+ const ret = wasm.__wbg_get_wasmsprite_g(this.__wbg_ptr);
938
+ return ret;
939
+ }
940
+ /**
941
+ * @returns {number}
942
+ */
943
+ get r() {
944
+ const ret = wasm.__wbg_get_wasmsprite_r(this.__wbg_ptr);
796
945
  return ret;
797
946
  }
947
+ /**
948
+ * @returns {number}
949
+ */
950
+ get texture_handle() {
951
+ const ret = wasm.__wbg_get_wasmsprite_texture_handle(this.__wbg_ptr);
952
+ return ret >>> 0;
953
+ }
798
954
  /**
799
955
  * @param {number} arg0
800
956
  */
801
- set scale_y(arg0) {
802
- wasm.__wbg_set_wasmtransform2d_scale_y(this.__wbg_ptr, arg0);
957
+ set a(arg0) {
958
+ wasm.__wbg_set_wasmsprite_a(this.__wbg_ptr, arg0);
803
959
  }
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
- }
960
+ /**
961
+ * @param {number} arg0
962
+ */
963
+ set anchor_x(arg0) {
964
+ wasm.__wbg_set_wasmsprite_anchor_x(this.__wbg_ptr, arg0);
965
+ }
966
+ /**
967
+ * @param {number} arg0
968
+ */
969
+ set anchor_y(arg0) {
970
+ wasm.__wbg_set_wasmsprite_anchor_y(this.__wbg_ptr, arg0);
971
+ }
972
+ /**
973
+ * @param {number} arg0
974
+ */
975
+ set b(arg0) {
976
+ wasm.__wbg_set_wasmsprite_b(this.__wbg_ptr, arg0);
977
+ }
978
+ /**
979
+ * @param {boolean} arg0
980
+ */
981
+ set flip_x(arg0) {
982
+ wasm.__wbg_set_wasmsprite_flip_x(this.__wbg_ptr, arg0);
983
+ }
984
+ /**
985
+ * @param {boolean} arg0
986
+ */
987
+ set flip_y(arg0) {
988
+ wasm.__wbg_set_wasmsprite_flip_y(this.__wbg_ptr, arg0);
989
+ }
990
+ /**
991
+ * @param {number} arg0
992
+ */
993
+ set g(arg0) {
994
+ wasm.__wbg_set_wasmsprite_g(this.__wbg_ptr, arg0);
995
+ }
996
+ /**
997
+ * @param {number} arg0
998
+ */
999
+ set r(arg0) {
1000
+ wasm.__wbg_set_wasmsprite_r(this.__wbg_ptr, arg0);
1001
+ }
1002
+ /**
1003
+ * @param {number} arg0
1004
+ */
1005
+ set texture_handle(arg0) {
1006
+ wasm.__wbg_set_wasmsprite_texture_handle(this.__wbg_ptr, arg0);
836
1007
  }
837
1008
  }
1009
+ if (Symbol.dispose) WasmSprite.prototype[Symbol.dispose] = WasmSprite.prototype.free;
838
1010
 
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;
1011
+ /**
1012
+ * A plain-data snapshot of a `Transform2D` component, safe to pass across
1013
+ * the wasm-bindgen boundary.
1014
+ */
1015
+ export class WasmTransform2D {
1016
+ static __wrap(ptr) {
1017
+ ptr = ptr >>> 0;
1018
+ const obj = Object.create(WasmTransform2D.prototype);
1019
+ obj.__wbg_ptr = ptr;
1020
+ WasmTransform2DFinalization.register(obj, obj.__wbg_ptr, obj);
1021
+ return obj;
1022
+ }
1023
+ __destroy_into_raw() {
1024
+ const ptr = this.__wbg_ptr;
1025
+ this.__wbg_ptr = 0;
1026
+ WasmTransform2DFinalization.unregister(this);
1027
+ return ptr;
1028
+ }
1029
+ free() {
1030
+ const ptr = this.__destroy_into_raw();
1031
+ wasm.__wbg_wasmtransform2d_free(ptr, 0);
1032
+ }
1033
+ /**
1034
+ * @returns {number}
1035
+ */
1036
+ get position_x() {
1037
+ const ret = wasm.__wbg_get_wasmtransform2d_position_x(this.__wbg_ptr);
1048
1038
  return ret;
1049
- };
1050
- imports.wbg.__wbg_navigator_b49edef831236138 = function(arg0) {
1051
- const ret = arg0.navigator;
1039
+ }
1040
+ /**
1041
+ * @returns {number}
1042
+ */
1043
+ get position_y() {
1044
+ const ret = wasm.__wbg_get_wasmtransform2d_position_y(this.__wbg_ptr);
1052
1045
  return ret;
1053
- };
1054
- imports.wbg.__wbg_new_1ba21ce319a06297 = function() {
1055
- const ret = new Object();
1046
+ }
1047
+ /**
1048
+ * @returns {number}
1049
+ */
1050
+ get rotation() {
1051
+ const ret = wasm.__wbg_get_wasmtransform2d_rotation(this.__wbg_ptr);
1056
1052
  return ret;
1057
- };
1058
- imports.wbg.__wbg_new_25f239778d6112b9 = function() {
1059
- const ret = new Array();
1053
+ }
1054
+ /**
1055
+ * @returns {number}
1056
+ */
1057
+ get scale_x() {
1058
+ const ret = wasm.__wbg_get_wasmtransform2d_scale_x(this.__wbg_ptr);
1060
1059
  return ret;
1061
- };
1062
- imports.wbg.__wbg_new_6421f6084cc5bc5a = function(arg0) {
1063
- const ret = new Uint8Array(arg0);
1060
+ }
1061
+ /**
1062
+ * @returns {number}
1063
+ */
1064
+ get scale_y() {
1065
+ const ret = wasm.__wbg_get_wasmtransform2d_scale_y(this.__wbg_ptr);
1064
1066
  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);
1067
+ }
1068
+ /**
1069
+ * @param {number} arg0
1070
+ */
1071
+ set position_x(arg0) {
1072
+ wasm.__wbg_set_wasmtransform2d_position_x(this.__wbg_ptr, arg0);
1073
+ }
1074
+ /**
1075
+ * @param {number} arg0
1076
+ */
1077
+ set position_y(arg0) {
1078
+ wasm.__wbg_set_wasmtransform2d_position_y(this.__wbg_ptr, arg0);
1079
+ }
1080
+ /**
1081
+ * @param {number} arg0
1082
+ */
1083
+ set rotation(arg0) {
1084
+ wasm.__wbg_set_wasmtransform2d_rotation(this.__wbg_ptr, arg0);
1085
+ }
1086
+ /**
1087
+ * @param {number} arg0
1088
+ */
1089
+ set scale_x(arg0) {
1090
+ wasm.__wbg_set_wasmtransform2d_scale_x(this.__wbg_ptr, arg0);
1091
+ }
1092
+ /**
1093
+ * @param {number} arg0
1094
+ */
1095
+ set scale_y(arg0) {
1096
+ wasm.__wbg_set_wasmtransform2d_scale_y(this.__wbg_ptr, arg0);
1097
+ }
1098
+ }
1099
+ if (Symbol.dispose) WasmTransform2D.prototype[Symbol.dispose] = WasmTransform2D.prototype.free;
1100
+
1101
+ function __wbg_get_imports() {
1102
+ const import0 = {
1103
+ __proto__: null,
1104
+ __wbg_Window_5bb26bc95d054384: function(arg0) {
1105
+ const ret = arg0.Window;
1079
1106
  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;
1107
+ },
1108
+ __wbg_WorkerGlobalScope_866db36eb93893fe: function(arg0) {
1109
+ const ret = arg0.WorkerGlobalScope;
1110
+ return ret;
1111
+ },
1112
+ __wbg___wbindgen_debug_string_5398f5bb970e0daa: function(arg0, arg1) {
1113
+ const ret = debugString(arg1);
1114
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1115
+ const len1 = WASM_VECTOR_LEN;
1116
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1117
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1118
+ },
1119
+ __wbg___wbindgen_is_function_3c846841762788c1: function(arg0) {
1120
+ const ret = typeof(arg0) === 'function';
1121
+ return ret;
1122
+ },
1123
+ __wbg___wbindgen_is_null_0b605fc6b167c56f: function(arg0) {
1124
+ const ret = arg0 === null;
1125
+ return ret;
1126
+ },
1127
+ __wbg___wbindgen_is_undefined_52709e72fb9f179c: function(arg0) {
1128
+ const ret = arg0 === undefined;
1129
+ return ret;
1130
+ },
1131
+ __wbg___wbindgen_throw_6ddd609b62940d55: function(arg0, arg1) {
1132
+ throw new Error(getStringFromWasm0(arg0, arg1));
1133
+ },
1134
+ __wbg__wbg_cb_unref_6b5b6b8576d35cb1: function(arg0) {
1135
+ arg0._wbg_cb_unref();
1136
+ },
1137
+ __wbg_beginRenderPass_b6be55dca13d3752: function() { return handleError(function (arg0, arg1) {
1138
+ const ret = arg0.beginRenderPass(arg1);
1139
+ return ret;
1140
+ }, arguments); },
1141
+ __wbg_buffer_60b8043cd926067d: function(arg0) {
1142
+ const ret = arg0.buffer;
1143
+ return ret;
1144
+ },
1145
+ __wbg_call_2d781c1f4d5c0ef8: function() { return handleError(function (arg0, arg1, arg2) {
1146
+ const ret = arg0.call(arg1, arg2);
1147
+ return ret;
1148
+ }, arguments); },
1149
+ __wbg_configure_3800e43cc1d4df6c: function() { return handleError(function (arg0, arg1) {
1150
+ arg0.configure(arg1);
1151
+ }, arguments); },
1152
+ __wbg_createBindGroupLayout_38abd4e4c5dded7c: function() { return handleError(function (arg0, arg1) {
1153
+ const ret = arg0.createBindGroupLayout(arg1);
1154
+ return ret;
1155
+ }, arguments); },
1156
+ __wbg_createBindGroup_dd602247ba7de53f: function(arg0, arg1) {
1157
+ const ret = arg0.createBindGroup(arg1);
1158
+ return ret;
1159
+ },
1160
+ __wbg_createBuffer_3fce72a987f07f6a: function() { return handleError(function (arg0, arg1) {
1161
+ const ret = arg0.createBuffer(arg1);
1162
+ return ret;
1163
+ }, arguments); },
1164
+ __wbg_createCommandEncoder_9b0d0f644b01b53d: function(arg0, arg1) {
1165
+ const ret = arg0.createCommandEncoder(arg1);
1166
+ return ret;
1167
+ },
1168
+ __wbg_createPipelineLayout_10a02d78a5e801aa: function(arg0, arg1) {
1169
+ const ret = arg0.createPipelineLayout(arg1);
1170
+ return ret;
1171
+ },
1172
+ __wbg_createRenderPipeline_f33944b9347badf7: function() { return handleError(function (arg0, arg1) {
1173
+ const ret = arg0.createRenderPipeline(arg1);
1174
+ return ret;
1175
+ }, arguments); },
1176
+ __wbg_createSampler_dfafeaada8a50f77: function(arg0, arg1) {
1177
+ const ret = arg0.createSampler(arg1);
1178
+ return ret;
1179
+ },
1180
+ __wbg_createShaderModule_c951549f9d218b6a: function(arg0, arg1) {
1181
+ const ret = arg0.createShaderModule(arg1);
1182
+ return ret;
1183
+ },
1184
+ __wbg_createTexture_7de0f1ac17578a0c: function() { return handleError(function (arg0, arg1) {
1185
+ const ret = arg0.createTexture(arg1);
1186
+ return ret;
1187
+ }, arguments); },
1188
+ __wbg_createView_ad451ea74ed4172f: function() { return handleError(function (arg0, arg1) {
1189
+ const ret = arg0.createView(arg1);
1190
+ return ret;
1191
+ }, arguments); },
1192
+ __wbg_document_c0320cd4183c6d9b: function(arg0) {
1193
+ const ret = arg0.document;
1194
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1195
+ },
1196
+ __wbg_drawIndexed_a9f3f3b50747fecf: function(arg0, arg1, arg2, arg3, arg4, arg5) {
1197
+ arg0.drawIndexed(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4, arg5 >>> 0);
1198
+ },
1199
+ __wbg_end_39838302f918fcd7: function(arg0) {
1200
+ arg0.end();
1201
+ },
1202
+ __wbg_error_8d9a8e04cd1d3588: function(arg0) {
1203
+ console.error(arg0);
1204
+ },
1205
+ __wbg_finish_1f441b2d9fcf60d0: function(arg0, arg1) {
1206
+ const ret = arg0.finish(arg1);
1207
+ return ret;
1208
+ },
1209
+ __wbg_finish_d4f7f2d108f44fc0: function(arg0) {
1210
+ const ret = arg0.finish();
1211
+ return ret;
1212
+ },
1213
+ __wbg_getContext_a9236f98f1f7fe7c: function() { return handleError(function (arg0, arg1, arg2) {
1214
+ const ret = arg0.getContext(getStringFromWasm0(arg1, arg2));
1215
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1216
+ }, arguments); },
1217
+ __wbg_getContext_f04bf8f22dcb2d53: function() { return handleError(function (arg0, arg1, arg2) {
1218
+ const ret = arg0.getContext(getStringFromWasm0(arg1, arg2));
1219
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1220
+ }, arguments); },
1221
+ __wbg_getCurrentTexture_66ae9639eac28f8b: function() { return handleError(function (arg0) {
1222
+ const ret = arg0.getCurrentTexture();
1223
+ return ret;
1224
+ }, arguments); },
1225
+ __wbg_getMappedRange_1197a8c58eb0add9: function() { return handleError(function (arg0, arg1, arg2) {
1226
+ const ret = arg0.getMappedRange(arg1, arg2);
1227
+ return ret;
1228
+ }, arguments); },
1229
+ __wbg_getPreferredCanvasFormat_2a0a2628959bb15a: function(arg0) {
1230
+ const ret = arg0.getPreferredCanvasFormat();
1231
+ return (__wbindgen_enum_GpuTextureFormat.indexOf(ret) + 1 || 96) - 1;
1232
+ },
1233
+ __wbg_get_c7546417fb0bec10: function(arg0, arg1) {
1234
+ const ret = arg0[arg1 >>> 0];
1235
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1236
+ },
1237
+ __wbg_gpu_0d39e2c1a52c373e: function(arg0) {
1238
+ const ret = arg0.gpu;
1239
+ return ret;
1240
+ },
1241
+ __wbg_instanceof_GpuAdapter_b2c1300e425af95c: function(arg0) {
1242
+ let result;
1243
+ try {
1244
+ result = arg0 instanceof GPUAdapter;
1245
+ } catch (_) {
1246
+ result = false;
1247
+ }
1248
+ const ret = result;
1249
+ return ret;
1250
+ },
1251
+ __wbg_instanceof_GpuCanvasContext_c9b75b4b7dc7555e: function(arg0) {
1252
+ let result;
1253
+ try {
1254
+ result = arg0 instanceof GPUCanvasContext;
1255
+ } catch (_) {
1256
+ result = false;
1257
+ }
1258
+ const ret = result;
1259
+ return ret;
1260
+ },
1261
+ __wbg_instanceof_Window_23e677d2c6843922: function(arg0) {
1262
+ let result;
1263
+ try {
1264
+ result = arg0 instanceof Window;
1265
+ } catch (_) {
1266
+ result = false;
1267
+ }
1268
+ const ret = result;
1269
+ return ret;
1270
+ },
1271
+ __wbg_label_dfb771c49b8a7920: function(arg0, arg1) {
1272
+ const ret = arg1.label;
1273
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1274
+ const len1 = WASM_VECTOR_LEN;
1275
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1276
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1277
+ },
1278
+ __wbg_length_ea16607d7b61445b: function(arg0) {
1279
+ const ret = arg0.length;
1280
+ return ret;
1281
+ },
1282
+ __wbg_mapAsync_7767a9f33865861e: function(arg0, arg1, arg2, arg3) {
1283
+ const ret = arg0.mapAsync(arg1 >>> 0, arg2, arg3);
1284
+ return ret;
1285
+ },
1286
+ __wbg_navigator_583ffd4fc14c0f7a: function(arg0) {
1287
+ const ret = arg0.navigator;
1288
+ return ret;
1289
+ },
1290
+ __wbg_navigator_9cebf56f28aa719b: function(arg0) {
1291
+ const ret = arg0.navigator;
1292
+ return ret;
1293
+ },
1294
+ __wbg_new_ab79df5bd7c26067: function() {
1295
+ const ret = new Object();
1296
+ return ret;
1297
+ },
1298
+ __wbg_new_from_slice_22da9388ac046e50: function(arg0, arg1) {
1299
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
1300
+ return ret;
1301
+ },
1302
+ __wbg_new_typed_aaaeaf29cf802876: function(arg0, arg1) {
1303
+ try {
1304
+ var state0 = {a: arg0, b: arg1};
1305
+ var cb0 = (arg0, arg1) => {
1306
+ const a = state0.a;
1307
+ state0.a = 0;
1308
+ try {
1309
+ return wasm_bindgen__convert__closures_____invoke__h40c8324309a93f8a(a, state0.b, arg0, arg1);
1310
+ } finally {
1311
+ state0.a = a;
1312
+ }
1313
+ };
1314
+ const ret = new Promise(cb0);
1315
+ return ret;
1316
+ } finally {
1317
+ state0.a = state0.b = 0;
1318
+ }
1319
+ },
1320
+ __wbg_new_typed_bccac67128ed885a: function() {
1321
+ const ret = new Array();
1322
+ return ret;
1323
+ },
1324
+ __wbg_new_with_byte_offset_and_length_b2ec5bf7b2f35743: function(arg0, arg1, arg2) {
1325
+ const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
1326
+ return ret;
1327
+ },
1328
+ __wbg_onSubmittedWorkDone_a33e32762de21b3d: function(arg0) {
1329
+ const ret = arg0.onSubmittedWorkDone();
1330
+ return ret;
1331
+ },
1332
+ __wbg_prototypesetcall_d62e5099504357e6: function(arg0, arg1, arg2) {
1333
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
1334
+ },
1335
+ __wbg_push_e87b0e732085a946: function(arg0, arg1) {
1336
+ const ret = arg0.push(arg1);
1337
+ return ret;
1338
+ },
1339
+ __wbg_querySelectorAll_ccbf0696a1c6fed8: function() { return handleError(function (arg0, arg1, arg2) {
1340
+ const ret = arg0.querySelectorAll(getStringFromWasm0(arg1, arg2));
1341
+ return ret;
1342
+ }, arguments); },
1343
+ __wbg_queueMicrotask_0c399741342fb10f: function(arg0) {
1344
+ const ret = arg0.queueMicrotask;
1345
+ return ret;
1346
+ },
1347
+ __wbg_queueMicrotask_a082d78ce798393e: function(arg0) {
1348
+ queueMicrotask(arg0);
1349
+ },
1350
+ __wbg_queue_451a2aa83c786578: function(arg0) {
1351
+ const ret = arg0.queue;
1352
+ return ret;
1353
+ },
1354
+ __wbg_requestAdapter_3cddf363b0bc9baf: function(arg0, arg1) {
1355
+ const ret = arg0.requestAdapter(arg1);
1356
+ return ret;
1357
+ },
1358
+ __wbg_requestDevice_7dd355306bacbcd8: function(arg0, arg1) {
1359
+ const ret = arg0.requestDevice(arg1);
1360
+ return ret;
1361
+ },
1362
+ __wbg_resolve_ae8d83246e5bcc12: function(arg0) {
1363
+ const ret = Promise.resolve(arg0);
1364
+ return ret;
1365
+ },
1366
+ __wbg_setBindGroup_24fcfe125e006dd4: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
1367
+ arg0.setBindGroup(arg1 >>> 0, arg2, getArrayU32FromWasm0(arg3, arg4), arg5, arg6 >>> 0);
1368
+ }, arguments); },
1369
+ __wbg_setBindGroup_3fecca142efa3bcf: function(arg0, arg1, arg2) {
1370
+ arg0.setBindGroup(arg1 >>> 0, arg2);
1371
+ },
1372
+ __wbg_setIndexBuffer_b194910ae0ffcbf4: function(arg0, arg1, arg2, arg3, arg4) {
1373
+ arg0.setIndexBuffer(arg1, __wbindgen_enum_GpuIndexFormat[arg2], arg3, arg4);
1374
+ },
1375
+ __wbg_setPipeline_fb3b65583e919c05: function(arg0, arg1) {
1376
+ arg0.setPipeline(arg1);
1377
+ },
1378
+ __wbg_setVertexBuffer_9e822995adc29ff7: function(arg0, arg1, arg2, arg3, arg4) {
1379
+ arg0.setVertexBuffer(arg1 >>> 0, arg2, arg3, arg4);
1380
+ },
1381
+ __wbg_set_7eaa4f96924fd6b3: function() { return handleError(function (arg0, arg1, arg2) {
1382
+ const ret = Reflect.set(arg0, arg1, arg2);
1383
+ return ret;
1384
+ }, arguments); },
1385
+ __wbg_set_a_c6ed845ffb46afcc: function(arg0, arg1) {
1386
+ arg0.a = arg1;
1387
+ },
1388
+ __wbg_set_access_9d39f60326d67278: function(arg0, arg1) {
1389
+ arg0.access = __wbindgen_enum_GpuStorageTextureAccess[arg1];
1390
+ },
1391
+ __wbg_set_address_mode_u_8c8aaf2ccebb3e8d: function(arg0, arg1) {
1392
+ arg0.addressModeU = __wbindgen_enum_GpuAddressMode[arg1];
1393
+ },
1394
+ __wbg_set_address_mode_v_252818714ab5937f: function(arg0, arg1) {
1395
+ arg0.addressModeV = __wbindgen_enum_GpuAddressMode[arg1];
1396
+ },
1397
+ __wbg_set_address_mode_w_d617929f92a5b8cc: function(arg0, arg1) {
1398
+ arg0.addressModeW = __wbindgen_enum_GpuAddressMode[arg1];
1399
+ },
1400
+ __wbg_set_alpha_a3317d40d97c514e: function(arg0, arg1) {
1401
+ arg0.alpha = arg1;
1402
+ },
1403
+ __wbg_set_alpha_mode_1ae7e0aa38a8eba8: function(arg0, arg1) {
1404
+ arg0.alphaMode = __wbindgen_enum_GpuCanvasAlphaMode[arg1];
1405
+ },
1406
+ __wbg_set_alpha_to_coverage_enabled_0c11d91caea2b92d: function(arg0, arg1) {
1407
+ arg0.alphaToCoverageEnabled = arg1 !== 0;
1408
+ },
1409
+ __wbg_set_array_layer_count_83a40d42f8858bba: function(arg0, arg1) {
1410
+ arg0.arrayLayerCount = arg1 >>> 0;
1411
+ },
1412
+ __wbg_set_array_stride_34be696a5e66eb16: function(arg0, arg1) {
1413
+ arg0.arrayStride = arg1;
1414
+ },
1415
+ __wbg_set_aspect_9d30d9ca40403001: function(arg0, arg1) {
1416
+ arg0.aspect = __wbindgen_enum_GpuTextureAspect[arg1];
1417
+ },
1418
+ __wbg_set_aspect_f231ddb55e5c30eb: function(arg0, arg1) {
1419
+ arg0.aspect = __wbindgen_enum_GpuTextureAspect[arg1];
1420
+ },
1421
+ __wbg_set_attributes_02005a0f12df5908: function(arg0, arg1) {
1422
+ arg0.attributes = arg1;
1423
+ },
1424
+ __wbg_set_b_f55b6a25fa56cccd: function(arg0, arg1) {
1425
+ arg0.b = arg1;
1426
+ },
1427
+ __wbg_set_base_array_layer_f8f8eb2d7bd5eb65: function(arg0, arg1) {
1428
+ arg0.baseArrayLayer = arg1 >>> 0;
1429
+ },
1430
+ __wbg_set_base_mip_level_41735f9b982a26b8: function(arg0, arg1) {
1431
+ arg0.baseMipLevel = arg1 >>> 0;
1432
+ },
1433
+ __wbg_set_beginning_of_pass_write_index_ff16e69caf566bee: function(arg0, arg1) {
1434
+ arg0.beginningOfPassWriteIndex = arg1 >>> 0;
1435
+ },
1436
+ __wbg_set_bind_group_layouts_ddc70fed7170a2ee: function(arg0, arg1) {
1437
+ arg0.bindGroupLayouts = arg1;
1438
+ },
1439
+ __wbg_set_binding_53105cd45cae6a03: function(arg0, arg1) {
1440
+ arg0.binding = arg1 >>> 0;
1441
+ },
1442
+ __wbg_set_binding_d82fdc5364e5b0c5: function(arg0, arg1) {
1443
+ arg0.binding = arg1 >>> 0;
1444
+ },
1445
+ __wbg_set_blend_00219e805977440c: function(arg0, arg1) {
1446
+ arg0.blend = arg1;
1447
+ },
1448
+ __wbg_set_buffer_0c946e9b46823a5c: function(arg0, arg1) {
1449
+ arg0.buffer = arg1;
1450
+ },
1451
+ __wbg_set_buffer_21a336fe62828e11: function(arg0, arg1) {
1452
+ arg0.buffer = arg1;
1453
+ },
1454
+ __wbg_set_buffers_070770ce2c0d5522: function(arg0, arg1) {
1455
+ arg0.buffers = arg1;
1456
+ },
1457
+ __wbg_set_bytes_per_row_8e39002b1f627e4d: function(arg0, arg1) {
1458
+ arg0.bytesPerRow = arg1 >>> 0;
1459
+ },
1460
+ __wbg_set_clear_value_4ed990a8b197a59a: function(arg0, arg1) {
1461
+ arg0.clearValue = arg1;
1462
+ },
1463
+ __wbg_set_code_7a3890c4ffd4f7d4: function(arg0, arg1, arg2) {
1464
+ arg0.code = getStringFromWasm0(arg1, arg2);
1465
+ },
1466
+ __wbg_set_color_85a6e64ea881593f: function(arg0, arg1) {
1467
+ arg0.color = arg1;
1468
+ },
1469
+ __wbg_set_color_attachments_88b752139b2e1a01: function(arg0, arg1) {
1470
+ arg0.colorAttachments = arg1;
1471
+ },
1472
+ __wbg_set_compare_494fcab2dc5d7792: function(arg0, arg1) {
1473
+ arg0.compare = __wbindgen_enum_GpuCompareFunction[arg1];
1474
+ },
1475
+ __wbg_set_compare_71e8ea844225b7cb: function(arg0, arg1) {
1476
+ arg0.compare = __wbindgen_enum_GpuCompareFunction[arg1];
1477
+ },
1478
+ __wbg_set_count_036a202e127d1828: function(arg0, arg1) {
1479
+ arg0.count = arg1 >>> 0;
1480
+ },
1481
+ __wbg_set_cull_mode_8c42221bd938897d: function(arg0, arg1) {
1482
+ arg0.cullMode = __wbindgen_enum_GpuCullMode[arg1];
1483
+ },
1484
+ __wbg_set_depth_bias_8de79219aa9d3e44: function(arg0, arg1) {
1485
+ arg0.depthBias = arg1;
1486
+ },
1487
+ __wbg_set_depth_bias_clamp_930cad73d46884cf: function(arg0, arg1) {
1488
+ arg0.depthBiasClamp = arg1;
1489
+ },
1490
+ __wbg_set_depth_bias_slope_scale_85d4c3f48c50408b: function(arg0, arg1) {
1491
+ arg0.depthBiasSlopeScale = arg1;
1492
+ },
1493
+ __wbg_set_depth_clear_value_ef40fa181859a36f: function(arg0, arg1) {
1494
+ arg0.depthClearValue = arg1;
1495
+ },
1496
+ __wbg_set_depth_compare_1273836af777aaa4: function(arg0, arg1) {
1497
+ arg0.depthCompare = __wbindgen_enum_GpuCompareFunction[arg1];
1498
+ },
1499
+ __wbg_set_depth_fail_op_424b14249d8983bf: function(arg0, arg1) {
1500
+ arg0.depthFailOp = __wbindgen_enum_GpuStencilOperation[arg1];
1501
+ },
1502
+ __wbg_set_depth_load_op_57a7381c934d435e: function(arg0, arg1) {
1503
+ arg0.depthLoadOp = __wbindgen_enum_GpuLoadOp[arg1];
1504
+ },
1505
+ __wbg_set_depth_or_array_layers_3601a844f36fa25f: function(arg0, arg1) {
1506
+ arg0.depthOrArrayLayers = arg1 >>> 0;
1507
+ },
1508
+ __wbg_set_depth_read_only_44e6668e5d98f75f: function(arg0, arg1) {
1509
+ arg0.depthReadOnly = arg1 !== 0;
1510
+ },
1511
+ __wbg_set_depth_stencil_5abb374ddd7f3268: function(arg0, arg1) {
1512
+ arg0.depthStencil = arg1;
1513
+ },
1514
+ __wbg_set_depth_stencil_attachment_eb9d08fc6e7a8fda: function(arg0, arg1) {
1515
+ arg0.depthStencilAttachment = arg1;
1516
+ },
1517
+ __wbg_set_depth_store_op_124f84da3afff2bd: function(arg0, arg1) {
1518
+ arg0.depthStoreOp = __wbindgen_enum_GpuStoreOp[arg1];
1519
+ },
1520
+ __wbg_set_depth_write_enabled_93d4e872c40ad885: function(arg0, arg1) {
1521
+ arg0.depthWriteEnabled = arg1 !== 0;
1522
+ },
1523
+ __wbg_set_device_7a51a7721914c23c: function(arg0, arg1) {
1524
+ arg0.device = arg1;
1525
+ },
1526
+ __wbg_set_dimension_9cfe90d02f664a7a: function(arg0, arg1) {
1527
+ arg0.dimension = __wbindgen_enum_GpuTextureDimension[arg1];
1528
+ },
1529
+ __wbg_set_dimension_b61b3c48adf487c1: function(arg0, arg1) {
1530
+ arg0.dimension = __wbindgen_enum_GpuTextureViewDimension[arg1];
1531
+ },
1532
+ __wbg_set_dst_factor_6cbfc3a6898cc9ce: function(arg0, arg1) {
1533
+ arg0.dstFactor = __wbindgen_enum_GpuBlendFactor[arg1];
1534
+ },
1535
+ __wbg_set_e80615d7a9a43981: function(arg0, arg1, arg2) {
1536
+ arg0.set(arg1, arg2 >>> 0);
1537
+ },
1538
+ __wbg_set_end_of_pass_write_index_41d72471cce1e061: function(arg0, arg1) {
1539
+ arg0.endOfPassWriteIndex = arg1 >>> 0;
1540
+ },
1541
+ __wbg_set_entries_0d3ea75764a89b83: function(arg0, arg1) {
1542
+ arg0.entries = arg1;
1543
+ },
1544
+ __wbg_set_entries_922ec6089646247e: function(arg0, arg1) {
1545
+ arg0.entries = arg1;
1546
+ },
1547
+ __wbg_set_entry_point_087ca8094ce666fd: function(arg0, arg1, arg2) {
1548
+ arg0.entryPoint = getStringFromWasm0(arg1, arg2);
1549
+ },
1550
+ __wbg_set_entry_point_d7efddda482bc7fe: function(arg0, arg1, arg2) {
1551
+ arg0.entryPoint = getStringFromWasm0(arg1, arg2);
1552
+ },
1553
+ __wbg_set_external_texture_41cadb0b9faf1919: function(arg0, arg1) {
1554
+ arg0.externalTexture = arg1;
1555
+ },
1556
+ __wbg_set_fail_op_9865183abff904e0: function(arg0, arg1) {
1557
+ arg0.failOp = __wbindgen_enum_GpuStencilOperation[arg1];
1558
+ },
1559
+ __wbg_set_format_09f304cdbee40626: function(arg0, arg1) {
1560
+ arg0.format = __wbindgen_enum_GpuTextureFormat[arg1];
1561
+ },
1562
+ __wbg_set_format_90502561f5c3fe92: function(arg0, arg1) {
1563
+ arg0.format = __wbindgen_enum_GpuTextureFormat[arg1];
1564
+ },
1565
+ __wbg_set_format_98f7ca48143feacb: function(arg0, arg1) {
1566
+ arg0.format = __wbindgen_enum_GpuTextureFormat[arg1];
1567
+ },
1568
+ __wbg_set_format_b111ffed7e227fef: function(arg0, arg1) {
1569
+ arg0.format = __wbindgen_enum_GpuTextureFormat[arg1];
1570
+ },
1571
+ __wbg_set_format_b3f26219150f6fcf: function(arg0, arg1) {
1572
+ arg0.format = __wbindgen_enum_GpuVertexFormat[arg1];
1573
+ },
1574
+ __wbg_set_format_dbb02ef2a1b11c73: function(arg0, arg1) {
1575
+ arg0.format = __wbindgen_enum_GpuTextureFormat[arg1];
1576
+ },
1577
+ __wbg_set_format_fd82439cf1e1f024: function(arg0, arg1) {
1578
+ arg0.format = __wbindgen_enum_GpuTextureFormat[arg1];
1579
+ },
1580
+ __wbg_set_fragment_4026e84121693413: function(arg0, arg1) {
1581
+ arg0.fragment = arg1;
1582
+ },
1583
+ __wbg_set_front_face_abcfb70c2001a63b: function(arg0, arg1) {
1584
+ arg0.frontFace = __wbindgen_enum_GpuFrontFace[arg1];
1585
+ },
1586
+ __wbg_set_g_3e49035507785f14: function(arg0, arg1) {
1587
+ arg0.g = arg1;
1588
+ },
1589
+ __wbg_set_has_dynamic_offset_ebc87f184bf9b1b6: function(arg0, arg1) {
1590
+ arg0.hasDynamicOffset = arg1 !== 0;
1591
+ },
1592
+ __wbg_set_height_5dc3bf5fd05f449d: function(arg0, arg1) {
1593
+ arg0.height = arg1 >>> 0;
1594
+ },
1595
+ __wbg_set_height_98a1a397672657e2: function(arg0, arg1) {
1596
+ arg0.height = arg1 >>> 0;
1597
+ },
1598
+ __wbg_set_height_b6548a01bdcb689a: function(arg0, arg1) {
1599
+ arg0.height = arg1 >>> 0;
1600
+ },
1601
+ __wbg_set_label_0ca1d80bd2825a5c: function(arg0, arg1, arg2) {
1602
+ arg0.label = getStringFromWasm0(arg1, arg2);
1603
+ },
1604
+ __wbg_set_label_15aeeb29a6954be8: function(arg0, arg1, arg2) {
1605
+ arg0.label = getStringFromWasm0(arg1, arg2);
1606
+ },
1607
+ __wbg_set_label_2f91d5326490d1cc: function(arg0, arg1, arg2) {
1608
+ arg0.label = getStringFromWasm0(arg1, arg2);
1609
+ },
1610
+ __wbg_set_label_355fa56959229d47: function(arg0, arg1, arg2) {
1611
+ arg0.label = getStringFromWasm0(arg1, arg2);
1612
+ },
1613
+ __wbg_set_label_565007795fa1b28b: function(arg0, arg1, arg2) {
1614
+ arg0.label = getStringFromWasm0(arg1, arg2);
1615
+ },
1616
+ __wbg_set_label_6b0d6041cd54c099: function(arg0, arg1, arg2) {
1617
+ arg0.label = getStringFromWasm0(arg1, arg2);
1618
+ },
1619
+ __wbg_set_label_76862276b026aadb: function(arg0, arg1, arg2) {
1620
+ arg0.label = getStringFromWasm0(arg1, arg2);
1621
+ },
1622
+ __wbg_set_label_776849dd514350e6: function(arg0, arg1, arg2) {
1623
+ arg0.label = getStringFromWasm0(arg1, arg2);
1624
+ },
1625
+ __wbg_set_label_7d273105ca29a945: function(arg0, arg1, arg2) {
1626
+ arg0.label = getStringFromWasm0(arg1, arg2);
1627
+ },
1628
+ __wbg_set_label_889010e958e191c9: function(arg0, arg1, arg2) {
1629
+ arg0.label = getStringFromWasm0(arg1, arg2);
1630
+ },
1631
+ __wbg_set_label_b80919003c66c761: function(arg0, arg1, arg2) {
1632
+ arg0.label = getStringFromWasm0(arg1, arg2);
1633
+ },
1634
+ __wbg_set_label_cbbe51e986da3989: function(arg0, arg1, arg2) {
1635
+ arg0.label = getStringFromWasm0(arg1, arg2);
1636
+ },
1637
+ __wbg_set_label_ccc4850f4197dc22: function(arg0, arg1, arg2) {
1638
+ arg0.label = getStringFromWasm0(arg1, arg2);
1639
+ },
1640
+ __wbg_set_layout_464ae8395c01fe6e: function(arg0, arg1) {
1641
+ arg0.layout = arg1;
1642
+ },
1643
+ __wbg_set_layout_b990b908a7810b31: function(arg0, arg1) {
1644
+ arg0.layout = arg1;
1645
+ },
1646
+ __wbg_set_load_op_5d3a8abceb4a5269: function(arg0, arg1) {
1647
+ arg0.loadOp = __wbindgen_enum_GpuLoadOp[arg1];
1648
+ },
1649
+ __wbg_set_lod_max_clamp_bf825cfbdd106655: function(arg0, arg1) {
1650
+ arg0.lodMaxClamp = arg1;
1651
+ },
1652
+ __wbg_set_lod_min_clamp_35ccf45d8ee31c7e: function(arg0, arg1) {
1653
+ arg0.lodMinClamp = arg1;
1654
+ },
1655
+ __wbg_set_mag_filter_8f8d84435d8db92a: function(arg0, arg1) {
1656
+ arg0.magFilter = __wbindgen_enum_GpuFilterMode[arg1];
1657
+ },
1658
+ __wbg_set_mapped_at_creation_ff06f7ed93a315dd: function(arg0, arg1) {
1659
+ arg0.mappedAtCreation = arg1 !== 0;
1660
+ },
1661
+ __wbg_set_mask_ad9d29606115a472: function(arg0, arg1) {
1662
+ arg0.mask = arg1 >>> 0;
1663
+ },
1664
+ __wbg_set_max_anisotropy_c82fc429f1b1e064: function(arg0, arg1) {
1665
+ arg0.maxAnisotropy = arg1;
1666
+ },
1667
+ __wbg_set_min_binding_size_746ae443396eb1f4: function(arg0, arg1) {
1668
+ arg0.minBindingSize = arg1;
1669
+ },
1670
+ __wbg_set_min_filter_fb0add0b126873ab: function(arg0, arg1) {
1671
+ arg0.minFilter = __wbindgen_enum_GpuFilterMode[arg1];
1672
+ },
1673
+ __wbg_set_mip_level_count_1d3d8f433adfb7ae: function(arg0, arg1) {
1674
+ arg0.mipLevelCount = arg1 >>> 0;
1675
+ },
1676
+ __wbg_set_mip_level_count_e13846330ea5c4a2: function(arg0, arg1) {
1677
+ arg0.mipLevelCount = arg1 >>> 0;
1678
+ },
1679
+ __wbg_set_mip_level_f4e04afe7e030b52: function(arg0, arg1) {
1680
+ arg0.mipLevel = arg1 >>> 0;
1681
+ },
1682
+ __wbg_set_mipmap_filter_202e81e75b49e109: function(arg0, arg1) {
1683
+ arg0.mipmapFilter = __wbindgen_enum_GpuMipmapFilterMode[arg1];
1684
+ },
1685
+ __wbg_set_module_6d0431faccebdcc4: function(arg0, arg1) {
1686
+ arg0.module = arg1;
1687
+ },
1688
+ __wbg_set_module_701adba2958bd873: function(arg0, arg1) {
1689
+ arg0.module = arg1;
1690
+ },
1691
+ __wbg_set_multisample_e577402263e48ad4: function(arg0, arg1) {
1692
+ arg0.multisample = arg1;
1693
+ },
1694
+ __wbg_set_multisampled_2180d2b5d246ae13: function(arg0, arg1) {
1695
+ arg0.multisampled = arg1 !== 0;
1696
+ },
1697
+ __wbg_set_offset_2d6ab375385cd2ae: function(arg0, arg1) {
1698
+ arg0.offset = arg1;
1699
+ },
1700
+ __wbg_set_offset_3fadbb3d3dadd4ef: function(arg0, arg1) {
1701
+ arg0.offset = arg1;
1702
+ },
1703
+ __wbg_set_offset_fa633343238c309f: function(arg0, arg1) {
1704
+ arg0.offset = arg1;
1705
+ },
1706
+ __wbg_set_operation_3a748fcc4d122201: function(arg0, arg1) {
1707
+ arg0.operation = __wbindgen_enum_GpuBlendOperation[arg1];
1708
+ },
1709
+ __wbg_set_origin_5531aa268ce97d9d: function(arg0, arg1) {
1710
+ arg0.origin = arg1;
1711
+ },
1712
+ __wbg_set_pass_op_e82189d4f2d5c48d: function(arg0, arg1) {
1713
+ arg0.passOp = __wbindgen_enum_GpuStencilOperation[arg1];
1714
+ },
1715
+ __wbg_set_power_preference_f8956c3fea27c41d: function(arg0, arg1) {
1716
+ arg0.powerPreference = __wbindgen_enum_GpuPowerPreference[arg1];
1717
+ },
1718
+ __wbg_set_primitive_65a118359b90be29: function(arg0, arg1) {
1719
+ arg0.primitive = arg1;
1720
+ },
1721
+ __wbg_set_query_set_17c4bef32f23bd7e: function(arg0, arg1) {
1722
+ arg0.querySet = arg1;
1723
+ },
1724
+ __wbg_set_r_399b4e4373534d2d: function(arg0, arg1) {
1725
+ arg0.r = arg1;
1726
+ },
1727
+ __wbg_set_required_features_83604ede3c9e0352: function(arg0, arg1) {
1728
+ arg0.requiredFeatures = arg1;
1729
+ },
1730
+ __wbg_set_resolve_target_1a8386ab8943f477: function(arg0, arg1) {
1731
+ arg0.resolveTarget = arg1;
1732
+ },
1733
+ __wbg_set_resource_ec6d0e1222a3141f: function(arg0, arg1) {
1734
+ arg0.resource = arg1;
1735
+ },
1736
+ __wbg_set_rows_per_image_e38e907b075d42a7: function(arg0, arg1) {
1737
+ arg0.rowsPerImage = arg1 >>> 0;
1738
+ },
1739
+ __wbg_set_sample_count_eb36fa5f0a856200: function(arg0, arg1) {
1740
+ arg0.sampleCount = arg1 >>> 0;
1741
+ },
1742
+ __wbg_set_sample_type_fade9fb214ec1d74: function(arg0, arg1) {
1743
+ arg0.sampleType = __wbindgen_enum_GpuTextureSampleType[arg1];
1744
+ },
1745
+ __wbg_set_sampler_e11b32a88597fe6a: function(arg0, arg1) {
1746
+ arg0.sampler = arg1;
1747
+ },
1748
+ __wbg_set_shader_location_87fe60eb5cf2ef69: function(arg0, arg1) {
1749
+ arg0.shaderLocation = arg1 >>> 0;
1750
+ },
1751
+ __wbg_set_size_724b776b74138f07: function(arg0, arg1) {
1752
+ arg0.size = arg1;
1753
+ },
1754
+ __wbg_set_size_a15931d6b21f35f9: function(arg0, arg1) {
1755
+ arg0.size = arg1;
1756
+ },
1757
+ __wbg_set_size_e76794a3069a90d7: function(arg0, arg1) {
1758
+ arg0.size = arg1;
1759
+ },
1760
+ __wbg_set_src_factor_00c2d54742fd17a4: function(arg0, arg1) {
1761
+ arg0.srcFactor = __wbindgen_enum_GpuBlendFactor[arg1];
1762
+ },
1763
+ __wbg_set_stencil_back_9ee211b35e39be71: function(arg0, arg1) {
1764
+ arg0.stencilBack = arg1;
1765
+ },
1766
+ __wbg_set_stencil_clear_value_884e0e38f410ec12: function(arg0, arg1) {
1767
+ arg0.stencilClearValue = arg1 >>> 0;
1768
+ },
1769
+ __wbg_set_stencil_front_4fc7b9162e3cc71f: function(arg0, arg1) {
1770
+ arg0.stencilFront = arg1;
1771
+ },
1772
+ __wbg_set_stencil_load_op_eeb37a3ee387626f: function(arg0, arg1) {
1773
+ arg0.stencilLoadOp = __wbindgen_enum_GpuLoadOp[arg1];
1774
+ },
1775
+ __wbg_set_stencil_read_mask_52264a1876326ce1: function(arg0, arg1) {
1776
+ arg0.stencilReadMask = arg1 >>> 0;
1777
+ },
1778
+ __wbg_set_stencil_read_only_192e9b65a6822039: function(arg0, arg1) {
1779
+ arg0.stencilReadOnly = arg1 !== 0;
1780
+ },
1781
+ __wbg_set_stencil_store_op_c110d1172a277982: function(arg0, arg1) {
1782
+ arg0.stencilStoreOp = __wbindgen_enum_GpuStoreOp[arg1];
1783
+ },
1784
+ __wbg_set_stencil_write_mask_5e49d555c45a16fa: function(arg0, arg1) {
1785
+ arg0.stencilWriteMask = arg1 >>> 0;
1786
+ },
1787
+ __wbg_set_step_mode_80a80308a6783be4: function(arg0, arg1) {
1788
+ arg0.stepMode = __wbindgen_enum_GpuVertexStepMode[arg1];
1789
+ },
1790
+ __wbg_set_storage_texture_dab6c69662cecb15: function(arg0, arg1) {
1791
+ arg0.storageTexture = arg1;
1792
+ },
1793
+ __wbg_set_store_op_2bf481ef4a30f927: function(arg0, arg1) {
1794
+ arg0.storeOp = __wbindgen_enum_GpuStoreOp[arg1];
1795
+ },
1796
+ __wbg_set_strip_index_format_ab81420028504e38: function(arg0, arg1) {
1797
+ arg0.stripIndexFormat = __wbindgen_enum_GpuIndexFormat[arg1];
1798
+ },
1799
+ __wbg_set_targets_f00488491d26619c: function(arg0, arg1) {
1800
+ arg0.targets = arg1;
1801
+ },
1802
+ __wbg_set_texture_8732ea1b0f00cc28: function(arg0, arg1) {
1803
+ arg0.texture = arg1;
1804
+ },
1805
+ __wbg_set_texture_e3dad6e696ee0d00: function(arg0, arg1) {
1806
+ arg0.texture = arg1;
1807
+ },
1808
+ __wbg_set_timestamp_writes_0e233b1252b29a60: function(arg0, arg1) {
1809
+ arg0.timestampWrites = arg1;
1810
+ },
1811
+ __wbg_set_topology_774e967bf9bd3600: function(arg0, arg1) {
1812
+ arg0.topology = __wbindgen_enum_GpuPrimitiveTopology[arg1];
1813
+ },
1814
+ __wbg_set_type_3e89072317fa3a02: function(arg0, arg1) {
1815
+ arg0.type = __wbindgen_enum_GpuSamplerBindingType[arg1];
1816
+ },
1817
+ __wbg_set_type_fc5fb8ab00ac41ab: function(arg0, arg1) {
1818
+ arg0.type = __wbindgen_enum_GpuBufferBindingType[arg1];
1819
+ },
1820
+ __wbg_set_unclipped_depth_bbe4b97da619705e: function(arg0, arg1) {
1821
+ arg0.unclippedDepth = arg1 !== 0;
1822
+ },
1823
+ __wbg_set_usage_215da50f99ff465b: function(arg0, arg1) {
1824
+ arg0.usage = arg1 >>> 0;
1825
+ },
1826
+ __wbg_set_usage_5fcdce4860170c24: function(arg0, arg1) {
1827
+ arg0.usage = arg1 >>> 0;
1828
+ },
1829
+ __wbg_set_usage_e78977f1ef3c2dc4: function(arg0, arg1) {
1830
+ arg0.usage = arg1 >>> 0;
1831
+ },
1832
+ __wbg_set_usage_ece80ba45b896722: function(arg0, arg1) {
1833
+ arg0.usage = arg1 >>> 0;
1834
+ },
1835
+ __wbg_set_vertex_879729b1ef5390a2: function(arg0, arg1) {
1836
+ arg0.vertex = arg1;
1837
+ },
1838
+ __wbg_set_view_9850fe7aa8b4eae3: function(arg0, arg1) {
1839
+ arg0.view = arg1;
1840
+ },
1841
+ __wbg_set_view_b8a1c6698b913d81: function(arg0, arg1) {
1842
+ arg0.view = arg1;
1843
+ },
1844
+ __wbg_set_view_dimension_5c6c0dc0d28476c3: function(arg0, arg1) {
1845
+ arg0.viewDimension = __wbindgen_enum_GpuTextureViewDimension[arg1];
1846
+ },
1847
+ __wbg_set_view_dimension_67ac13d87840ccb1: function(arg0, arg1) {
1848
+ arg0.viewDimension = __wbindgen_enum_GpuTextureViewDimension[arg1];
1849
+ },
1850
+ __wbg_set_view_formats_2b4e75efe5453ad6: function(arg0, arg1) {
1851
+ arg0.viewFormats = arg1;
1852
+ },
1853
+ __wbg_set_view_formats_6c5369e801fa17b7: function(arg0, arg1) {
1854
+ arg0.viewFormats = arg1;
1855
+ },
1856
+ __wbg_set_visibility_22877d2819bea70b: function(arg0, arg1) {
1857
+ arg0.visibility = arg1 >>> 0;
1858
+ },
1859
+ __wbg_set_width_576343a4a7f2cf28: function(arg0, arg1) {
1860
+ arg0.width = arg1 >>> 0;
1861
+ },
1862
+ __wbg_set_width_a6d5409d7980ccca: function(arg0, arg1) {
1863
+ arg0.width = arg1 >>> 0;
1864
+ },
1865
+ __wbg_set_width_c0fcaa2da53cd540: function(arg0, arg1) {
1866
+ arg0.width = arg1 >>> 0;
1867
+ },
1868
+ __wbg_set_write_mask_dceb6456d5310b39: function(arg0, arg1) {
1869
+ arg0.writeMask = arg1 >>> 0;
1870
+ },
1871
+ __wbg_set_x_40188fe21190a1a8: function(arg0, arg1) {
1872
+ arg0.x = arg1 >>> 0;
1873
+ },
1874
+ __wbg_set_y_8caca94aad6cb4e8: function(arg0, arg1) {
1875
+ arg0.y = arg1 >>> 0;
1876
+ },
1877
+ __wbg_set_z_bb89b8ff0b9f8f74: function(arg0, arg1) {
1878
+ arg0.z = arg1 >>> 0;
1879
+ },
1880
+ __wbg_static_accessor_GLOBAL_8adb955bd33fac2f: function() {
1881
+ const ret = typeof global === 'undefined' ? null : global;
1882
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1883
+ },
1884
+ __wbg_static_accessor_GLOBAL_THIS_ad356e0db91c7913: function() {
1885
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
1886
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1887
+ },
1888
+ __wbg_static_accessor_SELF_f207c857566db248: function() {
1889
+ const ret = typeof self === 'undefined' ? null : self;
1890
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1891
+ },
1892
+ __wbg_static_accessor_WINDOW_bb9f1ba69d61b386: function() {
1893
+ const ret = typeof window === 'undefined' ? null : window;
1894
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1895
+ },
1896
+ __wbg_submit_19b0e21319bc36d7: function(arg0, arg1) {
1897
+ arg0.submit(arg1);
1898
+ },
1899
+ __wbg_then_098abe61755d12f6: function(arg0, arg1) {
1900
+ const ret = arg0.then(arg1);
1901
+ return ret;
1902
+ },
1903
+ __wbg_then_9e335f6dd892bc11: function(arg0, arg1, arg2) {
1904
+ const ret = arg0.then(arg1, arg2);
1905
+ return ret;
1906
+ },
1907
+ __wbg_then_bc59d1943397ca4e: function(arg0, arg1, arg2) {
1908
+ const ret = arg0.then(arg1, arg2);
1909
+ return ret;
1910
+ },
1911
+ __wbg_unmap_c2954ef341a2b85d: function(arg0) {
1912
+ arg0.unmap();
1913
+ },
1914
+ __wbg_wasmgame_new: function(arg0) {
1915
+ const ret = WasmGame.__wrap(arg0);
1916
+ return ret;
1917
+ },
1918
+ __wbg_writeBuffer_1fa3becf9f9f970e: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
1919
+ arg0.writeBuffer(arg1, arg2, arg3, arg4, arg5);
1920
+ }, arguments); },
1921
+ __wbg_writeTexture_16d44079bcc6b839: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1922
+ arg0.writeTexture(arg1, arg2, arg3, arg4);
1923
+ }, arguments); },
1924
+ __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1925
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 64, function: Function { arguments: [Externref], shim_idx: 65, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1926
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h34b32f47e9536ad7, wasm_bindgen__convert__closures_____invoke__h8b43903f8a91b24f);
1927
+ return ret;
1928
+ },
1929
+ __wbindgen_cast_0000000000000002: function(arg0, arg1) {
1930
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 769, function: Function { arguments: [Externref], shim_idx: 770, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1931
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hb7ee5c5d3fd608d4, wasm_bindgen__convert__closures_____invoke__h6c9ef6970fdda1f4);
1932
+ return ret;
1933
+ },
1934
+ __wbindgen_cast_0000000000000003: function(arg0) {
1935
+ // Cast intrinsic for `F64 -> Externref`.
1936
+ const ret = arg0;
1937
+ return ret;
1938
+ },
1939
+ __wbindgen_cast_0000000000000004: function(arg0, arg1) {
1940
+ // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
1941
+ const ret = getArrayU8FromWasm0(arg0, arg1);
1942
+ return ret;
1943
+ },
1944
+ __wbindgen_cast_0000000000000005: function(arg0, arg1) {
1945
+ // Cast intrinsic for `Ref(String) -> Externref`.
1946
+ const ret = getStringFromWasm0(arg0, arg1);
1947
+ return ret;
1948
+ },
1949
+ __wbindgen_init_externref_table: function() {
1950
+ const table = wasm.__wbindgen_externrefs;
1951
+ const offset = table.grow(4);
1952
+ table.set(0, undefined);
1953
+ table.set(offset + 0, undefined);
1954
+ table.set(offset + 1, null);
1955
+ table.set(offset + 2, true);
1956
+ table.set(offset + 3, false);
1957
+ },
1958
+ };
1959
+ return {
1960
+ __proto__: null,
1961
+ "./goud_engine_bg.js": import0,
1210
1962
  };
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;
1963
+ }
1964
+
1965
+ function wasm_bindgen__convert__closures_____invoke__h8b43903f8a91b24f(arg0, arg1, arg2) {
1966
+ wasm.wasm_bindgen__convert__closures_____invoke__h8b43903f8a91b24f(arg0, arg1, arg2);
1967
+ }
1968
+
1969
+ function wasm_bindgen__convert__closures_____invoke__h6c9ef6970fdda1f4(arg0, arg1, arg2) {
1970
+ const ret = wasm.wasm_bindgen__convert__closures_____invoke__h6c9ef6970fdda1f4(arg0, arg1, arg2);
1971
+ if (ret[1]) {
1972
+ throw takeFromExternrefTable0(ret[0]);
1973
+ }
1974
+ }
1975
+
1976
+ function wasm_bindgen__convert__closures_____invoke__h40c8324309a93f8a(arg0, arg1, arg2, arg3) {
1977
+ wasm.wasm_bindgen__convert__closures_____invoke__h40c8324309a93f8a(arg0, arg1, arg2, arg3);
1978
+ }
1979
+
1980
+
1981
+ const __wbindgen_enum_GpuAddressMode = ["clamp-to-edge", "repeat", "mirror-repeat"];
1982
+
1983
+
1984
+ 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"];
1985
+
1986
+
1987
+ const __wbindgen_enum_GpuBlendOperation = ["add", "subtract", "reverse-subtract", "min", "max"];
1988
+
1989
+
1990
+ const __wbindgen_enum_GpuBufferBindingType = ["uniform", "storage", "read-only-storage"];
1991
+
1992
+
1993
+ const __wbindgen_enum_GpuCanvasAlphaMode = ["opaque", "premultiplied"];
1994
+
1995
+
1996
+ const __wbindgen_enum_GpuCompareFunction = ["never", "less", "equal", "less-equal", "greater", "not-equal", "greater-equal", "always"];
1997
+
1998
+
1999
+ const __wbindgen_enum_GpuCullMode = ["none", "front", "back"];
2000
+
2001
+
2002
+ const __wbindgen_enum_GpuFilterMode = ["nearest", "linear"];
2003
+
2004
+
2005
+ const __wbindgen_enum_GpuFrontFace = ["ccw", "cw"];
2006
+
2007
+
2008
+ const __wbindgen_enum_GpuIndexFormat = ["uint16", "uint32"];
2009
+
2010
+
2011
+ const __wbindgen_enum_GpuLoadOp = ["load", "clear"];
2012
+
2013
+
2014
+ const __wbindgen_enum_GpuMipmapFilterMode = ["nearest", "linear"];
2015
+
2016
+
2017
+ const __wbindgen_enum_GpuPowerPreference = ["low-power", "high-performance"];
2018
+
2019
+
2020
+ const __wbindgen_enum_GpuPrimitiveTopology = ["point-list", "line-list", "line-strip", "triangle-list", "triangle-strip"];
2021
+
2022
+
2023
+ const __wbindgen_enum_GpuSamplerBindingType = ["filtering", "non-filtering", "comparison"];
2024
+
2025
+
2026
+ const __wbindgen_enum_GpuStencilOperation = ["keep", "zero", "replace", "invert", "increment-clamp", "decrement-clamp", "increment-wrap", "decrement-wrap"];
2027
+
2028
+
2029
+ const __wbindgen_enum_GpuStorageTextureAccess = ["write-only", "read-only", "read-write"];
2030
+
2031
+
2032
+ const __wbindgen_enum_GpuStoreOp = ["store", "discard"];
2033
+
2034
+
2035
+ const __wbindgen_enum_GpuTextureAspect = ["all", "stencil-only", "depth-only"];
2036
+
2037
+
2038
+ const __wbindgen_enum_GpuTextureDimension = ["1d", "2d", "3d"];
2039
+
2040
+
2041
+ 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"];
2042
+
2043
+
2044
+ const __wbindgen_enum_GpuTextureSampleType = ["float", "unfilterable-float", "depth", "sint", "uint"];
2045
+
2046
+
2047
+ const __wbindgen_enum_GpuTextureViewDimension = ["1d", "2d", "2d-array", "cube", "cube-array", "3d"];
2048
+
2049
+
2050
+ 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"];
2051
+
2052
+
2053
+ const __wbindgen_enum_GpuVertexStepMode = ["vertex", "instance"];
2054
+ const WasmContactFinalization = (typeof FinalizationRegistry === 'undefined')
2055
+ ? { register: () => {}, unregister: () => {} }
2056
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmcontact_free(ptr >>> 0, 1));
2057
+ const WasmGameFinalization = (typeof FinalizationRegistry === 'undefined')
2058
+ ? { register: () => {}, unregister: () => {} }
2059
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmgame_free(ptr >>> 0, 1));
2060
+ const WasmRenderStatsFinalization = (typeof FinalizationRegistry === 'undefined')
2061
+ ? { register: () => {}, unregister: () => {} }
2062
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmrenderstats_free(ptr >>> 0, 1));
2063
+ const WasmSpriteFinalization = (typeof FinalizationRegistry === 'undefined')
2064
+ ? { register: () => {}, unregister: () => {} }
2065
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmsprite_free(ptr >>> 0, 1));
2066
+ const WasmTransform2DFinalization = (typeof FinalizationRegistry === 'undefined')
2067
+ ? { register: () => {}, unregister: () => {} }
2068
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmtransform2d_free(ptr >>> 0, 1));
2069
+
2070
+ function addToExternrefTable0(obj) {
2071
+ const idx = wasm.__externref_table_alloc();
2072
+ wasm.__wbindgen_externrefs.set(idx, obj);
2073
+ return idx;
2074
+ }
2075
+
2076
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
2077
+ ? { register: () => {}, unregister: () => {} }
2078
+ : new FinalizationRegistry(state => state.dtor(state.a, state.b));
2079
+
2080
+ function debugString(val) {
2081
+ // primitive types
2082
+ const type = typeof val;
2083
+ if (type == 'number' || type == 'boolean' || val == null) {
2084
+ return `${val}`;
2085
+ }
2086
+ if (type == 'string') {
2087
+ return `"${val}"`;
2088
+ }
2089
+ if (type == 'symbol') {
2090
+ const description = val.description;
2091
+ if (description == null) {
2092
+ return 'Symbol';
2093
+ } else {
2094
+ return `Symbol(${description})`;
2095
+ }
2096
+ }
2097
+ if (type == 'function') {
2098
+ const name = val.name;
2099
+ if (typeof name == 'string' && name.length > 0) {
2100
+ return `Function(${name})`;
2101
+ } else {
2102
+ return 'Function';
2103
+ }
2104
+ }
2105
+ // objects
2106
+ if (Array.isArray(val)) {
2107
+ const length = val.length;
2108
+ let debug = '[';
2109
+ if (length > 0) {
2110
+ debug += debugString(val[0]);
2111
+ }
2112
+ for(let i = 1; i < length; i++) {
2113
+ debug += ', ' + debugString(val[i]);
2114
+ }
2115
+ debug += ']';
2116
+ return debug;
2117
+ }
2118
+ // Test for built-in
2119
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
2120
+ let className;
2121
+ if (builtInMatches && builtInMatches.length > 1) {
2122
+ className = builtInMatches[1];
2123
+ } else {
2124
+ // Failed to match the standard '[object ClassName]'
2125
+ return toString.call(val);
2126
+ }
2127
+ if (className == 'Object') {
2128
+ // we're a user defined class or Object
2129
+ // JSON.stringify avoids problems with cycles, and is generally much
2130
+ // easier than looping through ownProperties of `val`.
2131
+ try {
2132
+ return 'Object(' + JSON.stringify(val) + ')';
2133
+ } catch (_) {
2134
+ return 'Object';
2135
+ }
2136
+ }
2137
+ // errors
2138
+ if (val instanceof Error) {
2139
+ return `${val.name}: ${val.message}\n${val.stack}`;
2140
+ }
2141
+ // TODO we could test for more things here, like `Set`s and `Map`s.
2142
+ return className;
2143
+ }
2144
+
2145
+ function getArrayU32FromWasm0(ptr, len) {
2146
+ ptr = ptr >>> 0;
2147
+ return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
2148
+ }
2149
+
2150
+ function getArrayU64FromWasm0(ptr, len) {
2151
+ ptr = ptr >>> 0;
2152
+ return getBigUint64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
2153
+ }
2154
+
2155
+ function getArrayU8FromWasm0(ptr, len) {
2156
+ ptr = ptr >>> 0;
2157
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
2158
+ }
2159
+
2160
+ let cachedBigUint64ArrayMemory0 = null;
2161
+ function getBigUint64ArrayMemory0() {
2162
+ if (cachedBigUint64ArrayMemory0 === null || cachedBigUint64ArrayMemory0.byteLength === 0) {
2163
+ cachedBigUint64ArrayMemory0 = new BigUint64Array(wasm.memory.buffer);
2164
+ }
2165
+ return cachedBigUint64ArrayMemory0;
2166
+ }
2167
+
2168
+ let cachedDataViewMemory0 = null;
2169
+ function getDataViewMemory0() {
2170
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
2171
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
2172
+ }
2173
+ return cachedDataViewMemory0;
2174
+ }
2175
+
2176
+ function getStringFromWasm0(ptr, len) {
2177
+ ptr = ptr >>> 0;
2178
+ return decodeText(ptr, len);
2179
+ }
2180
+
2181
+ let cachedUint32ArrayMemory0 = null;
2182
+ function getUint32ArrayMemory0() {
2183
+ if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
2184
+ cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
2185
+ }
2186
+ return cachedUint32ArrayMemory0;
2187
+ }
2188
+
2189
+ let cachedUint8ArrayMemory0 = null;
2190
+ function getUint8ArrayMemory0() {
2191
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
2192
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
2193
+ }
2194
+ return cachedUint8ArrayMemory0;
2195
+ }
2196
+
2197
+ function handleError(f, args) {
2198
+ try {
2199
+ return f.apply(this, args);
2200
+ } catch (e) {
2201
+ const idx = addToExternrefTable0(e);
2202
+ wasm.__wbindgen_exn_store(idx);
2203
+ }
2204
+ }
2205
+
2206
+ function isLikeNone(x) {
2207
+ return x === undefined || x === null;
2208
+ }
2209
+
2210
+ function makeMutClosure(arg0, arg1, dtor, f) {
2211
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
2212
+ const real = (...args) => {
2213
+
2214
+ // First up with a closure we increment the internal reference
2215
+ // count. This ensures that the Rust closure environment won't
2216
+ // be deallocated while we're invoking it.
2217
+ state.cnt++;
2218
+ const a = state.a;
2219
+ state.a = 0;
2220
+ try {
2221
+ return f(a, state.b, ...args);
2222
+ } finally {
2223
+ state.a = a;
2224
+ real._wbg_cb_unref();
2225
+ }
1715
2226
  };
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);
2227
+ real._wbg_cb_unref = () => {
2228
+ if (--state.cnt === 0) {
2229
+ state.dtor(state.a, state.b);
2230
+ state.a = 0;
2231
+ CLOSURE_DTORS.unregister(state);
2232
+ }
1724
2233
  };
2234
+ CLOSURE_DTORS.register(real, state, state);
2235
+ return real;
2236
+ }
2237
+
2238
+ function passArray64ToWasm0(arg, malloc) {
2239
+ const ptr = malloc(arg.length * 8, 8) >>> 0;
2240
+ getBigUint64ArrayMemory0().set(arg, ptr / 8);
2241
+ WASM_VECTOR_LEN = arg.length;
2242
+ return ptr;
2243
+ }
2244
+
2245
+ function passArray8ToWasm0(arg, malloc) {
2246
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
2247
+ getUint8ArrayMemory0().set(arg, ptr / 1);
2248
+ WASM_VECTOR_LEN = arg.length;
2249
+ return ptr;
2250
+ }
2251
+
2252
+ function passStringToWasm0(arg, malloc, realloc) {
2253
+ if (realloc === undefined) {
2254
+ const buf = cachedTextEncoder.encode(arg);
2255
+ const ptr = malloc(buf.length, 1) >>> 0;
2256
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
2257
+ WASM_VECTOR_LEN = buf.length;
2258
+ return ptr;
2259
+ }
2260
+
2261
+ let len = arg.length;
2262
+ let ptr = malloc(len, 1) >>> 0;
2263
+
2264
+ const mem = getUint8ArrayMemory0();
2265
+
2266
+ let offset = 0;
2267
+
2268
+ for (; offset < len; offset++) {
2269
+ const code = arg.charCodeAt(offset);
2270
+ if (code > 0x7F) break;
2271
+ mem[ptr + offset] = code;
2272
+ }
2273
+ if (offset !== len) {
2274
+ if (offset !== 0) {
2275
+ arg = arg.slice(offset);
2276
+ }
2277
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
2278
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
2279
+ const ret = cachedTextEncoder.encodeInto(arg, view);
2280
+
2281
+ offset += ret.written;
2282
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
2283
+ }
1725
2284
 
1726
- return imports;
2285
+ WASM_VECTOR_LEN = offset;
2286
+ return ptr;
2287
+ }
2288
+
2289
+ function takeFromExternrefTable0(idx) {
2290
+ const value = wasm.__wbindgen_externrefs.get(idx);
2291
+ wasm.__externref_table_dealloc(idx);
2292
+ return value;
2293
+ }
2294
+
2295
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
2296
+ cachedTextDecoder.decode();
2297
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
2298
+ let numBytesDecoded = 0;
2299
+ function decodeText(ptr, len) {
2300
+ numBytesDecoded += len;
2301
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
2302
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
2303
+ cachedTextDecoder.decode();
2304
+ numBytesDecoded = len;
2305
+ }
2306
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
2307
+ }
2308
+
2309
+ const cachedTextEncoder = new TextEncoder();
2310
+
2311
+ if (!('encodeInto' in cachedTextEncoder)) {
2312
+ cachedTextEncoder.encodeInto = function (arg, view) {
2313
+ const buf = cachedTextEncoder.encode(arg);
2314
+ view.set(buf);
2315
+ return {
2316
+ read: arg.length,
2317
+ written: buf.length
2318
+ };
2319
+ };
1727
2320
  }
1728
2321
 
2322
+ let WASM_VECTOR_LEN = 0;
2323
+
2324
+ let wasmModule, wasm;
1729
2325
  function __wbg_finalize_init(instance, module) {
1730
2326
  wasm = instance.exports;
1731
- __wbg_init.__wbindgen_wasm_module = module;
2327
+ wasmModule = module;
1732
2328
  cachedBigUint64ArrayMemory0 = null;
1733
2329
  cachedDataViewMemory0 = null;
1734
2330
  cachedUint32ArrayMemory0 = null;
1735
2331
  cachedUint8ArrayMemory0 = null;
1736
-
1737
-
1738
2332
  wasm.__wbindgen_start();
1739
2333
  return wasm;
1740
2334
  }
1741
2335
 
2336
+ async function __wbg_load(module, imports) {
2337
+ if (typeof Response === 'function' && module instanceof Response) {
2338
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
2339
+ try {
2340
+ return await WebAssembly.instantiateStreaming(module, imports);
2341
+ } catch (e) {
2342
+ const validResponse = module.ok && expectedResponseType(module.type);
2343
+
2344
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
2345
+ 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);
2346
+
2347
+ } else { throw e; }
2348
+ }
2349
+ }
2350
+
2351
+ const bytes = await module.arrayBuffer();
2352
+ return await WebAssembly.instantiate(bytes, imports);
2353
+ } else {
2354
+ const instance = await WebAssembly.instantiate(module, imports);
2355
+
2356
+ if (instance instanceof WebAssembly.Instance) {
2357
+ return { instance, module };
2358
+ } else {
2359
+ return instance;
2360
+ }
2361
+ }
2362
+
2363
+ function expectedResponseType(type) {
2364
+ switch (type) {
2365
+ case 'basic': case 'cors': case 'default': return true;
2366
+ }
2367
+ return false;
2368
+ }
2369
+ }
2370
+
1742
2371
  function initSync(module) {
1743
2372
  if (wasm !== undefined) return wasm;
1744
2373
 
1745
2374
 
1746
- if (typeof module !== 'undefined') {
2375
+ if (module !== undefined) {
1747
2376
  if (Object.getPrototypeOf(module) === Object.prototype) {
1748
2377
  ({module} = module)
1749
2378
  } else {
@@ -1763,7 +2392,7 @@ async function __wbg_init(module_or_path) {
1763
2392
  if (wasm !== undefined) return wasm;
1764
2393
 
1765
2394
 
1766
- if (typeof module_or_path !== 'undefined') {
2395
+ if (module_or_path !== undefined) {
1767
2396
  if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
1768
2397
  ({module_or_path} = module_or_path)
1769
2398
  } else {
@@ -1771,7 +2400,7 @@ async function __wbg_init(module_or_path) {
1771
2400
  }
1772
2401
  }
1773
2402
 
1774
- if (typeof module_or_path === 'undefined') {
2403
+ if (module_or_path === undefined) {
1775
2404
  module_or_path = new URL('goud_engine_bg.wasm', import.meta.url);
1776
2405
  }
1777
2406
  const imports = __wbg_get_imports();
@@ -1785,5 +2414,4 @@ async function __wbg_init(module_or_path) {
1785
2414
  return __wbg_finalize_init(instance, module);
1786
2415
  }
1787
2416
 
1788
- export { initSync };
1789
- export default __wbg_init;
2417
+ export { initSync, __wbg_init as default };