@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,160 @@
|
|
|
1
|
+
import { Plugin } from "../../viewer/Plugin";
|
|
2
|
+
import { Viewer } from "../../viewer/Viewer";
|
|
3
|
+
|
|
4
|
+
export declare type NavCubePluginConfiguration = {
|
|
5
|
+
/** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
|
|
6
|
+
id?: string;
|
|
7
|
+
/** ID of an existing HTML canvas to display the NavCube - either this or canvasElement is mandatory. When both values are given, the element reference is always preferred to the ID. */
|
|
8
|
+
canvasId?: string;
|
|
9
|
+
/** Reference of an existing HTML canvas to display the NavCube - either this or canvasId is mandatory. When both values are given, the element reference is always preferred to the ID. */
|
|
10
|
+
canvasElement?: HTMLCanvasElement;
|
|
11
|
+
/** Initial visibility. */
|
|
12
|
+
visible?: boolean;
|
|
13
|
+
/** Whether the shadow of the cube is visible. */
|
|
14
|
+
shadowVisible?: boolean;
|
|
15
|
+
/** Whether the {@link Camera} flies or jumps to each selected axis or diagonal. */
|
|
16
|
+
cameraFly?: string;
|
|
17
|
+
/** How much of the field-of-view, in degrees, that the 3D scene should fill the {@link Canvas} when the {@link Camera} moves to an axis or diagonal. */
|
|
18
|
+
cameraFitFOV?: string;
|
|
19
|
+
/** When flying the {@link Camera} to each new axis or diagonal, how long, in seconds, that the Camera takes to get there. */
|
|
20
|
+
cameraFlyDuration?: string;
|
|
21
|
+
/** Custom uniform color for the faces of the NavCube. */
|
|
22
|
+
color?: string;
|
|
23
|
+
/** Custom color for the front face of the NavCube. Overrides ````color````. */
|
|
24
|
+
frontColor?: string;
|
|
25
|
+
/** Custom color for the back face of the NavCube. Overrides ````color````. */
|
|
26
|
+
backColor?: string;
|
|
27
|
+
/** Custom color for the left face of the NavCube. Overrides ````color````. */
|
|
28
|
+
leftColor?: string;
|
|
29
|
+
/** Custom color for the right face of the NavCube. Overrides ````color````. */
|
|
30
|
+
rightColor?: string;
|
|
31
|
+
/** Custom color for the top face of the NavCube. Overrides ````color````. */
|
|
32
|
+
topColor?: string;
|
|
33
|
+
/** Custom color for the bottom face of the NavCube. Overrides ````color````. */
|
|
34
|
+
bottomColor?: string;
|
|
35
|
+
/** Custom color for highlighting regions on the NavCube as we hover the pointer over them. */
|
|
36
|
+
hoverColor?: string;
|
|
37
|
+
/** Sets whether the axis, corner and edge-aligned views will fit the view to the entire {@link Scene} or just to visible object-{@link Entity}s. Entitys are visible objects when {@link Entity.isObject} and {@link Entity.visible} are both ````true````. */
|
|
38
|
+
fitVisible?: boolean;
|
|
39
|
+
/** Sets whether the NavCube switches between perspective and orthographic projections in synchrony with the {@link Camera}. When ````false````, the NavCube will always be rendered with perspective projection. */
|
|
40
|
+
synchProjection?: boolean;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* {@link Viewer} plugin that lets us look at the entire {@link Scene} from along a chosen axis or diagonal.
|
|
45
|
+
*
|
|
46
|
+
*/
|
|
47
|
+
export declare class NavCubePlugin extends Plugin {
|
|
48
|
+
/**
|
|
49
|
+
* @constructor
|
|
50
|
+
* @param {Viewer} viewer The Viewer.
|
|
51
|
+
* @param {NavCubePluginConfiguration} cfg NavCubePlugin configuration.
|
|
52
|
+
*/
|
|
53
|
+
constructor(viewer: Viewer, cfg?: NavCubePluginConfiguration);
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Sets if the NavCube is visible.
|
|
57
|
+
*
|
|
58
|
+
* @param {Boolean} value Whether or not the NavCube is visible.
|
|
59
|
+
*/
|
|
60
|
+
setVisible(value?: boolean): void;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Gets if the NavCube is visible.
|
|
64
|
+
*
|
|
65
|
+
* @return {Boolean} True when the NavCube is visible.
|
|
66
|
+
*/
|
|
67
|
+
getVisible(): boolean;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Sets whether the axis, corner and edge-aligned views will fit the
|
|
71
|
+
* view to the entire {@link Scene} or just to visible object-{@link Entity}s.
|
|
72
|
+
*
|
|
73
|
+
* Entitys are visible objects when {@link Entity.isObject} and {@link Entity.visible} are both ````true````.
|
|
74
|
+
*
|
|
75
|
+
* @param {Boolean} value Set ````true```` to fit only visible object-Entitys.
|
|
76
|
+
*/
|
|
77
|
+
setFitVisible(value: boolean): void;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Gets whether the axis, corner and edge-aligned views will fit the
|
|
81
|
+
* view to the entire {@link Scene} or just to visible object-{@link Entity}s.
|
|
82
|
+
*
|
|
83
|
+
* Entitys are visible objects when {@link Entity.isObject} and {@link Entity.visible} are both ````true````.
|
|
84
|
+
*
|
|
85
|
+
* @return {Boolean} True when fitting only visible object-Entitys.
|
|
86
|
+
*/
|
|
87
|
+
getFitVisible(): boolean;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Sets whether the {@link Camera} flies or jumps to each selected axis or diagonal.
|
|
91
|
+
*
|
|
92
|
+
* Default is ````true````, to fly.
|
|
93
|
+
*
|
|
94
|
+
* @param {Boolean} value Set ````true```` to fly, else ````false```` to jump.
|
|
95
|
+
*/
|
|
96
|
+
setCameraFly(value: boolean): void;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Gets whether the {@link Camera} flies or jumps to each selected axis or diagonal.
|
|
100
|
+
*
|
|
101
|
+
* Default is ````true````, to fly.
|
|
102
|
+
*
|
|
103
|
+
* @returns {Boolean} Returns ````true```` to fly, else ````false```` to jump.
|
|
104
|
+
*/
|
|
105
|
+
getCameraFly(): boolean;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Sets how much of the field-of-view, in degrees, that the {@link Scene} should
|
|
109
|
+
* fill the canvas when flying or jumping the {@link Camera} to each selected axis or diagonal.
|
|
110
|
+
*
|
|
111
|
+
* Default value is ````45````.
|
|
112
|
+
*
|
|
113
|
+
* @param {Number} value New FOV value.
|
|
114
|
+
*/
|
|
115
|
+
setCameraFitFOV(value: number): void;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Gets how much of the field-of-view, in degrees, that the {@link Scene} should
|
|
119
|
+
* fill the canvas when flying or jumping the {@link Camera} to each selected axis or diagonal.
|
|
120
|
+
*
|
|
121
|
+
* Default value is ````45````.
|
|
122
|
+
*
|
|
123
|
+
* @returns {Number} Current FOV value.
|
|
124
|
+
*/
|
|
125
|
+
getCameraFitFOV(): number;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* When flying the {@link Camera} to each new axis or diagonal, sets how long, in seconds, that the Camera takes to get there.
|
|
129
|
+
*
|
|
130
|
+
* Default is ````0.5````.
|
|
131
|
+
*
|
|
132
|
+
* @param {Boolean} value Camera flight duration in seconds.
|
|
133
|
+
*/
|
|
134
|
+
setCameraFlyDuration(value: boolean): void;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* When flying the {@link Camera} to each new axis or diagonal, gets how long, in seconds, that the Camera takes to get there.
|
|
138
|
+
*
|
|
139
|
+
* Default is ````0.5````.
|
|
140
|
+
*
|
|
141
|
+
* @returns {Boolean} Camera flight duration in seconds.
|
|
142
|
+
*/
|
|
143
|
+
getCameraFlyDuration(): boolean;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Sets whether the NavCube switches between perspective and orthographic projections in synchrony with
|
|
147
|
+
* the {@link Camera}. When ````false````, the NavCube will always be rendered with perspective projection.
|
|
148
|
+
*
|
|
149
|
+
* @param {Boolean} value Set ````true```` to keep NavCube projection synchronized with {@link Camera.projection}.
|
|
150
|
+
*/
|
|
151
|
+
setSynchProjection(value: boolean): void;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Gets whether the NavCube switches between perspective and orthographic projections in synchrony with
|
|
155
|
+
* the {@link Camera}. When ````false````, the NavCube will always be rendered with perspective projection.
|
|
156
|
+
*
|
|
157
|
+
* @return {Boolean} True when NavCube projection is synchronized with {@link Camera.projection}.
|
|
158
|
+
*/
|
|
159
|
+
getSynchProjection(): boolean;
|
|
160
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./NavCubePlugin";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Plugin, Viewer, PerformanceModel } from "../../viewer";
|
|
2
|
+
|
|
3
|
+
export declare type LoadOBJModel = {
|
|
4
|
+
/** ID to assign to the model's root {@link Entity}, unique among all components in the Viewer's {@link Scene}. */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Path to an OBJ file. */
|
|
7
|
+
src: string;
|
|
8
|
+
/** Path to an optional metadata file. */
|
|
9
|
+
metaModelSrc?: string;
|
|
10
|
+
/** The model World-space 3D position. */
|
|
11
|
+
position?: number[];
|
|
12
|
+
/** The model's World-space scale. */
|
|
13
|
+
scale?: number[];
|
|
14
|
+
/** The model's World-space rotation, as Euler angles given in degrees, for each of the X, Y and Z axis. */
|
|
15
|
+
rotation?: number[];
|
|
16
|
+
/** The model's world transform matrix. Overrides the position, scale and rotation parameters. */
|
|
17
|
+
matrix?: number[];
|
|
18
|
+
/** 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. */
|
|
19
|
+
edgeThreshold?: number;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* {@link Viewer} plugin that loads models from [OBJ](https://en.wikipedia.org/wiki/Wavefront_.obj_file) files.
|
|
24
|
+
*/
|
|
25
|
+
export declare class OBJLoaderPlugin extends Plugin {
|
|
26
|
+
/**
|
|
27
|
+
* @constructor
|
|
28
|
+
*
|
|
29
|
+
* @param {Viewer} viewer The Viewer.
|
|
30
|
+
* @param {Object} cfg Plugin configuration.
|
|
31
|
+
* @param {String} [cfg.id="OBJLoader"] Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}.
|
|
32
|
+
*/
|
|
33
|
+
constructor(viewer: Viewer, cfg: {
|
|
34
|
+
id?: string;
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Loads an OBJ model from a file into this OBJLoader's {@link Viewer}.
|
|
39
|
+
*
|
|
40
|
+
* @param {LoadOBJModel} params Loading parameters.
|
|
41
|
+
* @returns {PerformanceModel} Entity representing the model, which will have {@link Entity.isModel} set ````true```` and will be registered by {@link Entity.id} in {@link Scene.models}
|
|
42
|
+
*/
|
|
43
|
+
load(params: LoadOBJModel): PerformanceModel;
|
|
44
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./OBJLoaderPlugin";
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { Plugin, Viewer, PerformanceModel } from "../../viewer";
|
|
2
|
+
|
|
3
|
+
export declare interface ISTLDefaultDataSource {
|
|
4
|
+
/**
|
|
5
|
+
* Gets STL data.
|
|
6
|
+
*
|
|
7
|
+
* @param {String|Number} src Identifies the STL file.
|
|
8
|
+
* @param {Function} ok Fired on successful loading of the STL file.
|
|
9
|
+
* @param {Function} error Fired on error while loading the STL file.
|
|
10
|
+
*/
|
|
11
|
+
getSTL(src: string | number, ok: Function, error: Function): void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export declare type STLLoaderPluginCOnfiguration = {
|
|
15
|
+
/** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
|
|
16
|
+
id?: string;
|
|
17
|
+
/** A custom data source through which the STLLoaderPlugin can load STL files. Defaults to an instance of {@link STLDefaultDataSource}, which loads over HTTP. */
|
|
18
|
+
dataSource?: ISTLDefaultDataSource;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export declare type LoadSTLModel = {
|
|
22
|
+
/** ID to assign to the model's root {@link Entity}, unique among all components in the Viewer's {@link Scene}. */
|
|
23
|
+
id: string;
|
|
24
|
+
/** Path to an STL file. Overrides the ````stl```` parameter. */
|
|
25
|
+
src?: string;
|
|
26
|
+
/** Contents of an STL file, either binary of ASCII. Overridden by the ````src```` parameter. */
|
|
27
|
+
stl?: string;
|
|
28
|
+
/** Whether or not to renders the model with edges emphasized. */
|
|
29
|
+
edges?: boolean;
|
|
30
|
+
/** 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. */
|
|
31
|
+
origin?: number[];
|
|
32
|
+
/** The model single-precision 3D position, relative to the ````origin```` parameter. */
|
|
33
|
+
position?: number[];
|
|
34
|
+
/** The model's scale. */
|
|
35
|
+
scale?: number[];
|
|
36
|
+
/** The model's orientation, given as Euler angles in degrees, for each of the X, Y and Z axis. */
|
|
37
|
+
rotation?: number[];
|
|
38
|
+
/** The model's world transform matrix. Overrides the position, scale and rotation parameters. */
|
|
39
|
+
matrix?: number[];
|
|
40
|
+
/** When true, allows visible backfaces, wherever specified in the 3DXML. When false, ignores backfaces. */
|
|
41
|
+
backfaces?: boolean;
|
|
42
|
+
/** When true, automatically converts face-oriented normals to vertex normals for a smooth appearance. */
|
|
43
|
+
smoothNormals?: boolean;
|
|
44
|
+
/** 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. */
|
|
45
|
+
smoothNormalsAngleThreshold?: number;
|
|
46
|
+
/** 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. */
|
|
47
|
+
edgeThreshold?: number;
|
|
48
|
+
/** When true, creates a separate {@link Mesh} for each group of faces that share the same vertex colors. Only works with binary STL. */
|
|
49
|
+
splitMeshes?: boolean;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* {@link Viewer} plugin that loads models from <a href="https://en.wikipedia.org/wiki/STL_(file_format)">STL</a> files.
|
|
54
|
+
*/
|
|
55
|
+
export declare class STLLoaderPlugin extends Plugin {
|
|
56
|
+
/**
|
|
57
|
+
* @constructor
|
|
58
|
+
* @param {Viewer} viewer The Viewer.
|
|
59
|
+
* @param {STLLoaderPluginCOnfiguration} [cfg] Plugin configuration.
|
|
60
|
+
*/
|
|
61
|
+
constructor(viewer: Viewer, cfg?: STLLoaderPluginCOnfiguration);
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Sets a custom data source through which the STLLoaderPlugin can load STL files.
|
|
65
|
+
*
|
|
66
|
+
* Default value is {@link STLDefaultDataSource}, which loads via an XMLHttpRequest.
|
|
67
|
+
*
|
|
68
|
+
* @type {ISTLDefaultDataSource}
|
|
69
|
+
*/
|
|
70
|
+
set dataSource(arg: ISTLDefaultDataSource);
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Gets the custom data source through which the STLLoaderPlugin can load STL files.
|
|
74
|
+
*
|
|
75
|
+
* Default value is {@link STLDefaultDataSource}, which loads via an XMLHttpRequest.
|
|
76
|
+
*
|
|
77
|
+
* @type {ISTLDefaultDataSource}
|
|
78
|
+
*/
|
|
79
|
+
get dataSource(): ISTLDefaultDataSource;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Loads an STL model from a file into this STLLoaderPlugin's {@link Viewer}.
|
|
83
|
+
*
|
|
84
|
+
* @param {LoadSTLModel} params Loading parameters.
|
|
85
|
+
* @returns {PerformanceModel} Entity representing the model, which will have {@link Entity.isModel} set ````true```` and will be registered by {@link Entity.id} in {@link Scene.models}
|
|
86
|
+
*/
|
|
87
|
+
load(params: LoadSTLModel): PerformanceModel;
|
|
88
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./STLLoaderPlugin";
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Plugin, Viewer } from "../../viewer";
|
|
2
|
+
import { SectionPlane } from "../../viewer/scene/sectionPlane";
|
|
3
|
+
|
|
4
|
+
export declare type SectionPlanesPluginConfiguration = {
|
|
5
|
+
/** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
|
|
6
|
+
id?: string;
|
|
7
|
+
/** ID of a canvas element to display the overview. */
|
|
8
|
+
overviewCanvasId?: string;
|
|
9
|
+
/** Initial visibility of the overview canvas. */
|
|
10
|
+
overviewVisible?: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* SectionPlanesPlugin is a {@link Viewer} plugin that manages {@link SectionPlane}s.
|
|
15
|
+
*/
|
|
16
|
+
export declare class SectionPlanesPlugin extends Plugin {
|
|
17
|
+
/**
|
|
18
|
+
* @constructor
|
|
19
|
+
* @param {Viewer} viewer The Viewer.
|
|
20
|
+
* @param {SectionPlanesPluginConfiguration} cfg Plugin configuration.
|
|
21
|
+
*/
|
|
22
|
+
constructor(viewer: Viewer, cfg?: SectionPlanesPluginConfiguration);
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Sets if the overview canvas is visible.
|
|
26
|
+
*
|
|
27
|
+
* @param {Boolean} visible Whether or not the overview canvas is visible.
|
|
28
|
+
*/
|
|
29
|
+
setOverviewVisible(visible: boolean): void;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Gets if the overview canvas is visible.
|
|
33
|
+
*
|
|
34
|
+
* @return {Boolean} True when the overview canvas is visible.
|
|
35
|
+
*/
|
|
36
|
+
getOverviewVisible(): boolean;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Returns a map of the {@link SectionPlane}s created by this SectionPlanesPlugin.
|
|
40
|
+
*
|
|
41
|
+
* @returns {{String:SectionPlane}} A map containing the {@link SectionPlane}s, each mapped to its {@link SectionPlane.id}.
|
|
42
|
+
*/
|
|
43
|
+
get sectionPlanes(): { [key:string]: SectionPlane };
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Creates a {@link SectionPlane}.
|
|
47
|
+
*
|
|
48
|
+
* The {@link SectionPlane} will be registered by {@link SectionPlane.id} in {@link SectionPlanesPlugin.sectionPlanes}.
|
|
49
|
+
*
|
|
50
|
+
* @param {Object} params {@link SectionPlane} configuration.
|
|
51
|
+
* @param {String} [params.id] Unique ID to assign to the {@link SectionPlane}. Must be unique among all components in the {@link Viewer}'s {@link Scene}. Auto-generated when omitted.
|
|
52
|
+
* @param {Number[]} [params.pos=[0,0,0]] World-space position of the {@link SectionPlane}.
|
|
53
|
+
* @param {Number[]} [params.dir=[0,0,-1]] World-space vector indicating the orientation of the {@link SectionPlane}.
|
|
54
|
+
* @param {Boolean} [params.active=true] Whether the {@link SectionPlane} is initially active. Only clips while this is true.
|
|
55
|
+
* @returns {SectionPlane} The new {@link SectionPlane}.
|
|
56
|
+
*/
|
|
57
|
+
createSectionPlane(params?: {
|
|
58
|
+
id?: string;
|
|
59
|
+
pos?: number[];
|
|
60
|
+
dir?: number[];
|
|
61
|
+
active?: boolean;
|
|
62
|
+
}): SectionPlane;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Inverts the direction of {@link SectionPlane.dir} on every existing SectionPlane.
|
|
66
|
+
*
|
|
67
|
+
* Inverts all SectionPlanes, including those that were not created with SectionPlanesPlugin.
|
|
68
|
+
*/
|
|
69
|
+
flipSectionPlanes(): void;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Shows the 3D editing gizmo for a {@link SectionPlane}.
|
|
73
|
+
*
|
|
74
|
+
* @param {String} id ID of the {@link SectionPlane}.
|
|
75
|
+
*/
|
|
76
|
+
showControl(id: string): void;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Gets the ID of the {@link SectionPlane} that the 3D editing gizmo is shown for.
|
|
80
|
+
*
|
|
81
|
+
* Returns ````null```` when the editing gizmo is not shown.
|
|
82
|
+
*
|
|
83
|
+
* @returns {String} ID of the the {@link SectionPlane} that the 3D editing gizmo is shown for, if shown, else ````null````.
|
|
84
|
+
*/
|
|
85
|
+
getShownControl(): string;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Hides the 3D {@link SectionPlane} editing gizmo if shown.
|
|
89
|
+
*/
|
|
90
|
+
hideControl(): void;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Destroys a {@link SectionPlane} created by this SectionPlanesPlugin.
|
|
94
|
+
*
|
|
95
|
+
* @param {String} id ID of the {@link SectionPlane}.
|
|
96
|
+
*/
|
|
97
|
+
destroySectionPlane(id: string): void;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Destroys all {@link SectionPlane}s created by this SectionPlanesPlugin.
|
|
101
|
+
*/
|
|
102
|
+
clear(): void;
|
|
103
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SectionPlanesPlugin";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Plugin, Viewer } from "../../viewer";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* {@link Viewer} plugin that manages skyboxes
|
|
5
|
+
*/
|
|
6
|
+
export declare class SkyboxesPlugin extends Plugin {
|
|
7
|
+
/**
|
|
8
|
+
* @constructor
|
|
9
|
+
* @param {Viewer} viewer The Viewer.
|
|
10
|
+
*/
|
|
11
|
+
constructor(viewer: Viewer);
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Creates a skybox.
|
|
15
|
+
* @param {String} id Unique ID to assign to the skybox.
|
|
16
|
+
* @param {Object} params Skybox configuration.
|
|
17
|
+
* @param {Boolean} [params.active=true] Whether the skybox plane is initially active. Only skyboxes while this is true.
|
|
18
|
+
* @returns {Skybox} The new skybox.
|
|
19
|
+
*/
|
|
20
|
+
createSkybox(id: string, params: {
|
|
21
|
+
active?: boolean;
|
|
22
|
+
}): any; //Skybox;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Destroys a skybox.
|
|
26
|
+
* @param id
|
|
27
|
+
*/
|
|
28
|
+
destroySkybox(id: string): void;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
Destroys all skyboxes.
|
|
32
|
+
*/
|
|
33
|
+
clear(): void;
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SkyboxesPlugin";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { StoreyViewsPlugin } from "./StoreyViewsPlugin";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Information about an ````IfcBuildingStorey````.
|
|
5
|
+
*/
|
|
6
|
+
export declare class Storey {
|
|
7
|
+
/**
|
|
8
|
+
* The {@link StoreyViewsPlugin} this Storey belongs to.
|
|
9
|
+
*
|
|
10
|
+
* @type {StoreyViewsPlugin}
|
|
11
|
+
*/
|
|
12
|
+
plugin: StoreyViewsPlugin;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* ID of the IfcBuildingStorey.
|
|
16
|
+
*
|
|
17
|
+
* This matches IDs of the IfcBuildingStorey's {@link MetaObject} and {@link Entity}.
|
|
18
|
+
*
|
|
19
|
+
* @type {String}
|
|
20
|
+
*/
|
|
21
|
+
storeyId: string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* ID of the model.
|
|
25
|
+
*
|
|
26
|
+
* This matches the ID of the {@link MetaModel} that contains the IfcBuildingStorey's {@link MetaObject}.
|
|
27
|
+
*
|
|
28
|
+
* @type {String|Number}
|
|
29
|
+
*/
|
|
30
|
+
modelId: string | number;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Axis-aligned World-space boundary of the {@link Entity}s that represent the IfcBuildingStorey.
|
|
34
|
+
*
|
|
35
|
+
* The boundary is a six-element Float32Array containing the min/max extents of the
|
|
36
|
+
* axis-aligned boundary, ie. ````[xmin, ymin, zmin, xmax, ymax, zmax]````
|
|
37
|
+
*
|
|
38
|
+
* @type {Number[]}
|
|
39
|
+
*/
|
|
40
|
+
aabb: number[];
|
|
41
|
+
|
|
42
|
+
/** Number of {@link Entity}s within the IfcBuildingStorey.
|
|
43
|
+
*
|
|
44
|
+
* @type {Number}
|
|
45
|
+
*/
|
|
46
|
+
numObjects: number;
|
|
47
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @desc A 2D plan view image of an ````IfcBuildingStorey````.
|
|
3
|
+
*/
|
|
4
|
+
export declare class StoreyMap {
|
|
5
|
+
/**
|
|
6
|
+
* ID of the IfcBuildingStorey.
|
|
7
|
+
*
|
|
8
|
+
* This matches IDs of the IfcBuildingStorey's {@link MetaObject} and {@link Entity}.
|
|
9
|
+
*
|
|
10
|
+
* @type {String}
|
|
11
|
+
*/
|
|
12
|
+
storeyId: string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Base64-encoded plan view image.
|
|
16
|
+
*
|
|
17
|
+
* @type {String}
|
|
18
|
+
*/
|
|
19
|
+
imageData: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* The image format - "png" or "jpeg".
|
|
23
|
+
*
|
|
24
|
+
* @type {String}
|
|
25
|
+
*/
|
|
26
|
+
format: string;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Width of the image, in pixels.
|
|
30
|
+
*
|
|
31
|
+
* @type {Number}
|
|
32
|
+
*/
|
|
33
|
+
width: number;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Height of the image, in pixels.
|
|
37
|
+
*
|
|
38
|
+
* @type {Number}
|
|
39
|
+
*/
|
|
40
|
+
height: number;
|
|
41
|
+
}
|