@xtctwins/tctwins-core 1.1.18 → 1.1.20
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/README.md +4 -4
- package/dist/tctwins-core.es5.js +27337 -27310
- package/dist/tctwins-core.min.es5.js +3 -3
- package/package.json +84 -84
- package/types/extras/ContextMenu/ContextMenu.d.ts +127 -127
- package/types/extras/ContextMenu/index.d.ts +1 -1
- package/types/extras/PointerCircle/PointerCircle.d.ts +51 -51
- package/types/extras/PointerCircle/index.d.ts +1 -1
- package/types/extras/PointerLens/PointerLens.d.ts +146 -146
- package/types/extras/index.d.ts +3 -3
- package/types/index.d.ts +3 -3
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurement.d.ts +204 -204
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsControl.d.ts +91 -91
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsMouseControl.d.ts +125 -125
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsPlugin.d.ts +151 -151
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsSimulateMouseControl.d.ts +86 -86
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsTouchControl.d.ts +124 -124
- package/types/plugins/AngleMeasurementsPlugin/index.d.ts +5 -5
- package/types/plugins/AnnotationsPlugin/Annotation.d.ts +135 -135
- package/types/plugins/AnnotationsPlugin/AnnotationsPlugin.d.ts +172 -172
- package/types/plugins/AnnotationsPlugin/index.d.ts +2 -2
- package/types/plugins/BCFViewpointsPlugin/BCFViewpointsPlugin.d.ts +148 -148
- package/types/plugins/BCFViewpointsPlugin/index.d.ts +1 -1
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurement.d.ts +253 -253
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsControl.d.ts +96 -96
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsMouseControl.d.ts +102 -102
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.d.ts +192 -192
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsSimulateMouseControl.d.ts +83 -83
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsTouchControl.d.ts +103 -103
- package/types/plugins/DistanceMeasurementsPlugin/index.d.ts +5 -5
- package/types/plugins/FastNavPlugin/FastNavPlugin.d.ts +223 -223
- package/types/plugins/FastNavPlugin/index.d.ts +1 -1
- package/types/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.d.ts +142 -142
- package/types/plugins/GLTFLoaderPlugin/index.d.ts +1 -1
- package/types/plugins/LASLoaderPlugin/LASLoaderPlugin.d.ts +240 -240
- package/types/plugins/LASLoaderPlugin/index.d.ts +1 -1
- package/types/plugins/NavCubePlugin/NavCubePlugin.d.ts +177 -177
- package/types/plugins/NavCubePlugin/index.d.ts +1 -1
- package/types/plugins/ObjectEditPlugin/ObjectEditPlugin.d.ts +242 -242
- package/types/plugins/ObjectEditPlugin/index.d.ts +1 -1
- package/types/plugins/SectionPlanesPlugin/SectionBoxControl.d.ts +36 -36
- package/types/plugins/SectionPlanesPlugin/SectionPlanesPlugin.d.ts +186 -186
- package/types/plugins/SectionPlanesPlugin/index.d.ts +2 -2
- package/types/plugins/SkyboxesPlugin/SkyboxesPlugin.d.ts +66 -66
- package/types/plugins/SkyboxesPlugin/index.d.ts +1 -1
- package/types/plugins/StoreyViewsPlugin/Storey.d.ts +69 -69
- package/types/plugins/StoreyViewsPlugin/StoreyMap.d.ts +41 -41
- package/types/plugins/StoreyViewsPlugin/StoreyViewsPlugin.d.ts +180 -180
- package/types/plugins/StoreyViewsPlugin/index.d.ts +1 -1
- package/types/plugins/TreeViewPlugin/ModelTreeView.d.ts +24 -24
- package/types/plugins/TreeViewPlugin/TreeViewNode.d.ts +71 -71
- package/types/plugins/TreeViewPlugin/TreeViewPlugin.d.ts +267 -267
- package/types/plugins/TreeViewPlugin/index.d.ts +1 -1
- package/types/plugins/TreeViewPlugin/renderService.d.ts +128 -128
- package/types/plugins/ViewCullPlugin/ViewCullPlugin.d.ts +34 -34
- package/types/plugins/ViewCullPlugin/index.d.ts +1 -1
- package/types/plugins/WebIFCLoaderPlugin/WebIFCLoaderPlugin.d.ts +236 -236
- package/types/plugins/WebIFCLoaderPlugin/index.d.ts +1 -1
- package/types/plugins/XTCLoaderPlugin/XTCLoaderPlugin.d.ts +288 -288
- package/types/plugins/XTCLoaderPlugin/index.d.ts +1 -1
- package/types/plugins/index.d.ts +30 -30
- package/types/viewer/Configs.d.ts +46 -46
- package/types/viewer/Plugin.d.ts +69 -69
- package/types/viewer/Viewer.d.ts +282 -282
- package/types/viewer/index.d.ts +6 -6
- package/types/viewer/localization/LocaleService.d.ts +183 -183
- package/types/viewer/metadata/IFCObjectDefaults.d.ts +9 -9
- package/types/viewer/metadata/MetaModel.d.ts +94 -94
- package/types/viewer/metadata/MetaObject.d.ts +74 -74
- package/types/viewer/metadata/MetaScene.d.ts +135 -135
- package/types/viewer/metadata/Property.d.ts +29 -29
- package/types/viewer/metadata/PropertySet.d.ts +31 -31
- package/types/viewer/metadata/index.d.ts +6 -6
- package/types/viewer/scene/Bitmap/Bitmap.d.ts +255 -255
- package/types/viewer/scene/CameraControl/CameraControl.d.ts +777 -777
- package/types/viewer/scene/Component.d.ts +155 -155
- package/types/viewer/scene/Entity.d.ts +401 -401
- package/types/viewer/scene/LineSet/LineSet.d.ts +111 -111
- package/types/viewer/scene/camera/Camera.d.ts +364 -364
- package/types/viewer/scene/camera/CameraFlightAnimation.d.ts +167 -167
- package/types/viewer/scene/camera/CameraPath.d.ts +28 -28
- package/types/viewer/scene/camera/CameraPathAnimation.d.ts +95 -95
- package/types/viewer/scene/camera/CustomProjection.d.ts +57 -57
- package/types/viewer/scene/camera/Frustum.d.ts +166 -166
- package/types/viewer/scene/camera/Ortho.d.ts +115 -115
- package/types/viewer/scene/camera/Perspective.d.ts +136 -136
- package/types/viewer/scene/camera/index.d.ts +4 -4
- package/types/viewer/scene/geometry/Geometry.d.ts +7 -7
- package/types/viewer/scene/geometry/ReadableGeometry.d.ts +95 -95
- package/types/viewer/scene/geometry/VBOGeometry.d.ts +62 -62
- package/types/viewer/scene/geometry/builders/buildBoxGeometry.d.ts +21 -21
- package/types/viewer/scene/geometry/builders/buildBoxLinesGeometry.d.ts +21 -21
- package/types/viewer/scene/geometry/builders/buildCylinderGeometry.d.ts +27 -27
- package/types/viewer/scene/geometry/builders/buildGridGeometry.d.ts +17 -17
- package/types/viewer/scene/geometry/builders/buildPlaneGeometry.d.ts +21 -21
- package/types/viewer/scene/geometry/builders/buildSphereGeometry.d.ts +21 -21
- package/types/viewer/scene/geometry/builders/buildTorusGeometry.d.ts +25 -25
- package/types/viewer/scene/geometry/builders/buildVectorTextGeometry.d.ts +21 -21
- package/types/viewer/scene/geometry/builders/index.d.ts +8 -8
- package/types/viewer/scene/geometry/index.d.ts +2 -2
- package/types/viewer/scene/index.d.ts +23 -23
- package/types/viewer/scene/input/input.d.ts +69 -69
- package/types/viewer/scene/lights/AmbientLight.d.ts +19 -19
- package/types/viewer/scene/lights/DirLight.d.ts +25 -25
- package/types/viewer/scene/lights/Light.d.ts +3 -3
- package/types/viewer/scene/lights/PointLight.d.ts +30 -30
- package/types/viewer/scene/lights/index.d.ts +2 -2
- package/types/viewer/scene/marker/Marker.d.ts +136 -136
- package/types/viewer/scene/marker/SpriteMarker.d.ts +185 -185
- package/types/viewer/scene/marker/index.d.ts +2 -2
- package/types/viewer/scene/materials/EdgeMaterial.d.ts +83 -83
- package/types/viewer/scene/materials/EmphasisMaterial.d.ts +241 -241
- package/types/viewer/scene/materials/Fresnel.d.ts +148 -148
- package/types/viewer/scene/materials/LinesMaterial.d.ts +71 -71
- package/types/viewer/scene/materials/Material.d.ts +3 -3
- package/types/viewer/scene/materials/PhongMaterial.d.ts +468 -468
- package/types/viewer/scene/materials/PointsMaterial.d.ts +206 -206
- package/types/viewer/scene/materials/Texture.d.ts +260 -260
- package/types/viewer/scene/materials/index.d.ts +6 -6
- package/types/viewer/scene/math/Frustum.d.ts +41 -41
- package/types/viewer/scene/math/index.d.ts +1 -1
- package/types/viewer/scene/math/math.d.ts +104 -104
- package/types/viewer/scene/mementos/CameraMemento.d.ts +28 -28
- package/types/viewer/scene/mementos/ModelMemento.d.ts +44 -44
- package/types/viewer/scene/mementos/ObjectsMemento.d.ts +39 -39
- package/types/viewer/scene/mementos/index.d.ts +3 -3
- package/types/viewer/scene/mesh/Mesh.d.ts +793 -793
- package/types/viewer/scene/mesh/index.d.ts +1 -1
- package/types/viewer/scene/models/PerformanceModel/PerformanceModel.d.ts +9 -9
- package/types/viewer/scene/models/PerformanceModel/index.d.ts +1 -1
- package/types/viewer/scene/models/SceneModel.d.ts +757 -757
- package/types/viewer/scene/models/SceneModelEntity.d.ts +417 -417
- package/types/viewer/scene/models/SceneModelMesh.d.ts +68 -68
- package/types/viewer/scene/models/SceneModelTexture.d.ts +16 -16
- package/types/viewer/scene/models/SceneModelTextureSet.d.ts +51 -51
- package/types/viewer/scene/models/SceneModelTransform.d.ts +197 -197
- package/types/viewer/scene/models/VBOSceneModel/VBOSceneModel.d.ts +7 -7
- package/types/viewer/scene/models/index.d.ts +7 -7
- package/types/viewer/scene/nodes/Node.d.ts +664 -664
- package/types/viewer/scene/nodes/index.d.ts +1 -1
- package/types/viewer/scene/postfx/CrossSections.d.ts +42 -42
- package/types/viewer/scene/postfx/SAO.d.ts +209 -209
- package/types/viewer/scene/scene/Scene.d.ts +1068 -1068
- package/types/viewer/scene/sectionPlane/SectionPlane.d.ts +110 -110
- package/types/viewer/scene/sectionPlane/index.d.ts +1 -1
- package/types/viewer/scene/stats.d.ts +40 -40
- package/types/viewer/scene/utils.d.ts +165 -165
- package/types/viewer/scene/viewport/Viewport.d.ts +23 -23
- package/types/viewer/scene/viewport/index.d.ts +1 -1
- package/types/viewer/scene/webgl/PickResult.d.ts +115 -115
- package/types/viewer/scene/webgl/index.d.ts +1 -1
|
@@ -1,186 +1,186 @@
|
|
|
1
|
-
import { Plugin, Viewer } from "../../viewer";
|
|
2
|
-
import { SectionPlane } from "../../viewer/scene/sectionPlane";
|
|
3
|
-
import { SectionBoxControl, SectionBoxConfiguration } from "./SectionBoxControl";
|
|
4
|
-
|
|
5
|
-
export declare type SectionPlanesPluginConfiguration = {
|
|
6
|
-
/** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
|
|
7
|
-
id?: string;
|
|
8
|
-
/** ID of a canvas element to display the overview. */
|
|
9
|
-
overviewCanvasId?: string;
|
|
10
|
-
/** Initial visibility of the overview canvas. */
|
|
11
|
-
overviewVisible?: boolean;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* SectionPlanesPlugin is a {@link Viewer} plugin that manages {@link SectionPlane}s.
|
|
16
|
-
*/
|
|
17
|
-
export declare class SectionPlanesPlugin extends Plugin {
|
|
18
|
-
/**
|
|
19
|
-
* @constructor
|
|
20
|
-
* @param {Viewer} viewer The Viewer.
|
|
21
|
-
* @param {SectionPlanesPluginConfiguration} cfg Plugin configuration.
|
|
22
|
-
*/
|
|
23
|
-
constructor(viewer: Viewer, cfg?: SectionPlanesPluginConfiguration);
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Sets if the overview canvas is visible.
|
|
27
|
-
*
|
|
28
|
-
* @param {Boolean} visible Whether or not the overview canvas is visible.
|
|
29
|
-
*/
|
|
30
|
-
setOverviewVisible(visible: boolean): void;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Gets if the overview canvas is visible.
|
|
34
|
-
*
|
|
35
|
-
* @return {Boolean} True when the overview canvas is visible.
|
|
36
|
-
*/
|
|
37
|
-
getOverviewVisible(): boolean;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Returns a map of the {@link SectionPlane}s created by this SectionPlanesPlugin.
|
|
41
|
-
*
|
|
42
|
-
* @returns {{String:SectionPlane}} A map containing the {@link SectionPlane}s, each mapped to its {@link SectionPlane.id}.
|
|
43
|
-
*/
|
|
44
|
-
get sectionPlanes(): { [key: string]: SectionPlane };
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Creates a {@link SectionPlane}.
|
|
48
|
-
*
|
|
49
|
-
* The {@link SectionPlane} will be registered by {@link SectionPlane.id} in {@link SectionPlanesPlugin.sectionPlanes}.
|
|
50
|
-
*
|
|
51
|
-
* @param {Object} params {@link SectionPlane} configuration.
|
|
52
|
-
* @param {String} [params.id] Unique ID to assign to the {@link SectionPlane}. Must be unique among all components in the {@link Viewer}'s {@link Scene}. Auto-generated when omitted.
|
|
53
|
-
* @param {Number[]} [params.pos=[0,0,0]] World-space position of the {@link SectionPlane}.
|
|
54
|
-
* @param {Number[]} [params.dir=[0,0,-1]] World-space vector indicating the orientation of the {@link SectionPlane}.
|
|
55
|
-
* @param {Boolean} [params.active=true] Whether the {@link SectionPlane} is initially active. Only clips while this is true.
|
|
56
|
-
* @returns {SectionPlane} The new {@link SectionPlane}.
|
|
57
|
-
*/
|
|
58
|
-
createSectionPlane(params?: { id?: string; pos?: number[]; dir?: number[]; active?: boolean }): SectionPlane;
|
|
59
|
-
|
|
60
|
-
/** 创建六面独立伸缩、保留盒内模型的剖切盒。 */
|
|
61
|
-
createClippingBox(params?: SectionBoxConfiguration): SectionBoxControl;
|
|
62
|
-
|
|
63
|
-
/** 创建固定尺寸整体平移、保留盒外模型的箱框。 */
|
|
64
|
-
createBoxFrame(params?: SectionBoxConfiguration): SectionBoxControl;
|
|
65
|
-
|
|
66
|
-
readonly clippingBox: SectionBoxControl | null;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* 设置是否是触屏模式
|
|
70
|
-
* @param {boolean} touch
|
|
71
|
-
*/
|
|
72
|
-
set isTouch(touch: boolean);
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* 设置剖切方式
|
|
76
|
-
*
|
|
77
|
-
* - `"plane"`:使用带边框的单面剖切控制器。
|
|
78
|
-
* - 其它值(含 `"control"`):使用默认单面剖切控制器。
|
|
79
|
-
*
|
|
80
|
-
* 旧的剖切盒取值 `"box"` / `"singleCtrl"` 已移除,剖切盒请使用 `createClippingBox()`。
|
|
81
|
-
*
|
|
82
|
-
* @param {string} way
|
|
83
|
-
*/
|
|
84
|
-
set sectionWay(way: string);
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* 设置剖切面方向
|
|
88
|
-
* @param {number} direction
|
|
89
|
-
*/
|
|
90
|
-
set sectionDirection(direction: number);
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* 设置剖切对象样式
|
|
94
|
-
* @param {any} cfg
|
|
95
|
-
* @param {number} cfg.planeSize?
|
|
96
|
-
* @param {number} cfg.controlSize?
|
|
97
|
-
* @param {number} cfg.planeOpacity?
|
|
98
|
-
* @param {number[]} cfg.controlFillColor?
|
|
99
|
-
* @param {number[]} cfg.controlEdgeColor?
|
|
100
|
-
*/
|
|
101
|
-
set sectionConfigs(cfg: any);
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* 设置剖切面位置
|
|
105
|
-
* @param pos
|
|
106
|
-
*/
|
|
107
|
-
setControlPos(posRate: number): void;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* 获取剖切面位置
|
|
111
|
-
* @returns
|
|
112
|
-
*/
|
|
113
|
-
getControlPos(): void;
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Inverts the direction of {@link SectionPlane.dir} on every existing SectionPlane.
|
|
117
|
-
*
|
|
118
|
-
* Inverts all SectionPlanes, including those that were not created with SectionPlanesPlugin.
|
|
119
|
-
*/
|
|
120
|
-
flipSectionPlanes(): void;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Shows the 3D editing gizmo for a {@link SectionPlane}.
|
|
124
|
-
*
|
|
125
|
-
* @param {String} id ID of the {@link SectionPlane}.
|
|
126
|
-
*/
|
|
127
|
-
showControl(id: string): void;
|
|
128
|
-
|
|
129
|
-
getShownControls(): void;
|
|
130
|
-
|
|
131
|
-
showAllControl(): void;
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Gets the ID of the {@link SectionPlane} that the 3D editing gizmo is shown for.
|
|
135
|
-
*
|
|
136
|
-
* Returns ````null```` when the editing gizmo is not shown.
|
|
137
|
-
*
|
|
138
|
-
* @returns {String} ID of the the {@link SectionPlane} that the 3D editing gizmo is shown for, if shown, else ````null````.
|
|
139
|
-
*/
|
|
140
|
-
getShownControl(): string;
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Hides the 3D {@link SectionPlane} editing gizmo if shown.
|
|
144
|
-
*/
|
|
145
|
-
hideControl(): void;
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Destroys a {@link SectionPlane} created by this SectionPlanesPlugin.
|
|
149
|
-
*
|
|
150
|
-
* @param {String} id ID of the {@link SectionPlane}.
|
|
151
|
-
*/
|
|
152
|
-
destroySectionPlane(id: string): void;
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Destroys all {@link SectionPlane}s created by this SectionPlanesPlugin.
|
|
156
|
-
*/
|
|
157
|
-
clear(): void;
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* 触屏点击剖切面事件
|
|
161
|
-
* @param event
|
|
162
|
-
* @param e
|
|
163
|
-
*/
|
|
164
|
-
on(event: "touchPlaneStart", e: any): void;
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* 触屏结束点击剖切面事件
|
|
168
|
-
* @param event
|
|
169
|
-
* @param e
|
|
170
|
-
*/
|
|
171
|
-
on(event: "touchPlaneEnd", e: any): void;
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* 鼠标点击剖切面事件
|
|
175
|
-
* @param event
|
|
176
|
-
* @param e
|
|
177
|
-
*/
|
|
178
|
-
on(event: "clickPlaneStart", e: any): void;
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* 鼠标抬起点击剖切面事件
|
|
182
|
-
* @param event
|
|
183
|
-
* @param e
|
|
184
|
-
*/
|
|
185
|
-
on(event: "clickPlaneEnd", e: any): void;
|
|
186
|
-
}
|
|
1
|
+
import { Plugin, Viewer } from "../../viewer";
|
|
2
|
+
import { SectionPlane } from "../../viewer/scene/sectionPlane";
|
|
3
|
+
import { SectionBoxControl, SectionBoxConfiguration } from "./SectionBoxControl";
|
|
4
|
+
|
|
5
|
+
export declare type SectionPlanesPluginConfiguration = {
|
|
6
|
+
/** Optional ID for this plugin, so that we can find it within {@link Viewer.plugins}. */
|
|
7
|
+
id?: string;
|
|
8
|
+
/** ID of a canvas element to display the overview. */
|
|
9
|
+
overviewCanvasId?: string;
|
|
10
|
+
/** Initial visibility of the overview canvas. */
|
|
11
|
+
overviewVisible?: boolean;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* SectionPlanesPlugin is a {@link Viewer} plugin that manages {@link SectionPlane}s.
|
|
16
|
+
*/
|
|
17
|
+
export declare class SectionPlanesPlugin extends Plugin {
|
|
18
|
+
/**
|
|
19
|
+
* @constructor
|
|
20
|
+
* @param {Viewer} viewer The Viewer.
|
|
21
|
+
* @param {SectionPlanesPluginConfiguration} cfg Plugin configuration.
|
|
22
|
+
*/
|
|
23
|
+
constructor(viewer: Viewer, cfg?: SectionPlanesPluginConfiguration);
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Sets if the overview canvas is visible.
|
|
27
|
+
*
|
|
28
|
+
* @param {Boolean} visible Whether or not the overview canvas is visible.
|
|
29
|
+
*/
|
|
30
|
+
setOverviewVisible(visible: boolean): void;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Gets if the overview canvas is visible.
|
|
34
|
+
*
|
|
35
|
+
* @return {Boolean} True when the overview canvas is visible.
|
|
36
|
+
*/
|
|
37
|
+
getOverviewVisible(): boolean;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Returns a map of the {@link SectionPlane}s created by this SectionPlanesPlugin.
|
|
41
|
+
*
|
|
42
|
+
* @returns {{String:SectionPlane}} A map containing the {@link SectionPlane}s, each mapped to its {@link SectionPlane.id}.
|
|
43
|
+
*/
|
|
44
|
+
get sectionPlanes(): { [key: string]: SectionPlane };
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Creates a {@link SectionPlane}.
|
|
48
|
+
*
|
|
49
|
+
* The {@link SectionPlane} will be registered by {@link SectionPlane.id} in {@link SectionPlanesPlugin.sectionPlanes}.
|
|
50
|
+
*
|
|
51
|
+
* @param {Object} params {@link SectionPlane} configuration.
|
|
52
|
+
* @param {String} [params.id] Unique ID to assign to the {@link SectionPlane}. Must be unique among all components in the {@link Viewer}'s {@link Scene}. Auto-generated when omitted.
|
|
53
|
+
* @param {Number[]} [params.pos=[0,0,0]] World-space position of the {@link SectionPlane}.
|
|
54
|
+
* @param {Number[]} [params.dir=[0,0,-1]] World-space vector indicating the orientation of the {@link SectionPlane}.
|
|
55
|
+
* @param {Boolean} [params.active=true] Whether the {@link SectionPlane} is initially active. Only clips while this is true.
|
|
56
|
+
* @returns {SectionPlane} The new {@link SectionPlane}.
|
|
57
|
+
*/
|
|
58
|
+
createSectionPlane(params?: { id?: string; pos?: number[]; dir?: number[]; active?: boolean }): SectionPlane;
|
|
59
|
+
|
|
60
|
+
/** 创建六面独立伸缩、保留盒内模型的剖切盒。 */
|
|
61
|
+
createClippingBox(params?: SectionBoxConfiguration): SectionBoxControl;
|
|
62
|
+
|
|
63
|
+
/** 创建固定尺寸整体平移、保留盒外模型的箱框。 */
|
|
64
|
+
createBoxFrame(params?: SectionBoxConfiguration): SectionBoxControl;
|
|
65
|
+
|
|
66
|
+
readonly clippingBox: SectionBoxControl | null;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* 设置是否是触屏模式
|
|
70
|
+
* @param {boolean} touch
|
|
71
|
+
*/
|
|
72
|
+
set isTouch(touch: boolean);
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* 设置剖切方式
|
|
76
|
+
*
|
|
77
|
+
* - `"plane"`:使用带边框的单面剖切控制器。
|
|
78
|
+
* - 其它值(含 `"control"`):使用默认单面剖切控制器。
|
|
79
|
+
*
|
|
80
|
+
* 旧的剖切盒取值 `"box"` / `"singleCtrl"` 已移除,剖切盒请使用 `createClippingBox()`。
|
|
81
|
+
*
|
|
82
|
+
* @param {string} way
|
|
83
|
+
*/
|
|
84
|
+
set sectionWay(way: string);
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* 设置剖切面方向
|
|
88
|
+
* @param {number} direction
|
|
89
|
+
*/
|
|
90
|
+
set sectionDirection(direction: number);
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* 设置剖切对象样式
|
|
94
|
+
* @param {any} cfg
|
|
95
|
+
* @param {number} cfg.planeSize?
|
|
96
|
+
* @param {number} cfg.controlSize?
|
|
97
|
+
* @param {number} cfg.planeOpacity?
|
|
98
|
+
* @param {number[]} cfg.controlFillColor?
|
|
99
|
+
* @param {number[]} cfg.controlEdgeColor?
|
|
100
|
+
*/
|
|
101
|
+
set sectionConfigs(cfg: any);
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* 设置剖切面位置
|
|
105
|
+
* @param pos
|
|
106
|
+
*/
|
|
107
|
+
setControlPos(posRate: number): void;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* 获取剖切面位置
|
|
111
|
+
* @returns
|
|
112
|
+
*/
|
|
113
|
+
getControlPos(): void;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Inverts the direction of {@link SectionPlane.dir} on every existing SectionPlane.
|
|
117
|
+
*
|
|
118
|
+
* Inverts all SectionPlanes, including those that were not created with SectionPlanesPlugin.
|
|
119
|
+
*/
|
|
120
|
+
flipSectionPlanes(): void;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Shows the 3D editing gizmo for a {@link SectionPlane}.
|
|
124
|
+
*
|
|
125
|
+
* @param {String} id ID of the {@link SectionPlane}.
|
|
126
|
+
*/
|
|
127
|
+
showControl(id: string): void;
|
|
128
|
+
|
|
129
|
+
getShownControls(): void;
|
|
130
|
+
|
|
131
|
+
showAllControl(): void;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Gets the ID of the {@link SectionPlane} that the 3D editing gizmo is shown for.
|
|
135
|
+
*
|
|
136
|
+
* Returns ````null```` when the editing gizmo is not shown.
|
|
137
|
+
*
|
|
138
|
+
* @returns {String} ID of the the {@link SectionPlane} that the 3D editing gizmo is shown for, if shown, else ````null````.
|
|
139
|
+
*/
|
|
140
|
+
getShownControl(): string;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Hides the 3D {@link SectionPlane} editing gizmo if shown.
|
|
144
|
+
*/
|
|
145
|
+
hideControl(): void;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Destroys a {@link SectionPlane} created by this SectionPlanesPlugin.
|
|
149
|
+
*
|
|
150
|
+
* @param {String} id ID of the {@link SectionPlane}.
|
|
151
|
+
*/
|
|
152
|
+
destroySectionPlane(id: string): void;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Destroys all {@link SectionPlane}s created by this SectionPlanesPlugin.
|
|
156
|
+
*/
|
|
157
|
+
clear(): void;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* 触屏点击剖切面事件
|
|
161
|
+
* @param event
|
|
162
|
+
* @param e
|
|
163
|
+
*/
|
|
164
|
+
on(event: "touchPlaneStart", e: any): void;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* 触屏结束点击剖切面事件
|
|
168
|
+
* @param event
|
|
169
|
+
* @param e
|
|
170
|
+
*/
|
|
171
|
+
on(event: "touchPlaneEnd", e: any): void;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* 鼠标点击剖切面事件
|
|
175
|
+
* @param event
|
|
176
|
+
* @param e
|
|
177
|
+
*/
|
|
178
|
+
on(event: "clickPlaneStart", e: any): void;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* 鼠标抬起点击剖切面事件
|
|
182
|
+
* @param event
|
|
183
|
+
* @param e
|
|
184
|
+
*/
|
|
185
|
+
on(event: "clickPlaneEnd", e: any): void;
|
|
186
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./SectionPlanesPlugin";
|
|
2
|
-
export * from "./SectionBoxControl";
|
|
1
|
+
export * from "./SectionPlanesPlugin";
|
|
2
|
+
export * from "./SectionBoxControl";
|
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
import { Plugin, Viewer } from "../../viewer";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* {@link Viewer} plugin that manages skyboxes
|
|
5
|
-
*/
|
|
6
|
-
export declare class SkyboxesPlugin extends Plugin {
|
|
7
|
-
/**
|
|
8
|
-
* @constructor
|
|
9
|
-
* @param {Viewer} viewer The Viewer.
|
|
10
|
-
*/
|
|
11
|
-
constructor(viewer: Viewer);
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Creates a skybox.
|
|
15
|
-
* @param {String} id Unique ID to assign to the skybox.
|
|
16
|
-
* @param {Object} params Skybox configuration.
|
|
17
|
-
* @param {Boolean} [params.active=true] Whether the skybox plane is initially active. Only skyboxes while this is true.
|
|
18
|
-
* @returns {Skybox} The new skybox.
|
|
19
|
-
*/
|
|
20
|
-
createSkybox(
|
|
21
|
-
id: string,
|
|
22
|
-
params: {
|
|
23
|
-
active?: boolean;
|
|
24
|
-
size?: number;
|
|
25
|
-
scale?: number[];
|
|
26
|
-
src?: string;
|
|
27
|
-
image?: HTMLImageElement;
|
|
28
|
-
}
|
|
29
|
-
): any; //Skybox;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* 设置指定id天空盒显示或隐藏
|
|
33
|
-
*/
|
|
34
|
-
setSkyBoxActiveById(id: string, active: boolean): void;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* 设置开启天空盒
|
|
38
|
-
*/
|
|
39
|
-
set active(active: boolean);
|
|
40
|
-
|
|
41
|
-
get active(): boolean;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* 根据指定id获取天空盒对象
|
|
45
|
-
* @param id
|
|
46
|
-
*/
|
|
47
|
-
getSkyBoxById(id: string): any;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Destroys a skybox.
|
|
51
|
-
* @param id
|
|
52
|
-
*/
|
|
53
|
-
destroySkybox(id: string): void;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
Destroys all skyboxes.
|
|
57
|
-
*/
|
|
58
|
-
clear(): void;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Destroys this plugin.
|
|
62
|
-
*
|
|
63
|
-
* Clears skyboxes from the Viewer first.
|
|
64
|
-
*/
|
|
65
|
-
destroy(): void;
|
|
66
|
-
}
|
|
1
|
+
import { Plugin, Viewer } from "../../viewer";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* {@link Viewer} plugin that manages skyboxes
|
|
5
|
+
*/
|
|
6
|
+
export declare class SkyboxesPlugin extends Plugin {
|
|
7
|
+
/**
|
|
8
|
+
* @constructor
|
|
9
|
+
* @param {Viewer} viewer The Viewer.
|
|
10
|
+
*/
|
|
11
|
+
constructor(viewer: Viewer);
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Creates a skybox.
|
|
15
|
+
* @param {String} id Unique ID to assign to the skybox.
|
|
16
|
+
* @param {Object} params Skybox configuration.
|
|
17
|
+
* @param {Boolean} [params.active=true] Whether the skybox plane is initially active. Only skyboxes while this is true.
|
|
18
|
+
* @returns {Skybox} The new skybox.
|
|
19
|
+
*/
|
|
20
|
+
createSkybox(
|
|
21
|
+
id: string,
|
|
22
|
+
params: {
|
|
23
|
+
active?: boolean;
|
|
24
|
+
size?: number;
|
|
25
|
+
scale?: number[];
|
|
26
|
+
src?: string;
|
|
27
|
+
image?: HTMLImageElement;
|
|
28
|
+
}
|
|
29
|
+
): any; //Skybox;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 设置指定id天空盒显示或隐藏
|
|
33
|
+
*/
|
|
34
|
+
setSkyBoxActiveById(id: string, active: boolean): void;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* 设置开启天空盒
|
|
38
|
+
*/
|
|
39
|
+
set active(active: boolean);
|
|
40
|
+
|
|
41
|
+
get active(): boolean;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* 根据指定id获取天空盒对象
|
|
45
|
+
* @param id
|
|
46
|
+
*/
|
|
47
|
+
getSkyBoxById(id: string): any;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Destroys a skybox.
|
|
51
|
+
* @param id
|
|
52
|
+
*/
|
|
53
|
+
destroySkybox(id: string): void;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
Destroys all skyboxes.
|
|
57
|
+
*/
|
|
58
|
+
clear(): void;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Destroys this plugin.
|
|
62
|
+
*
|
|
63
|
+
* Clears skyboxes from the Viewer first.
|
|
64
|
+
*/
|
|
65
|
+
destroy(): void;
|
|
66
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./SkyboxesPlugin";
|
|
1
|
+
export * from "./SkyboxesPlugin";
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import { StoreyViewsPlugin } from "./StoreyViewsPlugin";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Information about an ````IfcBuildingStorey````.
|
|
5
|
-
*/
|
|
6
|
-
export declare class Storey {
|
|
7
|
-
/**
|
|
8
|
-
* The {@link StoreyViewsPlugin} this Storey belongs to.
|
|
9
|
-
*
|
|
10
|
-
* @type {StoreyViewsPlugin}
|
|
11
|
-
*/
|
|
12
|
-
plugin: StoreyViewsPlugin;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* ID of the IfcBuildingStorey.
|
|
16
|
-
*
|
|
17
|
-
* This matches IDs of the IfcBuildingStorey's {@link MetaObject} and {@link Entity}.
|
|
18
|
-
*
|
|
19
|
-
* @type {String}
|
|
20
|
-
*/
|
|
21
|
-
storeyId: string;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* ID of the model.
|
|
25
|
-
*
|
|
26
|
-
* This matches the ID of the {@link MetaModel} that contains the IfcBuildingStorey's {@link MetaObject}.
|
|
27
|
-
*
|
|
28
|
-
* @type {String|Number}
|
|
29
|
-
*/
|
|
30
|
-
modelId: string | number;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Axis-aligned World-space boundary of the {@link Entity}s that represent the IfcBuildingStorey.
|
|
34
|
-
*
|
|
35
|
-
* The boundary is a six-element Float32Array containing the min/max extents of the
|
|
36
|
-
* axis-aligned boundary, ie. ````[xmin, ymin, zmin, xmax, ymax, zmax]````
|
|
37
|
-
*
|
|
38
|
-
* @type {Number[]}
|
|
39
|
-
*/
|
|
40
|
-
aabb: number[];
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Axis-aligned World-space boundary of the {@link Entity}s that represent the IfcBuildingStorey.
|
|
44
|
-
*
|
|
45
|
-
* The boundary is a six-element Float32Array containing the min/max extents of the
|
|
46
|
-
* axis-aligned boundary, ie. ````[xmin, ymin, zmin, xmax, ymax, zmax]````
|
|
47
|
-
*
|
|
48
|
-
* @property storeyAABB
|
|
49
|
-
* @type {Number[]}
|
|
50
|
-
*/
|
|
51
|
-
storeyAABB :number[];
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Axis-aligned World-space boundary of the {@link Entity}s that represent the model.
|
|
55
|
-
*
|
|
56
|
-
* The boundary is a six-element Float32Array containing the min/max extents of the
|
|
57
|
-
* axis-aligned boundary, ie. ````[xmin, ymin, zmin, xmax, ymax, zmax]````
|
|
58
|
-
*
|
|
59
|
-
* @property modelAABB
|
|
60
|
-
* @type {Number[]}
|
|
61
|
-
*/
|
|
62
|
-
modelAABB : number[];
|
|
63
|
-
|
|
64
|
-
/** Number of {@link Entity}s within the IfcBuildingStorey.
|
|
65
|
-
*
|
|
66
|
-
* @type {Number}
|
|
67
|
-
*/
|
|
68
|
-
numObjects: number;
|
|
69
|
-
}
|
|
1
|
+
import { StoreyViewsPlugin } from "./StoreyViewsPlugin";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Information about an ````IfcBuildingStorey````.
|
|
5
|
+
*/
|
|
6
|
+
export declare class Storey {
|
|
7
|
+
/**
|
|
8
|
+
* The {@link StoreyViewsPlugin} this Storey belongs to.
|
|
9
|
+
*
|
|
10
|
+
* @type {StoreyViewsPlugin}
|
|
11
|
+
*/
|
|
12
|
+
plugin: StoreyViewsPlugin;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* ID of the IfcBuildingStorey.
|
|
16
|
+
*
|
|
17
|
+
* This matches IDs of the IfcBuildingStorey's {@link MetaObject} and {@link Entity}.
|
|
18
|
+
*
|
|
19
|
+
* @type {String}
|
|
20
|
+
*/
|
|
21
|
+
storeyId: string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* ID of the model.
|
|
25
|
+
*
|
|
26
|
+
* This matches the ID of the {@link MetaModel} that contains the IfcBuildingStorey's {@link MetaObject}.
|
|
27
|
+
*
|
|
28
|
+
* @type {String|Number}
|
|
29
|
+
*/
|
|
30
|
+
modelId: string | number;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Axis-aligned World-space boundary of the {@link Entity}s that represent the IfcBuildingStorey.
|
|
34
|
+
*
|
|
35
|
+
* The boundary is a six-element Float32Array containing the min/max extents of the
|
|
36
|
+
* axis-aligned boundary, ie. ````[xmin, ymin, zmin, xmax, ymax, zmax]````
|
|
37
|
+
*
|
|
38
|
+
* @type {Number[]}
|
|
39
|
+
*/
|
|
40
|
+
aabb: number[];
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Axis-aligned World-space boundary of the {@link Entity}s that represent the IfcBuildingStorey.
|
|
44
|
+
*
|
|
45
|
+
* The boundary is a six-element Float32Array containing the min/max extents of the
|
|
46
|
+
* axis-aligned boundary, ie. ````[xmin, ymin, zmin, xmax, ymax, zmax]````
|
|
47
|
+
*
|
|
48
|
+
* @property storeyAABB
|
|
49
|
+
* @type {Number[]}
|
|
50
|
+
*/
|
|
51
|
+
storeyAABB :number[];
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Axis-aligned World-space boundary of the {@link Entity}s that represent the model.
|
|
55
|
+
*
|
|
56
|
+
* The boundary is a six-element Float32Array containing the min/max extents of the
|
|
57
|
+
* axis-aligned boundary, ie. ````[xmin, ymin, zmin, xmax, ymax, zmax]````
|
|
58
|
+
*
|
|
59
|
+
* @property modelAABB
|
|
60
|
+
* @type {Number[]}
|
|
61
|
+
*/
|
|
62
|
+
modelAABB : number[];
|
|
63
|
+
|
|
64
|
+
/** Number of {@link Entity}s within the IfcBuildingStorey.
|
|
65
|
+
*
|
|
66
|
+
* @type {Number}
|
|
67
|
+
*/
|
|
68
|
+
numObjects: number;
|
|
69
|
+
}
|