@inweb/viewer-visualize 25.3.21 → 25.3.22

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/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Viewer.visualize
2
2
 
3
- `Viewer.visualize` is JavaScript library powered by [Visualize](https://www.opendesign.com/products/visualize) for in-browser visualization of 3D CAD and BIM data in browser from `VSFX` files stored on the [Open Cloud Server](https://cloud.opendesign.com/docs/index.html#/opencloud_server), on the web, or on your local computer.
3
+ `Viewer.visualize` is JavaScript library powered by [Visualize](https://www.opendesign.com/products/visualize) for in-browser visualization of 3D CAD and BIM data files stored on the [Open Cloud Server](https://cloud.opendesign.com/docs/index.html#/opencloud_server), on the web, or on your local computer.
4
4
 
5
- This library enables you to integrate advanced visualization capabilities into your web applications, including user interaction with scenes and objects, markups, and collaboration using the [inWEB Open Cloud](https://www.opendesign.com/products/open-cloud) platform.
5
+ This library enables you to integrate advanced visualization capabilities into your web applications, including user interaction with scenes and markup creation.
6
6
 
7
- > `VSFX` is an internal [Visualize SDK](https://cloud.opendesign.com/docs/index.html#/visualizejs) file format with support for streaming and partial viewing.
7
+ > `Viewer.visualize` uses `VSFX` file format as internal geometry data format. `VSFX` is a [Visualize SDK](https://cloud.opendesign.com/docs/index.html#/visualizejs) file format with support for streaming and partial viewing.
8
8
 
9
9
  ## Installation
10
10
 
@@ -811,20 +811,6 @@
811
811
  ///////////////////////////////////////////////////////////////////////////////
812
812
  const CLICK_DELTA = 5;
813
813
  const INTERACTIVITY_FPS = 24;
814
- /**
815
- * A [Viewer]{@link Viewer} event that fires when the viewer needs to be updated.
816
- *
817
- * @property {string} type - `update`
818
- * @event update
819
- */
820
- /**
821
- * A [Viewer]{@link Viewer} event that fires when the user selects an entity with the mouse.
822
- *
823
- * @property {string} type - `select`
824
- * @property {OdTvSelectionSet} data - The set of selected entities. For more information, see
825
- * [OdTvSelectionSet](https://cloud.opendesign.com/docs/index.html#/vis/OdTvSelectionSet?id=odtvselectionset).
826
- * @event select
827
- */
828
814
  class OdBaseDragger extends OdaGeAction {
829
815
  constructor(subject) {
830
816
  super(subject.visualizeJs);
@@ -16496,7 +16482,7 @@
16496
16482
  const event = { loaded, timeStamp, total, lengthComputable, type: "visualizeprogress" };
16497
16483
  onProgress === null || onProgress === void 0 ? void 0 : onProgress(event);
16498
16484
  });
16499
- this.visualizeJs = visualizeJs;
16485
+ this._visualizeJs = visualizeJs;
16500
16486
  this.visualizeJs.canvas = canvas;
16501
16487
  this.visualizeJs.Viewer.create();
16502
16488
  this.canvas = canvas;
@@ -16521,23 +16507,30 @@
16521
16507
  * release the `Viewer` instance.
16522
16508
  */
16523
16509
  dispose() {
16524
- var _a, _b, _c, _d;
16525
16510
  this.cancel();
16526
16511
  this.emitEvent({ type: "dispose" });
16527
16512
  if (this.frameId)
16528
16513
  cancelAnimationFrame(this.frameId);
16529
16514
  this.frameId = 0;
16530
16515
  this.setActiveDragger("");
16531
- (_a = this._zoomWheelDragger) === null || _a === void 0 ? void 0 : _a.dispose();
16532
- (_b = this._gestureManager) === null || _b === void 0 ? void 0 : _b.dispose();
16533
16516
  this.removeAllListeners();
16534
- (_c = this._resizeObserver) === null || _c === void 0 ? void 0 : _c.disconnect();
16517
+ if (this._gestureManager)
16518
+ this._gestureManager.dispose();
16519
+ this._gestureManager = undefined;
16520
+ if (this._zoomWheelDragger)
16521
+ this._zoomWheelDragger.dispose();
16522
+ this._zoomWheelDragger = undefined;
16523
+ if (this._resizeObserver)
16524
+ this._resizeObserver.disconnect();
16535
16525
  this._resizeObserver = undefined;
16536
16526
  this.markup.dispose();
16537
- this.canvasEvents.forEach((x) => { var _a; return (_a = this.canvas) === null || _a === void 0 ? void 0 : _a.removeEventListener(x, this.canvaseventlistener); });
16538
- this.canvas = undefined;
16539
- (_d = this.visualizeJs) === null || _d === void 0 ? void 0 : _d.getViewer().clear();
16540
- this.visualizeJs = undefined;
16527
+ if (this.canvas) {
16528
+ this.canvasEvents.forEach((x) => this.canvas.removeEventListener(x, this.canvaseventlistener));
16529
+ this.canvas = undefined;
16530
+ }
16531
+ if (this._visualizeJs)
16532
+ this._visualizeJs.getViewer().clear();
16533
+ this._visualizeJs = undefined;
16541
16534
  return this;
16542
16535
  }
16543
16536
  /**
@@ -16640,6 +16633,13 @@
16640
16633
  this._isRunAsyncUpdate = false;
16641
16634
  }
16642
16635
  }
16636
+ /**
16637
+ * Returns `VisualizeJS`
16638
+ * {@link https://cloud.opendesign.com/docs/index.html#/visualizejs_api | module} instance.
16639
+ */
16640
+ get visualizeJs() {
16641
+ return this._visualizeJs;
16642
+ }
16643
16643
  /**
16644
16644
  * Returns `VisualizeJS`
16645
16645
  * {@link https://cloud.opendesign.com/docs/index.html#/visualizejs_api | module} instance.
@@ -16829,7 +16829,7 @@
16829
16829
  *
16830
16830
  * Fires:
16831
16831
  *
16832
- * - {@link ChangeActiveDragger | changeactivedragger}
16832
+ * - {@link ChangeActiveDraggerEvent | changeactivedragger}
16833
16833
  *
16834
16834
  * @param name - Dragger name. Can be one of the {@link Viewer#draggers | draggers} list.
16835
16835
  * @returns Returns active dragger instance or `null` if there is no dragger with the given name.
@@ -17189,7 +17189,7 @@
17189
17189
  colorizeAllMarkup(r = 255, g = 0, b = 0) {
17190
17190
  this.markup.colorizeAllMarkup(r, g, b);
17191
17191
  }
17192
- /**
17192
+ /*
17193
17193
  * Add an empty markup entity to the overlay.
17194
17194
  */
17195
17195
  addMarkupEntity(entityName) {
@@ -17209,10 +17209,9 @@
17209
17209
  }
17210
17210
  /**
17211
17211
  * Draw a viewpoint. To get a list of available model viewpoints, use the
17212
- * {@link Model#getViewpoints | Model.getViewpoints()} or
17213
- * {@link File#getViewpoints | File.getViewpoints()}.
17212
+ * {@link Model.getViewpoints()} or {@link File.getViewpoints()}.
17214
17213
  *
17215
- * @param viewpoint - Viewpoint.
17214
+ * @param viewpoint - Viewpoint data.
17216
17215
  */
17217
17216
  drawViewpoint(viewpoint) {
17218
17217
  this.setOrthogonalCameraSettings(viewpoint.orthogonal_camera);
@@ -17221,8 +17220,7 @@
17221
17220
  }
17222
17221
  /**
17223
17222
  * Create a viewpoint. To add a viewpoint to the list of model viewpoints, use the
17224
- * {@link Model#saveViewpoint | Model.saveViewpoint()} or
17225
- * {@link File#saveViewpoint | File.saveViewpoint()}.
17223
+ * {@link Model.saveViewpoint()} or {@link File.saveViewpoint()}.
17226
17224
  */
17227
17225
  createViewpoint() {
17228
17226
  const vp = this.markup.getViewpoint();