isard 0.5.1 → 0.6.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.
@@ -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
@@ -866,6 +872,29 @@ export class Engine {
866
872
  throw takeFromExternrefTable0(ret[0]);
867
873
  }
868
874
  }
875
+ /**
876
+ * Shows what can be seen from points, each within its range: `observers` holds 8 numbers per observer
877
+ * (16 at most): longitude, latitude (degrees), metres above the ground, range (metres), then to look one way
878
+ * only heading, tilt, angles of view across and up (degrees), the heading NaN to look all around. What some
879
+ * observer sees is tinted with `visible`, what is hidden from all those that reach it with `hidden` (RGB 0-1),
880
+ * at `opacity`
881
+ * @param {Float64Array} observers
882
+ * @param {Float32Array} visible
883
+ * @param {Float32Array} hidden
884
+ * @param {number} opacity
885
+ */
886
+ setViewshed(observers, visible, hidden, opacity) {
887
+ const ptr0 = passArrayF64ToWasm0(observers, wasm.__wbindgen_malloc);
888
+ const len0 = WASM_VECTOR_LEN;
889
+ const ptr1 = passArrayF32ToWasm0(visible, wasm.__wbindgen_malloc);
890
+ const len1 = WASM_VECTOR_LEN;
891
+ const ptr2 = passArrayF32ToWasm0(hidden, wasm.__wbindgen_malloc);
892
+ const len2 = WASM_VECTOR_LEN;
893
+ const ret = wasm.engine_setViewshed(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, opacity);
894
+ if (ret[1]) {
895
+ throw takeFromExternrefTable0(ret[0]);
896
+ }
897
+ }
869
898
  /**
870
899
  * @param {number} min
871
900
  * @param {number} max
@@ -1934,7 +1963,7 @@ function __wbg_get_imports() {
1934
1963
  return ret;
1935
1964
  },
1936
1965
  __wbindgen_generic_0000000000000001: function(arg0, arg1) {
1937
- // 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`.
1966
+ // 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`.
1938
1967
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen_2e566c63402fe7fa___convert__closures_____invoke___wasm_bindgen_2e566c63402fe7fa___JsValue__core_37ee0ce0c4cd57d5___result__Result_____wasm_bindgen_2e566c63402fe7fa___JsError___true_);
1939
1968
  return ret;
1940
1969
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isard",
3
- "version": "0.5.1",
3
+ "version": "0.6.1",
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",