@xeokit/xeokit-sdk 2.2.5 → 2.3.0-beta-2
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/web-ifc.wasm +0 -0
- package/dist/xeokit-sdk.cjs.js +87051 -79967
- package/dist/xeokit-sdk.es.js +87051 -79967
- package/dist/xeokit-sdk.min.cjs.js +1 -1
- package/dist/xeokit-sdk.min.es.js +1 -1
- package/package.json +18 -22
- package/types/extras/ContextMenu/ContextMenu.d.ts +125 -0
- package/types/extras/ContextMenu/index.d.ts +1 -0
- package/types/extras/index.d.ts +1 -0
- package/types/index.d.ts +3 -0
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurement.d.ts +144 -0
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsControl.d.ts +67 -0
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsPlugin.d.ts +99 -0
- package/types/plugins/AngleMeasurementsPlugin/index.d.ts +1 -0
- package/types/plugins/AnnotationsPlugin/Annotation.d.ts +135 -0
- package/types/plugins/AnnotationsPlugin/AnnotationsPlugin.d.ts +150 -0
- package/types/plugins/AnnotationsPlugin/index.d.ts +2 -0
- package/types/plugins/AxisGizmoPlugin/AxisGizmoPlugin.d.ts +28 -0
- package/types/plugins/AxisGizmoPlugin/index.d.ts +1 -0
- package/types/plugins/BCFViewpointsPlugin/BCFViewpointsPlugin.d.ts +146 -0
- package/types/plugins/BCFViewpointsPlugin/index.d.ts +1 -0
- package/types/plugins/CityJSONLoaderPlugin/CityJSONLoaderPlugin.d.ts +81 -0
- package/types/plugins/CityJSONLoaderPlugin/index.d.ts +1 -0
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurement.d.ts +137 -0
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsControl.d.ts +65 -0
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.d.ts +135 -0
- package/types/plugins/DistanceMeasurementsPlugin/index.d.ts +1 -0
- package/types/plugins/FastNavPlugin/FastNavPlugin.d.ts +203 -0
- package/types/plugins/FastNavPlugin/index.d.ts +1 -0
- package/types/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.d.ts +140 -0
- package/types/plugins/GLTFLoaderPlugin/index.d.ts +1 -0
- package/types/plugins/LASLoaderPlugin/LASLoaderPlugin.d.ts +146 -0
- package/types/plugins/LASLoaderPlugin/index.d.ts +1 -0
- package/types/plugins/NavCubePlugin/NavCubePlugin.d.ts +160 -0
- package/types/plugins/NavCubePlugin/index.d.ts +1 -0
- package/types/plugins/OBJLoaderPlugin/OBJLoaderPlugin.d.ts +44 -0
- package/types/plugins/OBJLoaderPlugin/index.d.ts +1 -0
- package/types/plugins/STLLoaderPlugin/STLLoaderPlugin.d.ts +88 -0
- package/types/plugins/STLLoaderPlugin/index.d.ts +1 -0
- package/types/plugins/SectionPlanesPlugin/SectionPlanesPlugin.d.ts +103 -0
- package/types/plugins/SectionPlanesPlugin/index.d.ts +1 -0
- package/types/plugins/SkyboxesPlugin/SkyboxesPlugin.d.ts +34 -0
- package/types/plugins/SkyboxesPlugin/index.d.ts +1 -0
- package/types/plugins/StoreyViewsPlugin/Storey.d.ts +47 -0
- package/types/plugins/StoreyViewsPlugin/StoreyMap.d.ts +41 -0
- package/types/plugins/StoreyViewsPlugin/StoreyViewsPlugin.d.ts +180 -0
- package/types/plugins/StoreyViewsPlugin/index.d.ts +1 -0
- package/types/plugins/TreeViewPlugin/ModelTreeView.d.ts +24 -0
- package/types/plugins/TreeViewPlugin/TreeViewNode.d.ts +66 -0
- package/types/plugins/TreeViewPlugin/TreeViewPlugin.d.ts +150 -0
- package/types/plugins/TreeViewPlugin/index.d.ts +1 -0
- package/types/plugins/ViewCullPlugin/ViewCullPlugin.d.ts +34 -0
- package/types/plugins/ViewCullPlugin/index.d.ts +1 -0
- package/types/plugins/WebIFCLoaderPlugin/WebIFCLoaderPlugin.d.ts +230 -0
- package/types/plugins/WebIFCLoaderPlugin/index.d.ts +1 -0
- package/types/plugins/XKTLoaderPlugin/XKTLoaderPlugin.d.ts +277 -0
- package/types/plugins/XKTLoaderPlugin/index.d.ts +1 -0
- package/types/plugins/XML3DLoaderPlugin/XML3DLoaderPlugin.d.ts +65 -0
- package/types/plugins/XML3DLoaderPlugin/index.d.ts +1 -0
- package/types/plugins/index.d.ts +34 -0
- package/types/viewer/Configs.d.ts +20 -0
- package/types/viewer/Plugin.d.ts +69 -0
- package/types/viewer/Viewer.d.ts +212 -0
- package/types/viewer/index.d.ts +6 -0
- package/types/viewer/localization/LocaleService.d.ts +183 -0
- package/types/viewer/metadata/IFCObjectDefaults.d.ts +9 -0
- package/types/viewer/metadata/MetaModel.d.ts +65 -0
- package/types/viewer/metadata/MetaObject.d.ts +74 -0
- package/types/viewer/metadata/MetaScene.d.ts +135 -0
- package/types/viewer/metadata/Property.d.ts +29 -0
- package/types/viewer/metadata/PropertySet.d.ts +31 -0
- package/types/viewer/metadata/index.d.ts +6 -0
- package/types/viewer/scene/CameraControl/CameraControl.d.ts +681 -0
- package/types/viewer/scene/Component.d.ts +155 -0
- package/types/viewer/scene/Entity.d.ts +394 -0
- package/types/viewer/scene/camera/Camera.d.ts +364 -0
- package/types/viewer/scene/camera/CameraFlightAnimation.d.ts +167 -0
- package/types/viewer/scene/camera/CameraPath.d.ts +28 -0
- package/types/viewer/scene/camera/CameraPathAnimation.d.ts +95 -0
- package/types/viewer/scene/camera/CustomProjection.d.ts +57 -0
- package/types/viewer/scene/camera/Frustum.d.ts +166 -0
- package/types/viewer/scene/camera/Ortho.d.ts +115 -0
- package/types/viewer/scene/camera/Perspective.d.ts +136 -0
- package/types/viewer/scene/camera/index.d.ts +4 -0
- package/types/viewer/scene/geometry/Geometry.d.ts +7 -0
- package/types/viewer/scene/geometry/ReadableGeometry.d.ts +95 -0
- package/types/viewer/scene/geometry/index.d.ts +1 -0
- package/types/viewer/scene/index.d.ts +17 -0
- package/types/viewer/scene/marker/Marker.d.ts +136 -0
- package/types/viewer/scene/marker/index.d.ts +1 -0
- package/types/viewer/scene/materials/EdgeMaterial.d.ts +83 -0
- package/types/viewer/scene/materials/EmphasisMaterial.d.ts +241 -0
- package/types/viewer/scene/materials/Fresnel.d.ts +148 -0
- package/types/viewer/scene/materials/LinesMaterial.d.ts +71 -0
- package/types/viewer/scene/materials/Material.d.ts +3 -0
- package/types/viewer/scene/materials/PhongMaterial.d.ts +468 -0
- package/types/viewer/scene/materials/PointsMaterial.d.ts +206 -0
- package/types/viewer/scene/materials/Texture.d.ts +260 -0
- package/types/viewer/scene/materials/index.d.ts +6 -0
- package/types/viewer/scene/math/math.d.ts +56 -0
- package/types/viewer/scene/mementos/CameraMemento.d.ts +28 -0
- package/types/viewer/scene/mementos/ModelMemento.d.ts +44 -0
- package/types/viewer/scene/mementos/ObjectsMemento.d.ts +39 -0
- package/types/viewer/scene/mementos/index.d.ts +3 -0
- package/types/viewer/scene/mesh/Mesh.d.ts +786 -0
- package/types/viewer/scene/mesh/index.d.ts +1 -0
- package/types/viewer/scene/models/PerformanceModel/PerformanceModel.d.ts +622 -0
- package/types/viewer/scene/models/PerformanceModel/PerformanceNode.d.ts +302 -0
- package/types/viewer/scene/models/PerformanceModel/index.d.ts +2 -0
- package/types/viewer/scene/models/index.d.ts +1 -0
- package/types/viewer/scene/nodes/Node.d.ts +664 -0
- package/types/viewer/scene/nodes/index.d.ts +1 -0
- package/types/viewer/scene/postfx/SAO.d.ts +209 -0
- package/types/viewer/scene/scene/Scene.d.ts +771 -0
- package/types/viewer/scene/sectionPlane/SectionPlane.d.ts +93 -0
- package/types/viewer/scene/sectionPlane/index.d.ts +1 -0
- package/types/viewer/scene/viewport/Viewport.d.ts +23 -0
- package/types/viewer/scene/viewport/index.d.ts +1 -0
- package/types/viewer/scene/webgl/PickResult.d.ts +103 -0
- package/types/viewer/scene/webgl/index.d.ts +1 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { Entity, Plugin, Viewer } from "../../viewer";
|
|
2
|
+
import { DistanceMeasurementsControl } from "./DistanceMeasurementsControl";
|
|
3
|
+
import { DistanceMeasurement } from "./DistanceMeasurement";
|
|
4
|
+
|
|
5
|
+
export declare type DistanceMeasurementsPluginConfiguration = {
|
|
6
|
+
/** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
|
|
7
|
+
id?: string;
|
|
8
|
+
/** The minimum length, in pixels, of an axis wire beyond which its label is shown. */
|
|
9
|
+
labelMinAxisLength?: number;
|
|
10
|
+
/** Container DOM element for markers and labels. Defaults to ````document.body````. */
|
|
11
|
+
container?: HTMLElement;
|
|
12
|
+
/** The default value of the DistanceMeasurements `visible` property. */
|
|
13
|
+
defaultVisible?: boolean;
|
|
14
|
+
/** The default value of the DistanceMeasurements `originVisible` property. */
|
|
15
|
+
defaultOriginVisible?: boolean;
|
|
16
|
+
/** The default value of the DistanceMeasurements `targetVisible` property. */
|
|
17
|
+
defaultTargetVisible?: boolean;
|
|
18
|
+
/** The default value of the DistanceMeasurements `wireVisible` property. */
|
|
19
|
+
defaultWireVisible?: boolean;
|
|
20
|
+
/** The default value of the DistanceMeasurements `axisVisible` property. */
|
|
21
|
+
defaultAxisVisible?: boolean;
|
|
22
|
+
/** The default color of the length dots, wire and label. */
|
|
23
|
+
defaultColor?: string;
|
|
24
|
+
/** If set, the wires, dots and labels will have this zIndex (+1 for dots and +2 for labels). */
|
|
25
|
+
zIndex?: number;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* {@link Viewer} plugin for measuring point-to-point distances.
|
|
30
|
+
*/
|
|
31
|
+
export declare class DistanceMeasurementsPlugin extends Plugin {
|
|
32
|
+
/**
|
|
33
|
+
* @constructor
|
|
34
|
+
* @param {Viewer} viewer The Viewer.
|
|
35
|
+
* @param {DistanceMeasurementsPluginConfiguration} [cfg] Plugin configuration.
|
|
36
|
+
*/
|
|
37
|
+
constructor(viewer: Viewer, cfg?: DistanceMeasurementsPluginConfiguration);
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Sets the minimum length, in pixels, of an axis wire beyond which its label is shown.
|
|
41
|
+
*
|
|
42
|
+
* The axis wire's label is not shown when its length is less than this value.
|
|
43
|
+
*
|
|
44
|
+
* This is ````25```` pixels by default.
|
|
45
|
+
*
|
|
46
|
+
* Must not be less than ````1````.
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
*/
|
|
50
|
+
set labelMinAxisLength(arg: number);
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Gets the minimum length, in pixels, of an axis wire beyond which its label is shown.
|
|
54
|
+
* @returns {number}
|
|
55
|
+
*/
|
|
56
|
+
get labelMinAxisLength(): number;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Gets the {@link DistanceMeasurementsControl}, which creates {@link DistanceMeasurement}s from user input.
|
|
60
|
+
*
|
|
61
|
+
* @type {DistanceMeasurementsControl}
|
|
62
|
+
*/
|
|
63
|
+
get control(): DistanceMeasurementsControl;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Gets the existing {@link DistanceMeasurement}s, each mapped to its {@link DistanceMeasurement.id}.
|
|
67
|
+
*
|
|
68
|
+
* @type {{String:DistanceMeasurement}}
|
|
69
|
+
*/
|
|
70
|
+
get measurements(): { [key:string]: DistanceMeasurement };
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Creates a {@link DistanceMeasurement}.
|
|
74
|
+
*
|
|
75
|
+
* The DistanceMeasurement is then registered by {@link DistanceMeasurement.id} in {@link DistanceMeasurementsPlugin.measurements}.
|
|
76
|
+
*
|
|
77
|
+
* @param {Object} params {@link DistanceMeasurement} configuration.
|
|
78
|
+
* @param {String} params.id Unique ID to assign to {@link DistanceMeasurement.id}. The DistanceMeasurement will be registered by this in {@link DistanceMeasurementsPlugin.measurements} and {@link Scene.components}. Must be unique among all components in the {@link Viewer}.
|
|
79
|
+
* @param {Number[]} params.origin.worldPos Origin World-space 3D position.
|
|
80
|
+
* @param {Entity} params.origin.entity Origin Entity.
|
|
81
|
+
* @param {Number[]} params.target.worldPos Target World-space 3D position.
|
|
82
|
+
* @param {Entity} params.target.entity Target Entity.
|
|
83
|
+
* @param {Boolean} [params.visible=true] Whether to initially show the {@link DistanceMeasurement}.
|
|
84
|
+
* @param {Boolean} [params.originVisible=true] Whether to initially show the {@link DistanceMeasurement} origin.
|
|
85
|
+
* @param {Boolean} [params.targetVisible=true] Whether to initially show the {@link DistanceMeasurement} target.
|
|
86
|
+
* @param {Boolean} [params.wireVisible=true] Whether to initially show the direct point-to-point wire between {@link DistanceMeasurement.origin} and {@link DistanceMeasurement.target}.
|
|
87
|
+
* @param {Boolean} [params.axisVisible=true] Whether to initially show the axis-aligned wires between {@link DistanceMeasurement.origin} and {@link DistanceMeasurement.target}.
|
|
88
|
+
* @param {string} [params.color] The color of the length dot, wire and label.
|
|
89
|
+
* @returns {DistanceMeasurement} The new {@link DistanceMeasurement}.
|
|
90
|
+
*/
|
|
91
|
+
createMeasurement(params?: {
|
|
92
|
+
id: string;
|
|
93
|
+
origin: {
|
|
94
|
+
entity: Entity;
|
|
95
|
+
worldPos: number[];
|
|
96
|
+
};
|
|
97
|
+
target: {
|
|
98
|
+
entity: Entity;
|
|
99
|
+
worldPos: number[];
|
|
100
|
+
};
|
|
101
|
+
visible?: boolean;
|
|
102
|
+
originVisible?: boolean;
|
|
103
|
+
targetVisible?: boolean;
|
|
104
|
+
wireVisible?: boolean;
|
|
105
|
+
axisVisible?: boolean;
|
|
106
|
+
color?: string;
|
|
107
|
+
}): DistanceMeasurement;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Destroys a {@link DistanceMeasurement}.
|
|
111
|
+
*
|
|
112
|
+
* @param {String} id ID of DistanceMeasurement to destroy.
|
|
113
|
+
*/
|
|
114
|
+
destroyMeasurement(id: string): void;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Destroys all {@link DistanceMeasurement}s.
|
|
118
|
+
*/
|
|
119
|
+
clear(): void;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Fires when a measurement is created.
|
|
123
|
+
* @param {String} event The measurementCreated event
|
|
124
|
+
* @param {Function} callback Callback fired on the event
|
|
125
|
+
*/
|
|
126
|
+
on(event: "measurementCreated", callback: (measurement: DistanceMeasurement)=> void): void;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Fires when a measurement is destroyed.
|
|
130
|
+
* @param {String} event The measurementDestroyed event
|
|
131
|
+
* @param {Function} callback Callback fired on the event
|
|
132
|
+
*/
|
|
133
|
+
on(event: "measurementDestroyed", callback: (measurement: DistanceMeasurement)=> void): void;
|
|
134
|
+
|
|
135
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./DistanceMeasurementsPlugin";
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { Plugin } from "../../viewer/Plugin";
|
|
2
|
+
import { Viewer } from "../../viewer/Viewer";
|
|
3
|
+
|
|
4
|
+
export declare type FastNavPluginConfiguration = {
|
|
5
|
+
/** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
|
|
6
|
+
id?: string;
|
|
7
|
+
/** Whether to temporarily hide physically-based rendering (PBR) whenever we interact with the Viewer. */
|
|
8
|
+
hidePBR?: boolean;
|
|
9
|
+
/** Whether to temporarily hide scalable ambient occlusion (SAO) whenever we interact with the Viewer. */
|
|
10
|
+
hideSAO?: boolean;
|
|
11
|
+
/** Whether to temporarily hide edges whenever we interact with the Viewer.*/
|
|
12
|
+
hideEdges?: boolean;
|
|
13
|
+
/** Whether to temporarily hide transparent objects whenever we interact with the Viewer. */
|
|
14
|
+
hideTransparentObjects?: boolean;
|
|
15
|
+
/** Whether to temporarily down-scale the canvas resolution whenever we interact with the Viewer. */
|
|
16
|
+
scaleCanvasResolution?: number;
|
|
17
|
+
/** The factor by which we downscale the canvas resolution whenever we interact with the Viewer. */
|
|
18
|
+
scaleCanvasResolutionFactor?: number;
|
|
19
|
+
/** Whether to temporarily have a delay before restoring normal rendering after we stop interacting with the Viewer. */
|
|
20
|
+
delayBeforeRestore?: boolean;
|
|
21
|
+
/** Delay in seconds before restoring normal rendering after we stop interacting with the Viewer. */
|
|
22
|
+
delayBeforeRestoreSeconds?: number;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* {@link Viewer} plugin that makes interaction smoother with large models, by temporarily switching
|
|
27
|
+
* the Viewer to faster, lower-quality rendering modes whenever we interact.
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
export declare class FastNavPlugin extends Plugin {
|
|
31
|
+
/**
|
|
32
|
+
* @constructor
|
|
33
|
+
* @param {Viewer} viewer The Viewer.
|
|
34
|
+
* @param {FastNavPluginConfiguration} cfg FastNavPlugin configuration.
|
|
35
|
+
*/
|
|
36
|
+
constructor(viewer: Viewer, cfg?: FastNavPluginConfiguration);
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Sets whether to temporarily hide physically-based rendering (PBR) whenever we interact with the Viewer.
|
|
40
|
+
*
|
|
41
|
+
* Default is ````true````.
|
|
42
|
+
*
|
|
43
|
+
* @param {Boolean} value ````true```` to hide PBR.
|
|
44
|
+
*/
|
|
45
|
+
set hidePBR(value: boolean);
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Gets whether to temporarily hide physically-based rendering (PBR) whenever we interact with the Viewer.
|
|
49
|
+
*
|
|
50
|
+
* Default is ````true````.
|
|
51
|
+
*
|
|
52
|
+
* @return {Boolean} ````true```` if hiding PBR.
|
|
53
|
+
*/
|
|
54
|
+
get hidePBR(): boolean;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Sets whether to temporarily hide scalable ambient shadows (SAO) whenever we interact with the Viewer.
|
|
58
|
+
*
|
|
59
|
+
* Default is ````true````.
|
|
60
|
+
*
|
|
61
|
+
* @param {Boolean} value ````true```` to hide SAO.
|
|
62
|
+
*/
|
|
63
|
+
set hideSAO(value: boolean);
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Gets whether to temporarily hide scalable ambient shadows (SAO) whenever we interact with the Viewer.
|
|
67
|
+
*
|
|
68
|
+
* Default is ````true````.
|
|
69
|
+
*
|
|
70
|
+
* @return {Boolean} ````true```` if hiding SAO.
|
|
71
|
+
*/
|
|
72
|
+
get hideSAO(): boolean;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Sets whether to temporarily hide edges whenever we interact with the Viewer.
|
|
76
|
+
*
|
|
77
|
+
* Default is ````true````.
|
|
78
|
+
*
|
|
79
|
+
* @param {Boolean} value ````true```` to hide edges.
|
|
80
|
+
*/
|
|
81
|
+
set hideEdges(value: boolean);
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Gets whether to temporarily hide edges whenever we interact with the Viewer.
|
|
85
|
+
*
|
|
86
|
+
* Default is ````true````.
|
|
87
|
+
*
|
|
88
|
+
* @return {Boolean} ````true```` if hiding edges.
|
|
89
|
+
*/
|
|
90
|
+
get hideEdges(): boolean;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Sets whether to temporarily hide transparent objects whenever we interact with the Viewer.
|
|
94
|
+
*
|
|
95
|
+
* Does not hide X-rayed, selected, highlighted objects.
|
|
96
|
+
*
|
|
97
|
+
* Default is ````false````.
|
|
98
|
+
*
|
|
99
|
+
* @param {Boolean} value ````true```` to hide transparent objects.
|
|
100
|
+
*/
|
|
101
|
+
set hideTransparentObjects(value: boolean);
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Gets whether to temporarily hide transparent objects whenever we interact with the Viewer.
|
|
105
|
+
*
|
|
106
|
+
* Does not hide X-rayed, selected, highlighted objects.
|
|
107
|
+
*
|
|
108
|
+
* Default is ````false````.
|
|
109
|
+
*
|
|
110
|
+
* @return {Boolean} ````true```` if hiding transparent objects.
|
|
111
|
+
*/
|
|
112
|
+
get hideTransparentObjects(): boolean;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Sets whether to temporarily scale the canvas resolution whenever we interact with the Viewer.
|
|
116
|
+
*
|
|
117
|
+
* Default is ````false````.
|
|
118
|
+
*
|
|
119
|
+
* The scaling factor is configured via {@link FastNavPlugin.scaleCanvasResolutionFactor}.
|
|
120
|
+
*
|
|
121
|
+
* @param {Boolean} scaleCanvasResolution ````true```` to scale the canvas resolution.
|
|
122
|
+
*/
|
|
123
|
+
set scaleCanvasResolution(value: boolean);
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Gets whether to temporarily scale the canvas resolution whenever we interact with the Viewer.
|
|
127
|
+
*
|
|
128
|
+
* Default is ````false````.
|
|
129
|
+
*
|
|
130
|
+
* The scaling factor is configured via {@link FastNavPlugin.scaleCanvasResolutionFactor}.
|
|
131
|
+
*
|
|
132
|
+
* @return {Boolean} ````true```` if scaling the canvas resolution.
|
|
133
|
+
*/
|
|
134
|
+
get scaleCanvasResolution(): boolean;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Sets the factor by which we temporarily scale the canvas resolution when we interact with the viewer.
|
|
138
|
+
*
|
|
139
|
+
* Accepted range is ````[0.0 .. 1.0]````.
|
|
140
|
+
*
|
|
141
|
+
* Default is ````0.6````.
|
|
142
|
+
*
|
|
143
|
+
* Enable canvas resolution scaling by setting {@link FastNavPlugin.scaleCanvasResolution} ````true````.
|
|
144
|
+
*
|
|
145
|
+
* @param {Number} scaleCanvasResolutionFactor Factor by which we scale the canvas resolution.
|
|
146
|
+
*/
|
|
147
|
+
set scaleCanvasResolutionFactor(value: number);
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Gets the factor by which we temporarily scale the canvas resolution when we interact with the viewer.
|
|
151
|
+
*
|
|
152
|
+
* Default is ````0.6````.
|
|
153
|
+
*
|
|
154
|
+
* Enable canvas resolution scaling by setting {@link FastNavPlugin.scaleCanvasResolution} ````true````.
|
|
155
|
+
*
|
|
156
|
+
* @return {Number} Factor by which we scale the canvas resolution.
|
|
157
|
+
*/
|
|
158
|
+
get scaleCanvasResolutionFactor(): number;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Sets whether to have a delay before restoring normal rendering after we stop interacting with the Viewer.
|
|
162
|
+
*
|
|
163
|
+
* The delay duration is configured via {@link FastNavPlugin.delayBeforeRestoreSeconds}.
|
|
164
|
+
*
|
|
165
|
+
* Default is ````true````.
|
|
166
|
+
*
|
|
167
|
+
* @param {Boolean} delayBeforeRestore Whether to have a delay.
|
|
168
|
+
*/
|
|
169
|
+
set delayBeforeRestore(value: boolean);
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Gets whether to have a delay before restoring normal rendering after we stop interacting with the Viewer.
|
|
173
|
+
*
|
|
174
|
+
* The delay duration is configured via {@link FastNavPlugin.delayBeforeRestoreSeconds}.
|
|
175
|
+
*
|
|
176
|
+
* Default is ````true````.
|
|
177
|
+
*
|
|
178
|
+
* @return {Boolean} Whether to have a delay.
|
|
179
|
+
*/
|
|
180
|
+
get delayBeforeRestore(): boolean;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Sets the delay before restoring normal rendering after we stop interacting with the Viewer.
|
|
184
|
+
*
|
|
185
|
+
* The delay is enabled when {@link FastNavPlugin.delayBeforeRestore} is ````true````.
|
|
186
|
+
*
|
|
187
|
+
* Default is ````0.5```` seconds.
|
|
188
|
+
*
|
|
189
|
+
* @param {Number} delayBeforeRestoreSeconds Delay in seconds.
|
|
190
|
+
*/
|
|
191
|
+
set delayBeforeRestoreSeconds(value: number);
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Gets the delay before restoring normal rendering after we stop interacting with the Viewer.
|
|
195
|
+
*
|
|
196
|
+
* The delay is enabled when {@link FastNavPlugin.delayBeforeRestore} is ````true````.
|
|
197
|
+
*
|
|
198
|
+
* Default is ````0.5```` seconds.
|
|
199
|
+
*
|
|
200
|
+
* @return {Number} Delay in seconds.
|
|
201
|
+
*/
|
|
202
|
+
get delayBeforeRestoreSeconds(): number;
|
|
203
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./FastNavPlugin";
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { Plugin, Viewer, PerformanceModel, IFCObjectDefaults } from "../../viewer";
|
|
2
|
+
|
|
3
|
+
export declare interface IGLTFDefaultDataSource {
|
|
4
|
+
/**
|
|
5
|
+
* Gets metamodel JSON.
|
|
6
|
+
*
|
|
7
|
+
* @param {String|Number} metaModelSrc Identifies the metamodel JSON asset.
|
|
8
|
+
* @param {Function(*)} ok Fired on successful loading of the metamodel JSON asset.
|
|
9
|
+
* @param {Function(*)} error Fired on error while loading the metamodel JSON asset.
|
|
10
|
+
*/
|
|
11
|
+
getMetaModel(metaModelSrc: string | number, ok: Function, error: Function): void;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Gets glTF JSON.
|
|
15
|
+
*
|
|
16
|
+
* @param {String|Number} glTFSrc Identifies the glTF JSON asset.
|
|
17
|
+
* @param {Function} ok Fired on successful loading of the glTF JSON asset.
|
|
18
|
+
* @param {Function} error Fired on error while loading the glTF JSON asset.
|
|
19
|
+
*/
|
|
20
|
+
getGLTF(glTFSrc: string | number, ok: Function, error: Function): void;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Gets glTF binary attachment.
|
|
24
|
+
*
|
|
25
|
+
* Note that this method requires the source of the glTF JSON asset. This is because the binary attachment
|
|
26
|
+
* source could be relative to the glTF source, IE. it may not be a global ID.
|
|
27
|
+
*
|
|
28
|
+
* @param {String|Number} glTFSrc Identifies the glTF JSON asset.
|
|
29
|
+
* @param {String|Number} binarySrc Identifies the glTF binary asset.
|
|
30
|
+
* @param {Function} ok Fired on successful loading of the glTF binary asset.
|
|
31
|
+
* @param {Function} error Fired on error while loading the glTF binary asset.
|
|
32
|
+
*/
|
|
33
|
+
getArrayBuffer(glTFSrc: string | number, binarySrc: string | number, ok: Function, error: Function): void;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export declare type GLTFLoaderPluginConfiguration = {
|
|
37
|
+
/** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
|
|
38
|
+
id?: string;
|
|
39
|
+
/** Map of initial default states for each loaded {@link Entity} that represents an object. Default value is {@link IFCObjectDefaults}. */
|
|
40
|
+
objectDefaults?: IFCObjectDefaults;
|
|
41
|
+
/** A custom data source through which the GLTFLoaderPlugin can load metadata, glTF and binary attachments. Defaults to an instance of {@link GLTFDefaultDataSource}, which loads over HTTP. */
|
|
42
|
+
dataSource?: IGLTFDefaultDataSource;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export declare type LoadGLTFModel = {
|
|
46
|
+
/** ID to assign to the root {@link Entity.id}, unique among all components in the Viewer's {@link Scene}, generated automatically by default. */
|
|
47
|
+
id?: string;
|
|
48
|
+
/** Path to a glTF file, as an alternative to the ````gltf```` parameter. */
|
|
49
|
+
src?: string;
|
|
50
|
+
/** glTF JSON, as an alternative to the ````src```` parameter. */
|
|
51
|
+
gltf?: any;
|
|
52
|
+
/** Path to an optional metadata file, as an alternative to the ````metaModelData```` parameter.*/
|
|
53
|
+
metaModelSrc?: string;
|
|
54
|
+
/** JSON model metadata, as an alternative to the ````metaModelSrc```` parameter. */
|
|
55
|
+
metaModelData?: any;
|
|
56
|
+
/** Map of initial default states for each loaded {@link Entity} that represents an object. Default value is {@link IFCObjectDefaults}. */
|
|
57
|
+
objectDefaults?: object;
|
|
58
|
+
/** When loading metadata, only loads objects that have {@link MetaObject}s with {@link MetaObject.type} values in this list. */
|
|
59
|
+
includeTypes?: string[]
|
|
60
|
+
/** When loading metadata, never loads objects that have {@link MetaObject}s with {@link MetaObject.type} values in this list. */
|
|
61
|
+
excludeTypes?: string[]
|
|
62
|
+
/** Whether or not xeokit renders the model with edges emphasized. */
|
|
63
|
+
edges?: boolean;
|
|
64
|
+
/** The double-precision World-space origin of the model's coordinates. */
|
|
65
|
+
origin?: number[]
|
|
66
|
+
/** The single-precision position, relative to ````origin````. */
|
|
67
|
+
position?: number[]
|
|
68
|
+
/** The model's scale. */
|
|
69
|
+
scale?: number[]
|
|
70
|
+
/** The model's orientation, as Euler angles given in degrees, for each of the X, Y and Z axis. */
|
|
71
|
+
rotation?: number[]
|
|
72
|
+
/** The model's world transform matrix. Overrides the position, scale and rotation parameters. Relative to ````origin````. */
|
|
73
|
+
matrix?: number[]
|
|
74
|
+
/** When true, allows visible backfaces, wherever specified in the glTF. When false, ignores backfaces. */
|
|
75
|
+
backfaces?: number[]
|
|
76
|
+
/** When xraying, highlighting, selecting or edging, this is the threshold angle between normals of adjacent triangles, below which their shared wireframe edge is not drawn. */
|
|
77
|
+
edgeThreshold?: number[]
|
|
78
|
+
/** Set ````false```` to load all the materials and textures provided by the glTF file, otherwise leave ````true```` to load the default high-performance representation optimized for low memory usage and efficient rendering. */
|
|
79
|
+
performance?: boolean;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* {@link Viewer} plugin that loads models from [glTF](https://www.khronos.org/gltf/).
|
|
84
|
+
*/
|
|
85
|
+
export declare class GLTFLoaderPlugin extends Plugin {
|
|
86
|
+
/**
|
|
87
|
+
* @constructor
|
|
88
|
+
*
|
|
89
|
+
* @param {Viewer} viewer The Viewer.
|
|
90
|
+
* @param {IGLTFDefaultDataSource} cfg Plugin configuration.
|
|
91
|
+
* @param {String} [cfg.id="GLTFLoader"]
|
|
92
|
+
* @param {Object} [cfg.objectDefaults]
|
|
93
|
+
* @param {Object} [cfg.dataSource]
|
|
94
|
+
*/
|
|
95
|
+
constructor(viewer: Viewer, cfg?:GLTFLoaderPluginConfiguration);
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Sets a custom data source through which the GLTFLoaderPlugin can load metadata, glTF and binary attachments.
|
|
99
|
+
*
|
|
100
|
+
* Default value is {@link GLTFDefaultDataSource}, which loads via an XMLHttpRequest.
|
|
101
|
+
*
|
|
102
|
+
* @type {Object}
|
|
103
|
+
*/
|
|
104
|
+
set dataSource(arg: IGLTFDefaultDataSource);
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Gets the custom data source through which the GLTFLoaderPlugin can load metadata, glTF and binary attachments.
|
|
108
|
+
*
|
|
109
|
+
* Default value is {@link GLTFDefaultDataSource}, which loads via an XMLHttpRequest.
|
|
110
|
+
*
|
|
111
|
+
* @type {Object}
|
|
112
|
+
*/
|
|
113
|
+
get dataSource(): IGLTFDefaultDataSource;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Sets map of initial default states for each loaded {@link Entity} that represents an object.
|
|
117
|
+
*
|
|
118
|
+
* Default value is {@link IFCObjectDefaults}.
|
|
119
|
+
*
|
|
120
|
+
* @type {IFCObjectDefaults}
|
|
121
|
+
*/
|
|
122
|
+
set objectDefaults(arg: IFCObjectDefaults);
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Gets map of initial default states for each loaded {@link Entity} that represents an object.
|
|
126
|
+
*
|
|
127
|
+
* Default value is {@link IFCObjectDefaults}.
|
|
128
|
+
*
|
|
129
|
+
* @type {IFCObjectDefaults}
|
|
130
|
+
*/
|
|
131
|
+
get objectDefaults(): IFCObjectDefaults;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Loads a glTF model from a file into this GLTFLoaderPlugin's {@link Viewer}.
|
|
135
|
+
*
|
|
136
|
+
* @param {LoadGLTFModel} params Loading parameters.
|
|
137
|
+
* @returns {Entity} Entity representing the model, which will have {@link Entity.isModel} set ````true```` and will be registered by {@link Entity.id} in {@link Scene.models}
|
|
138
|
+
*/
|
|
139
|
+
load(params: LoadGLTFModel): PerformanceModel;
|
|
140
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./GLTFLoaderPlugin";
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { PerformanceModel, Plugin, Viewer } from "../../viewer";
|
|
2
|
+
import { ModelStats } from "../index";
|
|
3
|
+
|
|
4
|
+
export declare interface ILASDefaultDataSource {
|
|
5
|
+
/**
|
|
6
|
+
* Gets the contents of the given LAS file in an arraybuffer.
|
|
7
|
+
*
|
|
8
|
+
* @param {String|Number} src Path or ID of an LAS file.
|
|
9
|
+
* @param {Function} ok Callback fired on success, argument is the LAS file in an arraybuffer.
|
|
10
|
+
* @param {Function} error Callback fired on error.
|
|
11
|
+
*/
|
|
12
|
+
getLAS(src: string | number, ok: (LAS: ArrayBuffer) => void, error: (e: Error) => void): void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export declare type LASLoaderPluginConfiguration = {
|
|
16
|
+
/** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
|
|
17
|
+
id?: string;
|
|
18
|
+
/** A custom data source through which the LASLoaderPlugin can load model and metadata files. Defaults to an instance of {@link LASDefaultDataSource}, which loads over HTTP. */
|
|
19
|
+
dataSource?: ILASDefaultDataSource;
|
|
20
|
+
/** Configures LASLoaderPlugin to load every **n** points.*/
|
|
21
|
+
skip?: number;
|
|
22
|
+
/** Configures if LASLoaderPlugin assumes that LAS positions are stored in 64-bit floats instead of 32-bit. */
|
|
23
|
+
fp64?: number;
|
|
24
|
+
/** Configures whether LASLoaderPlugin assumes that LAS colors are encoded using 8 or 16 bits. Accepted values are 8, 16 an "auto". */
|
|
25
|
+
colorDepth?: 8 | 16 | "auto";
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export declare type LoadLASModel = {
|
|
29
|
+
/** ID to assign to the root {@link Entity.id}, unique among all components in the Viewer's {@link Scene}, generated automatically by default. */
|
|
30
|
+
id?: string;
|
|
31
|
+
/** Path to a LAS file, as an alternative to the ````las```` parameter. */
|
|
32
|
+
src?: string;
|
|
33
|
+
/** The LAS file data, as an alternative to the ````src```` parameter. */
|
|
34
|
+
las?: ArrayBuffer;
|
|
35
|
+
/** Whether to load metadata for the LAS model. */
|
|
36
|
+
loadMetadata?: boolean;
|
|
37
|
+
/** The model's World-space double-precision 3D origin. Use this to position the model within xeokit's World coordinate system, using double-precision coordinates. */
|
|
38
|
+
origin?: number[]
|
|
39
|
+
/** The model single-precision 3D position, relative to the ````origin```` parameter. */
|
|
40
|
+
position?: number[]
|
|
41
|
+
/** The model's scale. */
|
|
42
|
+
scale?: number[]
|
|
43
|
+
/** The model's orientation, given as Euler angles in degrees, for each of the X, Y and Z axis. */
|
|
44
|
+
rotation?: number[]
|
|
45
|
+
/** The model's world transform matrix. Overrides the position, scale and rotation parameters. Relative to ````origin````. */
|
|
46
|
+
matrix?: number[]
|
|
47
|
+
/** Collects model statistics. */
|
|
48
|
+
stats?: ModelStats
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* {@link Viewer} plugin that loads lidar point cloud geometry from LAS files.
|
|
53
|
+
*/
|
|
54
|
+
export declare class LASLoaderPlugin extends Plugin {
|
|
55
|
+
/**
|
|
56
|
+
* @constructor
|
|
57
|
+
*
|
|
58
|
+
* @param {Viewer} viewer The Viewer.
|
|
59
|
+
* @param {LASLoaderPluginConfiguration} cfg Plugin configuration.
|
|
60
|
+
*/
|
|
61
|
+
constructor(viewer: Viewer, cfg?: LASLoaderPluginConfiguration);
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Sets a custom data source through which the LASLoaderPlugin can load LAS files.
|
|
65
|
+
*
|
|
66
|
+
* Default value is {@link LASDefaultDataSource}, which loads via HTTP.
|
|
67
|
+
*
|
|
68
|
+
* @type {ILASDefaultDataSource}
|
|
69
|
+
*/
|
|
70
|
+
set dataSource(arg: ILASDefaultDataSource);
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Gets the custom data source through which the LASLoaderPlugin can load LAS files.
|
|
74
|
+
*
|
|
75
|
+
* Default value is {@link LASDefaultDataSource}, which loads via HTTP.
|
|
76
|
+
*
|
|
77
|
+
* @type {ILASDefaultDataSource}
|
|
78
|
+
*/
|
|
79
|
+
get dataSource(): ILASDefaultDataSource;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Configures LASLoaderPlugin to load every **n** points.
|
|
83
|
+
*
|
|
84
|
+
* Default value is ````1````.
|
|
85
|
+
*
|
|
86
|
+
* @param {Number} value The **n**th point that LASLoaderPlugin will read.
|
|
87
|
+
*/
|
|
88
|
+
set skip(arg: number);
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* When LASLoaderPlugin is configured to load every **n** points, returns the value of **n**.
|
|
92
|
+
*
|
|
93
|
+
* Default value is ````1````.
|
|
94
|
+
*
|
|
95
|
+
* @returns {Number} The **n**th point that LASLoaderPlugin will read.
|
|
96
|
+
*/
|
|
97
|
+
get skip(): number;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Configures if LASLoaderPlugin assumes that LAS positions are stored in 64-bit floats instead of 32-bit.
|
|
101
|
+
*
|
|
102
|
+
* Default value is ````false````.
|
|
103
|
+
*
|
|
104
|
+
* @param {Boolean} value True if LASLoaderPlugin assumes that positions are stored in 64-bit floats instead of 32-bit.
|
|
105
|
+
*/
|
|
106
|
+
set fp64(arg: boolean);
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Gets if LASLoaderPlugin assumes that LAS positions are stored in 64-bit floats instead of 32-bit.
|
|
110
|
+
*
|
|
111
|
+
* Default value is ````false````.
|
|
112
|
+
*
|
|
113
|
+
* @returns {Boolean} True if LASLoaderPlugin assumes that positions are stored in 64-bit floats instead of 32-bit.
|
|
114
|
+
*/
|
|
115
|
+
get fp64(): boolean;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Configures whether LASLoaderPlugin assumes that LAS colors are encoded using 8 or 16 bits.
|
|
119
|
+
*
|
|
120
|
+
* Default value is ````8````.
|
|
121
|
+
*
|
|
122
|
+
* Note: LAS specification recommends 16 bits.
|
|
123
|
+
*
|
|
124
|
+
* @param {Number|String} value Valid values are 8, 16 and "auto".
|
|
125
|
+
*/
|
|
126
|
+
set colorDepth(arg: 8 | 16 | "auto");
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Gets whether LASLoaderPlugin assumes that LAS colors are encoded using 8 or 16 bits.
|
|
130
|
+
*
|
|
131
|
+
* Default value is ````8````.
|
|
132
|
+
*
|
|
133
|
+
* Note: LAS specification recommends 16 bits.
|
|
134
|
+
*
|
|
135
|
+
* @returns {Number|String} Possible returned values are 8, 16 and "auto".
|
|
136
|
+
*/
|
|
137
|
+
get colorDepth(): 8 | 16 | "auto";
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Loads an ````LAS```` model into this LASLoaderPlugin's {@link Viewer}.
|
|
141
|
+
*
|
|
142
|
+
* @param {LoadLASModel} params Loading parameters.
|
|
143
|
+
* @returns {Entity} Entity representing the model, which will have {@link Entity.isModel} set ````true```` and will be registered by {@link Entity.id} in {@link Scene.models}.
|
|
144
|
+
*/
|
|
145
|
+
load(params?: LoadLASModel): PerformanceModel;
|
|
146
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./LASLoaderPlugin";
|