@xtctwins/tctwins-core 1.1.19 → 1.1.21

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 (151) hide show
  1. package/README.md +4 -4
  2. package/dist/tctwins-core.es5.js +27557 -27494
  3. package/dist/tctwins-core.min.es5.js +4 -4
  4. package/package.json +84 -84
  5. package/types/extras/ContextMenu/ContextMenu.d.ts +127 -127
  6. package/types/extras/ContextMenu/index.d.ts +1 -1
  7. package/types/extras/PointerCircle/PointerCircle.d.ts +51 -51
  8. package/types/extras/PointerCircle/index.d.ts +1 -1
  9. package/types/extras/PointerLens/PointerLens.d.ts +146 -146
  10. package/types/extras/index.d.ts +3 -3
  11. package/types/index.d.ts +3 -3
  12. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurement.d.ts +204 -204
  13. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsControl.d.ts +91 -91
  14. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsMouseControl.d.ts +125 -125
  15. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsPlugin.d.ts +151 -151
  16. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsSimulateMouseControl.d.ts +86 -86
  17. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsTouchControl.d.ts +124 -124
  18. package/types/plugins/AngleMeasurementsPlugin/index.d.ts +5 -5
  19. package/types/plugins/AnnotationsPlugin/Annotation.d.ts +135 -135
  20. package/types/plugins/AnnotationsPlugin/AnnotationsPlugin.d.ts +172 -172
  21. package/types/plugins/AnnotationsPlugin/index.d.ts +2 -2
  22. package/types/plugins/BCFViewpointsPlugin/BCFViewpointsPlugin.d.ts +148 -148
  23. package/types/plugins/BCFViewpointsPlugin/index.d.ts +1 -1
  24. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurement.d.ts +253 -253
  25. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsControl.d.ts +96 -96
  26. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsMouseControl.d.ts +102 -102
  27. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.d.ts +192 -192
  28. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsSimulateMouseControl.d.ts +83 -83
  29. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsTouchControl.d.ts +103 -103
  30. package/types/plugins/DistanceMeasurementsPlugin/index.d.ts +5 -5
  31. package/types/plugins/FastNavPlugin/FastNavPlugin.d.ts +223 -223
  32. package/types/plugins/FastNavPlugin/index.d.ts +1 -1
  33. package/types/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.d.ts +142 -142
  34. package/types/plugins/GLTFLoaderPlugin/index.d.ts +1 -1
  35. package/types/plugins/LASLoaderPlugin/LASLoaderPlugin.d.ts +240 -240
  36. package/types/plugins/LASLoaderPlugin/index.d.ts +1 -1
  37. package/types/plugins/NavCubePlugin/NavCubePlugin.d.ts +177 -177
  38. package/types/plugins/NavCubePlugin/index.d.ts +1 -1
  39. package/types/plugins/ObjectEditPlugin/ObjectEditPlugin.d.ts +242 -242
  40. package/types/plugins/ObjectEditPlugin/index.d.ts +1 -1
  41. package/types/plugins/SectionPlanesPlugin/SectionBoxControl.d.ts +36 -36
  42. package/types/plugins/SectionPlanesPlugin/SectionPlanesPlugin.d.ts +186 -186
  43. package/types/plugins/SectionPlanesPlugin/index.d.ts +2 -2
  44. package/types/plugins/SkyboxesPlugin/SkyboxesPlugin.d.ts +66 -66
  45. package/types/plugins/SkyboxesPlugin/index.d.ts +1 -1
  46. package/types/plugins/StoreyViewsPlugin/Storey.d.ts +69 -69
  47. package/types/plugins/StoreyViewsPlugin/StoreyMap.d.ts +41 -41
  48. package/types/plugins/StoreyViewsPlugin/StoreyViewsPlugin.d.ts +180 -180
  49. package/types/plugins/StoreyViewsPlugin/index.d.ts +1 -1
  50. package/types/plugins/TreeViewPlugin/ModelTreeView.d.ts +24 -24
  51. package/types/plugins/TreeViewPlugin/TreeViewNode.d.ts +71 -71
  52. package/types/plugins/TreeViewPlugin/TreeViewPlugin.d.ts +267 -267
  53. package/types/plugins/TreeViewPlugin/index.d.ts +1 -1
  54. package/types/plugins/TreeViewPlugin/renderService.d.ts +128 -128
  55. package/types/plugins/ViewCullPlugin/ViewCullPlugin.d.ts +34 -34
  56. package/types/plugins/ViewCullPlugin/index.d.ts +1 -1
  57. package/types/plugins/WebIFCLoaderPlugin/WebIFCLoaderPlugin.d.ts +236 -236
  58. package/types/plugins/WebIFCLoaderPlugin/index.d.ts +1 -1
  59. package/types/plugins/XTCLoaderPlugin/XTCLoaderPlugin.d.ts +288 -288
  60. package/types/plugins/XTCLoaderPlugin/index.d.ts +1 -1
  61. package/types/plugins/index.d.ts +30 -30
  62. package/types/viewer/Configs.d.ts +46 -46
  63. package/types/viewer/Plugin.d.ts +69 -69
  64. package/types/viewer/Viewer.d.ts +282 -282
  65. package/types/viewer/index.d.ts +6 -6
  66. package/types/viewer/localization/LocaleService.d.ts +183 -183
  67. package/types/viewer/metadata/IFCObjectDefaults.d.ts +9 -9
  68. package/types/viewer/metadata/MetaModel.d.ts +94 -102
  69. package/types/viewer/metadata/MetaObject.d.ts +74 -74
  70. package/types/viewer/metadata/MetaScene.d.ts +135 -135
  71. package/types/viewer/metadata/Property.d.ts +29 -29
  72. package/types/viewer/metadata/PropertySet.d.ts +31 -31
  73. package/types/viewer/metadata/index.d.ts +6 -6
  74. package/types/viewer/scene/Bitmap/Bitmap.d.ts +255 -255
  75. package/types/viewer/scene/CameraControl/CameraControl.d.ts +777 -777
  76. package/types/viewer/scene/Component.d.ts +155 -155
  77. package/types/viewer/scene/Entity.d.ts +401 -401
  78. package/types/viewer/scene/LineSet/LineSet.d.ts +111 -111
  79. package/types/viewer/scene/camera/Camera.d.ts +364 -364
  80. package/types/viewer/scene/camera/CameraFlightAnimation.d.ts +167 -167
  81. package/types/viewer/scene/camera/CameraPath.d.ts +28 -28
  82. package/types/viewer/scene/camera/CameraPathAnimation.d.ts +95 -95
  83. package/types/viewer/scene/camera/CustomProjection.d.ts +57 -57
  84. package/types/viewer/scene/camera/Frustum.d.ts +166 -166
  85. package/types/viewer/scene/camera/Ortho.d.ts +115 -115
  86. package/types/viewer/scene/camera/Perspective.d.ts +136 -136
  87. package/types/viewer/scene/camera/index.d.ts +4 -4
  88. package/types/viewer/scene/geometry/Geometry.d.ts +7 -7
  89. package/types/viewer/scene/geometry/ReadableGeometry.d.ts +95 -95
  90. package/types/viewer/scene/geometry/VBOGeometry.d.ts +62 -62
  91. package/types/viewer/scene/geometry/builders/buildBoxGeometry.d.ts +21 -21
  92. package/types/viewer/scene/geometry/builders/buildBoxLinesGeometry.d.ts +21 -21
  93. package/types/viewer/scene/geometry/builders/buildCylinderGeometry.d.ts +27 -27
  94. package/types/viewer/scene/geometry/builders/buildGridGeometry.d.ts +17 -17
  95. package/types/viewer/scene/geometry/builders/buildPlaneGeometry.d.ts +21 -21
  96. package/types/viewer/scene/geometry/builders/buildSphereGeometry.d.ts +21 -21
  97. package/types/viewer/scene/geometry/builders/buildTorusGeometry.d.ts +25 -25
  98. package/types/viewer/scene/geometry/builders/buildVectorTextGeometry.d.ts +21 -21
  99. package/types/viewer/scene/geometry/builders/index.d.ts +8 -8
  100. package/types/viewer/scene/geometry/index.d.ts +2 -2
  101. package/types/viewer/scene/index.d.ts +23 -23
  102. package/types/viewer/scene/input/input.d.ts +69 -69
  103. package/types/viewer/scene/lights/AmbientLight.d.ts +19 -19
  104. package/types/viewer/scene/lights/DirLight.d.ts +25 -25
  105. package/types/viewer/scene/lights/Light.d.ts +3 -3
  106. package/types/viewer/scene/lights/PointLight.d.ts +30 -30
  107. package/types/viewer/scene/lights/index.d.ts +2 -2
  108. package/types/viewer/scene/marker/Marker.d.ts +136 -136
  109. package/types/viewer/scene/marker/SpriteMarker.d.ts +185 -185
  110. package/types/viewer/scene/marker/index.d.ts +2 -2
  111. package/types/viewer/scene/materials/EdgeMaterial.d.ts +83 -83
  112. package/types/viewer/scene/materials/EmphasisMaterial.d.ts +241 -241
  113. package/types/viewer/scene/materials/Fresnel.d.ts +148 -148
  114. package/types/viewer/scene/materials/LinesMaterial.d.ts +71 -71
  115. package/types/viewer/scene/materials/Material.d.ts +3 -3
  116. package/types/viewer/scene/materials/PhongMaterial.d.ts +468 -468
  117. package/types/viewer/scene/materials/PointsMaterial.d.ts +206 -206
  118. package/types/viewer/scene/materials/Texture.d.ts +260 -260
  119. package/types/viewer/scene/materials/index.d.ts +6 -6
  120. package/types/viewer/scene/math/Frustum.d.ts +41 -41
  121. package/types/viewer/scene/math/index.d.ts +1 -1
  122. package/types/viewer/scene/math/math.d.ts +104 -104
  123. package/types/viewer/scene/mementos/CameraMemento.d.ts +28 -28
  124. package/types/viewer/scene/mementos/ModelMemento.d.ts +44 -44
  125. package/types/viewer/scene/mementos/ObjectsMemento.d.ts +39 -39
  126. package/types/viewer/scene/mementos/index.d.ts +3 -3
  127. package/types/viewer/scene/mesh/Mesh.d.ts +793 -793
  128. package/types/viewer/scene/mesh/index.d.ts +1 -1
  129. package/types/viewer/scene/models/PerformanceModel/PerformanceModel.d.ts +9 -9
  130. package/types/viewer/scene/models/PerformanceModel/index.d.ts +1 -1
  131. package/types/viewer/scene/models/SceneModel.d.ts +757 -762
  132. package/types/viewer/scene/models/SceneModelEntity.d.ts +417 -417
  133. package/types/viewer/scene/models/SceneModelMesh.d.ts +68 -68
  134. package/types/viewer/scene/models/SceneModelTexture.d.ts +16 -16
  135. package/types/viewer/scene/models/SceneModelTextureSet.d.ts +51 -51
  136. package/types/viewer/scene/models/SceneModelTransform.d.ts +197 -197
  137. package/types/viewer/scene/models/VBOSceneModel/VBOSceneModel.d.ts +7 -7
  138. package/types/viewer/scene/models/index.d.ts +7 -7
  139. package/types/viewer/scene/nodes/Node.d.ts +664 -664
  140. package/types/viewer/scene/nodes/index.d.ts +1 -1
  141. package/types/viewer/scene/postfx/CrossSections.d.ts +42 -42
  142. package/types/viewer/scene/postfx/SAO.d.ts +209 -209
  143. package/types/viewer/scene/scene/Scene.d.ts +1068 -1068
  144. package/types/viewer/scene/sectionPlane/SectionPlane.d.ts +110 -110
  145. package/types/viewer/scene/sectionPlane/index.d.ts +1 -1
  146. package/types/viewer/scene/stats.d.ts +40 -40
  147. package/types/viewer/scene/viewport/Viewport.d.ts +23 -23
  148. package/types/viewer/scene/viewport/index.d.ts +1 -1
  149. package/types/viewer/scene/webgl/PickResult.d.ts +115 -115
  150. package/types/viewer/scene/webgl/index.d.ts +1 -1
  151. package/dist/tctwins-core.umd.js +0 -37
