isard 0.5.0 → 0.6.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.
@@ -209,6 +209,12 @@ export class Engine {
209
209
  clearPreload() {
210
210
  wasm.engine_clearPreload(this.__wbg_ptr);
211
211
  }
212
+ /**
213
+ * Removes the viewshed
214
+ */
215
+ clearViewshed() {
216
+ wasm.engine_clearViewshed(this.__wbg_ptr);
217
+ }
212
218
  /**
213
219
  * Model-view-projection matrix (16 numbers, column-major, for `uniformMatrix4fv`) of the local frame at a
214
220
  * longitude, latitude (degrees) and altitude (metres): x east, y north, z up, in metres. Undefined outside the
@@ -352,7 +358,6 @@ export class Engine {
352
358
  wasm.engine_removeLayer(this.__wbg_ptr, id);
353
359
  }
354
360
  /**
355
- * Draws a frame; returns true while tiles are still loading (a new frame will be asked through `redraw`)
356
361
  * @returns {boolean}
357
362
  */
358
363
  render() {
@@ -867,6 +872,31 @@ export class Engine {
867
872
  throw takeFromExternrefTable0(ret[0]);
868
873
  }
869
874
  }
875
+ /**
876
+ * Shows what can be seen from a point within `range` metres around it: `lon`, `lat` (degrees), `height` metres
877
+ * above the ground; seen and hidden surfaces tinted with `visible` and `hidden` (RGB 0-1) at `opacity`. `cone`:
878
+ * heading, tilt, angles of view across and up (degrees) to look one way only, empty to look all around
879
+ * @param {number} lon
880
+ * @param {number} lat
881
+ * @param {number} height
882
+ * @param {number} range
883
+ * @param {Float32Array} visible
884
+ * @param {Float32Array} hidden
885
+ * @param {number} opacity
886
+ * @param {Float64Array} cone
887
+ */
888
+ setViewshed(lon, lat, height, range, visible, hidden, opacity, cone) {
889
+ const ptr0 = passArrayF32ToWasm0(visible, wasm.__wbindgen_malloc);
890
+ const len0 = WASM_VECTOR_LEN;
891
+ const ptr1 = passArrayF32ToWasm0(hidden, wasm.__wbindgen_malloc);
892
+ const len1 = WASM_VECTOR_LEN;
893
+ const ptr2 = passArrayF64ToWasm0(cone, wasm.__wbindgen_malloc);
894
+ const len2 = WASM_VECTOR_LEN;
895
+ const ret = wasm.engine_setViewshed(this.__wbg_ptr, lon, lat, height, range, ptr0, len0, ptr1, len1, opacity, ptr2, len2);
896
+ if (ret[1]) {
897
+ throw takeFromExternrefTable0(ret[0]);
898
+ }
899
+ }
870
900
  /**
871
901
  * @param {number} min
872
902
  * @param {number} max
@@ -1935,7 +1965,7 @@ function __wbg_get_imports() {
1935
1965
  return ret;
1936
1966
  },
1937
1967
  __wbindgen_generic_0000000000000001: function(arg0, arg1) {
1938
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 87, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1968
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 92, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1939
1969
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___wasm_bindgen_2e566c63402fe7fa___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_2e566c63402fe7fa___JsError___true_);
1940
1970
  return ret;
1941
1971
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isard",
3
- "version": "0.5.0",
3
+ "version": "0.6.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",