@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.
- package/dist/xeokit-sdk.cjs.js +1414 -1786
- package/dist/xeokit-sdk.es.js +1412 -1787
- package/dist/xeokit-sdk.es5.js +732 -725
- package/dist/xeokit-sdk.min.cjs.js +5 -5
- package/dist/xeokit-sdk.min.es.js +5 -5
- package/dist/xeokit-sdk.min.es5.js +4 -4
- package/package.json +1 -1
- package/src/plugins/AngleMeasurementsPlugin/AngleMeasurement.js +155 -415
- package/src/plugins/AngleMeasurementsPlugin/AngleMeasurementsMouseControl.js +1 -1
- package/src/plugins/AnnotationsPlugin/Annotation.js +7 -5
- package/src/plugins/DistanceMeasurementsPlugin/DistanceMeasurement.js +236 -750
- package/src/plugins/StoreyViewsPlugin/StoreyViewsPlugin.js +51 -0
- package/src/plugins/TreeViewPlugin/RenderService.js +2 -1
- package/src/plugins/XKTLoaderPlugin/XKTLoaderPlugin.js +5 -1
- package/src/plugins/ZonesPlugin/ZonesPlugin.js +15 -79
- package/src/plugins/lib/html/Dot.js +14 -41
- package/src/plugins/lib/html/Label.js +10 -37
- package/src/plugins/lib/html/MenuEvent.js +74 -0
- package/src/plugins/lib/html/Wire.js +20 -47
- package/src/plugins/lib/ui/index.js +370 -12
- package/src/viewer/Viewer.js +9 -0
- package/src/viewer/index.js +1 -0
- package/src/viewer/scene/CameraControl/CameraControl.js +38 -0
- package/src/viewer/scene/CameraControl/lib/CameraUpdater.js +5 -4
- package/src/viewer/scene/CameraControl/lib/handlers/KeyboardPanRotateDollyHandler.js +0 -8
- package/src/viewer/scene/CameraControl/lib/handlers/MousePanRotateDollyHandler.js +1 -2
- package/src/viewer/scene/CameraControl/lib/handlers/TouchPanRotateAndDollyHandler.js +2 -1
- package/src/viewer/scene/marker/Marker.js +20 -23
- package/src/viewer/scene/model/SceneModelEntity.js +5 -0
- package/src/viewer/scene/model/vbo/instancing/triangles/VBOInstancingTrianglesLayer.js +1 -1
- package/src/viewer/utils/index.js +1 -0
- package/src/viewer/utils/os.js +8 -1
- package/types/viewer/scene/CameraControl/CameraControl.d.ts +23 -0
- package/types/viewer/scene/models/PerformanceModel/index.d.ts +0 -1
- package/types/viewer/scene/models/SceneModel.d.ts +0 -3
- package/types/viewer/scene/models/SceneModelEntity.d.ts +6 -0
- 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.
|
|
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';
|
package/src/viewer/utils/os.js
CHANGED
|
@@ -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
|
*
|
|
@@ -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
|
|
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.
|