@xeokit/xeokit-sdk 2.6.54 → 2.6.57

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.
Files changed (37) hide show
  1. package/dist/xeokit-sdk.cjs.js +1414 -1786
  2. package/dist/xeokit-sdk.es.js +1412 -1787
  3. package/dist/xeokit-sdk.es5.js +732 -725
  4. package/dist/xeokit-sdk.min.cjs.js +5 -5
  5. package/dist/xeokit-sdk.min.es.js +5 -5
  6. package/dist/xeokit-sdk.min.es5.js +4 -4
  7. package/package.json +1 -1
  8. package/src/plugins/AngleMeasurementsPlugin/AngleMeasurement.js +155 -415
  9. package/src/plugins/AngleMeasurementsPlugin/AngleMeasurementsMouseControl.js +1 -1
  10. package/src/plugins/AnnotationsPlugin/Annotation.js +7 -5
  11. package/src/plugins/DistanceMeasurementsPlugin/DistanceMeasurement.js +236 -750
  12. package/src/plugins/StoreyViewsPlugin/StoreyViewsPlugin.js +51 -0
  13. package/src/plugins/TreeViewPlugin/RenderService.js +2 -1
  14. package/src/plugins/XKTLoaderPlugin/XKTLoaderPlugin.js +5 -1
  15. package/src/plugins/ZonesPlugin/ZonesPlugin.js +15 -79
  16. package/src/plugins/lib/html/Dot.js +14 -41
  17. package/src/plugins/lib/html/Label.js +10 -37
  18. package/src/plugins/lib/html/MenuEvent.js +74 -0
  19. package/src/plugins/lib/html/Wire.js +20 -47
  20. package/src/plugins/lib/ui/index.js +370 -12
  21. package/src/viewer/Viewer.js +9 -0
  22. package/src/viewer/index.js +1 -0
  23. package/src/viewer/scene/CameraControl/CameraControl.js +38 -0
  24. package/src/viewer/scene/CameraControl/lib/CameraUpdater.js +5 -4
  25. package/src/viewer/scene/CameraControl/lib/handlers/KeyboardPanRotateDollyHandler.js +0 -8
  26. package/src/viewer/scene/CameraControl/lib/handlers/MousePanRotateDollyHandler.js +1 -2
  27. package/src/viewer/scene/CameraControl/lib/handlers/TouchPanRotateAndDollyHandler.js +2 -1
  28. package/src/viewer/scene/marker/Marker.js +20 -23
  29. package/src/viewer/scene/model/SceneModelEntity.js +5 -0
  30. package/src/viewer/scene/model/vbo/instancing/triangles/VBOInstancingTrianglesLayer.js +1 -1
  31. package/src/viewer/utils/index.js +1 -0
  32. package/src/viewer/utils/os.js +8 -1
  33. package/types/viewer/scene/CameraControl/CameraControl.d.ts +23 -0
  34. package/types/viewer/scene/models/PerformanceModel/index.d.ts +0 -1
  35. package/types/viewer/scene/models/SceneModel.d.ts +0 -3
  36. package/types/viewer/scene/models/SceneModelEntity.d.ts +6 -0
  37. package/types/viewer/scene/nodes/Node.d.ts +1 -1
@@ -334,7 +334,7 @@ export class VBOInstancingTrianglesLayer {
334
334
  state.indicesBuf = new ArrayBuf(gl, gl.ELEMENT_ARRAY_BUFFER, new Uint32Array(geometry.indices), geometry.indices.length, 1, gl.STATIC_DRAW);
335
335
  state.numIndices = geometry.indices.length;
336
336
  }
337
- if (geometry.primitive === "triangles" || geometry.primitive === "solid" || geometry.primitive === "surface") {
337
+ if (geometry.edgeIndices && geometry.edgeIndices.length > 0) {
338
338
  state.edgeIndicesBuf = new ArrayBuf(gl, gl.ELEMENT_ARRAY_BUFFER, new Uint32Array(geometry.edgeIndices), geometry.edgeIndices.length, 1, gl.STATIC_DRAW);
339
339
  }
340
340
 
@@ -0,0 +1 @@
1
+ export * from './os.js';
@@ -5,7 +5,14 @@ const os = {
5
5
  const isSafari = /Safari/i.test(userAgent) && !/Chrome/i.test(userAgent);
6
6
 
7
7
  return isIphone && isSafari;
8
+ },
9
+ isTouchDevice() {
10
+ return (
11
+ 'ontouchstart' in window || //works for most devices
12
+ navigator.maxTouchPoints > 0 || //works for modern touch devices
13
+ navigator.mxMaxTouchPoints > 0 //works for older microsoft touch devices
14
+ )
8
15
  }
9
16
  };
10
17
 
11
- export {os};
18
+ export { os };
@@ -526,6 +526,29 @@ export declare class CameraControl extends Component {
526
526
  */
527
527
  get pointerEnabled(): boolean;
528
528
 
529
+ /**
530
+ * Sets the cursor to be used when a particular action is being performed.
531
+ *
532
+ * Accepted actions are:
533
+ *
534
+ * * "dollyForward" - when the camera is dollying in the forward direction
535
+ * * "dollyBackward" - when the camera is dollying in the backward direction
536
+ * * "pan" - when the camera is being panned
537
+ * * "rotate" - when the camera is being rotated
538
+ *
539
+ * @param {String} action
540
+ * @param {String} style
541
+ */
542
+ setCursorStyle(action: string, style: string): void;
543
+
544
+ /**
545
+ * Gets the current style for a particular action.
546
+ *
547
+ * @param {String} action To get the style for
548
+ * @returns {String} style set on the cursor for action
549
+ */
550
+ getCursorStyle(action: string): string | null;
551
+
529
552
  /**
530
553
  * Sets how much the {@link Camera} dollys each second with keyboard input.
531
554
  *
@@ -1,2 +1 @@
1
1
  export * from "./PerformanceModel";
2
- export * from "./PerformanceNode";
@@ -168,9 +168,6 @@ export declare class SceneModel extends Component {
168
168
  */
169
169
  get aabb(): number[];
170
170
 
171
-
172
- get numEntities(): number;
173
-
174
171
  /**
175
172
  * The number of entities in this SceneModel.
176
173
  *
@@ -411,6 +411,12 @@ export declare abstract class SceneModelEntity implements Entity {
411
411
  */
412
412
  meshes : SceneModelMesh[];
413
413
 
414
+
415
+ /**
416
+ * Identifies if it's a SceneModelEntity
417
+ */
418
+ isSceneModelEntity: boolean;
419
+
414
420
  /**
415
421
  * Destroys this SceneModelEntity.
416
422
  */
@@ -58,7 +58,7 @@ export declare type NodeConfiguration = {
58
58
  /**
59
59
  * An {@link Entity} that is a scene graph node that can have child Nodes and {@link Mesh}es.
60
60
  */
61
- export declare class Node extends Component implements Omit<Entity, "parent"> {
61
+ export declare class Node extends Component {
62
62
  /**
63
63
  * @constructor
64
64
  * @param {Component} owner Owner component. When destroyed, the owner will destroy this component as well.