@xeokit/xeokit-sdk 2.2.4 → 2.2.5-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.
Files changed (107) hide show
  1. package/dist/xeokit-sdk.cjs.js +77 -40
  2. package/dist/xeokit-sdk.es.js +77 -40
  3. package/dist/xeokit-sdk.min.cjs.js +1 -1
  4. package/dist/xeokit-sdk.min.es.js +1 -1
  5. package/package.json +4 -2
  6. package/types/extras/ContextMenu/ContextMenu.d.ts +125 -0
  7. package/types/extras/ContextMenu/index.d.ts +1 -0
  8. package/types/extras/index.d.ts +1 -0
  9. package/types/index.d.ts +3 -0
  10. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurement.d.ts +144 -0
  11. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsControl.d.ts +42 -0
  12. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsPlugin.d.ts +85 -0
  13. package/types/plugins/AngleMeasurementsPlugin/index.d.ts +1 -0
  14. package/types/plugins/AnnotationsPlugin/Annotation.d.ts +134 -0
  15. package/types/plugins/AnnotationsPlugin/AnnotationsPlugin.d.ts +117 -0
  16. package/types/plugins/AnnotationsPlugin/index.d.ts +1 -0
  17. package/types/plugins/AxisGizmoPlugin/AxisGizmoPlugin.d.ts +28 -0
  18. package/types/plugins/AxisGizmoPlugin/index.d.ts +1 -0
  19. package/types/plugins/BCFViewpointsPlugin/BCFViewpointsPlugin.d.ts +146 -0
  20. package/types/plugins/BCFViewpointsPlugin/index.d.ts +1 -0
  21. package/types/plugins/CityJSONLoaderPlugin/CityJSONLoaderPlugin.d.ts +81 -0
  22. package/types/plugins/CityJSONLoaderPlugin/index.d.ts +1 -0
  23. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurement.d.ts +137 -0
  24. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsControl.d.ts +40 -0
  25. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.d.ts +120 -0
  26. package/types/plugins/DistanceMeasurementsPlugin/index.d.ts +1 -0
  27. package/types/plugins/FastNavPlugin/FastNavPlugin.d.ts +203 -0
  28. package/types/plugins/FastNavPlugin/index.d.ts +1 -0
  29. package/types/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.d.ts +140 -0
  30. package/types/plugins/GLTFLoaderPlugin/index.d.ts +1 -0
  31. package/types/plugins/LASLoaderPlugin/LASLoaderPlugin.d.ts +146 -0
  32. package/types/plugins/LASLoaderPlugin/index.d.ts +1 -0
  33. package/types/plugins/NavCubePlugin/NavCubePlugin.d.ts +160 -0
  34. package/types/plugins/NavCubePlugin/index.d.ts +1 -0
  35. package/types/plugins/OBJLoaderPlugin/OBJLoaderPlugin.d.ts +44 -0
  36. package/types/plugins/OBJLoaderPlugin/index.d.ts +1 -0
  37. package/types/plugins/STLLoaderPlugin/STLLoaderPlugin.d.ts +88 -0
  38. package/types/plugins/STLLoaderPlugin/index.d.ts +2 -0
  39. package/types/plugins/SectionPlanesPlugin/SectionPlanesPlugin.d.ts +103 -0
  40. package/types/plugins/SectionPlanesPlugin/index.d.ts +1 -0
  41. package/types/plugins/SkyboxesPlugin/SkyboxesPlugin.d.ts +34 -0
  42. package/types/plugins/SkyboxesPlugin/index.d.ts +1 -0
  43. package/types/plugins/StoreyViewsPlugin/Storey.d.ts +47 -0
  44. package/types/plugins/StoreyViewsPlugin/StoreyMap.d.ts +41 -0
  45. package/types/plugins/StoreyViewsPlugin/StoreyViewsPlugin.d.ts +173 -0
  46. package/types/plugins/StoreyViewsPlugin/index.d.ts +1 -0
  47. package/types/plugins/TreeViewPlugin/ModelTreeView.d.ts +24 -0
  48. package/types/plugins/TreeViewPlugin/TreeViewNode.d.ts +66 -0
  49. package/types/plugins/TreeViewPlugin/TreeViewPlugin.d.ts +136 -0
  50. package/types/plugins/TreeViewPlugin/index.d.ts +1 -0
  51. package/types/plugins/ViewCullPlugin/ViewCullPlugin.d.ts +34 -0
  52. package/types/plugins/ViewCullPlugin/index.d.ts +1 -0
  53. package/types/plugins/WebIFCLoaderPlugin/WebIFCLoaderPlugin.d.ts +230 -0
  54. package/types/plugins/WebIFCLoaderPlugin/index.d.ts +1 -0
  55. package/types/plugins/XKTLoaderPlugin/XKTLoaderPlugin.d.ts +277 -0
  56. package/types/plugins/XKTLoaderPlugin/index.d.ts +1 -0
  57. package/types/plugins/XML3DLoaderPlugin/XML3DLoaderPlugin.d.ts +65 -0
  58. package/types/plugins/XML3DLoaderPlugin/index.d.ts +1 -0
  59. package/types/plugins/index.d.ts +34 -0
  60. package/types/viewer/Configs.d.ts +20 -0
  61. package/types/viewer/Plugin.d.ts +69 -0
  62. package/types/viewer/Viewer.d.ts +212 -0
  63. package/types/viewer/index.d.ts +6 -0
  64. package/types/viewer/localization/LocaleService.d.ts +176 -0
  65. package/types/viewer/metadata/IFCObjectDefaults.d.ts +9 -0
  66. package/types/viewer/metadata/MetaModel.d.ts +65 -0
  67. package/types/viewer/metadata/MetaObject.d.ts +74 -0
  68. package/types/viewer/metadata/MetaScene.d.ts +135 -0
  69. package/types/viewer/metadata/Property.d.ts +29 -0
  70. package/types/viewer/metadata/PropertySet.d.ts +31 -0
  71. package/types/viewer/metadata/index.d.ts +6 -0
  72. package/types/viewer/scene/CameraControl/CameraControl.d.ts +591 -0
  73. package/types/viewer/scene/Component.d.ts +155 -0
  74. package/types/viewer/scene/Entity.d.ts +394 -0
  75. package/types/viewer/scene/PerformanceModel/PerformanceModel.d.ts +605 -0
  76. package/types/viewer/scene/PerformanceModel/PerformanceNode.d.ts +302 -0
  77. package/types/viewer/scene/camera/Camera.d.ts +364 -0
  78. package/types/viewer/scene/camera/CameraFlightAnimation.d.ts +167 -0
  79. package/types/viewer/scene/camera/CameraPath.d.ts +28 -0
  80. package/types/viewer/scene/camera/CameraPathAnimation.d.ts +95 -0
  81. package/types/viewer/scene/camera/CustomProjection.d.ts +57 -0
  82. package/types/viewer/scene/camera/Frustum.d.ts +166 -0
  83. package/types/viewer/scene/camera/Ortho.d.ts +115 -0
  84. package/types/viewer/scene/camera/Perspective.d.ts +136 -0
  85. package/types/viewer/scene/camera/index.d.ts +4 -0
  86. package/types/viewer/scene/geometry/Geometry.d.ts +7 -0
  87. package/types/viewer/scene/geometry/ReadableGeometry.d.ts +95 -0
  88. package/types/viewer/scene/geometry/index.d.ts +1 -0
  89. package/types/viewer/scene/index.d.ts +6 -0
  90. package/types/viewer/scene/marker/Marker.d.ts +136 -0
  91. package/types/viewer/scene/marker/index.d.ts +1 -0
  92. package/types/viewer/scene/materials/EdgeMaterial.d.ts +83 -0
  93. package/types/viewer/scene/materials/EmphasisMaterial.d.ts +241 -0
  94. package/types/viewer/scene/materials/Fresnel.d.ts +149 -0
  95. package/types/viewer/scene/materials/LinesMaterial.d.ts +71 -0
  96. package/types/viewer/scene/materials/Material.d.ts +3 -0
  97. package/types/viewer/scene/materials/PhongMaterial.d.ts +468 -0
  98. package/types/viewer/scene/materials/PointsMaterial.d.ts +206 -0
  99. package/types/viewer/scene/materials/Texture.d.ts +261 -0
  100. package/types/viewer/scene/materials/index.d.ts +5 -0
  101. package/types/viewer/scene/math/math.d.ts +36 -0
  102. package/types/viewer/scene/postfx/SAO.d.ts +209 -0
  103. package/types/viewer/scene/scene/Scene.d.ts +727 -0
  104. package/types/viewer/scene/sectionPlane/SectionPlane.d.ts +93 -0
  105. package/types/viewer/scene/sectionPlane/index.d.ts +1 -0
  106. package/types/viewer/scene/viewport/Viewport.d.ts +23 -0
  107. package/types/viewer/scene/webgl/PickResult.d.ts +103 -0
@@ -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 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";
@@ -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";