isard 2.4.1 → 2.5.0

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.
@@ -431,6 +431,26 @@ export class Engine {
431
431
  const ret = wasm.engine_elevationAt(this.__wbg_ptr, lon, lat);
432
432
  return ret[0] === 0 ? undefined : ret[1];
433
433
  }
434
+ /**
435
+ * The camera framing a box (the camera unmoved): `bounds` west, south, east, north (degrees), from `bottom` to
436
+ * `top` (metres; the same for a box on the ground), `padding` top, right, bottom, left (CSS pixels), at `pitch`
437
+ * and `bearing` (degrees); undefined for a box that is not one
438
+ * @param {Float64Array} bounds
439
+ * @param {number} bottom
440
+ * @param {number} top
441
+ * @param {Float64Array} padding
442
+ * @param {number} pitch
443
+ * @param {number} bearing
444
+ * @returns {Camera | undefined}
445
+ */
446
+ fitCamera(bounds, bottom, top, padding, pitch, bearing) {
447
+ const ptr0 = passArrayF64ToWasm0(bounds, wasm.__wbindgen_malloc);
448
+ const len0 = WASM_VECTOR_LEN;
449
+ const ptr1 = passArrayF64ToWasm0(padding, wasm.__wbindgen_malloc);
450
+ const len1 = WASM_VECTOR_LEN;
451
+ const ret = wasm.engine_fitCamera(this.__wbg_ptr, ptr0, len0, bottom, top, ptr1, len1, pitch, bearing);
452
+ return ret;
453
+ }
434
454
  /**
435
455
  * Height of the RAF20 geoid above the ellipsoid at a position (metres; 0 away from mainland France): what raises
436
456
  * the altitudes (NGF-IGN69) of a source onto the IGN relief
@@ -1502,6 +1522,17 @@ export class Engine {
1502
1522
  setTiles3dFeatureColors(id, colors) {
1503
1523
  wasm.engine_setTiles3dFeatureColors(this.__wbg_ptr, id, colors);
1504
1524
  }
1525
+ /**
1526
+ * A box a 3D Tiles layer loads to its finest tiles, first, in view or not: west, south, east, north (degrees),
1527
+ * bottom and top (metres above the ellipsoid); empty for none
1528
+ * @param {number} id
1529
+ * @param {Float64Array} focus
1530
+ */
1531
+ setTiles3dFocus(id, focus) {
1532
+ const ptr0 = passArrayF64ToWasm0(focus, wasm.__wbindgen_malloc);
1533
+ const len0 = WASM_VECTOR_LEN;
1534
+ wasm.engine_setTiles3dFocus(this.__wbg_ptr, id, ptr0, len0);
1535
+ }
1505
1536
  /**
1506
1537
  * Screen-space error threshold, opacity, size of the points (CSS pixels, 2 if not given) and color (RGB 0-1, empty
1507
1538
  * for none: it tints the textures and colors the untextured meshes) of a 3D Tiles layer
@@ -1815,6 +1846,26 @@ export class Engine {
1815
1846
  const ret = wasm.engine_tiles3dFeature(this.__wbg_ptr, id, index);
1816
1847
  return ret;
1817
1848
  }
1849
+ /**
1850
+ * The first feature of a 3D Tiles layer's tiles drawn whose properties `matches` takes, the finest tiles first:
1851
+ * `[properties, feature]`, its properties and its index in its tile; undefined if none
1852
+ * @param {number} id
1853
+ * @param {(properties: Record<string, unknown>) => boolean} matches
1854
+ * @returns {[properties: Record<string, unknown>, feature: number] | undefined}
1855
+ */
1856
+ tiles3dFind(id, matches) {
1857
+ const ret = wasm.engine_tiles3dFind(this.__wbg_ptr, id, matches);
1858
+ return ret;
1859
+ }
1860
+ /**
1861
+ * The tiles of a 3D Tiles layer's focus box still to load at the last frame; undefined before its root tileset
1862
+ * @param {number} id
1863
+ * @returns {number | undefined}
1864
+ */
1865
+ tiles3dFocusPending(id) {
1866
+ const ret = wasm.engine_tiles3dFocusPending(this.__wbg_ptr, id);
1867
+ return ret === Number.MAX_SAFE_INTEGER ? undefined : ret;
1868
+ }
1818
1869
  /**
1819
1870
  * Counters of a 3D Tiles layer, undefined if there is none with this id
1820
1871
  * @param {number} id
@@ -2172,6 +2223,24 @@ function __wbg_get_imports() {
2172
2223
  const ret = arg0.fetch(getStringFromWasm0(arg1, arg2), arg3);
2173
2224
  return ret;
2174
2225
  },
2226
+ __wbg_findIndex_af2ae0290a92a901: function(arg0, arg1, arg2) {
2227
+ try {
2228
+ var state0 = {a: arg1, b: arg2};
2229
+ var cb0 = (arg0, arg1, arg2) => {
2230
+ const a = state0.a;
2231
+ state0.a = 0;
2232
+ try {
2233
+ return wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___wasm_bindgen_2e566c63402fe7fa___JsValue__u32__js_sys_b1e1c29ba6b0e6b3___Array__bool__true_(a, state0.b, arg0, arg1, arg2);
2234
+ } finally {
2235
+ state0.a = a;
2236
+ }
2237
+ };
2238
+ const ret = arg0.findIndex(cb0);
2239
+ return ret;
2240
+ } finally {
2241
+ state0.a = 0;
2242
+ }
2243
+ },
2175
2244
  __wbg_finish_09ec094c10f41e7b: function(arg0) {
2176
2245
  const ret = arg0.finish();
2177
2246
  return ret;
@@ -2204,6 +2273,10 @@ function __wbg_get_imports() {
2204
2273
  const ret = Reflect.get(arg0, arg1);
2205
2274
  return ret;
2206
2275
  }, arguments); },
2276
+ __wbg_get_6c896e0571ddae51: function(arg0, arg1) {
2277
+ const ret = arg0[arg1 >>> 0];
2278
+ return ret;
2279
+ },
2207
2280
  __wbg_get_806853698d9fc227: function() { return handleError(function (arg0, arg1) {
2208
2281
  const ret = Reflect.get(arg0, arg1 >>> 0);
2209
2282
  return ret;
@@ -3455,28 +3528,28 @@ function __wbg_get_imports() {
3455
3528
  arg0.writeTexture(arg1, getArrayU8FromWasm0(arg2, arg3), arg4, arg5);
3456
3529
  }, arguments); },
3457
3530
  __wbindgen_generic_0000000000000001: function(arg0, arg1) {
3458
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 330, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3531
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 332, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3459
3532
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___wasm_bindgen_2e566c63402fe7fa___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_2e566c63402fe7fa___JsError___true_);
3460
3533
  return ret;
3461
3534
  },
3462
3535
  __wbindgen_generic_0000000000000002: function(arg0, arg1) {
3463
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx: 273, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3536
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx: 275, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3464
3537
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___wasm_bindgen_2e566c63402fe7fa___sys__JsNullable_wgpu_79b597b3111bcbe9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_2e566c63402fe7fa___JsError___true_);
3465
3538
  return ret;
3466
3539
  },
3467
3540
  __wbindgen_generic_0000000000000003: function(arg0, arg1) {
3468
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUUncapturedErrorEvent")], shim_idx: 277, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3541
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUUncapturedErrorEvent")], shim_idx: 279, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
3469
3542
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___wgpu_79b597b3111bcbe9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true_);
3470
3543
  return ret;
3471
3544
  },
3472
3545
  __wbindgen_generic_0000000000000004: function(arg0, arg1) {
3473
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx: 273, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3474
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___wasm_bindgen_2e566c63402fe7fa___sys__JsNullable_wgpu_79b597b3111bcbe9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_2e566c63402fe7fa___JsError___true__134);
3546
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx: 275, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3547
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___wasm_bindgen_2e566c63402fe7fa___sys__JsNullable_wgpu_79b597b3111bcbe9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_2e566c63402fe7fa___JsError___true__139);
3475
3548
  return ret;
3476
3549
  },
3477
3550
  __wbindgen_generic_0000000000000005: function(arg0, arg1) {
3478
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx: 273, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3479
- const ret = makeMutClosure(arg0, arg1, wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___wasm_bindgen_2e566c63402fe7fa___sys__JsNullable_wgpu_79b597b3111bcbe9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_2e566c63402fe7fa___JsError___true__135);
3551
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx: 275, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
3552
+ const ret = makeMutClosure(arg0, arg1, wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___wasm_bindgen_2e566c63402fe7fa___sys__JsNullable_wgpu_79b597b3111bcbe9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_2e566c63402fe7fa___JsError___true__140);
3480
3553
  return ret;
3481
3554
  },
3482
3555
  __wbindgen_generic_0000000000000006: function(arg0) {
@@ -3528,15 +3601,15 @@ function wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___wasm_bin
3528
3601
  }
3529
3602
  }
3530
3603
 
3531
- function wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___wasm_bindgen_2e566c63402fe7fa___sys__JsNullable_wgpu_79b597b3111bcbe9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_2e566c63402fe7fa___JsError___true__134(arg0, arg1, arg2) {
3532
- const ret = wasm.wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___wasm_bindgen_2e566c63402fe7fa___sys__JsNullable_wgpu_79b597b3111bcbe9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_2e566c63402fe7fa___JsError___true__134(arg0, arg1, arg2);
3604
+ function wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___wasm_bindgen_2e566c63402fe7fa___sys__JsNullable_wgpu_79b597b3111bcbe9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_2e566c63402fe7fa___JsError___true__139(arg0, arg1, arg2) {
3605
+ const ret = wasm.wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___wasm_bindgen_2e566c63402fe7fa___sys__JsNullable_wgpu_79b597b3111bcbe9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_2e566c63402fe7fa___JsError___true__139(arg0, arg1, arg2);
3533
3606
  if (ret[1]) {
3534
3607
  throw takeFromExternrefTable0(ret[0]);
3535
3608
  }
3536
3609
  }
3537
3610
 
3538
- function wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___wasm_bindgen_2e566c63402fe7fa___sys__JsNullable_wgpu_79b597b3111bcbe9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_2e566c63402fe7fa___JsError___true__135(arg0, arg1, arg2) {
3539
- const ret = wasm.wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___wasm_bindgen_2e566c63402fe7fa___sys__JsNullable_wgpu_79b597b3111bcbe9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_2e566c63402fe7fa___JsError___true__135(arg0, arg1, arg2);
3611
+ function wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___wasm_bindgen_2e566c63402fe7fa___sys__JsNullable_wgpu_79b597b3111bcbe9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_2e566c63402fe7fa___JsError___true__140(arg0, arg1, arg2) {
3612
+ const ret = wasm.wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___wasm_bindgen_2e566c63402fe7fa___sys__JsNullable_wgpu_79b597b3111bcbe9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_2e566c63402fe7fa___JsError___true__140(arg0, arg1, arg2);
3540
3613
  if (ret[1]) {
3541
3614
  throw takeFromExternrefTable0(ret[0]);
3542
3615
  }
@@ -3546,6 +3619,11 @@ function wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___js_sys_b
3546
3619
  wasm.wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___js_sys_b1e1c29ba6b0e6b3___Function_fn_wasm_bindgen_2e566c63402fe7fa___JsValue_____wasm_bindgen_2e566c63402fe7fa___sys__Undefined___js_sys_b1e1c29ba6b0e6b3___Function_fn_wasm_bindgen_2e566c63402fe7fa___JsValue_____wasm_bindgen_2e566c63402fe7fa___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
3547
3620
  }
3548
3621
 
3622
+ function wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___wasm_bindgen_2e566c63402fe7fa___JsValue__u32__js_sys_b1e1c29ba6b0e6b3___Array__bool__true_(arg0, arg1, arg2, arg3, arg4) {
3623
+ const ret = wasm.wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___wasm_bindgen_2e566c63402fe7fa___JsValue__u32__js_sys_b1e1c29ba6b0e6b3___Array__bool__true_(arg0, arg1, arg2, arg3, arg4);
3624
+ return ret !== 0;
3625
+ }
3626
+
3549
3627
 
3550
3628
  const __wbindgen_enum_ColorSpaceConversion = ["none", "default"];
3551
3629
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isard",
3
- "version": "2.4.1",
3
+ "version": "2.5.0",
4
4
  "description": "A WebGL2 map engine for large, interactive data layers, labels and 3D Tiles over raster or vector basemaps (Rust core in WebAssembly)",
5
5
  "license": "MIT",
6
6
  "author": "Kevin Graff",