@@ -1,41 +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
- }
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
+ }
@@ -1,180 +1,180 @@
1
- import { PickResult } from "../../viewer/scene/webgl/PickResult";
2
- import { Plugin, Viewer } from "../../viewer";
3
- import { Storey } from "./Storey";
4
- import { StoreyMap } from "./StoreyMap";
5
-
6
- export declare type IFCStoreyPlanObjectStates = {
7
- [key: string] : {
8
- visible: boolean;
9
- edges?: boolean;
10
- colorize?: number[]
11
- }
12
- };
13
-
14
- export declare type StoreyViewsPluginConfiguration = {
15
- /** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
16
- id?: string;
17
- /** Map of visual states for the {@link Entity}s as rendered within each {@link Storey}. Default value is {@link IFCStoreyPlanObjectStates}. */
18
- objectStates?: IFCStoreyPlanObjectStates;
19
- };
20
-
21
- /**
22
- * A {@link Viewer} plugin that provides methods for visualizing IfcBuildingStoreys.
23
- */
24
- export declare class StoreyViewsPlugin extends Plugin {
25
- /**
26
- * @constructor
27
- *
28
- * @param {Viewer} viewer The Viewer.
29
- * @param {StoreyViewsPluginConfiguration} cfg Plugin configuration.
30
- */
31
- constructor(viewer: Viewer, cfg?: StoreyViewsPluginConfiguration);
32
-
33
- /**
34
- * A {@link Storey} for each ````IfcBuildingStorey```.
35
- *
36
- * There will be a {@link Storey} for every existing {@link MetaObject} whose {@link MetaObject.type} equals "IfcBuildingStorey".
37
- *
38
- * These are created and destroyed automatically as models are loaded and destroyed.
39
- *
40
- * @type {{String:Storey}}
41
- */
42
- storeys: {[key: string]: Storey };
43
-
44
- /**
45
- * A set of {@link Storey}s for each {@link MetaModel}.
46
- *
47
- * These are created and destroyed automatically as models are loaded and destroyed.
48
- *
49
- * @type {{String: {String:Storey}}}
50
- */
51
- modelStoreys: {[key: string]: { [key: string]: Storey} };
52
-
53
- /**
54
- * Sets map of visual states for the {@link Entity}s as rendered within each {@link Storey}.
55
- *
56
- * Default value is {@link IFCStoreyPlanObjectStates}.
57
- *
58
- * @type {IFCStoreyPlanObjectStates}
59
- */
60
- set objectStates(arg: IFCStoreyPlanObjectStates);
61
-
62
- /**
63
- * Gets map of visual states for the {@link Entity}s as rendered within each {@link Storey}.
64
- *
65
- * Default value is {@link IFCStoreyPlanObjectStates}.
66
- *
67
- * @type {IFCStoreyPlanObjectStates}
68
- */
69
- get objectStates(): IFCStoreyPlanObjectStates;
70
-
71
- /**
72
- * Arranges the {@link Camera} for a 3D orthographic view of the {@link Entity}s within the given storey.
73
- *
74
- * See also: {@link CameraMemento}, which saves and restores the state of the {@link Scene}'s {@link Camera}
75
- *
76
- * @param {String} storeyId ID of the ````IfcBuildingStorey```` object.
77
- * @param {*} [options] Options for arranging the Camera.
78
- * @param {String} [options.projection] Projection type to transition the Camera to. Accepted values are "perspective" and "ortho".
79
- * @param {Function} [options.done] Callback to fire when the Camera has arrived. When provided, causes an animated flight to the saved state. Otherwise jumps to the saved state.
80
- */
81
- gotoStoreyCamera(storeyId: string, options?: {
82
- projection?: string;
83
- done?: Function
84
- }): void;
85
-
86
- /**
87
- * Shows the {@link Entity}s within the given storey.
88
- *
89
- * Optionally hides all other Entitys.
90
- *
91
- * Optionally sets the visual appearance of each of the Entitys according to its IFC type. The appearance of
92
- * IFC types in plan views is configured by {@link StoreyViewsPlugin.objectStates}.
93
- *
94
- * See also: {@link ObjectsMemento}, which saves and restores a memento of the visual state
95
- * of the {@link Entity}'s that represent objects within a {@link Scene}.
96
- *
97
- * @param {String} storeyId ID of the ````IfcBuildingStorey```` object.
98
- * @param {*} [options] Options for showing the Entitys within the storey.
99
- * @param {Boolean} [options.hideOthers=false] When ````true````, hide all other {@link Entity}s.
100
- * @param {Boolean} [options.useObjectStates=false] When ````true````, apply the custom visibilities and appearances configured for IFC types in {@link StoreyViewsPlugin.objectStates}.
101
- */
102
- showStoreyObjects(storeyId: string, options?: {
103
- hideOthers?: boolean;
104
- useObjectStates?: boolean
105
- }): void;
106
-
107
- /**
108
- * Executes a callback on each of the objects within the given storey.
109
- *
110
- *
111
- * @param {String} storeyId ID of the ````IfcBuildingStorey```` object.
112
- * @param {Function} callback The callback.
113
- */
114
- withStoreyObjects(storeyId: string, callback: Function): void;
115
-
116
- /**
117
- * Creates a 2D map of the given storey.
118
- *
119
- * @param {String} storeyId ID of the ````IfcBuildingStorey```` object.
120
- * @param {*} [options] Options for creating the image.
121
- * @param {Number} [options.width=300] Image width in pixels. Height will be automatically determined from this, if not given.
122
- * @param {Number} [options.height=300] Image height in pixels, as an alternative to width. Width will be automatically determined from this, if not given.
123
- * @param {String} [options.format="png"] Image format. Accepted values are "png" and "jpeg".
124
- * @returns {StoreyMap} The StoreyMap.
125
- */
126
- createStoreyMap(storeyId: string, options?: {
127
- width?: number;
128
- height?: number;
129
- format?: "png" | "jpeg";
130
- }): StoreyMap;
131
-
132
- /**
133
- * Attempts to pick an {@link Entity} at the given pixel coordinates within a StoreyMap image.
134
- *
135
- * @param {StoreyMap} storeyMap The StoreyMap.
136
- * @param {Number[]} imagePos 2D pixel coordinates within the bounds of {@link StoreyMap.imageData}.
137
- * @param {*} [options] Picking options.
138
- * @param {Boolean} [options.pickSurface=false] Whether to return the picked position on the surface of the Entity.
139
- * @returns {PickResult} The pick result, if an Entity was successfully picked, else null.
140
- */
141
- pickStoreyMap(storeyMap: StoreyMap, imagePos: number[], options?: {
142
- pickSurface?: boolean;
143
- }): PickResult;
144
-
145
- /**
146
- * Gets the ID of the storey that contains the given 3D World-space position.
147
- *.
148
- * @param {Number[]} worldPos 3D World-space position.
149
- * @returns {String} ID of the storey containing the position, or null if the position falls outside all the storeys.
150
- */
151
- getStoreyContainingWorldPos(worldPos: number[]): string;
152
-
153
- /**
154
- * Converts a 3D World-space position to a 2D position within a StoreyMap image.
155
- *
156
- * Use {@link StoreyViewsPlugin.pickStoreyMap} to convert 2D image positions to 3D world-space.
157
- *
158
- * @param {StoreyMap} storeyMap The StoreyMap.
159
- * @param {Number[]} worldPos 3D World-space position within the storey.
160
- * @param {Number[]} imagePos 2D pixel position within the {@link StoreyMap.imageData}.
161
- * @returns {Boolean} True if ````imagePos```` is within the bounds of the {@link StoreyMap.imageData}, else ````false```` if it falls outside.
162
- */
163
- worldPosToStoreyMap(storeyMap: StoreyMap, worldPos: number[], imagePos: number[]): boolean;
164
-
165
- /**
166
- * Converts a 3D World-space direction vector to a 2D vector within a StoreyMap image.
167
- *
168
- * @param {StoreyMap} storeyMap The StoreyMap.
169
- * @param {Number[]} worldDir 3D World-space direction vector.
170
- * @param {Number[]} imageDir Normalized 2D direction vector.
171
- */
172
- worldDirToStoreyMap(storeyMap: StoreyMap, worldDir: number[], imageDir: number[]): void;
173
-
174
- /**
175
- * Fires when the storeys are updated (after a model is added or removed).
176
- * @param {String} event The storeys event
177
- * @param {Function} callback Callback fired on the event
178
- */
179
- on(event: "storeys", callback: (storyes: {[key: string]: Storey })=> void): void;
180
- }
1
+ import { PickResult } from "../../viewer/scene/webgl/PickResult";
2
+ import { Plugin, Viewer } from "../../viewer";
3
+ import { Storey } from "./Storey";
4
+ import { StoreyMap } from "./StoreyMap";
5
+
6
+ export declare type IFCStoreyPlanObjectStates = {
7
+ [key: string] : {
8
+ visible: boolean;
9
+ edges?: boolean;
10
+ colorize?: number[]
11
+ }
12
+ };
13
+
14
+ export declare type StoreyViewsPluginConfiguration = {
15
+ /** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
16
+ id?: string;
17
+ /** Map of visual states for the {@link Entity}s as rendered within each {@link Storey}. Default value is {@link IFCStoreyPlanObjectStates}. */
18
+ objectStates?: IFCStoreyPlanObjectStates;
19
+ };
20
+
21
+ /**
22
+ * A {@link Viewer} plugin that provides methods for visualizing IfcBuildingStoreys.
23
+ */
24
+ export declare class StoreyViewsPlugin extends Plugin {
25
+ /**
26
+ * @constructor
27
+ *
28
+ * @param {Viewer} viewer The Viewer.
29
+ * @param {StoreyViewsPluginConfiguration} cfg Plugin configuration.
30
+ */
31
+ constructor(viewer: Viewer, cfg?: StoreyViewsPluginConfiguration);
32
+
33
+ /**
34
+ * A {@link Storey} for each ````IfcBuildingStorey```.
35
+ *
36
+ * There will be a {@link Storey} for every existing {@link MetaObject} whose {@link MetaObject.type} equals "IfcBuildingStorey".
37
+ *
38
+ * These are created and destroyed automatically as models are loaded and destroyed.
39
+ *
40
+ * @type {{String:Storey}}
41
+ */
42
+ storeys: {[key: string]: Storey };
43
+
44
+ /**
45
+ * A set of {@link Storey}s for each {@link MetaModel}.
46
+ *
47
+ * These are created and destroyed automatically as models are loaded and destroyed.
48
+ *
49
+ * @type {{String: {String:Storey}}}
50
+ */
51
+ modelStoreys: {[key: string]: { [key: string]: Storey} };
52
+
53
+ /**
54
+ * Sets map of visual states for the {@link Entity}s as rendered within each {@link Storey}.
55
+ *
56
+ * Default value is {@link IFCStoreyPlanObjectStates}.
57
+ *
58
+ * @type {IFCStoreyPlanObjectStates}
59
+ */
60
+ set objectStates(arg: IFCStoreyPlanObjectStates);
61
+
62
+ /**
63
+ * Gets map of visual states for the {@link Entity}s as rendered within each {@link Storey}.
64
+ *
65
+ * Default value is {@link IFCStoreyPlanObjectStates}.
66
+ *
67
+ * @type {IFCStoreyPlanObjectStates}
68
+ */
69
+ get objectStates(): IFCStoreyPlanObjectStates;
70
+
71
+ /**
72
+ * Arranges the {@link Camera} for a 3D orthographic view of the {@link Entity}s within the given storey.
73
+ *
74
+ * See also: {@link CameraMemento}, which saves and restores the state of the {@link Scene}'s {@link Camera}
75
+ *
76
+ * @param {String} storeyId ID of the ````IfcBuildingStorey```` object.
77
+ * @param {*} [options] Options for arranging the Camera.
78
+ * @param {String} [options.projection] Projection type to transition the Camera to. Accepted values are "perspective" and "ortho".
79
+ * @param {Function} [options.done] Callback to fire when the Camera has arrived. When provided, causes an animated flight to the saved state. Otherwise jumps to the saved state.
80
+ */
81
+ gotoStoreyCamera(storeyId: string, options?: {
82
+ projection?: string;
83
+ done?: Function
84
+ }): void;
85
+
86
+ /**
87
+ * Shows the {@link Entity}s within the given storey.
88
+ *
89
+ * Optionally hides all other Entitys.
90
+ *
91
+ * Optionally sets the visual appearance of each of the Entitys according to its IFC type. The appearance of
92
+ * IFC types in plan views is configured by {@link StoreyViewsPlugin.objectStates}.
93
+ *
94
+ * See also: {@link ObjectsMemento}, which saves and restores a memento of the visual state
95
+ * of the {@link Entity}'s that represent objects within a {@link Scene}.
96
+ *
97
+ * @param {String} storeyId ID of the ````IfcBuildingStorey```` object.
98
+ * @param {*} [options] Options for showing the Entitys within the storey.
99
+ * @param {Boolean} [options.hideOthers=false] When ````true````, hide all other {@link Entity}s.
100
+ * @param {Boolean} [options.useObjectStates=false] When ````true````, apply the custom visibilities and appearances configured for IFC types in {@link StoreyViewsPlugin.objectStates}.
101
+ */
102
+ showStoreyObjects(storeyId: string, options?: {
103
+ hideOthers?: boolean;
104
+ useObjectStates?: boolean
105
+ }): void;
106
+
107
+ /**
108
+ * Executes a callback on each of the objects within the given storey.
109
+ *
110
+ *
111
+ * @param {String} storeyId ID of the ````IfcBuildingStorey```` object.
112
+ * @param {Function} callback The callback.
113
+ */
114
+ withStoreyObjects(storeyId: string, callback: Function): void;
115
+
116
+ /**
117
+ * Creates a 2D map of the given storey.
118
+ *
119
+ * @param {String} storeyId ID of the ````IfcBuildingStorey```` object.
120
+ * @param {*} [options] Options for creating the image.
121
+ * @param {Number} [options.width=300] Image width in pixels. Height will be automatically determined from this, if not given.
122
+ * @param {Number} [options.height=300] Image height in pixels, as an alternative to width. Width will be automatically determined from this, if not given.
123
+ * @param {String} [options.format="png"] Image format. Accepted values are "png" and "jpeg".
124
+ * @returns {StoreyMap} The StoreyMap.
125
+ */
126
+ createStoreyMap(storeyId: string, options?: {
127
+ width?: number;
128
+ height?: number;
129
+ format?: "png" | "jpeg";
130
+ }): StoreyMap;
131
+
132
+ /**
133
+ * Attempts to pick an {@link Entity} at the given pixel coordinates within a StoreyMap image.
134
+ *
135
+ * @param {StoreyMap} storeyMap The StoreyMap.
136
+ * @param {Number[]} imagePos 2D pixel coordinates within the bounds of {@link StoreyMap.imageData}.
137
+ * @param {*} [options] Picking options.
138
+ * @param {Boolean} [options.pickSurface=false] Whether to return the picked position on the surface of the Entity.
139
+ * @returns {PickResult} The pick result, if an Entity was successfully picked, else null.
140
+ */
141
+ pickStoreyMap(storeyMap: StoreyMap, imagePos: number[], options?: {
142
+ pickSurface?: boolean;
143
+ }): PickResult;
144
+
145
+ /**
146
+ * Gets the ID of the storey that contains the given 3D World-space position.
147
+ *.
148
+ * @param {Number[]} worldPos 3D World-space position.
149
+ * @returns {String} ID of the storey containing the position, or null if the position falls outside all the storeys.
150
+ */
151
+ getStoreyContainingWorldPos(worldPos: number[]): string;
152
+
153
+ /**
154
+ * Converts a 3D World-space position to a 2D position within a StoreyMap image.
155
+ *
156
+ * Use {@link StoreyViewsPlugin.pickStoreyMap} to convert 2D image positions to 3D world-space.
157
+ *
158
+ * @param {StoreyMap} storeyMap The StoreyMap.
159
+ * @param {Number[]} worldPos 3D World-space position within the storey.
160
+ * @param {Number[]} imagePos 2D pixel position within the {@link StoreyMap.imageData}.
161
+ * @returns {Boolean} True if ````imagePos```` is within the bounds of the {@link StoreyMap.imageData}, else ````false```` if it falls outside.
162
+ */
163
+ worldPosToStoreyMap(storeyMap: StoreyMap, worldPos: number[], imagePos: number[]): boolean;
164
+
165
+ /**
166
+ * Converts a 3D World-space direction vector to a 2D vector within a StoreyMap image.
167
+ *
168
+ * @param {StoreyMap} storeyMap The StoreyMap.
169
+ * @param {Number[]} worldDir 3D World-space direction vector.
170
+ * @param {Number[]} imageDir Normalized 2D direction vector.
171
+ */
172
+ worldDirToStoreyMap(storeyMap: StoreyMap, worldDir: number[], imageDir: number[]): void;
173
+
174
+ /**
175
+ * Fires when the storeys are updated (after a model is added or removed).
176
+ * @param {String} event The storeys event
177
+ * @param {Function} callback Callback fired on the event
178
+ */
179
+ on(event: "storeys", callback: (storyes: {[key: string]: Storey })=> void): void;
180
+ }
@@ -1 +1 @@
1
- export * from "./StoreyViewsPlugin";
1
+ export * from "./StoreyViewsPlugin";
@@ -1,24 +1,24 @@
1
- import { MetaModel } from "../../viewer/metadata";
2
-
3
- /**
4
- * Represents a model tree view within a {@link TreeViewPlugin}.
5
- */
6
- export declare class ModelTreeView {
7
- /**
8
- * Contains messages for any errors found in the MetaModel for this ModelTreeView.
9
- * @type {String[]}
10
- */
11
- errors: string[];
12
-
13
- /**
14
- * True if errors were found in the MetaModel for this ModelTreeView.
15
- * @type {boolean}
16
- */
17
- valid: boolean;
18
-
19
- /**
20
- * The MetaModel corresponding to this ModelTreeView.
21
- * @type {MetaModel}
22
- */
23
- metaModel: MetaModel;
24
- }
1
+ import { MetaModel } from "../../viewer/metadata";
2
+
3
+ /**
4
+ * Represents a model tree view within a {@link TreeViewPlugin}.
5
+ */
6
+ export declare class ModelTreeView {
7
+ /**
8
+ * Contains messages for any errors found in the MetaModel for this ModelTreeView.
9
+ * @type {String[]}
10
+ */
11
+ errors: string[];
12
+
13
+ /**
14
+ * True if errors were found in the MetaModel for this ModelTreeView.
15
+ * @type {boolean}
16
+ */
17
+ valid: boolean;
18
+
19
+ /**
20
+ * The MetaModel corresponding to this ModelTreeView.
21
+ * @type {MetaModel}
22
+ */
23
+ metaModel: MetaModel;
24
+ }
@@ -1,71 +1,71 @@
1
- /**
2
- * A node within a {@link TreeViewPlugin}.
3
- */
4
- export declare class TreeViewNode {
5
- /**
6
- * Globally unique node ID.
7
- *
8
- * @type {String}
9
- */
10
- get nodeId(): string;
11
-
12
- /**
13
- * Title of the TreeViewNode.
14
- *
15
- * @type {String}
16
- */
17
- get title(): string;
18
-
19
- /**
20
- * ID of the corresponding {@link MetaObject}.
21
- *
22
- * This is only defined if the TreeViewNode represents an object.
23
- *
24
- * @type {String}
25
- */
26
- get objectId(): string;
27
-
28
- /**
29
- * Type of the corresponding {@link MetaObject}.
30
- *
31
- * @type {String}
32
- */
33
- get type(): string;
34
-
35
- /**
36
- * The child TreeViewNodes.
37
- *
38
- * @type {Array}
39
- */
40
- get children(): any[];
41
-
42
- /** The parent TreeViewNode.
43
- *
44
- * @type {TreeViewNode|null}
45
- */
46
- get parent(): TreeViewNode | null;
47
-
48
- /** The number of {@link Entity}s within the subtree of this TreeViewNode.
49
- *
50
- * @type {Number}
51
- */
52
- get numEntities(): number;
53
-
54
- /** The number of {@link Entity}s that are currently visible within the subtree of this TreeViewNode.
55
- *
56
- * @type {Number}
57
- */
58
- get numVisibleEntities(): number;
59
-
60
- /** Whether or not the TreeViewNode is currently checked.
61
- *
62
- * @type {Boolean}
63
- */
64
- get checked(): boolean;
65
-
66
- /** Whether or not the TreeViewNode is currently xrayed.
67
- *
68
- * @type {Boolean}
69
- */
70
- get xrayed(): boolean;
71
- }
1
+ /**
2
+ * A node within a {@link TreeViewPlugin}.
3
+ */
4
+ export declare class TreeViewNode {
5
+ /**
6
+ * Globally unique node ID.
7
+ *
8
+ * @type {String}
9
+ */
10
+ get nodeId(): string;
11
+
12
+ /**
13
+ * Title of the TreeViewNode.
14
+ *
15
+ * @type {String}
16
+ */
17
+ get title(): string;
18
+
19
+ /**
20
+ * ID of the corresponding {@link MetaObject}.
21
+ *
22
+ * This is only defined if the TreeViewNode represents an object.
23
+ *
24
+ * @type {String}
25
+ */
26
+ get objectId(): string;
27
+
28
+ /**
29
+ * Type of the corresponding {@link MetaObject}.
30
+ *
31
+ * @type {String}
32
+ */
33
+ get type(): string;
34
+
35
+ /**
36
+ * The child TreeViewNodes.
37
+ *
38
+ * @type {Array}
39
+ */
40
+ get children(): any[];
41
+
42
+ /** The parent TreeViewNode.
43
+ *
44
+ * @type {TreeViewNode|null}
45
+ */
46
+ get parent(): TreeViewNode | null;
47
+
48
+ /** The number of {@link Entity}s within the subtree of this TreeViewNode.
49
+ *
50
+ * @type {Number}
51
+ */
52
+ get numEntities(): number;
53
+
54
+ /** The number of {@link Entity}s that are currently visible within the subtree of this TreeViewNode.
55
+ *
56
+ * @type {Number}
57
+ */
58
+ get numVisibleEntities(): number;
59
+
60
+ /** Whether or not the TreeViewNode is currently checked.
61
+ *
62
+ * @type {Boolean}
63
+ */
64
+ get checked(): boolean;
65
+
66
+ /** Whether or not the TreeViewNode is currently xrayed.
67
+ *
68
+ * @type {Boolean}
69
+ */
70
+ get xrayed(): boolean;
71
+ }