@splinetool/loader 2.0.32 → 2.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/hana-ui.js CHANGED
@@ -218,11 +218,18 @@ export class SceneController {
218
218
  * The optional args name a face inside a font collection (`.ttc` — common for
219
219
  * macOS system fonts): the matching face is parsed instead of face 0. Omitting
220
220
  * them (existing 2-arg callers) keeps the old behavior.
221
+ *
222
+ * Returns whether the asset now holds a parsed font — false when the bytes
223
+ * aren't parseable by the engine (or on a no-text build). Hosts use it to
224
+ * decide whether an overlay `TextSimple` may reference the asset via
225
+ * `font_id`: an id whose font never parses would silently render with the
226
+ * built-in fallback and sit in the overlay's pending-font set forever.
221
227
  * @param {ID} id
222
228
  * @param {Uint8Array} data
223
229
  * @param {string | null} [postscript_name]
224
230
  * @param {string | null} [family]
225
231
  * @param {string | null} [style]
232
+ * @returns {boolean}
226
233
  */
227
234
  addLocalFont(id, data, postscript_name, family, style) {
228
235
  var ptr0 = isLikeNone(postscript_name) ? 0 : passStringToWasm0(postscript_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -231,7 +238,8 @@ export class SceneController {
231
238
  var len1 = WASM_VECTOR_LEN;
232
239
  var ptr2 = isLikeNone(style) ? 0 : passStringToWasm0(style, wasm.__wbindgen_export, wasm.__wbindgen_export2);
233
240
  var len2 = WASM_VECTOR_LEN;
234
- wasm.scenecontroller_addLocalFont(this.__wbg_ptr, addHeapObject(id), addHeapObject(data), ptr0, len0, ptr1, len1, ptr2, len2);
241
+ const ret = wasm.scenecontroller_addLocalFont(this.__wbg_ptr, addHeapObject(id), addHeapObject(data), ptr0, len0, ptr1, len1, ptr2, len2);
242
+ return ret !== 0;
235
243
  }
236
244
  /**
237
245
  * @param {ID} id
@@ -540,8 +548,10 @@ export class SceneController {
540
548
  return ret !== 0;
541
549
  }
542
550
  /**
543
- * Whether the built-in editor/UI font (the single font the immediate-mode
544
- * `updateUiShapes` overlay renders text with) has been fetched and parsed.
551
+ * Whether the built-in editor/UI font (the font the immediate-mode
552
+ * `updateUiShapes` overlay renders text with when a shape names no
553
+ * `font_id`, and the fallback while a named font asset is still
554
+ * loading) has been fetched and parsed.
545
555
  * The load kicks off asynchronously at controller creation
546
556
  * (`Assets::load_ui_font`), so overlay text pushed before it lands
547
557
  * tessellates to nothing until the next frame after the load completes.
@@ -2475,7 +2485,7 @@ function __wbg_get_imports() {
2475
2485
  const a = state0.a;
2476
2486
  state0.a = 0;
2477
2487
  try {
2478
- return __wasm_bindgen_func_elem_14191(a, state0.b, arg0, arg1);
2488
+ return __wasm_bindgen_func_elem_14195(a, state0.b, arg0, arg1);
2479
2489
  } finally {
2480
2490
  state0.a = a;
2481
2491
  }
@@ -2521,7 +2531,7 @@ function __wbg_get_imports() {
2521
2531
  const a = state0.a;
2522
2532
  state0.a = 0;
2523
2533
  try {
2524
- return __wasm_bindgen_func_elem_14191(a, state0.b, arg0, arg1);
2534
+ return __wasm_bindgen_func_elem_14195(a, state0.b, arg0, arg1);
2525
2535
  } finally {
2526
2536
  state0.a = a;
2527
2537
  }
@@ -3637,47 +3647,47 @@ function __wbg_get_imports() {
3637
3647
  }, arguments); },
3638
3648
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
3639
3649
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1054, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3640
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_14189);
3650
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_14193);
3641
3651
  return addHeapObject(ret);
3642
3652
  },
3643
3653
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
3644
3654
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 34, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3645
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_5119);
3655
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_5124);
3646
3656
  return addHeapObject(ret);
3647
3657
  },
3648
3658
  __wbindgen_cast_0000000000000003: function(arg0, arg1) {
3649
3659
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUComputePipeline")], shim_idx: 929, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3650
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11145);
3660
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11149);
3651
3661
  return addHeapObject(ret);
3652
3662
  },
3653
3663
  __wbindgen_cast_0000000000000004: function(arg0, arg1) {
3654
3664
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx: 929, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3655
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11145_3);
3665
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11149_3);
3656
3666
  return addHeapObject(ret);
3657
3667
  },
3658
3668
  __wbindgen_cast_0000000000000005: function(arg0, arg1) {
3659
3669
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx: 930, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3660
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11146);
3670
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11150);
3661
3671
  return addHeapObject(ret);
3662
3672
  },
3663
3673
  __wbindgen_cast_0000000000000006: function(arg0, arg1) {
3664
3674
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPURenderPipeline")], shim_idx: 929, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3665
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11145_5);
3675
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11149_5);
3666
3676
  return addHeapObject(ret);
3667
3677
  },
3668
3678
  __wbindgen_cast_0000000000000007: function(arg0, arg1) {
3669
3679
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx: 929, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3670
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11145_6);
3680
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11149_6);
3671
3681
  return addHeapObject(ret);
3672
3682
  },
3673
3683
  __wbindgen_cast_0000000000000008: function(arg0, arg1) {
3674
3684
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx: 929, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3675
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11145_7);
3685
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11149_7);
3676
3686
  return addHeapObject(ret);
3677
3687
  },
3678
3688
  __wbindgen_cast_0000000000000009: function(arg0, arg1) {
3679
3689
  // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 1037, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3680
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_12552);
3690
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_12556);
3681
3691
  return addHeapObject(ret);
3682
3692
  },
3683
3693
  __wbindgen_cast_000000000000000a: function(arg0) {
@@ -3751,22 +3761,22 @@ function __wbg_get_imports() {
3751
3761
  };
3752
3762
  }
3753
3763
 
3754
- function __wasm_bindgen_func_elem_12552(arg0, arg1) {
3755
- wasm.__wasm_bindgen_func_elem_12552(arg0, arg1);
3764
+ function __wasm_bindgen_func_elem_12556(arg0, arg1) {
3765
+ wasm.__wasm_bindgen_func_elem_12556(arg0, arg1);
3756
3766
  }
3757
3767
 
3758
- function __wasm_bindgen_func_elem_5119(arg0, arg1, arg2) {
3759
- wasm.__wasm_bindgen_func_elem_5119(arg0, arg1, addHeapObject(arg2));
3768
+ function __wasm_bindgen_func_elem_5124(arg0, arg1, arg2) {
3769
+ wasm.__wasm_bindgen_func_elem_5124(arg0, arg1, addHeapObject(arg2));
3760
3770
  }
3761
3771
 
3762
- function __wasm_bindgen_func_elem_11146(arg0, arg1, arg2) {
3763
- wasm.__wasm_bindgen_func_elem_11146(arg0, arg1, addHeapObject(arg2));
3772
+ function __wasm_bindgen_func_elem_11150(arg0, arg1, arg2) {
3773
+ wasm.__wasm_bindgen_func_elem_11150(arg0, arg1, addHeapObject(arg2));
3764
3774
  }
3765
3775
 
3766
- function __wasm_bindgen_func_elem_14189(arg0, arg1, arg2) {
3776
+ function __wasm_bindgen_func_elem_14193(arg0, arg1, arg2) {
3767
3777
  try {
3768
3778
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3769
- wasm.__wasm_bindgen_func_elem_14189(retptr, arg0, arg1, addHeapObject(arg2));
3779
+ wasm.__wasm_bindgen_func_elem_14193(retptr, arg0, arg1, addHeapObject(arg2));
3770
3780
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3771
3781
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3772
3782
  if (r1) {
@@ -3777,10 +3787,10 @@ function __wasm_bindgen_func_elem_14189(arg0, arg1, arg2) {
3777
3787
  }
3778
3788
  }
3779
3789
 
3780
- function __wasm_bindgen_func_elem_11145(arg0, arg1, arg2) {
3790
+ function __wasm_bindgen_func_elem_11149(arg0, arg1, arg2) {
3781
3791
  try {
3782
3792
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3783
- wasm.__wasm_bindgen_func_elem_11145(retptr, arg0, arg1, addHeapObject(arg2));
3793
+ wasm.__wasm_bindgen_func_elem_11149(retptr, arg0, arg1, addHeapObject(arg2));
3784
3794
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3785
3795
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3786
3796
  if (r1) {
@@ -3791,10 +3801,10 @@ function __wasm_bindgen_func_elem_11145(arg0, arg1, arg2) {
3791
3801
  }
3792
3802
  }
3793
3803
 
3794
- function __wasm_bindgen_func_elem_11145_3(arg0, arg1, arg2) {
3804
+ function __wasm_bindgen_func_elem_11149_3(arg0, arg1, arg2) {
3795
3805
  try {
3796
3806
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3797
- wasm.__wasm_bindgen_func_elem_11145_3(retptr, arg0, arg1, addHeapObject(arg2));
3807
+ wasm.__wasm_bindgen_func_elem_11149_3(retptr, arg0, arg1, addHeapObject(arg2));
3798
3808
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3799
3809
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3800
3810
  if (r1) {
@@ -3805,10 +3815,10 @@ function __wasm_bindgen_func_elem_11145_3(arg0, arg1, arg2) {
3805
3815
  }
3806
3816
  }
3807
3817
 
3808
- function __wasm_bindgen_func_elem_11145_5(arg0, arg1, arg2) {
3818
+ function __wasm_bindgen_func_elem_11149_5(arg0, arg1, arg2) {
3809
3819
  try {
3810
3820
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3811
- wasm.__wasm_bindgen_func_elem_11145_5(retptr, arg0, arg1, addHeapObject(arg2));
3821
+ wasm.__wasm_bindgen_func_elem_11149_5(retptr, arg0, arg1, addHeapObject(arg2));
3812
3822
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3813
3823
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3814
3824
  if (r1) {
@@ -3819,10 +3829,10 @@ function __wasm_bindgen_func_elem_11145_5(arg0, arg1, arg2) {
3819
3829
  }
3820
3830
  }
3821
3831
 
3822
- function __wasm_bindgen_func_elem_11145_6(arg0, arg1, arg2) {
3832
+ function __wasm_bindgen_func_elem_11149_6(arg0, arg1, arg2) {
3823
3833
  try {
3824
3834
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3825
- wasm.__wasm_bindgen_func_elem_11145_6(retptr, arg0, arg1, addHeapObject(arg2));
3835
+ wasm.__wasm_bindgen_func_elem_11149_6(retptr, arg0, arg1, addHeapObject(arg2));
3826
3836
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3827
3837
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3828
3838
  if (r1) {
@@ -3833,10 +3843,10 @@ function __wasm_bindgen_func_elem_11145_6(arg0, arg1, arg2) {
3833
3843
  }
3834
3844
  }
3835
3845
 
3836
- function __wasm_bindgen_func_elem_11145_7(arg0, arg1, arg2) {
3846
+ function __wasm_bindgen_func_elem_11149_7(arg0, arg1, arg2) {
3837
3847
  try {
3838
3848
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3839
- wasm.__wasm_bindgen_func_elem_11145_7(retptr, arg0, arg1, addHeapObject(arg2));
3849
+ wasm.__wasm_bindgen_func_elem_11149_7(retptr, arg0, arg1, addHeapObject(arg2));
3840
3850
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3841
3851
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3842
3852
  if (r1) {
@@ -3847,8 +3857,8 @@ function __wasm_bindgen_func_elem_11145_7(arg0, arg1, arg2) {
3847
3857
  }
3848
3858
  }
3849
3859
 
3850
- function __wasm_bindgen_func_elem_14191(arg0, arg1, arg2, arg3) {
3851
- wasm.__wasm_bindgen_func_elem_14191(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
3860
+ function __wasm_bindgen_func_elem_14195(arg0, arg1, arg2, arg3) {
3861
+ wasm.__wasm_bindgen_func_elem_14195(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
3852
3862
  }
3853
3863
 
3854
3864
 
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splinetool/loader",
3
- "version": "2.0.32",
3
+ "version": "2.0.34",
4
4
  "description": "Spline is a collaborative design platform for creating production-ready interactive experiences in multiple dimensions. © 2025 Spline, Inc.",
5
5
  "keywords": [
6
6
  "spline",