@kuncat/avoidant 0.2.0 → 0.2.1

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.
@@ -10,8 +10,8 @@
10
10
  type MapShape,
11
11
  } from "../wasm/avoidant_wasm";
12
12
  import { Canvas, T } from "@threlte/core";
13
- import { OrbitControls } from "@threlte/extras";
14
- import { MOUSE, TOUCH, WebGLRenderer } from "three";
13
+ import MapControls from "./MapControls.svelte";
14
+ import { WebGLRenderer } from "three";
15
15
  import Board from "./board.svelte";
16
16
  import { m } from "../paraglide/messages";
17
17
  import { getLocale, locales, setLocale } from "../paraglide/runtime";
@@ -405,6 +405,8 @@
405
405
  ];
406
406
 
407
407
  async function startGame() {
408
+ if (status) return;
409
+ let nextGameState: GameState | undefined;
408
410
  try {
409
411
  const relayUrls = parseRelayServersInput($state.snapshot(relayServersInput));
410
412
  const options: GameOptions = {
@@ -418,10 +420,13 @@
418
420
  voidFraction: $state.snapshot(voidFractionInput),
419
421
  };
420
422
  status = m.status_generating_map();
421
- isFlatMap = options.shape?.kind === "flat";
422
- gameState = new GameState(options);
423
+ setupMode = undefined;
423
424
  const generated = await generateMap(options);
424
- gameState.applyMapCells(generated.cells);
425
+ nextGameState = new GameState(options);
426
+ nextGameState.applyMapCells(generated.cells);
427
+ // Publish only a complete map: mounting an empty game while old terrain
428
+ // remains makes the board look up terrain indices in an empty cell list.
429
+ isFlatMap = options.shape?.kind === "flat";
425
430
  terrain = generated.terrain;
426
431
  surfaceArea = generated.surfaceArea;
427
432
  boundsRadius = generated.boundsRadius;
@@ -429,7 +434,9 @@
429
434
  exploredCellsSeen = new SvelteSet<number>();
430
435
  pendingTutorialClick = undefined;
431
436
  tutorial = isTutorialMode ? new TutorialState() : undefined;
437
+ gameState = nextGameState;
432
438
  } catch (error) {
439
+ nextGameState?.free();
433
440
  console.error("Failed to start game", error);
434
441
  } finally {
435
442
  setupMode = undefined;
@@ -512,6 +519,9 @@
512
519
  console.error("Failed to release game state", error);
513
520
  }
514
521
  gameState = undefined;
522
+ terrain = undefined;
523
+ surfaceArea = 0;
524
+ boundsRadius = DEFAULT_RADIUS;
515
525
  setupMode = undefined;
516
526
  inviteTicket = "";
517
527
  ticketInput = "";
@@ -679,7 +689,7 @@
679
689
  <p class="mt-2 text-sm text-slate-600!">{status}</p>
680
690
  {/if}
681
691
 
682
- {#if !gameState}
692
+ {#if !gameState && !status}
683
693
  {#if setupMode === "host"}
684
694
  <form
685
695
  class="mt-4 w-full"
@@ -996,14 +1006,7 @@
996
1006
  if (tutorial) pendingTutorialClick = cellIndex;
997
1007
  }}
998
1008
  />
999
- <OrbitControls
1000
- enablePan={true}
1001
- enableZoom={true}
1002
- enableRotate={true}
1003
- mouseButtons={{ LEFT: MOUSE.PAN, MIDDLE: MOUSE.DOLLY, RIGHT: MOUSE.ROTATE }}
1004
- target={[0, 0, 0]}
1005
- touches={{ ONE: TOUCH.PAN, TWO: TOUCH.DOLLY_ROTATE }}
1006
- />
1009
+ <MapControls flat={isFlatMap} radius={boundsRadius} />
1007
1010
  </Canvas>
1008
1011
  </div>
1009
1012
  {/if}
@@ -0,0 +1,158 @@
1
+ <script lang="ts">
2
+ import { useThrelte } from "@threlte/core";
3
+ import { PerspectiveCamera, Raycaster, Vector2 } from "three";
4
+ import { cameraPlanePoint, orbitMap, orbitRadiansPerPixel, panMap, zoomMap } from "./map-camera";
5
+
6
+ let { flat, radius }: { flat: boolean; radius: number } = $props();
7
+ const { camera, renderer, scene, invalidate } = useThrelte();
8
+
9
+ $effect(() => {
10
+ const selectedCamera = $camera;
11
+ if (!(selectedCamera instanceof PerspectiveCamera)) return;
12
+ const activeCamera: PerspectiveCamera = selectedCamera;
13
+ const isFlat = flat;
14
+ const mapRadius = Math.max(1, radius);
15
+ const element = renderer.domElement;
16
+ // Gesture bookkeeping is deliberately non-reactive.
17
+ // eslint-disable-next-line svelte/prefer-svelte-reactivity
18
+ const pointers = new Map<number, { x: number; y: number; button: number }>();
19
+ let gestureDistance = 0;
20
+ let suppressClick = false;
21
+ const oldTouchAction = element.style.touchAction;
22
+ element.style.touchAction = "none";
23
+ activeCamera.lookAt(0, 0, 0);
24
+ activeCamera.updateMatrixWorld();
25
+ invalidate();
26
+
27
+ function ndc(x: number, y: number) {
28
+ const rect = element.getBoundingClientRect();
29
+ return new Vector2(
30
+ ((x - rect.left) / rect.width) * 2 - 1,
31
+ 1 - ((y - rect.top) / rect.height) * 2,
32
+ );
33
+ }
34
+
35
+ function anchorAt(x: number, y: number) {
36
+ const cursor = ndc(x, y);
37
+ const raycaster = new Raycaster();
38
+ raycaster.setFromCamera(cursor, activeCamera);
39
+ // Pick the visible terrain surface when possible, otherwise the map's center plane.
40
+ const terrain = scene.getObjectByName("terrain");
41
+ const hit = terrain ? raycaster.intersectObject(terrain, false)[0] : undefined;
42
+ return hit?.point ?? cameraPlanePoint(activeCamera, cursor);
43
+ }
44
+
45
+ function zoom(x: number, y: number, amount: number) {
46
+ const anchor = anchorAt(x, y);
47
+ if (!anchor) return;
48
+ zoomMap(
49
+ activeCamera,
50
+ anchor,
51
+ Math.exp(amount),
52
+ mapRadius * (isFlat ? 0.03 : 1.05),
53
+ mapRadius * 20,
54
+ !isFlat,
55
+ );
56
+ invalidate();
57
+ }
58
+
59
+ function pan(fromX: number, fromY: number, toX: number, toY: number) {
60
+ const anchor = anchorAt(fromX, fromY);
61
+ if (!anchor) return;
62
+ panMap(activeCamera, ndc(fromX, fromY), ndc(toX, toY), anchor);
63
+ invalidate();
64
+ }
65
+
66
+ function rotate(dx: number, dy: number) {
67
+ const scale = orbitRadiansPerPixel(activeCamera, mapRadius, element.clientHeight, isFlat);
68
+ orbitMap(activeCamera, dx * scale, dy * scale);
69
+ invalidate();
70
+ }
71
+
72
+ function down(event: PointerEvent) {
73
+ if (event.button > 2) return;
74
+ if (pointers.size === 0) {
75
+ gestureDistance = 0;
76
+ suppressClick = false;
77
+ } else suppressClick = true;
78
+ pointers.set(event.pointerId, { x: event.clientX, y: event.clientY, button: event.button });
79
+ element.setPointerCapture(event.pointerId);
80
+ }
81
+
82
+ function move(event: PointerEvent) {
83
+ const previous = pointers.get(event.pointerId);
84
+ if (!previous) return;
85
+ gestureDistance += Math.hypot(event.clientX - previous.x, event.clientY - previous.y);
86
+ if (gestureDistance > 8) suppressClick = true;
87
+ const before = [...pointers.values()];
88
+ pointers.set(event.pointerId, {
89
+ x: event.clientX,
90
+ y: event.clientY,
91
+ button: previous.button,
92
+ });
93
+ const after = [...pointers.values()];
94
+ if (before.length === 2) {
95
+ const midpoint = (points: typeof before) =>
96
+ new Vector2((points[0].x + points[1].x) / 2, (points[0].y + points[1].y) / 2);
97
+ const distance = (points: typeof before) =>
98
+ Math.hypot(points[0].x - points[1].x, points[0].y - points[1].y);
99
+ const oldMid = midpoint(before);
100
+ const newMid = midpoint(after);
101
+ const oldDistance = distance(before);
102
+ const newDistance = distance(after);
103
+ if (oldDistance > 0 && newDistance > 0)
104
+ zoom(oldMid.x, oldMid.y, Math.log(oldDistance / newDistance));
105
+ rotate(newMid.x - oldMid.x, newMid.y - oldMid.y);
106
+ } else if (before.length === 1) {
107
+ const dx = event.clientX - previous.x;
108
+ const dy = event.clientY - previous.y;
109
+ if (previous.button === 1) zoom(event.clientX, event.clientY, dy * 0.01);
110
+ else if (event.shiftKey) rotate(dx, dy);
111
+ else pan(previous.x, previous.y, event.clientX, event.clientY);
112
+ }
113
+ }
114
+
115
+ function up(event: PointerEvent) {
116
+ pointers.delete(event.pointerId);
117
+ if (element.hasPointerCapture(event.pointerId))
118
+ element.releasePointerCapture(event.pointerId);
119
+ }
120
+
121
+ function wheel(event: WheelEvent) {
122
+ event.preventDefault();
123
+ const pixels =
124
+ event.deltaY *
125
+ (event.deltaMode === 1 ? 16 : event.deltaMode === 2 ? element.clientHeight : 1);
126
+ zoom(event.clientX, event.clientY, Math.max(-0.5, Math.min(0.5, pixels * 0.001)));
127
+ }
128
+
129
+ function click(event: MouseEvent) {
130
+ if (suppressClick) event.stopImmediatePropagation();
131
+ }
132
+
133
+ function contextMenu(event: MouseEvent) {
134
+ event.preventDefault();
135
+ }
136
+ element.addEventListener("click", click, true);
137
+ element.addEventListener("pointerdown", down);
138
+ element.addEventListener("pointermove", move);
139
+ element.addEventListener("pointerup", up);
140
+ element.addEventListener("pointercancel", up);
141
+ element.addEventListener("lostpointercapture", up);
142
+ element.addEventListener("wheel", wheel, { passive: false });
143
+ element.addEventListener("contextmenu", contextMenu);
144
+ return () => {
145
+ element.removeEventListener("click", click, true);
146
+ element.removeEventListener("pointerdown", down);
147
+ element.removeEventListener("pointermove", move);
148
+ element.removeEventListener("pointerup", up);
149
+ element.removeEventListener("pointercancel", up);
150
+ element.removeEventListener("lostpointercapture", up);
151
+ element.removeEventListener("wheel", wheel);
152
+ element.removeEventListener("contextmenu", contextMenu);
153
+ for (const id of pointers.keys())
154
+ if (element.hasPointerCapture(id)) element.releasePointerCapture(id);
155
+ element.style.touchAction = oldTouchAction;
156
+ };
157
+ });
158
+ </script>
@@ -0,0 +1,7 @@
1
+ type $$ComponentProps = {
2
+ flat: boolean;
3
+ radius: number;
4
+ };
5
+ declare const MapControls: import("svelte").Component<$$ComponentProps, {}, "">;
6
+ type MapControls = ReturnType<typeof MapControls>;
7
+ export default MapControls;
@@ -588,7 +588,7 @@
588
588
  </script>
589
589
 
590
590
  <T is={opaqueMesh} />
591
- <T is={terrainMesh} onclick={handleTerrainClick} />
591
+ <T is={terrainMesh} name="terrain" onclick={handleTerrainClick} />
592
592
 
593
593
  {#each $cellMetadata as entry, i (i)}
594
594
  {#if entry.isExplored && !entry.isVoid && entry.voidNeighborCount > 0}
@@ -0,0 +1,10 @@
1
+ import { PerspectiveCamera, Vector2, Vector3 } from "three";
2
+ /** Rotate the entire camera frame around the map, without Euler-angle pole limits. */
3
+ export declare function orbitMap(camera: PerspectiveCamera, dx: number, dy: number): void;
4
+ /** Dolly along the anchor ray; the anchor keeps the same screen position. */
5
+ export declare function zoomMap(camera: PerspectiveCamera, anchor: Vector3, factor: number, minDistance: number, maxDistance: number, centeredBounds?: boolean): void;
6
+ /** Match rotation to the projected surface size, slowing down as the camera approaches it. */
7
+ export declare function orbitRadiansPerPixel(camera: PerspectiveCamera, radius: number, viewportHeight: number, flat?: boolean): number;
8
+ /** Move the grabbed surface point with the pointer without changing the orbit center. */
9
+ export declare function panMap(camera: PerspectiveCamera, from: Vector2, to: Vector2, anchor: Vector3): void;
10
+ export declare function cameraPlanePoint(camera: PerspectiveCamera, ndc: Vector2, anchor?: Vector3): Vector3 | null;
@@ -0,0 +1,73 @@
1
+ import { PerspectiveCamera, Plane, Quaternion, Raycaster, Vector2, Vector3 } from "three";
2
+ const origin = new Vector3();
3
+ /** Rotate the entire camera frame around the map, without Euler-angle pole limits. */
4
+ export function orbitMap(camera, dx, dy) {
5
+ const axis = new Vector3(dy, dx, 0);
6
+ const angle = axis.length();
7
+ if (!angle)
8
+ return;
9
+ axis.normalize().applyQuaternion(camera.quaternion);
10
+ const rotation = new Quaternion().setFromAxisAngle(axis, -angle);
11
+ camera.position.applyQuaternion(rotation);
12
+ camera.quaternion.premultiply(rotation).normalize();
13
+ camera.up.set(0, 1, 0).applyQuaternion(camera.quaternion);
14
+ camera.updateMatrixWorld();
15
+ }
16
+ /** Dolly along the anchor ray; the anchor keeps the same screen position. */
17
+ export function zoomMap(camera, anchor, factor, minDistance, maxDistance, centeredBounds = true) {
18
+ if (!centeredBounds) {
19
+ // Flat maps can be panned far from the origin; bound zoom relative to the focus.
20
+ const distance = camera.position.distanceTo(anchor);
21
+ if (!distance)
22
+ return;
23
+ factor = Math.max(minDistance / distance, Math.min(maxDistance / distance, factor));
24
+ camera.position.sub(anchor).multiplyScalar(factor).add(anchor);
25
+ camera.updateMatrixWorld();
26
+ return;
27
+ }
28
+ const next = camera.position.clone().sub(anchor).multiplyScalar(factor).add(anchor);
29
+ // Bound travel along the ray rather than clamping position off the cursor ray.
30
+ const delta = next.clone().sub(camera.position);
31
+ const distance = camera.position.length();
32
+ const limit = factor < 1 ? minDistance : maxDistance;
33
+ if ((factor < 1 && next.length() < limit) || (factor > 1 && next.length() > limit)) {
34
+ const a = delta.lengthSq();
35
+ const b = 2 * camera.position.dot(delta);
36
+ const c = distance * distance - limit * limit;
37
+ const discriminant = b * b - 4 * a * c;
38
+ if (!a || discriminant < 0)
39
+ return;
40
+ const roots = [
41
+ (-b - Math.sqrt(discriminant)) / (2 * a),
42
+ (-b + Math.sqrt(discriminant)) / (2 * a),
43
+ ];
44
+ const t = roots.filter((value) => value >= 0 && value <= 1).sort((a, b) => a - b)[0];
45
+ if (t === undefined)
46
+ return;
47
+ next.copy(camera.position).addScaledVector(delta, t);
48
+ }
49
+ camera.position.copy(next);
50
+ camera.updateMatrixWorld();
51
+ }
52
+ /** Match rotation to the projected surface size, slowing down as the camera approaches it. */
53
+ export function orbitRadiansPerPixel(camera, radius, viewportHeight, flat = false) {
54
+ const mapRadius = Math.max(1, radius);
55
+ const surfaceDistance = Math.max(mapRadius * 0.01, camera.position.length() - (flat ? 0 : mapRadius));
56
+ const visibleHeight = 2 * Math.tan((camera.getEffectiveFOV() * Math.PI) / 360) * surfaceDistance;
57
+ // The vertical FOV includes the aspect-ratio adjustment on narrow screens.
58
+ return 2 * Math.min(Math.PI * 2, visibleHeight / mapRadius) / Math.max(1, viewportHeight);
59
+ }
60
+ /** Move the grabbed surface point with the pointer without changing the orbit center. */
61
+ export function panMap(camera, from, to, anchor) {
62
+ const start = cameraPlanePoint(camera, from, anchor);
63
+ const end = cameraPlanePoint(camera, to, anchor);
64
+ if (start && end)
65
+ camera.position.add(start.sub(end));
66
+ camera.updateMatrixWorld();
67
+ }
68
+ export function cameraPlanePoint(camera, ndc, anchor = origin) {
69
+ const raycaster = new Raycaster();
70
+ raycaster.setFromCamera(ndc, camera);
71
+ const plane = new Plane().setFromNormalAndCoplanarPoint(camera.getWorldDirection(new Vector3()), anchor);
72
+ return raycaster.ray.intersectPlane(plane, new Vector3());
73
+ }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * | output |
3
3
  * | --- |
4
- * | "Welcome to Avoidant. Take a moment to get familiar with moving the camera around: on a touchscreen, one-finger dragging will pan the map, and two fingers wil..." |
4
+ * | "Welcome to Avoidant. On any map, drag with one finger or either mouse button to pan. Hold Shift while dragging, or drag with two fingers on a touchscreen, to..." |
5
5
  *
6
6
  * @param {Tutorial_IntroInputs} inputs
7
7
  * @param {{ locale?: "en" | "bn" }} options
@@ -6,17 +6,17 @@ import { getLocale, experimentalStaticLocale } from '../runtime.js';
6
6
  /** @typedef {{}} Tutorial_IntroInputs */
7
7
 
8
8
  const en_tutorial_intro = /** @type {(inputs: Tutorial_IntroInputs) => LocalizedString} */ () => {
9
- return /** @type {LocalizedString} */ (`Welcome to Avoidant. Take a moment to get familiar with moving the camera around: on a touchscreen, one-finger dragging will pan the map, and two fingers will let you rotate and zoom. With a mouse, drag with the left mouse button to pan, drag with the right mouse button to rotate, and scroll to zoom. With a trackpad, holding shift while dragging lets you rotate. When you're comfortable with the controls, press Next to start exploring cells.`)
9
+ return /** @type {LocalizedString} */ (`Welcome to Avoidant. On any map, drag with one finger or either mouse button to pan. Hold Shift while dragging, or drag with two fingers on a touchscreen, to rotate around the map's center. Scroll to zoom toward the cursor, or pinch to zoom around the midpoint between your fingers. Rotation slows down as you zoom in. When you're comfortable with the controls, press Next to start exploring cells.`)
10
10
  };
11
11
 
12
12
  const bn_tutorial_intro = /** @type {(inputs: Tutorial_IntroInputs) => LocalizedString} */ () => {
13
- return /** @type {LocalizedString} */ (`Avoidant-এ স্বাগতম। প্রথমে ক্যামেরা ঘোরানোর সাথে পরিচিত হয়ে নিন: টাচস্ক্রিনে এক আঙুল দিয়ে টেনে ম্যাপ সরানো যায়, আর দুই আঙুলে ঘোরানো ও জুম করা যায়। মাউসে বাম বোতাম টেনে ম্যাপ সরান, ডান বোতাম টেনে ঘোরান, এবং স্ক্রল করে জুম করুন। ট্র্যাকপ্যাডে Shift চেপে টানলে ঘোরানো যাবে। নিয়ন্ত্রণে সাবলীল হলে পরবর্তী চাপুন এবং সেল অনুসন্ধান শুরু করুন।`)
13
+ return /** @type {LocalizedString} */ (`Avoidant-এ স্বাগতম। সব ধরনের ম্যাপে এক আঙুল দিয়ে বা মাউসের বাম বা ডান বোতাম চেপে টানলে ম্যাপ সরানো যায়। Shift চেপে টানলে, অথবা টাচস্ক্রিনে দুই আঙুল দিয়ে টানলে, ম্যাপের কেন্দ্র ঘিরে ঘোরানো যায়। কার্সরের অবস্থানের দিকে জুম করতে স্ক্রল করুন। দুই আঙুল কাছাকাছি বা দূরে সরালে আঙুল দুটির মাঝের বিন্দুকে কেন্দ্র করে জুম হবে। জুম করে কাছে গেলে ঘোরানোর গতি কমে। নিয়ন্ত্রণে সাবলীল হলে পরবর্তী চাপুন এবং সেল অনুসন্ধান শুরু করুন।`)
14
14
  };
15
15
 
16
16
  /**
17
17
  * | output |
18
18
  * | --- |
19
- * | "Welcome to Avoidant. Take a moment to get familiar with moving the camera around: on a touchscreen, one-finger dragging will pan the map, and two fingers wil..." |
19
+ * | "Welcome to Avoidant. On any map, drag with one finger or either mouse button to pan. Hold Shift while dragging, or drag with two fingers on a touchscreen, to..." |
20
20
  *
21
21
  * @param {Tutorial_IntroInputs} inputs
22
22
  * @param {{ locale?: "en" | "bn" }} options
@@ -1331,12 +1331,12 @@ function __wbg_get_imports() {
1331
1331
  return ret;
1332
1332
  },
1333
1333
  __wbindgen_generic_0000000000000002: function(arg0, arg1) {
1334
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 3994, ret: Externref, inner_ret: Some(Externref) }, mutable: true }) -> Externref`.
1334
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 3995, ret: Externref, inner_ret: Some(Externref) }, mutable: true }) -> Externref`.
1335
1335
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_6ded4d2ca8032970___convert__closures_____invoke___wasm_bindgen_6ded4d2ca8032970___JsValue__wasm_bindgen_6ded4d2ca8032970___JsValue__true_);
1336
1336
  return ret;
1337
1337
  },
1338
1338
  __wbindgen_generic_0000000000000003: function(arg0, arg1) {
1339
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 3999, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1339
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 4000, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1340
1340
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_6ded4d2ca8032970___convert__closures_____invoke___wasm_bindgen_6ded4d2ca8032970___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_6ded4d2ca8032970___JsError___true_);
1341
1341
  return ret;
1342
1342
  },
@@ -1346,7 +1346,7 @@ function __wbg_get_imports() {
1346
1346
  return ret;
1347
1347
  },
1348
1348
  __wbindgen_generic_0000000000000005: function(arg0, arg1) {
1349
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 2743, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1349
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 2741, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1350
1350
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_6ded4d2ca8032970___convert__closures_____invoke___web_sys_1a344eaec6f2c168___features__gen_MessageEvent__MessageEvent______true_);
1351
1351
  return ret;
1352
1352
  },
@@ -1356,17 +1356,17 @@ function __wbg_get_imports() {
1356
1356
  return ret;
1357
1357
  },
1358
1358
  __wbindgen_generic_0000000000000007: function(arg0, arg1) {
1359
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 2475, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1359
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 2474, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1360
1360
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_6ded4d2ca8032970___convert__closures_____invoke_______true__1_);
1361
1361
  return ret;
1362
1362
  },
1363
1363
  __wbindgen_generic_0000000000000008: function(arg0, arg1) {
1364
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 2477, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
1364
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 2476, ret: Unit, inner_ret: Some(Unit) }, mutable: false }) -> Externref`.
1365
1365
  const ret = makeClosure(arg0, arg1, wasm_bindgen_6ded4d2ca8032970___convert__closures_____invoke_______true__2_);
1366
1366
  return ret;
1367
1367
  },
1368
1368
  __wbindgen_generic_0000000000000009: function(arg0, arg1) {
1369
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 3863, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1369
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 3865, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1370
1370
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_6ded4d2ca8032970___convert__closures_____invoke_______true__3_);
1371
1371
  return ret;
1372
1372
  },
Binary file
package/package.json CHANGED
@@ -84,5 +84,5 @@
84
84
  "**/*.css"
85
85
  ],
86
86
  "type": "module",
87
- "version": "0.2.0"
87
+ "version": "0.2.1"
88
88
  }