@xtctwins/tctwins-core 1.0.54 → 1.0.56
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/tctwins-core.es5.js +24818 -23053
- package/dist/tctwins-core.min.es5.js +4 -4
- package/package.json +1 -1
- package/types/plugins/BCFViewpointsPlugin/BCFViewpointsPlugin.d.ts +148 -0
- package/types/plugins/BCFViewpointsPlugin/index.d.ts +1 -0
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurement.d.ts +3 -0
- package/types/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.d.ts +142 -0
- package/types/plugins/GLTFLoaderPlugin/index.d.ts +1 -0
- package/types/plugins/LASLoaderPlugin/LASLoaderPlugin.d.ts +240 -0
- package/types/plugins/LASLoaderPlugin/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/index.d.ts +4 -0
- package/types/viewer/scene/postfx/CrossSections.d.ts +42 -0
package/package.json
CHANGED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { Plugin, Viewer } from "../../viewer";
|
|
2
|
+
|
|
3
|
+
export declare type BCFViewpointsPluginConfiguration = {
|
|
4
|
+
/** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
|
|
5
|
+
id?: string;
|
|
6
|
+
/** Identifies the originating system for BCF records. */
|
|
7
|
+
originatingSystem?: string;
|
|
8
|
+
/** Identifies the authoring tool for BCF records. */
|
|
9
|
+
authoringTool?: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* {@link Viewer} plugin that saves and loads BCF viewpoints as JSON objects.
|
|
14
|
+
*/
|
|
15
|
+
export declare class BCFViewpointsPlugin extends Plugin {
|
|
16
|
+
/**
|
|
17
|
+
* @constructor
|
|
18
|
+
* @param {Viewer} viewer The Viewer.
|
|
19
|
+
* @param {BCFViewpointsPluginConfiguration} cfg Plugin configuration.
|
|
20
|
+
*/
|
|
21
|
+
constructor(viewer: Viewer, cfg?: BCFViewpointsPluginConfiguration);
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Identifies the originating system to include in BCF viewpoints saved by this plugin.
|
|
25
|
+
* @type {string}
|
|
26
|
+
*/
|
|
27
|
+
originatingSystem: string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Identifies the authoring tool to include in BCF viewpoints saved by this plugin.
|
|
31
|
+
* @type {string}
|
|
32
|
+
*/
|
|
33
|
+
authoringTool: string;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Saves viewer state to a BCF viewpoint.
|
|
37
|
+
*
|
|
38
|
+
* Note that xeokit's {@link Camera.look} is the **point-of-interest**, whereas the BCF ````camera_direction```` is a
|
|
39
|
+
* direction vector. Therefore, we save ````camera_direction```` as the vector from {@link Camera.eye} to {@link Camera.look}.
|
|
40
|
+
*
|
|
41
|
+
* @param {*} [options] Options for getting the viewpoint.
|
|
42
|
+
* @param {Boolean} [options.spacesVisible=false] Indicates whether ````IfcSpace```` types should be forced visible in the viewpoint.
|
|
43
|
+
* @param {Boolean} [options.openingsVisible=false] Indicates whether ````IfcOpening```` types should be forced visible in the viewpoint.
|
|
44
|
+
* @param {Boolean} [options.spaceBoundariesVisible=false] Indicates whether the boundaries of ````IfcSpace```` types should be visible in the viewpoint.
|
|
45
|
+
* @param {Boolean} [options.snapshot=true] Indicates whether the snapshot should be included in the viewpoint.
|
|
46
|
+
* @param {Boolean} [options.defaultInvisible=false] When ````true````, will save the default visibility of all objects
|
|
47
|
+
* as ````false````. This means that when we load the viewpoint again, and there are additional models loaded that
|
|
48
|
+
* were not saved in the viewpoint, those models will be hidden when we load the viewpoint, and that only the
|
|
49
|
+
* objects in the viewpoint will be visible.
|
|
50
|
+
* @param {Boolean} [options.reverseClippingPlanes=false] When ````true````, clipping planes are reversed (https://github.com/buildingSMART/BCF-XML/issues/193)
|
|
51
|
+
* @returns {*} BCF JSON viewpoint object
|
|
52
|
+
* @example
|
|
53
|
+
*
|
|
54
|
+
* const viewer = new Viewer();
|
|
55
|
+
*
|
|
56
|
+
* const bcfPlugin = new BCFPlugin(viewer, {
|
|
57
|
+
* //...
|
|
58
|
+
* });
|
|
59
|
+
*
|
|
60
|
+
* const viewpoint = bcfPlugin.getViewpoint({ // Options - see constructor
|
|
61
|
+
* spacesVisible: false, // Default
|
|
62
|
+
* spaceBoundariesVisible: false, // Default
|
|
63
|
+
* openingsVisible: false // Default
|
|
64
|
+
* });
|
|
65
|
+
*
|
|
66
|
+
* // viewpoint will resemble the following:
|
|
67
|
+
*
|
|
68
|
+
* {
|
|
69
|
+
* perspective_camera: {
|
|
70
|
+
* camera_view_point: {
|
|
71
|
+
* x: 0.0,
|
|
72
|
+
* y: 0.0,
|
|
73
|
+
* z: 0.0
|
|
74
|
+
* },
|
|
75
|
+
* camera_direction: {
|
|
76
|
+
* x: 1.0,
|
|
77
|
+
* y: 1.0,
|
|
78
|
+
* z: 2.0
|
|
79
|
+
* },
|
|
80
|
+
* camera_up_vector: {
|
|
81
|
+
* x: 0.0,
|
|
82
|
+
* y: 0.0,
|
|
83
|
+
* z: 1.0
|
|
84
|
+
* },
|
|
85
|
+
* field_of_view: 90.0
|
|
86
|
+
* },
|
|
87
|
+
* lines: [],
|
|
88
|
+
* clipping_planes: [{
|
|
89
|
+
* location: {
|
|
90
|
+
* x: 0.5,
|
|
91
|
+
* y: 0.5,
|
|
92
|
+
* z: 0.5
|
|
93
|
+
* },
|
|
94
|
+
* direction: {
|
|
95
|
+
* x: 1.0,
|
|
96
|
+
* y: 0.0,
|
|
97
|
+
* z: 0.0
|
|
98
|
+
* }
|
|
99
|
+
* }],
|
|
100
|
+
* bitmaps: [],
|
|
101
|
+
* snapshot: {
|
|
102
|
+
* snapshot_type: png,
|
|
103
|
+
* snapshot_data: "data:image/png;base64,......"
|
|
104
|
+
* },
|
|
105
|
+
* components: {
|
|
106
|
+
* visibility: {
|
|
107
|
+
* default_visibility: false,
|
|
108
|
+
* exceptions: [{
|
|
109
|
+
* ifc_guid: 4$cshxZO9AJBebsni$z9Yk,
|
|
110
|
+
* originating_system: xeokit.io,
|
|
111
|
+
* authoring_tool_id: xeokit/v1.0
|
|
112
|
+
* }]
|
|
113
|
+
* },
|
|
114
|
+
* selection: [{
|
|
115
|
+
* ifc_guid: "4$cshxZO9AJBebsni$z9Yk",
|
|
116
|
+
* }]
|
|
117
|
+
* }
|
|
118
|
+
* }
|
|
119
|
+
*/
|
|
120
|
+
getViewpoint(options?: any): any;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Sets viewer state to the given BCF viewpoint.
|
|
124
|
+
*
|
|
125
|
+
* Note that xeokit's {@link Camera.look} is the **point-of-interest**, whereas the BCF ````camera_direction```` is a
|
|
126
|
+
* direction vector. Therefore, when loading a BCF viewpoint, we set {@link Camera.look} to the absolute position
|
|
127
|
+
* obtained by offsetting the BCF ````camera_view_point```` along ````camera_direction````.
|
|
128
|
+
*
|
|
129
|
+
* When loading a viewpoint, we also have the option to find {@link Camera.look} as the closest point of intersection
|
|
130
|
+
* (on the surface of any visible and pickable {@link Entity}) with a 3D ray fired from ````camera_view_point```` in
|
|
131
|
+
* the direction of ````camera_direction````.
|
|
132
|
+
*
|
|
133
|
+
* @param {*} bcfViewpoint BCF JSON viewpoint object,
|
|
134
|
+
* shows default visible entities and restores camera to initial default position.
|
|
135
|
+
* @param {*} [options] Options for setting the viewpoint.
|
|
136
|
+
* @param {Boolean} [options.rayCast=true] When ````true```` (default), will attempt to set {@link Camera.look} to the closest
|
|
137
|
+
* point of surface intersection with a ray fired from the BCF ````camera_view_point```` in the direction of ````camera_direction````.
|
|
138
|
+
* @param {Boolean} [options.immediate=true] When ````true```` (default), immediately set camera position.
|
|
139
|
+
* @param {Boolean} [options.duration] Flight duration in seconds. Overrides {@link CameraFlightAnimation.duration}. Only applies when ````immediate```` is ````false````.
|
|
140
|
+
* @param {Boolean} [options.reset=true] When ````true```` (default), set {@link Entity.xrayed} and {@link Entity.highlighted} ````false```` on all scene objects.
|
|
141
|
+
* @param {Boolean} [options.reverseClippingPlanes=false] When ````true````, clipping planes are reversed (https://github.com/buildingSMART/BCF-XML/issues/193)
|
|
142
|
+
* @param {Boolean} [options.updateCompositeObjects=false] When ````true````, then when visibility and selection updates refer to composite objects (eg. an IfcBuildingStorey),
|
|
143
|
+
* then this method will apply the updates to objects within those composites.
|
|
144
|
+
*/
|
|
145
|
+
setViewpoint(bcfViewpoint: any, options?: any): void;
|
|
146
|
+
|
|
147
|
+
getUUID(): string;
|
|
148
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./BCFViewpointsPlugin";
|
|
@@ -80,6 +80,9 @@ export declare class DistanceMeasurement extends Component {
|
|
|
80
80
|
*/
|
|
81
81
|
get targetVisible(): boolean;
|
|
82
82
|
|
|
83
|
+
get xLabel(): any;
|
|
84
|
+
get yLabel(): any;
|
|
85
|
+
get zLabel(): any;
|
|
83
86
|
/**
|
|
84
87
|
* Sets if the axis-aligned wires between {@link DistanceMeasurement#origin} and {@link DistanceMeasurement#target} are enabled.
|
|
85
88
|
*
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { Entity, IFCObjectDefaults, Plugin, SceneModel, Viewer } 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
|
+
/** When true, generate a single MetaObject that represents the entire glTF model, and a MetaObject for each entity within it. */
|
|
81
|
+
autoMetaModel?: boolean;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* {@link Viewer} plugin that loads models from [glTF](https://www.khronos.org/gltf/).
|
|
86
|
+
*/
|
|
87
|
+
export declare class GLTFLoaderPlugin extends Plugin {
|
|
88
|
+
/**
|
|
89
|
+
* @constructor
|
|
90
|
+
*
|
|
91
|
+
* @param {Viewer} viewer The Viewer.
|
|
92
|
+
* @param {IGLTFDefaultDataSource} cfg Plugin configuration.
|
|
93
|
+
* @param {String} [cfg.id="GLTFLoader"]
|
|
94
|
+
* @param {Object} [cfg.objectDefaults]
|
|
95
|
+
* @param {Object} [cfg.dataSource]
|
|
96
|
+
*/
|
|
97
|
+
constructor(viewer: Viewer, cfg?: GLTFLoaderPluginConfiguration);
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Sets a custom data source through which the GLTFLoaderPlugin can load metadata, glTF and binary attachments.
|
|
101
|
+
*
|
|
102
|
+
* Default value is {@link GLTFDefaultDataSource}, which loads via an XMLHttpRequest.
|
|
103
|
+
*
|
|
104
|
+
* @type {Object}
|
|
105
|
+
*/
|
|
106
|
+
set dataSource(arg: IGLTFDefaultDataSource);
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Gets the custom data source through which the GLTFLoaderPlugin can load metadata, glTF and binary attachments.
|
|
110
|
+
*
|
|
111
|
+
* Default value is {@link GLTFDefaultDataSource}, which loads via an XMLHttpRequest.
|
|
112
|
+
*
|
|
113
|
+
* @type {Object}
|
|
114
|
+
*/
|
|
115
|
+
get dataSource(): IGLTFDefaultDataSource;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Sets map of initial default states for each loaded {@link Entity} that represents an object.
|
|
119
|
+
*
|
|
120
|
+
* Default value is {@link IFCObjectDefaults}.
|
|
121
|
+
*
|
|
122
|
+
* @type {IFCObjectDefaults}
|
|
123
|
+
*/
|
|
124
|
+
set objectDefaults(arg: IFCObjectDefaults);
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Gets map of initial default states for each loaded {@link Entity} that represents an object.
|
|
128
|
+
*
|
|
129
|
+
* Default value is {@link IFCObjectDefaults}.
|
|
130
|
+
*
|
|
131
|
+
* @type {IFCObjectDefaults}
|
|
132
|
+
*/
|
|
133
|
+
get objectDefaults(): IFCObjectDefaults;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Loads a glTF model from a file into this GLTFLoaderPlugin's {@link Viewer}.
|
|
137
|
+
*
|
|
138
|
+
* @param {LoadGLTFModel} params Loading parameters.
|
|
139
|
+
* @returns {SceneModel} SceneModel representing the model, which will have {@link Entity.isModel} set ````true```` and will be registered by {@link Entity.id} in {@link Scene.models}.
|
|
140
|
+
*/
|
|
141
|
+
load(params: LoadGLTFModel): SceneModel;
|
|
142
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./GLTFLoaderPlugin";
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { Entity, Plugin, SceneModel, 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
|
+
/** Whether to center the LAS points. Applied before "rotateX", "rotate" and "transform". */
|
|
27
|
+
center?: boolean;
|
|
28
|
+
/** Whether to rotate the LAS point positions 90 degrees. Applied after "center". */
|
|
29
|
+
rotateX?: boolean;
|
|
30
|
+
/** Rotations to apply to the LAS points, given as Euler angles in degrees, for each of the X, Y and Z axis. Rotation is applied after "center" and "rotateX".*/
|
|
31
|
+
rotate?: number[];
|
|
32
|
+
/** 4x4 transform matrix to immediately apply to the LAS points. This is applied after "center", "rotateX" and "rotate". Typically used instead of "rotateX" and "rotate". */
|
|
33
|
+
transform?: number[];
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export declare type LoadLASModel = {
|
|
37
|
+
/** ID to assign to the root {@link Entity.id}, unique among all components in the Viewer's {@link Scene}, generated automatically by default. */
|
|
38
|
+
id?: string;
|
|
39
|
+
/** Path to a LAS file, as an alternative to the ````las```` parameter. */
|
|
40
|
+
src?: string;
|
|
41
|
+
/** The LAS file data, as an alternative to the ````src```` parameter. */
|
|
42
|
+
las?: ArrayBuffer;
|
|
43
|
+
/** Create entity with this id */
|
|
44
|
+
entityId?: string;
|
|
45
|
+
/** Creates a MetaModel from json */
|
|
46
|
+
metaModelJSON?: any;
|
|
47
|
+
/** Whether to load metadata for the LAS model. */
|
|
48
|
+
loadMetadata?: boolean;
|
|
49
|
+
/** 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. */
|
|
50
|
+
origin?: number[];
|
|
51
|
+
/** The model single-precision 3D position, relative to the ````origin```` parameter. */
|
|
52
|
+
position?: number[];
|
|
53
|
+
/** The model's scale. */
|
|
54
|
+
scale?: number[];
|
|
55
|
+
/** The model's orientation, given as Euler angles in degrees, for each of the X, Y and Z axis. */
|
|
56
|
+
rotation?: number[];
|
|
57
|
+
/** The model's world transform matrix. Overrides the position, scale and rotation parameters. Relative to ````origin````. */
|
|
58
|
+
matrix?: number[];
|
|
59
|
+
/** Collects model statistics. */
|
|
60
|
+
stats?: ModelStats;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* {@link Viewer} plugin that loads lidar point cloud geometry from LAS files.
|
|
65
|
+
*/
|
|
66
|
+
export declare class LASLoaderPlugin extends Plugin {
|
|
67
|
+
/**
|
|
68
|
+
* @constructor
|
|
69
|
+
*
|
|
70
|
+
* @param {Viewer} viewer The Viewer.
|
|
71
|
+
* @param {LASLoaderPluginConfiguration} cfg Plugin configuration.
|
|
72
|
+
*/
|
|
73
|
+
constructor(viewer: Viewer, cfg?: LASLoaderPluginConfiguration);
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Sets a custom data source through which the LASLoaderPlugin can load LAS files.
|
|
77
|
+
*
|
|
78
|
+
* Default value is {@link LASDefaultDataSource}, which loads via HTTP.
|
|
79
|
+
*
|
|
80
|
+
* @type {ILASDefaultDataSource}
|
|
81
|
+
*/
|
|
82
|
+
set dataSource(arg: ILASDefaultDataSource);
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Gets the custom data source through which the LASLoaderPlugin can load LAS files.
|
|
86
|
+
*
|
|
87
|
+
* Default value is {@link LASDefaultDataSource}, which loads via HTTP.
|
|
88
|
+
*
|
|
89
|
+
* @type {ILASDefaultDataSource}
|
|
90
|
+
*/
|
|
91
|
+
get dataSource(): ILASDefaultDataSource;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Configures LASLoaderPlugin to load every **n** points.
|
|
95
|
+
*
|
|
96
|
+
* Default value is ````1````.
|
|
97
|
+
*
|
|
98
|
+
* @param {Number} value The **n**th point that LASLoaderPlugin will read.
|
|
99
|
+
*/
|
|
100
|
+
set skip(value: number);
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* When LASLoaderPlugin is configured to load every **n** points, returns the value of **n**.
|
|
104
|
+
*
|
|
105
|
+
* Default value is ````1````.
|
|
106
|
+
*
|
|
107
|
+
* @returns {Number} The **n**th point that LASLoaderPlugin will read.
|
|
108
|
+
*/
|
|
109
|
+
get skip(): number;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Configures if LASLoaderPlugin assumes that LAS positions are stored in 64-bit floats instead of 32-bit.
|
|
113
|
+
*
|
|
114
|
+
* Default value is ````false````.
|
|
115
|
+
*
|
|
116
|
+
* @param {Boolean} value True if LASLoaderPlugin assumes that positions are stored in 64-bit floats instead of 32-bit.
|
|
117
|
+
*/
|
|
118
|
+
set fp64(value: boolean);
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Gets if LASLoaderPlugin assumes that LAS positions are stored in 64-bit floats instead of 32-bit.
|
|
122
|
+
*
|
|
123
|
+
* Default value is ````false````.
|
|
124
|
+
*
|
|
125
|
+
* @returns {Boolean} True if LASLoaderPlugin assumes that positions are stored in 64-bit floats instead of 32-bit.
|
|
126
|
+
*/
|
|
127
|
+
get fp64(): boolean;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Configures whether LASLoaderPlugin assumes that LAS colors are encoded using 8 or 16 bits.
|
|
131
|
+
*
|
|
132
|
+
* Default value is ````8````.
|
|
133
|
+
*
|
|
134
|
+
* Note: LAS specification recommends 16 bits.
|
|
135
|
+
*
|
|
136
|
+
* @param {Number|String} value Valid values are 8, 16 and "auto".
|
|
137
|
+
*/
|
|
138
|
+
set colorDepth(value: 8 | 16 | "auto");
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Gets whether LASLoaderPlugin assumes that LAS colors are encoded using 8 or 16 bits.
|
|
142
|
+
*
|
|
143
|
+
* Default value is ````8````.
|
|
144
|
+
*
|
|
145
|
+
* Note: LAS specification recommends 16 bits.
|
|
146
|
+
*
|
|
147
|
+
* @returns {Number|String} Possible returned values are 8, 16 and "auto".
|
|
148
|
+
*/
|
|
149
|
+
get colorDepth(): 8 | 16 | "auto";
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Gets if LASLoaderPlugin immediately centers LAS positions.
|
|
153
|
+
*
|
|
154
|
+
* If this is ````true```` then centering is the first thing that happens to LAS positions as they are loaded.
|
|
155
|
+
*
|
|
156
|
+
* Default value is ````false````.
|
|
157
|
+
*
|
|
158
|
+
* @returns {Boolean} True if LASLoaderPlugin immediately centers LAS positions.
|
|
159
|
+
*/
|
|
160
|
+
get center(): number[];
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Configures if LASLoaderPlugin immediately centers LAS positions.
|
|
164
|
+
*
|
|
165
|
+
* If this is ````true```` then centering is the first thing that happens to LAS positions as they are loaded.
|
|
166
|
+
*
|
|
167
|
+
* Default value is ````false````.
|
|
168
|
+
*
|
|
169
|
+
* @param {Boolean} value True if LASLoaderPlugin immediately centers LAS positions.
|
|
170
|
+
*/
|
|
171
|
+
set center(value: number[]);
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Gets the current transformation to apply to LAS positions as they are loaded.
|
|
175
|
+
*
|
|
176
|
+
* If this is ````true```` then LAS positions will be transformed right after they are centered.
|
|
177
|
+
*
|
|
178
|
+
* Default value is null.
|
|
179
|
+
*
|
|
180
|
+
* @returns {Number[]|null} A 16-element array containing a 4x4 transformation matrix.
|
|
181
|
+
*/
|
|
182
|
+
get transform(): number[];
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Sets the current transformation to apply to LAS positions as they are loaded.
|
|
186
|
+
*
|
|
187
|
+
* Default value is null.
|
|
188
|
+
*
|
|
189
|
+
* @param {Number[]|null} transform A 16-element array containing a 4x4 transformation matrix.
|
|
190
|
+
*/
|
|
191
|
+
set transform(transform: number[]);
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Gets the current rotations to apply to LAS positions as they are loaded.
|
|
195
|
+
*
|
|
196
|
+
* Rotations are an array of three Euler angles in degrees, for each of the X, Y and Z axis, applied in that order.
|
|
197
|
+
*
|
|
198
|
+
* Default value is null.
|
|
199
|
+
*
|
|
200
|
+
* @returns {Number[]|null} If defined, an array of three Euler angles in degrees, for each of the X, Y and Z axis. Null if undefined.
|
|
201
|
+
*/
|
|
202
|
+
get rotate(): number[];
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Sets the current rotations to apply to LAS positions as they are loaded.
|
|
206
|
+
*
|
|
207
|
+
* Rotations are an array of three Euler angles in degrees, for each of the X, Y and Z axis, applied in that order.
|
|
208
|
+
*
|
|
209
|
+
* Default value is null.
|
|
210
|
+
*
|
|
211
|
+
* @param {Number[]|null} rotate Array of three Euler angles in degrees, for each of the X, Y and Z axis.
|
|
212
|
+
*/
|
|
213
|
+
set rotate(rotate: number[]);
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Gets if LAS positions are rotated 90 degrees about X as they are loaded.
|
|
217
|
+
*
|
|
218
|
+
* Default value is ````false````.
|
|
219
|
+
*
|
|
220
|
+
* @returns {*}
|
|
221
|
+
*/
|
|
222
|
+
get rotateX(): boolean;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Sets if LAS positions are rotated 90 degrees about X as they are loaded.
|
|
226
|
+
*
|
|
227
|
+
* Default value is ````false````.
|
|
228
|
+
*
|
|
229
|
+
* @param rotateX
|
|
230
|
+
*/
|
|
231
|
+
set rotateX(rotateX: boolean);
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Loads an ````LAS```` model into this LASLoaderPlugin's {@link Viewer}.
|
|
235
|
+
*
|
|
236
|
+
* @param {LoadLASModel} params Loading parameters.
|
|
237
|
+
* @returns {SceneModel} SceneModel representing the model, which will have {@link Entity.isModel} set ````true```` and will be registered by {@link Entity.id} in {@link Scene.models}.
|
|
238
|
+
*/
|
|
239
|
+
load(params?: LoadLASModel): SceneModel;
|
|
240
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./LASLoaderPlugin";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Plugin, Viewer } from "../../viewer";
|
|
2
|
+
|
|
3
|
+
export declare type ViewCullPluginConfiguration = {
|
|
4
|
+
/** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
|
|
5
|
+
id?: string;
|
|
6
|
+
/** Maximum depth of the kd-tree. */
|
|
7
|
+
maxTreeDepth?: number;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* {@link Viewer} plugin that performs view frustum culling to accelerate rendering performance.
|
|
12
|
+
*/
|
|
13
|
+
export declare class ViewCullPlugin extends Plugin {
|
|
14
|
+
/**
|
|
15
|
+
* @constructor
|
|
16
|
+
* @param {Viewer} viewer The Viewer.
|
|
17
|
+
* @param {ViewCullPluginConfiguration} cfg Plugin configuration.
|
|
18
|
+
*/
|
|
19
|
+
constructor(viewer: Viewer, cfg?: ViewCullPluginConfiguration);
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Sets whether view culling is enabled.
|
|
23
|
+
*
|
|
24
|
+
* @param {Boolean} enabled Whether to enable view culling.
|
|
25
|
+
*/
|
|
26
|
+
set enabled(arg: boolean);
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Gets whether view culling is enabled.
|
|
30
|
+
*
|
|
31
|
+
* @retutns {Boolean} Whether view culling is enabled.
|
|
32
|
+
*/
|
|
33
|
+
get enabled(): boolean;
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ViewCullPlugin";
|
package/types/plugins/index.d.ts
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
export * from "./AngleMeasurementsPlugin";
|
|
2
2
|
export * from "./AnnotationsPlugin";
|
|
3
|
+
export * from "./BCFViewpointsPlugin";
|
|
3
4
|
export * from "./DistanceMeasurementsPlugin";
|
|
4
5
|
export * from "./FastNavPlugin";
|
|
6
|
+
export * from "./GLTFLoaderPlugin";
|
|
5
7
|
export * from "./NavCubePlugin";
|
|
6
8
|
export * from "./SectionPlanesPlugin";
|
|
7
9
|
export * from "./SkyboxesPlugin";
|
|
8
10
|
export * from "./StoreyViewsPlugin";
|
|
9
11
|
export * from "./TreeViewPlugin";
|
|
12
|
+
export * from "./ViewCullPlugin";
|
|
10
13
|
export * from "./XTCLoaderPlugin";
|
|
11
14
|
export * from "./WebIFCLoaderPlugin";
|
|
15
|
+
export * from "./LASLoaderPlugin";
|
|
12
16
|
|
|
13
17
|
export declare type ModelStats = {
|
|
14
18
|
sourceFormat: string;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Component } from "../Component";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @desc Configures cross-section slices for a {@link Scene}.
|
|
5
|
+
*/
|
|
6
|
+
export declare class CrossSections extends Component {
|
|
7
|
+
/**
|
|
8
|
+
* Sets the thickness of a slice created by a section.
|
|
9
|
+
*
|
|
10
|
+
* Default value is ````0.0````.
|
|
11
|
+
*
|
|
12
|
+
* @type {Number}
|
|
13
|
+
*/
|
|
14
|
+
set sliceThickness(arg: number);
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Gets the thickness of a slice created by a section.
|
|
18
|
+
*
|
|
19
|
+
* Default value is ````0.0````.
|
|
20
|
+
*
|
|
21
|
+
* @type {Number}
|
|
22
|
+
*/
|
|
23
|
+
get sliceThickness(): number;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Sets the color of a slice created by a section.
|
|
27
|
+
*
|
|
28
|
+
* Default value is ````[0.0, 0.0, 0.0, 1.0]````.
|
|
29
|
+
*
|
|
30
|
+
* @type {Number}
|
|
31
|
+
*/
|
|
32
|
+
set sliceColor(arg: number[]);
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Gets the color of a slice created by a section.
|
|
36
|
+
*
|
|
37
|
+
* Default value is ````[0.0, 0.0, 0.0, 1.0]````.
|
|
38
|
+
*
|
|
39
|
+
* @type {Number}
|
|
40
|
+
*/
|
|
41
|
+
get sliceColor(): number[];
|
|
42
|
+
}
|