Merge pull request #117 from pattern-x/feature/section
Enable to clip the building with dxf
This commit is contained in:
@ -1,22 +1,24 @@
|
||||
{
|
||||
"files": {
|
||||
"main.css": "./static/css/main.f052ad65.css",
|
||||
"main.js": "./static/js/main.b6487067.js",
|
||||
"static/js/787.cf5efa72.chunk.js": "./static/js/787.cf5efa72.chunk.js",
|
||||
"main.css": "./static/css/main.90df8265.css",
|
||||
"main.js": "./static/js/main.f09baa39.js",
|
||||
"static/js/787.55649ca3.chunk.js": "./static/js/787.55649ca3.chunk.js",
|
||||
"demo/libs/gemini-viewer.esm.min.js": "./demo/libs/gemini-viewer.esm.min.js",
|
||||
"static/media/dwg_background.png": "./static/media/dwg_background.f630e7cda68e19172eec.png",
|
||||
"demo/libs/types/core/viewers/DxfViewer.d.ts": "./demo/libs/types/core/viewers/DxfViewer.d.ts",
|
||||
"demo/libs/types/core/viewers/DxfViewer.temp.d.ts": "./demo/libs/types/core/viewers/DxfViewer.temp.d.ts",
|
||||
"demo/libs/types/core/camera-controls/CameraControls.d.ts": "./demo/libs/types/core/camera-controls/CameraControls.d.ts",
|
||||
"demo/libs/types/core/viewers/DxfViewer.d.ts": "./demo/libs/types/core/viewers/DxfViewer.d.ts",
|
||||
"demo/libs/types/core/dxf/DxfLoader.d.ts": "./demo/libs/types/core/dxf/DxfLoader.d.ts",
|
||||
"demo/libs/types/core/viewers/BimViewer.d.ts": "./demo/libs/types/core/viewers/BimViewer.d.ts",
|
||||
"demo/libs/types/core/viewers/BimViewer.temp.d.ts": "./demo/libs/types/core/viewers/BimViewer.temp.d.ts",
|
||||
"demo/libs/types/core/utils/ObjectUtils.d.ts": "./demo/libs/types/core/utils/ObjectUtils.d.ts",
|
||||
"demo/libs/types/plugins/pdf/PdfLoader.d.ts": "./demo/libs/types/plugins/pdf/PdfLoader.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/DxfParser.d.ts": "./demo/libs/types/core/dxf-parser/DxfParser.d.ts",
|
||||
"demo/libs/types/core/viewers/VRViewer.d.ts": "./demo/libs/types/core/viewers/VRViewer.d.ts",
|
||||
"demo/libs/types/core/viewers/BaseViewer.d.ts": "./demo/libs/types/core/viewers/BaseViewer.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/DxfParser.d.ts": "./demo/libs/types/core/dxf-parser/DxfParser.d.ts",
|
||||
"demo/libs/types/core/viewers/VRViewer.temp.d.ts": "./demo/libs/types/core/viewers/VRViewer.temp.d.ts",
|
||||
"demo/libs/types/core/viewers/BaseViewer.temp.d.ts": "./demo/libs/types/core/viewers/BaseViewer.temp.d.ts",
|
||||
"demo/libs/types/core/Configs.d.ts": "./demo/libs/types/core/Configs.d.ts",
|
||||
"demo/libs/types/core/patches/shaders/shaderLib/gemini_standard.glsl.d.ts": "./demo/libs/types/core/patches/shaders/shaderLib/gemini_standard.glsl.d.ts",
|
||||
"demo/libs/types/plugins/sections/BasePlaneSection.d.ts": "./demo/libs/types/plugins/sections/BasePlaneSection.d.ts",
|
||||
"demo/libs/types/core/patches/shaders/shaderLib/gemini_standard.glsl.d.ts": "./demo/libs/types/core/patches/shaders/shaderLib/gemini_standard.glsl.d.ts",
|
||||
"demo/libs/types/core/helpers/OSnapHelper.d.ts": "./demo/libs/types/core/helpers/OSnapHelper.d.ts",
|
||||
"demo/libs/types/plugins/overview-map/OverviewMapPlugin.d.ts": "./demo/libs/types/plugins/overview-map/OverviewMapPlugin.d.ts",
|
||||
"demo/libs/types/core/utils/Locale.d.ts": "./demo/libs/types/core/utils/Locale.d.ts",
|
||||
@ -26,18 +28,19 @@
|
||||
"demo/libs/types/core/utils/CommonUtils.d.ts": "./demo/libs/types/core/utils/CommonUtils.d.ts",
|
||||
"demo/libs/types/plugins/measure/BaseMeasurement.d.ts": "./demo/libs/types/plugins/measure/BaseMeasurement.d.ts",
|
||||
"demo/libs/types/plugins/measure/MeasurementPlugin.d.ts": "./demo/libs/types/plugins/measure/MeasurementPlugin.d.ts",
|
||||
"demo/libs/types/core/controls/VRControls.d.ts": "./demo/libs/types/core/controls/VRControls.d.ts",
|
||||
"demo/libs/types/plugins/screenshot/ScreenshotPlugin.d.ts": "./demo/libs/types/plugins/screenshot/ScreenshotPlugin.d.ts",
|
||||
"demo/libs/types/core/model/Model2d.d.ts": "./demo/libs/types/core/model/Model2d.d.ts",
|
||||
"demo/libs/types/core/Constants.d.ts": "./demo/libs/types/core/Constants.d.ts",
|
||||
"demo/libs/types/core/input/InputManager.d.ts": "./demo/libs/types/core/input/InputManager.d.ts",
|
||||
"demo/libs/types/core/compare/BaseDxfCompareHelper.d.ts": "./demo/libs/types/core/compare/BaseDxfCompareHelper.d.ts",
|
||||
"demo/libs/types/core/utils/GeometryUtils.d.ts": "./demo/libs/types/core/utils/GeometryUtils.d.ts",
|
||||
"demo/libs/types/plugins/screenshot/ScreenshotPlugin.d.ts": "./demo/libs/types/plugins/screenshot/ScreenshotPlugin.d.ts",
|
||||
"demo/libs/types/plugins/toolbars/Toolbar.d.ts": "./demo/libs/types/plugins/toolbars/Toolbar.d.ts",
|
||||
"demo/libs/types/core/camera-controls/types.d.ts": "./demo/libs/types/core/camera-controls/types.d.ts",
|
||||
"demo/libs/types/plugins/hotpoint/HotpointPlugin.d.ts": "./demo/libs/types/plugins/hotpoint/HotpointPlugin.d.ts",
|
||||
"demo/libs/types/plugins/toolbars/Toolbar.d.ts": "./demo/libs/types/plugins/toolbars/Toolbar.d.ts",
|
||||
"demo/libs/types/core/viewers/VRViewer.d.ts": "./demo/libs/types/core/viewers/VRViewer.d.ts",
|
||||
"demo/libs/types/core/camera-controls/types.d.ts": "./demo/libs/types/core/camera-controls/types.d.ts",
|
||||
"demo/libs/types/core/markup/MarkupManager.d.ts": "./demo/libs/types/core/markup/MarkupManager.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/mleader.d.ts": "./demo/libs/types/core/dxf-parser/entities/mleader.d.ts",
|
||||
"demo/libs/types/core/model/Model2d.d.ts": "./demo/libs/types/core/model/Model2d.d.ts",
|
||||
"demo/libs/types/core/camera/CameraManager.d.ts": "./demo/libs/types/core/camera/CameraManager.d.ts",
|
||||
"demo/libs/types/core/dxf/DxfUtils.d.ts": "./demo/libs/types/core/dxf/DxfUtils.d.ts",
|
||||
"demo/libs/types/core/utils/CoordinateUtils.d.ts": "./demo/libs/types/core/utils/CoordinateUtils.d.ts",
|
||||
"demo/libs/types/core/compare/DxfCompareHelper.d.ts": "./demo/libs/types/core/compare/DxfCompareHelper.d.ts",
|
||||
@ -45,45 +48,49 @@
|
||||
"demo/libs/types/core/dxf-parser/entities/hatch.d.ts": "./demo/libs/types/core/dxf-parser/entities/hatch.d.ts",
|
||||
"demo/libs/types/plugins/sections/AxisPlaneSection.d.ts": "./demo/libs/types/plugins/sections/AxisPlaneSection.d.ts",
|
||||
"demo/libs/types/core/canvas/Drawable.d.ts": "./demo/libs/types/core/canvas/Drawable.d.ts",
|
||||
"demo/libs/types/core/font/FontManager.d.ts": "./demo/libs/types/core/font/FontManager.d.ts",
|
||||
"demo/libs/types/core/viewers/BimViewer.d.ts": "./demo/libs/types/core/viewers/BimViewer.d.ts",
|
||||
"demo/libs/types/core/helpers/LoadingHelper.d.ts": "./demo/libs/types/core/helpers/LoadingHelper.d.ts",
|
||||
"demo/libs/types/core/font/FontManager.d.ts": "./demo/libs/types/core/font/FontManager.d.ts",
|
||||
"demo/libs/types/core/utils/MathUtils.d.ts": "./demo/libs/types/core/utils/MathUtils.d.ts",
|
||||
"demo/libs/types/plugins/sections/BaseSection.d.ts": "./demo/libs/types/plugins/sections/BaseSection.d.ts",
|
||||
"demo/libs/types/core/viewers/ViewerEvent.d.ts": "./demo/libs/types/core/viewers/ViewerEvent.d.ts",
|
||||
"demo/libs/types/plugins/view-cube/ViewCube.d.ts": "./demo/libs/types/plugins/view-cube/ViewCube.d.ts",
|
||||
"demo/libs/types/plugins/sections/BaseSection.d.ts": "./demo/libs/types/plugins/sections/BaseSection.d.ts",
|
||||
"demo/libs/types/core/model/Model3d.d.ts": "./demo/libs/types/core/model/Model3d.d.ts",
|
||||
"demo/libs/types/core/utils/ExportUtils.d.ts": "./demo/libs/types/core/utils/ExportUtils.d.ts",
|
||||
"demo/libs/types/core/viewers/ViewerEvent.d.ts": "./demo/libs/types/core/viewers/ViewerEvent.d.ts",
|
||||
"demo/libs/types/plugins/dat-gui/BimViewerDatGui.d.ts": "./demo/libs/types/plugins/dat-gui/BimViewerDatGui.d.ts",
|
||||
"demo/libs/types/plugins/sections/SectionPlugin.d.ts": "./demo/libs/types/plugins/sections/SectionPlugin.d.ts",
|
||||
"demo/libs/types/plugins/layer-manager/LayerManagerPlugin.d.ts": "./demo/libs/types/plugins/layer-manager/LayerManagerPlugin.d.ts",
|
||||
"demo/libs/types/core/canvas/CanvasRender.d.ts": "./demo/libs/types/core/canvas/CanvasRender.d.ts",
|
||||
"demo/libs/types/plugins/layer-manager/LayerManagerPlugin.d.ts": "./demo/libs/types/plugins/layer-manager/LayerManagerPlugin.d.ts",
|
||||
"demo/libs/types/plugins/skybox/SkyboxPlugin.d.ts": "./demo/libs/types/plugins/skybox/SkyboxPlugin.d.ts",
|
||||
"demo/libs/types/core/pick/PickManager.d.ts": "./demo/libs/types/core/pick/PickManager.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/index.d.ts": "./demo/libs/types/core/dxf-parser/index.d.ts",
|
||||
"demo/libs/types/core/markup/CloudRectWithTextMarkup.d.ts": "./demo/libs/types/core/markup/CloudRectWithTextMarkup.d.ts",
|
||||
"demo/libs/types/core/font/ShxFont.d.ts": "./demo/libs/types/core/font/ShxFont.d.ts",
|
||||
"demo/libs/types/core/webcam/WebCam.d.ts": "./demo/libs/types/core/webcam/WebCam.d.ts",
|
||||
"demo/libs/types/plugins/sections/PickPlaneSection.d.ts": "./demo/libs/types/plugins/sections/PickPlaneSection.d.ts",
|
||||
"demo/libs/types/plugins/view-cube/ViewCubePlugin.d.ts": "./demo/libs/types/plugins/view-cube/ViewCubePlugin.d.ts",
|
||||
"demo/libs/types/core/vr/BaseVRMesh.d.ts": "./demo/libs/types/core/vr/BaseVRMesh.d.ts",
|
||||
"demo/libs/types/core/helpers/BoxSelectHelper.d.ts": "./demo/libs/types/core/helpers/BoxSelectHelper.d.ts",
|
||||
"demo/libs/types/core/utils/MaterialUtils.d.ts": "./demo/libs/types/core/utils/MaterialUtils.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/ParseHelpers.d.ts": "./demo/libs/types/core/dxf-parser/ParseHelpers.d.ts",
|
||||
"demo/libs/types/plugins/view-cube/ViewCubePlugin.d.ts": "./demo/libs/types/plugins/view-cube/ViewCubePlugin.d.ts",
|
||||
"demo/libs/types/core/markup/TextMarkup.d.ts": "./demo/libs/types/core/markup/TextMarkup.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/ParseHelpers.d.ts": "./demo/libs/types/core/dxf-parser/ParseHelpers.d.ts",
|
||||
"demo/libs/types/core/text-texture/TextTexture.d.ts": "./demo/libs/types/core/text-texture/TextTexture.d.ts",
|
||||
"demo/libs/types/export.doc.d.ts": "./demo/libs/types/export.doc.d.ts",
|
||||
"demo/libs/types/plugins/measure/BaseMeasureDrawable.d.ts": "./demo/libs/types/plugins/measure/BaseMeasureDrawable.d.ts",
|
||||
"demo/libs/types/plugins/sections/ViewportSection.d.ts": "./demo/libs/types/plugins/sections/ViewportSection.d.ts",
|
||||
"demo/libs/types/plugins/pdf/PdfLoaderPlugin.d.ts": "./demo/libs/types/plugins/pdf/PdfLoaderPlugin.d.ts",
|
||||
"demo/libs/types/plugins/explode/ExplodePlugin.d.ts": "./demo/libs/types/plugins/explode/ExplodePlugin.d.ts",
|
||||
"demo/libs/types/plugins/measure/BaseMeasureDrawable.d.ts": "./demo/libs/types/plugins/measure/BaseMeasureDrawable.d.ts",
|
||||
"demo/libs/types/plugins/overview-map/TextDrawable.d.ts": "./demo/libs/types/plugins/overview-map/TextDrawable.d.ts",
|
||||
"demo/libs/types/core/vr/VRCube24Faces.d.ts": "./demo/libs/types/core/vr/VRCube24Faces.d.ts",
|
||||
"demo/libs/types/plugins/bottom-bar/BottomBarPlugin.d.ts": "./demo/libs/types/plugins/bottom-bar/BottomBarPlugin.d.ts",
|
||||
"demo/libs/types/core/vr/BaseVRMesh.d.ts": "./demo/libs/types/core/vr/BaseVRMesh.d.ts",
|
||||
"demo/libs/types/export.doc.d.ts": "./demo/libs/types/export.doc.d.ts",
|
||||
"demo/libs/types/plugins/axis-gizmo/AxisGizmoPlugin.d.ts": "./demo/libs/types/plugins/axis-gizmo/AxisGizmoPlugin.d.ts",
|
||||
"demo/libs/types/plugins/ground-shaow/GroundShadowPlugin.d.ts": "./demo/libs/types/plugins/ground-shaow/GroundShadowPlugin.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/viewport.d.ts": "./demo/libs/types/core/dxf-parser/entities/viewport.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/geomtry.d.ts": "./demo/libs/types/core/dxf-parser/entities/geomtry.d.ts",
|
||||
"demo/libs/types/core/effect/EffectManager.d.ts": "./demo/libs/types/core/effect/EffectManager.d.ts",
|
||||
"demo/libs/types/plugins/explode/ObjectExploder.d.ts": "./demo/libs/types/plugins/explode/ObjectExploder.d.ts",
|
||||
"demo/libs/types/plugins/sections/SectionGizmo.d.ts": "./demo/libs/types/plugins/sections/SectionGizmo.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/geomtry.d.ts": "./demo/libs/types/core/dxf-parser/entities/geomtry.d.ts",
|
||||
"demo/libs/types/core/geometry-offset/Offset.d.ts": "./demo/libs/types/core/geometry-offset/Offset.d.ts",
|
||||
"demo/libs/types/core/vr/VRCube24Faces.d.ts": "./demo/libs/types/core/vr/VRCube24Faces.d.ts",
|
||||
"demo/libs/types/plugins/sections/SectionGizmo.d.ts": "./demo/libs/types/plugins/sections/SectionGizmo.d.ts",
|
||||
"demo/libs/types/plugins/sections/ObjectsBoxSection.d.ts": "./demo/libs/types/plugins/sections/ObjectsBoxSection.d.ts",
|
||||
"demo/libs/types/plugins/nav-cube/NavCubePlugin.d.ts": "./demo/libs/types/plugins/nav-cube/NavCubePlugin.d.ts",
|
||||
"demo/libs/types/plugins/overview-map/ImageDrawable.d.ts": "./demo/libs/types/plugins/overview-map/ImageDrawable.d.ts",
|
||||
@ -91,178 +98,188 @@
|
||||
"demo/libs/types/plugins/ground-grid/GroundGridPlugin.d.ts": "./demo/libs/types/plugins/ground-grid/GroundGridPlugin.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/table.d.ts": "./demo/libs/types/core/dxf-parser/entities/table.d.ts",
|
||||
"demo/libs/types/core/font/BaseFont.d.ts": "./demo/libs/types/core/font/BaseFont.d.ts",
|
||||
"demo/libs/types/core/scene/SceneManager.d.ts": "./demo/libs/types/core/scene/SceneManager.d.ts",
|
||||
"demo/libs/types/core/helpers/ControlsHelper.d.ts": "./demo/libs/types/core/helpers/ControlsHelper.d.ts",
|
||||
"demo/libs/types/core/camera-controls/EventDispatcher.d.ts": "./demo/libs/types/core/camera-controls/EventDispatcher.d.ts",
|
||||
"demo/libs/types/plugins/measure/AreaMeasurement.d.ts": "./demo/libs/types/plugins/measure/AreaMeasurement.d.ts",
|
||||
"demo/libs/types/plugins/sections/BaseBoxSection.d.ts": "./demo/libs/types/plugins/sections/BaseBoxSection.d.ts",
|
||||
"demo/libs/types/core/font/shx/util/BitConverter.d.ts": "./demo/libs/types/core/font/shx/util/BitConverter.d.ts",
|
||||
"demo/libs/types/core/markup/BaseMarkup.d.ts": "./demo/libs/types/core/markup/BaseMarkup.d.ts",
|
||||
"demo/libs/types/plugins/sections/BaseBoxSection.d.ts": "./demo/libs/types/plugins/sections/BaseBoxSection.d.ts",
|
||||
"demo/libs/types/plugins/toolbars/DxfViewerToolbarPlugin.d.ts": "./demo/libs/types/plugins/toolbars/DxfViewerToolbarPlugin.d.ts",
|
||||
"demo/libs/types/core/indexeddb/BaseTable.d.ts": "./demo/libs/types/core/indexeddb/BaseTable.d.ts",
|
||||
"demo/libs/types/core/dxf/dxfom-mtext.d.ts": "./demo/libs/types/core/dxf/dxfom-mtext.d.ts",
|
||||
"demo/libs/types/core/controls/CameraControlsEx.d.ts": "./demo/libs/types/core/controls/CameraControlsEx.d.ts",
|
||||
"demo/libs/types/core/utils/SceneUtils.d.ts": "./demo/libs/types/core/utils/SceneUtils.d.ts",
|
||||
"demo/libs/types/core/dxf/dxfom-mtext.d.ts": "./demo/libs/types/core/dxf/dxfom-mtext.d.ts",
|
||||
"demo/libs/types/plugins/measure/DistanceMeasurement.d.ts": "./demo/libs/types/plugins/measure/DistanceMeasurement.d.ts",
|
||||
"demo/libs/types/core/dxf/DxfObject.d.ts": "./demo/libs/types/core/dxf/DxfObject.d.ts",
|
||||
"demo/libs/types/plugins/measure/DistanceMeasurement.d.ts": "./demo/libs/types/plugins/measure/DistanceMeasurement.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/DxfTextReader.d.ts": "./demo/libs/types/core/dxf-parser/DxfTextReader.d.ts",
|
||||
"demo/libs/types/core/canvas/DrawableList.d.ts": "./demo/libs/types/core/canvas/DrawableList.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/image.d.ts": "./demo/libs/types/core/dxf-parser/entities/image.d.ts",
|
||||
"demo/libs/types/core/model/Constants.d.ts": "./demo/libs/types/core/model/Constants.d.ts",
|
||||
"demo/libs/types/plugins/local-model-uploader/LocalModelUploader.d.ts": "./demo/libs/types/plugins/local-model-uploader/LocalModelUploader.d.ts",
|
||||
"demo/libs/types/core/markup/LeaderLineMarkup.d.ts": "./demo/libs/types/core/markup/LeaderLineMarkup.d.ts",
|
||||
"demo/libs/types/components/progress-bar/ProgressBar.d.ts": "./demo/libs/types/components/progress-bar/ProgressBar.d.ts",
|
||||
"demo/libs/types/core/markup/LeaderLineMarkup.d.ts": "./demo/libs/types/core/markup/LeaderLineMarkup.d.ts",
|
||||
"demo/libs/types/core/helpers/MobileTouchHelperDrawable.d.ts": "./demo/libs/types/core/helpers/MobileTouchHelperDrawable.d.ts",
|
||||
"demo/libs/types/core/camera-controls/utils/math-utils.d.ts": "./demo/libs/types/core/camera-controls/utils/math-utils.d.ts",
|
||||
"demo/libs/types/core/utils/Event.d.ts": "./demo/libs/types/core/utils/Event.d.ts",
|
||||
"demo/libs/types/core/helpers/PickMarkupHelper.d.ts": "./demo/libs/types/core/helpers/PickMarkupHelper.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/objects/common.d.ts": "./demo/libs/types/core/dxf-parser/objects/common.d.ts",
|
||||
"demo/libs/types/core/camera-controls/utils/math-utils.d.ts": "./demo/libs/types/core/camera-controls/utils/math-utils.d.ts",
|
||||
"demo/libs/types/components/settings/ProjectSettingsDef.d.ts": "./demo/libs/types/components/settings/ProjectSettingsDef.d.ts",
|
||||
"demo/libs/types/core/helpers/PickMarkupHelper.d.ts": "./demo/libs/types/core/helpers/PickMarkupHelper.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/attdef.d.ts": "./demo/libs/types/core/dxf-parser/entities/attdef.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/attrib.d.ts": "./demo/libs/types/core/dxf-parser/entities/attrib.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/objects/common.d.ts": "./demo/libs/types/core/dxf-parser/objects/common.d.ts",
|
||||
"demo/libs/types/core/indexeddb/FontDataTable.d.ts": "./demo/libs/types/core/indexeddb/FontDataTable.d.ts",
|
||||
"demo/libs/types/plugins/pdf/PdfLoaderPlugin.d.ts": "./demo/libs/types/plugins/pdf/PdfLoaderPlugin.d.ts",
|
||||
"demo/libs/types/plugins/sections/SectionPlaneMesh.d.ts": "./demo/libs/types/plugins/sections/SectionPlaneMesh.d.ts",
|
||||
"demo/libs/types/core/shp-js/ShpThree.d.ts": "./demo/libs/types/core/shp-js/ShpThree.d.ts",
|
||||
"demo/libs/types/plugins/context-menu/Constants.d.ts": "./demo/libs/types/plugins/context-menu/Constants.d.ts",
|
||||
"demo/libs/types/core/shp-js/ShpThree.d.ts": "./demo/libs/types/core/shp-js/ShpThree.d.ts",
|
||||
"demo/libs/types/core/utils/index.d.ts": "./demo/libs/types/core/utils/index.d.ts",
|
||||
"demo/libs/types/plugins/toolbars/BimViewerToolbarPlugin.d.ts": "./demo/libs/types/plugins/toolbars/BimViewerToolbarPlugin.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/objects/spatialfilter.d.ts": "./demo/libs/types/core/dxf-parser/objects/spatialfilter.d.ts",
|
||||
"demo/libs/types/plugins/context-menu/ContextMenuPlugin.d.ts": "./demo/libs/types/plugins/context-menu/ContextMenuPlugin.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/objects/spatialfilter.d.ts": "./demo/libs/types/core/dxf-parser/objects/spatialfilter.d.ts",
|
||||
"demo/libs/types/core/viewers/Plugin.d.ts": "./demo/libs/types/core/viewers/Plugin.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/objects/layout.d.ts": "./demo/libs/types/core/dxf-parser/objects/layout.d.ts",
|
||||
"demo/libs/types/core/components/ProgressBar.d.ts": "./demo/libs/types/core/components/ProgressBar.d.ts",
|
||||
"demo/libs/types/plugins/measure/AngleMeasurement.d.ts": "./demo/libs/types/plugins/measure/AngleMeasurement.d.ts",
|
||||
"demo/libs/types/plugins/measure/CoordinateMeasurement.d.ts": "./demo/libs/types/plugins/measure/CoordinateMeasurement.d.ts",
|
||||
"demo/libs/types/plugins/sections/GlobalPlaneSection.d.ts": "./demo/libs/types/plugins/sections/GlobalPlaneSection.d.ts",
|
||||
"demo/libs/types/plugins/measure/CoordinateMeasurement.d.ts": "./demo/libs/types/plugins/measure/CoordinateMeasurement.d.ts",
|
||||
"demo/libs/types/core/canvas/Constants.d.ts": "./demo/libs/types/core/canvas/Constants.d.ts",
|
||||
"demo/libs/types/core/font/shx/TextShape.d.ts": "./demo/libs/types/core/font/shx/TextShape.d.ts",
|
||||
"demo/libs/types/core/utils/Viewer3DUtils.d.ts": "./demo/libs/types/core/utils/Viewer3DUtils.d.ts",
|
||||
"demo/libs/types/core/font/shx/TextShape.d.ts": "./demo/libs/types/core/font/shx/TextShape.d.ts",
|
||||
"demo/libs/types/plugins/overview-map/OverviewMapDrawable.d.ts": "./demo/libs/types/plugins/overview-map/OverviewMapDrawable.d.ts",
|
||||
"demo/libs/types/core/indexeddb/IndexedDbManager.d.ts": "./demo/libs/types/core/indexeddb/IndexedDbManager.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/polyline.d.ts": "./demo/libs/types/core/dxf-parser/entities/polyline.d.ts",
|
||||
"demo/libs/types/components/dxf-layout-bar/DxfLayoutBar.d.ts": "./demo/libs/types/components/dxf-layout-bar/DxfLayoutBar.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/polyline.d.ts": "./demo/libs/types/core/dxf-parser/entities/polyline.d.ts",
|
||||
"demo/libs/types/core/helpers/InstantiateHelper.d.ts": "./demo/libs/types/core/helpers/InstantiateHelper.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/objects/imagedef.d.ts": "./demo/libs/types/core/dxf-parser/objects/imagedef.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/spline.d.ts": "./demo/libs/types/core/dxf-parser/entities/spline.d.ts",
|
||||
"demo/libs/types/core/helpers/InstantiateHelper.d.ts": "./demo/libs/types/core/helpers/InstantiateHelper.d.ts",
|
||||
"demo/libs/types/components/pop-panel/AxisSectionPopPanel.d.ts": "./demo/libs/types/components/pop-panel/AxisSectionPopPanel.d.ts",
|
||||
"demo/libs/types/plugins/sections/ObjectsPlaneSection.d.ts": "./demo/libs/types/plugins/sections/ObjectsPlaneSection.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/dimension.d.ts": "./demo/libs/types/core/dxf-parser/entities/dimension.d.ts",
|
||||
"demo/libs/types/plugins/measure/AngleMeasureDrawable.d.ts": "./demo/libs/types/plugins/measure/AngleMeasureDrawable.d.ts",
|
||||
"demo/libs/types/core/helpers/ZoomToRectHelper.d.ts": "./demo/libs/types/core/helpers/ZoomToRectHelper.d.ts",
|
||||
"demo/libs/types/plugins/measure/AreaMeasureDrawable.d.ts": "./demo/libs/types/plugins/measure/AreaMeasureDrawable.d.ts",
|
||||
"demo/libs/types/components/pop-panel/AxisSectionPopPanel.d.ts": "./demo/libs/types/components/pop-panel/AxisSectionPopPanel.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/lwpolyline.d.ts": "./demo/libs/types/core/dxf-parser/entities/lwpolyline.d.ts",
|
||||
"demo/libs/types/core/components/Container.d.ts": "./demo/libs/types/core/components/Container.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/leader.d.ts": "./demo/libs/types/core/dxf-parser/entities/leader.d.ts",
|
||||
"demo/libs/types/components/pop-panel/PickSectionPopPanel.d.ts": "./demo/libs/types/components/pop-panel/PickSectionPopPanel.d.ts",
|
||||
"demo/libs/types/plugins/measure/AngleMeasureDrawable.d.ts": "./demo/libs/types/plugins/measure/AngleMeasureDrawable.d.ts",
|
||||
"demo/libs/types/plugins/measure/AreaMeasureDrawable.d.ts": "./demo/libs/types/plugins/measure/AreaMeasureDrawable.d.ts",
|
||||
"demo/libs/types/core/helpers/BinaryReader.d.ts": "./demo/libs/types/core/helpers/BinaryReader.d.ts",
|
||||
"demo/libs/types/plugins/overview-map/LineDrawable.d.ts": "./demo/libs/types/plugins/overview-map/LineDrawable.d.ts",
|
||||
"demo/libs/types/components/pop-panel/PickSectionPopPanel.d.ts": "./demo/libs/types/components/pop-panel/PickSectionPopPanel.d.ts",
|
||||
"demo/libs/types/core/helpers/ZoomToRectHelper.d.ts": "./demo/libs/types/core/helpers/ZoomToRectHelper.d.ts",
|
||||
"demo/libs/types/plugins/measure/DistanceMeasureDrawable.d.ts": "./demo/libs/types/plugins/measure/DistanceMeasureDrawable.d.ts",
|
||||
"index.html": "./index.html",
|
||||
"demo/libs/types/core/utils/ColorUtils.d.ts": "./demo/libs/types/core/utils/ColorUtils.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/vertex.d.ts": "./demo/libs/types/core/dxf-parser/entities/vertex.d.ts",
|
||||
"demo/libs/types/core/font/shx/ShxParser.d.ts": "./demo/libs/types/core/font/shx/ShxParser.d.ts",
|
||||
"demo/libs/types/plugins/local-model-uploader/LocalDxfUploader.d.ts": "./demo/libs/types/plugins/local-model-uploader/LocalDxfUploader.d.ts",
|
||||
"demo/libs/types/core/dxf/dxfom-text.d.ts": "./demo/libs/types/core/dxf/dxfom-text.d.ts",
|
||||
"demo/libs/types/core/utils/EdgeUtils.d.ts": "./demo/libs/types/core/utils/EdgeUtils.d.ts",
|
||||
"demo/libs/types/core/indexeddb/ImageDataTable.d.ts": "./demo/libs/types/core/indexeddb/ImageDataTable.d.ts",
|
||||
"demo/libs/types/core/geometry-offset/Edge.d.ts": "./demo/libs/types/core/geometry-offset/Edge.d.ts",
|
||||
"index.html": "./index.html",
|
||||
"demo/libs/types/core/utils/EdgeUtils.d.ts": "./demo/libs/types/core/utils/EdgeUtils.d.ts",
|
||||
"demo/libs/types/plugins/index.d.ts": "./demo/libs/types/plugins/index.d.ts",
|
||||
"demo/libs/types/core/utils/SectionUtils.d.ts": "./demo/libs/types/core/utils/SectionUtils.d.ts",
|
||||
"demo/libs/types/plugins/stats/StatsPlugin.d.ts": "./demo/libs/types/plugins/stats/StatsPlugin.d.ts",
|
||||
"demo/libs/types/core/indexeddb/DxfDataTable.d.ts": "./demo/libs/types/core/indexeddb/DxfDataTable.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/insert.d.ts": "./demo/libs/types/core/dxf-parser/entities/insert.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/ole2frame.d.ts": "./demo/libs/types/core/dxf-parser/entities/ole2frame.d.ts",
|
||||
"demo/libs/types/core/indexeddb/DxfDataTable.d.ts": "./demo/libs/types/core/indexeddb/DxfDataTable.d.ts",
|
||||
"demo/libs/types/core/utils/SectionUtils.d.ts": "./demo/libs/types/core/utils/SectionUtils.d.ts",
|
||||
"demo/libs/types/components/tool-tip/Tooltip.d.ts": "./demo/libs/types/components/tool-tip/Tooltip.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/objects/dictionary.d.ts": "./demo/libs/types/core/dxf-parser/objects/dictionary.d.ts",
|
||||
"demo/libs/types/core/utils/UnitConversionUtils.d.ts": "./demo/libs/types/core/utils/UnitConversionUtils.d.ts",
|
||||
"demo/libs/types/core/helpers/RafHelper.d.ts": "./demo/libs/types/core/helpers/RafHelper.d.ts",
|
||||
"demo/libs/types/core/font/MeshFont.d.ts": "./demo/libs/types/core/font/MeshFont.d.ts",
|
||||
"demo/libs/types/core/utils/CSS2DObjectUtils.d.ts": "./demo/libs/types/core/utils/CSS2DObjectUtils.d.ts",
|
||||
"demo/libs/types/core/compare/CompareDrawable.d.ts": "./demo/libs/types/core/compare/CompareDrawable.d.ts",
|
||||
"demo/libs/types/core/utils/UnitConversionUtils.d.ts": "./demo/libs/types/core/utils/UnitConversionUtils.d.ts",
|
||||
"demo/libs/types/core/utils/CSS2DObjectUtils.d.ts": "./demo/libs/types/core/utils/CSS2DObjectUtils.d.ts",
|
||||
"demo/libs/types/core/helpers/MeshBvhHelper.d.ts": "./demo/libs/types/core/helpers/MeshBvhHelper.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/mtext.d.ts": "./demo/libs/types/core/dxf-parser/entities/mtext.d.ts",
|
||||
"demo/libs/types/core/undo-redo/UndoRedoManager.d.ts": "./demo/libs/types/core/undo-redo/UndoRedoManager.d.ts",
|
||||
"demo/libs/types/core/markup/ArrowMarkup.d.ts": "./demo/libs/types/core/markup/ArrowMarkup.d.ts",
|
||||
"demo/libs/types/core/utils/TextureUtils.d.ts": "./demo/libs/types/core/utils/TextureUtils.d.ts",
|
||||
"demo/libs/types/core/undo-redo/UndoRedoManager.d.ts": "./demo/libs/types/core/undo-redo/UndoRedoManager.d.ts",
|
||||
"demo/libs/types/core/index.d.ts": "./demo/libs/types/core/index.d.ts",
|
||||
"demo/libs/types/core/materials/GeminiStandardMaterial.d.ts": "./demo/libs/types/core/materials/GeminiStandardMaterial.d.ts",
|
||||
"demo/libs/types/plugins/toolbars/MarkupToolbar.d.ts": "./demo/libs/types/plugins/toolbars/MarkupToolbar.d.ts",
|
||||
"demo/libs/types/core/vr/VRCube.d.ts": "./demo/libs/types/core/vr/VRCube.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/text.d.ts": "./demo/libs/types/core/dxf-parser/entities/text.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/arc.d.ts": "./demo/libs/types/core/dxf-parser/entities/arc.d.ts",
|
||||
"demo/libs/types/core/patches/shaders/shaderChunk/outline_bc_pars_fragment.glsl.d.ts": "./demo/libs/types/core/patches/shaders/shaderChunk/outline_bc_pars_fragment.glsl.d.ts",
|
||||
"demo/libs/types/core/workers/GenerateMeshBvhWorker.d.ts": "./demo/libs/types/core/workers/GenerateMeshBvhWorker.d.ts",
|
||||
"demo/libs/types/plugins/axis-gizmo/CoordinateAxes.d.ts": "./demo/libs/types/plugins/axis-gizmo/CoordinateAxes.d.ts",
|
||||
"demo/libs/types/core/utils/SVGObjectUtils.d.ts": "./demo/libs/types/core/utils/SVGObjectUtils.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/ellipse.d.ts": "./demo/libs/types/core/dxf-parser/entities/ellipse.d.ts",
|
||||
"demo/libs/types/core/markup/Constants.d.ts": "./demo/libs/types/core/markup/Constants.d.ts",
|
||||
"demo/libs/types/core/patches/shaders/shaderChunk/outline_bc_pars_fragment.glsl.d.ts": "./demo/libs/types/core/patches/shaders/shaderChunk/outline_bc_pars_fragment.glsl.d.ts",
|
||||
"demo/libs/types/core/markup/CircleMarkup.d.ts": "./demo/libs/types/core/markup/CircleMarkup.d.ts",
|
||||
"demo/libs/types/core/utils/DeviceUtils.d.ts": "./demo/libs/types/core/utils/DeviceUtils.d.ts",
|
||||
"demo/libs/types/plugins/measure/CoordinateMeasureDrawable.d.ts": "./demo/libs/types/plugins/measure/CoordinateMeasureDrawable.d.ts",
|
||||
"demo/libs/types/plugins/skybox/GradientColorSkybox.d.ts": "./demo/libs/types/plugins/skybox/GradientColorSkybox.d.ts",
|
||||
"demo/libs/types/core/markup/CloudLineMarkup.d.ts": "./demo/libs/types/core/markup/CloudLineMarkup.d.ts",
|
||||
"demo/libs/types/plugins/skybox/GradientColorSkybox.d.ts": "./demo/libs/types/plugins/skybox/GradientColorSkybox.d.ts",
|
||||
"demo/libs/types/core/markup/EllipseMarkup.d.ts": "./demo/libs/types/core/markup/EllipseMarkup.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/objects/sortentstable.d.ts": "./demo/libs/types/core/dxf-parser/objects/sortentstable.d.ts",
|
||||
"demo/libs/types/core/markup/PolylineMarkup.d.ts": "./demo/libs/types/core/markup/PolylineMarkup.d.ts",
|
||||
"demo/libs/types/core/Units.d.ts": "./demo/libs/types/core/Units.d.ts",
|
||||
"demo/libs/types/core/vr/VRCube.d.ts": "./demo/libs/types/core/vr/VRCube.d.ts",
|
||||
"demo/libs/types/core/markup/PolylineMarkup.d.ts": "./demo/libs/types/core/markup/PolylineMarkup.d.ts",
|
||||
"demo/libs/types/core/vr/ImageManager.d.ts": "./demo/libs/types/core/vr/ImageManager.d.ts",
|
||||
"demo/libs/types/core/markup/CloudRectMarkup.d.ts": "./demo/libs/types/core/markup/CloudRectMarkup.d.ts",
|
||||
"demo/libs/types/core/helpers/ObjectPixelSizeHelper.d.ts": "./demo/libs/types/core/helpers/ObjectPixelSizeHelper.d.ts",
|
||||
"demo/libs/types/core/controls/PlanControl.d.ts": "./demo/libs/types/core/controls/PlanControl.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/objects/xrecord.d.ts": "./demo/libs/types/core/dxf-parser/objects/xrecord.d.ts",
|
||||
"demo/libs/types/core/dxf/HatchPatternShaders.d.ts": "./demo/libs/types/core/dxf/HatchPatternShaders.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/circle.d.ts": "./demo/libs/types/core/dxf-parser/entities/circle.d.ts",
|
||||
"demo/libs/types/core/dxf/LinePatternShaders.d.ts": "./demo/libs/types/core/dxf/LinePatternShaders.d.ts",
|
||||
"demo/libs/types/core/utils/SimplifyUtils.d.ts": "./demo/libs/types/core/utils/SimplifyUtils.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/circle.d.ts": "./demo/libs/types/core/dxf-parser/entities/circle.d.ts",
|
||||
"demo/libs/types/core/model/Model.d.ts": "./demo/libs/types/core/model/Model.d.ts",
|
||||
"demo/libs/types/core/dxf/LinePatternShaders.d.ts": "./demo/libs/types/core/dxf/LinePatternShaders.d.ts",
|
||||
"demo/libs/types/core/compare/DxfCompareMarkupManager.d.ts": "./demo/libs/types/core/compare/DxfCompareMarkupManager.d.ts",
|
||||
"demo/libs/types/core/markup/RectMarkup.d.ts": "./demo/libs/types/core/markup/RectMarkup.d.ts",
|
||||
"demo/libs/types/core/model/Model.d.ts": "./demo/libs/types/core/model/Model.d.ts",
|
||||
"demo/libs/types/core/helpers/index.d.ts": "./demo/libs/types/core/helpers/index.d.ts",
|
||||
"demo/libs/types/core/markup/XMarkup.d.ts": "./demo/libs/types/core/markup/XMarkup.d.ts",
|
||||
"demo/libs/types/core/markup/index.d.ts": "./demo/libs/types/core/markup/index.d.ts",
|
||||
"demo/libs/types/core/indexeddb/AnnotationTable.d.ts": "./demo/libs/types/core/indexeddb/AnnotationTable.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/3dface.d.ts": "./demo/libs/types/core/dxf-parser/entities/3dface.d.ts",
|
||||
"demo/libs/types/components/pop-panel/PopPanel.d.ts": "./demo/libs/types/components/pop-panel/PopPanel.d.ts",
|
||||
"demo/libs/types/core/indexeddb/ViewpointTable.d.ts": "./demo/libs/types/core/indexeddb/ViewpointTable.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/3dface.d.ts": "./demo/libs/types/core/dxf-parser/entities/3dface.d.ts",
|
||||
"demo/libs/types/core/controls/VRControl.d.ts": "./demo/libs/types/core/controls/VRControl.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/DxfBinaryReader.d.ts": "./demo/libs/types/core/dxf-parser/DxfBinaryReader.d.ts",
|
||||
"demo/libs/types/core/controls/OrbitControl.d.ts": "./demo/libs/types/core/controls/OrbitControl.d.ts",
|
||||
"demo/libs/types/core/vr/VRSphere.d.ts": "./demo/libs/types/core/vr/VRSphere.d.ts",
|
||||
"demo/libs/types/core/undo-redo/UpdateMarkupCommand.d.ts": "./demo/libs/types/core/undo-redo/UpdateMarkupCommand.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/AutoCadColorIndex.d.ts": "./demo/libs/types/core/dxf-parser/AutoCadColorIndex.d.ts",
|
||||
"demo/libs/types/core/patches/shaders/shaderChunk/outine_bc_vertex.glsl.d.ts": "./demo/libs/types/core/patches/shaders/shaderChunk/outine_bc_vertex.glsl.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/point.d.ts": "./demo/libs/types/core/dxf-parser/entities/point.d.ts",
|
||||
"demo/libs/types/plugins/sections/Section.constants.d.ts": "./demo/libs/types/plugins/sections/Section.constants.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/point.d.ts": "./demo/libs/types/core/dxf-parser/entities/point.d.ts",
|
||||
"demo/libs/types/core/helpers/index.d.ts": "./demo/libs/types/core/helpers/index.d.ts",
|
||||
"demo/libs/types/core/patches/shaders/shaderChunk/outine_bc_vertex.glsl.d.ts": "./demo/libs/types/core/patches/shaders/shaderChunk/outine_bc_vertex.glsl.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/region.d.ts": "./demo/libs/types/core/dxf-parser/entities/region.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/solid.d.ts": "./demo/libs/types/core/dxf-parser/entities/solid.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/xline.d.ts": "./demo/libs/types/core/dxf-parser/entities/xline.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/line.d.ts": "./demo/libs/types/core/dxf-parser/entities/line.d.ts",
|
||||
"demo/libs/types/core/shp-js/SHPLoader.d.ts": "./demo/libs/types/core/shp-js/SHPLoader.d.ts",
|
||||
"demo/libs/types/core/dxf/bspline.d.ts": "./demo/libs/types/core/dxf/bspline.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/line.d.ts": "./demo/libs/types/core/dxf-parser/entities/line.d.ts",
|
||||
"demo/libs/types/plugins/nav-cube/NavCube.d.ts": "./demo/libs/types/plugins/nav-cube/NavCube.d.ts",
|
||||
"demo/libs/types/core/markup/DotMarkup.d.ts": "./demo/libs/types/core/markup/DotMarkup.d.ts",
|
||||
"demo/libs/types/core/dxf/bspline.d.ts": "./demo/libs/types/core/dxf/bspline.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/ray.d.ts": "./demo/libs/types/core/dxf-parser/entities/ray.d.ts",
|
||||
"demo/libs/types/core/markup/DotMarkup.d.ts": "./demo/libs/types/core/markup/DotMarkup.d.ts",
|
||||
"demo/libs/types/core/undo-redo/RemoveMarkupCommand.d.ts": "./demo/libs/types/core/undo-redo/RemoveMarkupCommand.d.ts",
|
||||
"demo/libs/types/core/undo-redo/AddMarkupCommand.d.ts": "./demo/libs/types/core/undo-redo/AddMarkupCommand.d.ts",
|
||||
"demo/libs/types/core/dxf/DxfConstants.d.ts": "./demo/libs/types/core/dxf/DxfConstants.d.ts",
|
||||
"demo/libs/types/core/dxf/index.d.ts": "./demo/libs/types/core/dxf/index.d.ts",
|
||||
"demo/libs/types/core/undo-redo/RemoveMeasurementCommand.d.ts": "./demo/libs/types/core/undo-redo/RemoveMeasurementCommand.d.ts",
|
||||
"demo/libs/types/core/undo-redo/AddMeasurementCommand.d.ts": "./demo/libs/types/core/undo-redo/AddMeasurementCommand.d.ts",
|
||||
"demo/libs/types/plugins/local-model-uploader/LocalImageUploader.d.ts": "./demo/libs/types/plugins/local-model-uploader/LocalImageUploader.d.ts",
|
||||
"demo/libs/types/core/vr/VRSphere.d.ts": "./demo/libs/types/core/vr/VRSphere.d.ts",
|
||||
"demo/libs/types/core/undo-redo/AddMeasurementCommand.d.ts": "./demo/libs/types/core/undo-redo/AddMeasurementCommand.d.ts",
|
||||
"demo/libs/types/core/components/Spinner.d.ts": "./demo/libs/types/core/components/Spinner.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/DxfBaseReader.d.ts": "./demo/libs/types/core/dxf-parser/DxfBaseReader.d.ts",
|
||||
"demo/libs/types/core/shp-js/BitView.d.ts": "./demo/libs/types/core/shp-js/BitView.d.ts",
|
||||
"demo/libs/types/core/dxf-parser/entities/seqend.d.ts": "./demo/libs/types/core/dxf-parser/entities/seqend.d.ts",
|
||||
"demo/libs/types/core/patches/shaders/shaderChunk/outline_bc_fragment.glsl.d.ts": "./demo/libs/types/core/patches/shaders/shaderChunk/outline_bc_fragment.glsl.d.ts",
|
||||
"demo/libs/types/core/font/shx/gbk/index.d.ts": "./demo/libs/types/core/font/shx/gbk/index.d.ts",
|
||||
"demo/libs/types/core/undo-redo/index.d.ts": "./demo/libs/types/core/undo-redo/index.d.ts",
|
||||
"demo/libs/types/core/font/shx/gbk/index.d.ts": "./demo/libs/types/core/font/shx/gbk/index.d.ts",
|
||||
"demo/libs/types/plugins/local-model-uploader/IUploader.d.ts": "./demo/libs/types/plugins/local-model-uploader/IUploader.d.ts",
|
||||
"demo/libs/types/core/utils/PolygonUtils.d.ts": "./demo/libs/types/core/utils/PolygonUtils.d.ts",
|
||||
"demo/libs/types/core/viewers/index.d.ts": "./demo/libs/types/core/viewers/index.d.ts",
|
||||
"demo/libs/types/index.d.ts": "./demo/libs/types/index.d.ts",
|
||||
"demo/libs/types/plugins/toolbars/Toolbar.config.d.ts": "./demo/libs/types/plugins/toolbars/Toolbar.config.d.ts",
|
||||
"demo/libs/types/core/controls/Control.d.ts": "./demo/libs/types/core/controls/Control.d.ts",
|
||||
"demo/libs/types/core/indexeddb/index.d.ts": "./demo/libs/types/core/indexeddb/index.d.ts",
|
||||
"demo/libs/types/core/utils/LogUtils.d.ts": "./demo/libs/types/core/utils/LogUtils.d.ts",
|
||||
"demo/libs/types/plugins/toolbars/index.d.ts": "./demo/libs/types/plugins/toolbars/index.d.ts",
|
||||
"demo/libs/types/core/utils/FpsUtils.d.ts": "./demo/libs/types/core/utils/FpsUtils.d.ts",
|
||||
"demo/libs/types/core/shp-js/Shp.d.ts": "./demo/libs/types/core/shp-js/Shp.d.ts",
|
||||
"demo/libs/types/core/viewers/index.d.ts": "./demo/libs/types/core/viewers/index.d.ts",
|
||||
"demo/libs/types/core/font/shx/Shx.constants.d.ts": "./demo/libs/types/core/font/shx/Shx.constants.d.ts",
|
||||
"demo/libs/types/plugins/toolbars/index.d.ts": "./demo/libs/types/plugins/toolbars/index.d.ts",
|
||||
"demo/libs/types/core/camera-controls/utils/notSupportedInOrthographicCamera.d.ts": "./demo/libs/types/core/camera-controls/utils/notSupportedInOrthographicCamera.d.ts",
|
||||
"demo/libs/types/core/indexeddb/index.d.ts": "./demo/libs/types/core/indexeddb/index.d.ts",
|
||||
"demo/libs/types/core/camera-controls/utils/extractClientCoordFromEvent.d.ts": "./demo/libs/types/core/camera-controls/utils/extractClientCoordFromEvent.d.ts",
|
||||
"demo/libs/types/core/utils/CancelablePromise.d.ts": "./demo/libs/types/core/utils/CancelablePromise.d.ts",
|
||||
"demo/libs/types/core/camera-controls/utils/extractClientCoordFromEvent.d.ts": "./demo/libs/types/core/camera-controls/utils/extractClientCoordFromEvent.d.ts",
|
||||
"demo/libs/types/core/VersionManager.d.ts": "./demo/libs/types/core/VersionManager.d.ts",
|
||||
"demo/libs/types/core/viewers/Constants.d.ts": "./demo/libs/types/core/viewers/Constants.d.ts",
|
||||
"demo/libs/types/plugins/overview-map/index.d.ts": "./demo/libs/types/plugins/overview-map/index.d.ts",
|
||||
"demo/libs/types/plugins/sections/index.d.ts": "./demo/libs/types/plugins/sections/index.d.ts",
|
||||
"demo/libs/types/core/patches/shaders/shaderChunk/outline_bc_pars_vertex.glsl.d.ts": "./demo/libs/types/core/patches/shaders/shaderChunk/outline_bc_pars_vertex.glsl.d.ts",
|
||||
@ -270,22 +287,23 @@
|
||||
"demo/libs/types/core/compare/index.d.ts": "./demo/libs/types/core/compare/index.d.ts",
|
||||
"demo/libs/types/core/patches/index.d.ts": "./demo/libs/types/core/patches/index.d.ts",
|
||||
"demo/libs/types/core/canvas/index.d.ts": "./demo/libs/types/core/canvas/index.d.ts",
|
||||
"demo/libs/types/core/controls/index.d.ts": "./demo/libs/types/core/controls/index.d.ts",
|
||||
"demo/libs/types/core/vr/index.d.ts": "./demo/libs/types/core/vr/index.d.ts",
|
||||
"demo/libs/types/core/utils/DecimalPrecisionUtils.d.ts": "./demo/libs/types/core/utils/DecimalPrecisionUtils.d.ts",
|
||||
"demo/libs/types/plugins/local-model-uploader/index.d.ts": "./demo/libs/types/plugins/local-model-uploader/index.d.ts",
|
||||
"demo/libs/types/plugins/measure/index.d.ts": "./demo/libs/types/plugins/measure/index.d.ts",
|
||||
"demo/libs/types/core/model/index.d.ts": "./demo/libs/types/core/model/index.d.ts",
|
||||
"demo/libs/types/core/shp-js/index.d.ts": "./demo/libs/types/core/shp-js/index.d.ts",
|
||||
"demo/libs/types/plugins/context-menu/ContextMenu.config.d.ts": "./demo/libs/types/plugins/context-menu/ContextMenu.config.d.ts",
|
||||
"demo/libs/types/components/pop-panel/index.d.ts": "./demo/libs/types/components/pop-panel/index.d.ts",
|
||||
"demo/libs/types/plugins/context-menu/ContextMenu.config.d.ts": "./demo/libs/types/plugins/context-menu/ContextMenu.config.d.ts",
|
||||
"demo/libs/types/plugins/context-menu/index.d.ts": "./demo/libs/types/plugins/context-menu/index.d.ts",
|
||||
"demo/libs/types/core/components/index.d.ts": "./demo/libs/types/core/components/index.d.ts",
|
||||
"demo/libs/types/core/dxf/round10.d.ts": "./demo/libs/types/core/dxf/round10.d.ts",
|
||||
"demo/libs/types/core/camera-controls/index.d.ts": "./demo/libs/types/core/camera-controls/index.d.ts",
|
||||
"demo/libs/types/core/patches/Constants.d.ts": "./demo/libs/types/core/patches/Constants.d.ts",
|
||||
"demo/libs/types/core/font/shx/ExtraLettersTemplate.d.ts": "./demo/libs/types/core/font/shx/ExtraLettersTemplate.d.ts",
|
||||
"demo/libs/types/core/input/index.d.ts": "./demo/libs/types/core/input/index.d.ts",
|
||||
"demo/libs/types/core/camera-controls/Constants.d.ts": "./demo/libs/types/core/camera-controls/Constants.d.ts",
|
||||
"demo/libs/types/core/controls/index.d.ts": "./demo/libs/types/core/controls/index.d.ts",
|
||||
"demo/libs/types/core/input/index.d.ts": "./demo/libs/types/core/input/index.d.ts",
|
||||
"demo/libs/types/plugins/pdf/index.d.ts": "./demo/libs/types/plugins/pdf/index.d.ts",
|
||||
"demo/libs/types/core/patches/shaders/ShaderChunk.d.ts": "./demo/libs/types/core/patches/shaders/ShaderChunk.d.ts",
|
||||
"demo/libs/types/fetch-polyfill.d.ts": "./demo/libs/types/fetch-polyfill.d.ts",
|
||||
@ -306,24 +324,28 @@
|
||||
"demo/libs/types/plugins/dat-gui/index.d.ts": "./demo/libs/types/plugins/dat-gui/index.d.ts",
|
||||
"demo/libs/types/plugins/hotpoint/index.d.ts": "./demo/libs/types/plugins/hotpoint/index.d.ts",
|
||||
"demo/libs/types/plugins/view-cube/index.d.ts": "./demo/libs/types/plugins/view-cube/index.d.ts",
|
||||
"demo/libs/types/core/camera/index.d.ts": "./demo/libs/types/core/camera/index.d.ts",
|
||||
"demo/libs/types/core/effect/index.d.ts": "./demo/libs/types/core/effect/index.d.ts",
|
||||
"demo/libs/types/core/font/shx/index.d.ts": "./demo/libs/types/core/font/shx/index.d.ts",
|
||||
"demo/libs/types/plugins/explode/index.d.ts": "./demo/libs/types/plugins/explode/index.d.ts",
|
||||
"demo/libs/types/plugins/nav-cube/index.d.ts": "./demo/libs/types/plugins/nav-cube/index.d.ts",
|
||||
"demo/libs/types/components/dxf-layout-bar/index.d.ts": "./demo/libs/types/components/dxf-layout-bar/index.d.ts",
|
||||
"demo/libs/types/core/scene/index.d.ts": "./demo/libs/types/core/scene/index.d.ts",
|
||||
"demo/libs/types/plugins/skybox/index.d.ts": "./demo/libs/types/plugins/skybox/index.d.ts",
|
||||
"demo/libs/types/components/progress-bar/index.d.ts": "./demo/libs/types/components/progress-bar/index.d.ts",
|
||||
"demo/libs/types/core/font/index.d.ts": "./demo/libs/types/core/font/index.d.ts",
|
||||
"demo/libs/types/core/pick/index.d.ts": "./demo/libs/types/core/pick/index.d.ts",
|
||||
"demo/libs/types/plugins/stats/index.d.ts": "./demo/libs/types/plugins/stats/index.d.ts",
|
||||
"demo/libs/types/components/tool-tip/index.d.ts": "./demo/libs/types/components/tool-tip/index.d.ts",
|
||||
"demo/libs/types/core/geometry-offset/index.d.ts": "./demo/libs/types/core/geometry-offset/index.d.ts",
|
||||
"demo/libs/types/core/webcam/index.d.ts": "./demo/libs/types/core/webcam/index.d.ts",
|
||||
"demo/libs/types/core/workers/CreateMeshBvh.worker.d.ts": "./demo/libs/types/core/workers/CreateMeshBvh.worker.d.ts",
|
||||
"main.f052ad65.css.map": "./static/css/main.f052ad65.css.map",
|
||||
"main.b6487067.js.map": "./static/js/main.b6487067.js.map",
|
||||
"787.cf5efa72.chunk.js.map": "./static/js/787.cf5efa72.chunk.js.map"
|
||||
"main.90df8265.css.map": "./static/css/main.90df8265.css.map",
|
||||
"main.f09baa39.js.map": "./static/js/main.f09baa39.js.map",
|
||||
"787.55649ca3.chunk.js.map": "./static/js/787.55649ca3.chunk.js.map"
|
||||
},
|
||||
"entrypoints": [
|
||||
"static/css/main.f052ad65.css",
|
||||
"static/js/main.b6487067.js"
|
||||
"static/css/main.90df8265.css",
|
||||
"static/js/main.f09baa39.js"
|
||||
]
|
||||
}
|
||||
2
demo/libs/gemini-viewer.esm.min.js
vendored
2
demo/libs/gemini-viewer.esm.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
import { PopPanel } from "./PopPanel";
|
||||
import type { BaseViewer } from "../../core/viewers/BaseViewer";
|
||||
import type { PickPlaneSection } from "../../plugins/sections/PickPlaneSection";
|
||||
import { PickPlaneSection } from "../../plugins/sections";
|
||||
export declare class PickSectionPopPanel extends PopPanel {
|
||||
protected activeSelectNode?: Element;
|
||||
protected isVisible: boolean;
|
||||
|
||||
5
demo/libs/types/core/Configs.d.ts
vendored
5
demo/libs/types/core/Configs.d.ts
vendored
@ -14,6 +14,10 @@ export interface CameraConfig {
|
||||
* @internal
|
||||
*/
|
||||
up?: number[];
|
||||
/**
|
||||
* The camera zoom
|
||||
*/
|
||||
zoom?: number;
|
||||
/**
|
||||
* The camera's near clip plane
|
||||
*/
|
||||
@ -186,6 +190,7 @@ export interface DxfCompareConfig {
|
||||
*/
|
||||
export interface VRViewerConfig extends BaseViewerConfig {
|
||||
autoRotateSpeed?: number;
|
||||
enableCache?: boolean;
|
||||
}
|
||||
/**
|
||||
* VR Viewpoint's hotpoint, which can be a user defined html element.
|
||||
|
||||
78
demo/libs/types/core/camera/CameraManager.d.ts
vendored
Normal file
78
demo/libs/types/core/camera/CameraManager.d.ts
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
import * as THREE from "three";
|
||||
import { CameraConfig } from "../../core/Configs";
|
||||
import CameraControls from "../../core/camera-controls";
|
||||
import { Control, NavigationModes } from "../../core/controls/Control";
|
||||
import { type BaseViewer } from "../../core/viewers/BaseViewer";
|
||||
export declare enum CameraProjections {
|
||||
Perspective = 0,
|
||||
Orthographic = 1
|
||||
}
|
||||
export declare type CameraInfo = CameraConfig;
|
||||
export declare class CameraManager {
|
||||
viewer: BaseViewer;
|
||||
readonly perspectiveCamera: THREE.PerspectiveCamera;
|
||||
readonly orthographicCamera: THREE.OrthographicCamera;
|
||||
activeCamera: THREE.PerspectiveCamera | THREE.OrthographicCamera;
|
||||
readonly cameraControls: CameraControls;
|
||||
private previousDistance;
|
||||
private previousAzimuthRotateSpeed;
|
||||
private previousPolarRotateSpeed;
|
||||
private previousDollySpeed;
|
||||
private previousTruckSpeed;
|
||||
private previousMouseLeft;
|
||||
protected enableKeyDown: boolean;
|
||||
navMode: Record<string, Control>;
|
||||
currentNavMode: Control;
|
||||
currentProjection: CameraProjections;
|
||||
protected anchor: HTMLElement;
|
||||
constructor(viewer: BaseViewer);
|
||||
get viewerContainer(): HTMLElement;
|
||||
get inputManager(): import("../../core/input/InputManager").InputManager;
|
||||
private createAnchor;
|
||||
protected setAnchorPosition(x: number, y: number): void;
|
||||
setOrbitPointVisible(visible: boolean): void;
|
||||
private setOrthoCameraAspect;
|
||||
private setupCameras;
|
||||
private setCameraPositionAndTarget;
|
||||
private setupControls;
|
||||
private onKeyDown;
|
||||
private onChange;
|
||||
setOrthoCamera(): void;
|
||||
private getDims;
|
||||
private setupOrthoCamera;
|
||||
private setPerspectiveCamera;
|
||||
update(delta: number): boolean;
|
||||
updateAspect(): void;
|
||||
get camera(): THREE.PerspectiveCamera | THREE.OrthographicCamera;
|
||||
enableKeyControl(enable: boolean): void;
|
||||
getTarget(): THREE.Vector3;
|
||||
getPosition(): THREE.Vector3;
|
||||
adjustCameraByBbox(bbox: THREE.Box3): void;
|
||||
enableControl(active: boolean): void;
|
||||
enableRotate(enable: boolean): void;
|
||||
enableZoom(enable: boolean): void;
|
||||
enablePan(enable: boolean): void;
|
||||
enableMouseLeft(enable: boolean): void;
|
||||
setCameraPosition(position: THREE.Vector3): void;
|
||||
setCameraTarget(target: THREE.Vector3): void;
|
||||
flyTo(position: THREE.Vector3, lookAt: THREE.Vector3): void;
|
||||
flyToPosition(x: number, y: number, z: number): void;
|
||||
flyToBox(box: THREE.Box3): void;
|
||||
fitToSphere(box: THREE.Object3D | THREE.Sphere): void;
|
||||
flyToObject(object: THREE.Object3D): void;
|
||||
getDistanceToFitSphere(radius: number): number;
|
||||
setNavigationMode(mode: NavigationModes): void;
|
||||
setProjection(projection: CameraProjections): void;
|
||||
setOrbitPoint(point: THREE.Vector3): void;
|
||||
getCameraDirection(): THREE.Vector3;
|
||||
getCameraInfo(): {
|
||||
near: number;
|
||||
far: number;
|
||||
zoom: number;
|
||||
eye: THREE.Vector3Tuple;
|
||||
up: THREE.Vector3Tuple;
|
||||
look: THREE.Vector3Tuple;
|
||||
};
|
||||
setCameraInfo(cameraInfo: CameraInfo): void;
|
||||
destroy(): void;
|
||||
}
|
||||
1
demo/libs/types/core/camera/index.d.ts
vendored
Normal file
1
demo/libs/types/core/camera/index.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from "./CameraManager";
|
||||
@ -3,7 +3,7 @@ import { DrawableData } from "./Constants";
|
||||
import { Drawable } from "./Drawable";
|
||||
import type { DrawableList } from "./DrawableList";
|
||||
import { Event } from "../../core/utils";
|
||||
import type { BimViewer, DxfViewer } from "../../core/viewers";
|
||||
import type { BaseViewer } from "../../core/viewers";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
@ -20,7 +20,7 @@ export declare class CanvasRender extends Event {
|
||||
private projScreenMatrix;
|
||||
static _registerDrawableClass(drawable: constructorReturnType<Drawable>): void;
|
||||
static createDrawable(data: DrawableData): Drawable<Record<string, unknown>>;
|
||||
constructor(viewer: BimViewer | DxfViewer);
|
||||
constructor(viewer: BaseViewer);
|
||||
get is3d(): boolean;
|
||||
get container(): HTMLElement;
|
||||
get camera(): THREE.Camera;
|
||||
@ -33,7 +33,8 @@ export declare class CanvasRender extends Event {
|
||||
render(): void;
|
||||
setSize(width: number, height: number): void;
|
||||
getSortedDrawables(onlyVisible?: boolean): Drawable<Record<string, unknown>>[];
|
||||
getDrawablesByPosition(p: THREE.Vector3, raycaster?: THREE.Raycaster): Drawable[];
|
||||
getDrawablesByDrawableListAndPosition(drawList: DrawableList, p: THREE.Vector3): Drawable<Record<string, unknown>> | undefined;
|
||||
getDrawablesByPosition(p: THREE.Vector3): Drawable[];
|
||||
getDrawableById(id: string): Drawable<Record<string, unknown>> | undefined;
|
||||
measureTextLength(text: string, font: string): number;
|
||||
/**
|
||||
|
||||
21
demo/libs/types/core/components/Container.d.ts
vendored
Normal file
21
demo/libs/types/core/components/Container.d.ts
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
export declare class Container {
|
||||
width: number;
|
||||
height: number;
|
||||
container: HTMLDivElement;
|
||||
viewerContainer?: HTMLDivElement;
|
||||
widgetContainer?: HTMLDivElement;
|
||||
constructor(containerId: string);
|
||||
/**
|
||||
* Creates a viewerContainer under the container that user passed in.
|
||||
* There are some benefits to create a new one. e.g., its style won't affect
|
||||
* the container div user passed in.
|
||||
*/
|
||||
private initViewerContainer;
|
||||
/**
|
||||
*
|
||||
* @description Create a div for ui widget, if widget need position, just relative container, maybe remove later.
|
||||
*/
|
||||
private initWidgetContainer;
|
||||
get needResize(): boolean;
|
||||
destroy(): void;
|
||||
}
|
||||
21
demo/libs/types/core/components/ProgressBar.d.ts
vendored
Normal file
21
demo/libs/types/core/components/ProgressBar.d.ts
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
import type { Container } from "./Container";
|
||||
export interface ProgressItem {
|
||||
div: HTMLDivElement;
|
||||
onProgress?: (event: ProgressEvent) => void;
|
||||
}
|
||||
export declare class ProgressBar {
|
||||
private element;
|
||||
private progressItems;
|
||||
private replaceReg;
|
||||
constructor(container: Container);
|
||||
addProgressItem(id: string, message?: string, onProgress?: (event: ProgressEvent) => void): void;
|
||||
removeProgressItem(id: string): void;
|
||||
updateProgressBar(id: string, progress: number | ProgressEvent, min?: number, max?: number): void;
|
||||
setVisible(visible: boolean): void;
|
||||
/**
|
||||
* Removes a progress item after some time
|
||||
* @param progressItemId
|
||||
*/
|
||||
delayRemoveProgressItem(progressItemId: string, delayInMs?: number): void;
|
||||
destroy(): void;
|
||||
}
|
||||
13
demo/libs/types/core/components/Spinner.d.ts
vendored
Normal file
13
demo/libs/types/core/components/Spinner.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
import type { Container } from "./Container";
|
||||
export declare class Spinner {
|
||||
private element;
|
||||
jobCount: number;
|
||||
constructor(container: Container);
|
||||
/**
|
||||
* Sets spinner visibility
|
||||
*/
|
||||
private setSpinnerVisibility;
|
||||
increaseJobCount(): void;
|
||||
decreaseJobCount(): void;
|
||||
destroy(): void;
|
||||
}
|
||||
3
demo/libs/types/core/components/index.d.ts
vendored
Normal file
3
demo/libs/types/core/components/index.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
export * from "./Spinner";
|
||||
export * from "./Container";
|
||||
export * from "./ProgressBar";
|
||||
11
demo/libs/types/core/controls/Control.d.ts
vendored
Normal file
11
demo/libs/types/core/controls/Control.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
export declare enum NavigationModes {
|
||||
Orbit = 0,
|
||||
FirstPerson = 1,
|
||||
Plan = 2,
|
||||
VR = 3
|
||||
}
|
||||
export interface Control {
|
||||
mode: NavigationModes;
|
||||
setupControl(): void;
|
||||
adjustCameraByBbox(bbox: THREE.Box3): void;
|
||||
}
|
||||
10
demo/libs/types/core/controls/OrbitControl.d.ts
vendored
Normal file
10
demo/libs/types/core/controls/OrbitControl.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import * as THREE from "three";
|
||||
import { Control, NavigationModes } from "./Control";
|
||||
import type { CameraManager } from "../../core/camera/CameraManager";
|
||||
export declare class OrbitControl implements Control {
|
||||
readonly mode = NavigationModes.Orbit;
|
||||
private cameraManager;
|
||||
constructor(cameraManager: CameraManager);
|
||||
setupControl(): void;
|
||||
adjustCameraByBbox(box: THREE.Box3): void;
|
||||
}
|
||||
14
demo/libs/types/core/controls/PlanControl.d.ts
vendored
Normal file
14
demo/libs/types/core/controls/PlanControl.d.ts
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
import * as THREE from "three";
|
||||
import { Control, NavigationModes } from "./Control";
|
||||
import type { CameraManager } from "../../core/camera";
|
||||
/**
|
||||
*
|
||||
* @description control for 2d. dxf,pdf etc.
|
||||
*/
|
||||
export declare class PlanControl implements Control {
|
||||
readonly mode = NavigationModes.Plan;
|
||||
private cameraManager;
|
||||
constructor(cameraManager: CameraManager);
|
||||
setupControl(): void;
|
||||
adjustCameraByBbox(box: THREE.Box3): void;
|
||||
}
|
||||
10
demo/libs/types/core/controls/VRControl.d.ts
vendored
Normal file
10
demo/libs/types/core/controls/VRControl.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import * as THREE from "three";
|
||||
import { Control, NavigationModes } from "./Control";
|
||||
import type { CameraManager } from "../../core/camera/CameraManager";
|
||||
export declare class VRControl implements Control {
|
||||
readonly mode = NavigationModes.FirstPerson;
|
||||
private cameraManager;
|
||||
constructor(cameraManager: CameraManager);
|
||||
setupControl(): void;
|
||||
adjustCameraByBbox(box: THREE.Box3): void;
|
||||
}
|
||||
131
demo/libs/types/core/controls/VRControls.d.ts
vendored
131
demo/libs/types/core/controls/VRControls.d.ts
vendored
@ -1,131 +0,0 @@
|
||||
import { EventDispatcher, PerspectiveCamera, Vector3 } from "three";
|
||||
import type { ControlsHelper } from "../../core/helpers";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare enum STATE {
|
||||
NONE = -1,
|
||||
ROTATE = 0,
|
||||
DOLLY = 1,
|
||||
PAN = 2,
|
||||
TOUCH_ROTATE = 3,
|
||||
TOUCH_DOLLY = 4
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare enum Keys {
|
||||
LEFT = "ArrowLeft",
|
||||
UP = "ArrowUp",
|
||||
RIGHT = "ArrowRight",
|
||||
BOTTOM = "ArrowDown"
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare class VRControls extends EventDispatcher {
|
||||
object: PerspectiveCamera;
|
||||
domElement: HTMLCanvasElement;
|
||||
isVRMode: boolean;
|
||||
enabled: boolean;
|
||||
target: Vector3;
|
||||
enableZoom: boolean;
|
||||
enablePan: boolean;
|
||||
enableRotate: boolean;
|
||||
state: STATE;
|
||||
rotateSpeed: number;
|
||||
zoomSpeed: number;
|
||||
panSpeed: number;
|
||||
scale: number;
|
||||
minZoom: number;
|
||||
maxZoom: number;
|
||||
screenSpacePanning: boolean;
|
||||
autoRotate: boolean;
|
||||
controlsHelper?: ControlsHelper;
|
||||
autoRotateSpeed: number;
|
||||
enableDamping: boolean;
|
||||
dampingFactor: number;
|
||||
minAzimuthAngle: number;
|
||||
maxAzimuthAngle: number;
|
||||
minPolarAngle: number;
|
||||
maxPolarAngle: number;
|
||||
minDistance: number;
|
||||
maxDistance: number;
|
||||
keyPanSpeed: number;
|
||||
minFov: number;
|
||||
maxFov: number;
|
||||
private zoomChanged;
|
||||
private panOffset;
|
||||
private pointerPositions;
|
||||
private rotateStart;
|
||||
private rotateEnd;
|
||||
private rotateDelta;
|
||||
private dollyStart;
|
||||
private dollyEnd;
|
||||
private dollyDelta;
|
||||
private panStart;
|
||||
private panEnd;
|
||||
private panDelta;
|
||||
private pointers;
|
||||
private spherical;
|
||||
private sphericalDelta;
|
||||
private domElementKeyEvents?;
|
||||
private quat;
|
||||
constructor(object: PerspectiveCamera, domElement: HTMLCanvasElement, isVRMode?: boolean);
|
||||
dispose(): void;
|
||||
update: () => boolean;
|
||||
private addPointer;
|
||||
private removePointer;
|
||||
private onContextMenu;
|
||||
/**
|
||||
*
|
||||
* Get the distance between two points
|
||||
* @param {number[]} p1
|
||||
* @param {number[]} p2
|
||||
* @return {*}
|
||||
* @memberof VRControls
|
||||
*/
|
||||
getDist(p1: number[], p2: number[]): number;
|
||||
private trackPointer;
|
||||
/**************************PointerDown Event*************************/
|
||||
private onTouchStart;
|
||||
private onMouseDown;
|
||||
private onPointerDown;
|
||||
/**************************PointerMove Event*************************/
|
||||
private onTouchMove;
|
||||
private onMouseMove;
|
||||
private onPointerMove;
|
||||
/**************************PointerUp Event*************************/
|
||||
handlerTouchEnd(event: PointerEvent): void;
|
||||
private onPointerUp;
|
||||
private onPointerCancel;
|
||||
handleMouseWheel(event: WheelEvent): void;
|
||||
private onMouseWheel;
|
||||
/**************************Ponter down event handling*************************/
|
||||
handleMouseDownRotate(event: PointerEvent): void;
|
||||
handleMouseDownDolly(event: PointerEvent): void;
|
||||
handleMouseDownPan(event: PointerEvent): void;
|
||||
handleTouchStartRotate(): void;
|
||||
handleTouchStartDolly(pointers: PointerEvent[]): void;
|
||||
/**************************Mouse move rotate event handling*************************/
|
||||
private updateRotate;
|
||||
handleMouseMoveRotate(event: PointerEvent): void;
|
||||
/**************************Mouse move zoom event handling*************************/
|
||||
private dollyOut;
|
||||
private dollyIn;
|
||||
handleMouseMoveDolly(event: PointerEvent): void;
|
||||
/**************************Mouse move pan event handling*************************/
|
||||
private pan;
|
||||
private panLeft;
|
||||
private panUp;
|
||||
handleMouseMovePan(event: PointerEvent): void;
|
||||
/**************************One-finger or Two-finger rotate event handling*************************/
|
||||
private getSecondPointerPosition;
|
||||
handleTouchMoveRotate(event: PointerEvent): void;
|
||||
/**************************Two-finger zoom event handling*************************/
|
||||
private updateFov;
|
||||
handleTouchMoveDolly(event: PointerEvent): void;
|
||||
private handleKeyDown;
|
||||
private onKeyDown;
|
||||
listenToKeyEvents(domElement: HTMLElement): void;
|
||||
}
|
||||
6
demo/libs/types/core/controls/index.d.ts
vendored
6
demo/libs/types/core/controls/index.d.ts
vendored
@ -1,2 +1,4 @@
|
||||
export * from "./VRControls";
|
||||
export * from "./CameraControlsEx";
|
||||
export * from "./Control";
|
||||
export * from "./OrbitControl";
|
||||
export * from "./PlanControl";
|
||||
export * from "./VRControl";
|
||||
|
||||
40
demo/libs/types/core/effect/EffectManager.d.ts
vendored
Normal file
40
demo/libs/types/core/effect/EffectManager.d.ts
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
import * as THREE from "three";
|
||||
import type { BimViewer } from "../../core/viewers/BimViewer";
|
||||
export declare class EffectManager {
|
||||
private viewer;
|
||||
private composerEnabled;
|
||||
private composer?;
|
||||
private renderPass?;
|
||||
private effectFxaaPass?;
|
||||
private saoPass?;
|
||||
private ssaoPass?;
|
||||
private outlinePass?;
|
||||
private ssaaRenderPass?;
|
||||
private bloomPass?;
|
||||
private unrealBloomPass?;
|
||||
private vertexNormalsHelpers?;
|
||||
constructor(viewer: BimViewer);
|
||||
get enabled(): boolean;
|
||||
set enabled(enable: boolean);
|
||||
get renderPassEnabled(): boolean;
|
||||
set renderPassEnabled(enable: boolean);
|
||||
get fxaaPassEnabled(): boolean;
|
||||
set fxaaPassEnabled(enable: boolean);
|
||||
get saoPassEnabled(): boolean;
|
||||
set saoPassEnabled(enable: boolean);
|
||||
get ssaoPassEnabled(): boolean;
|
||||
set ssaoPassEnabled(enable: boolean);
|
||||
get outlinePassEnabled(): boolean;
|
||||
set outlinePassEnabled(enable: boolean);
|
||||
get ssaaPassEnabled(): boolean;
|
||||
set ssaaPassEnabled(enable: boolean);
|
||||
get bloomPassEnabled(): boolean;
|
||||
set bloomPassEnabled(enable: boolean);
|
||||
get unrealBloomPassEnabled(): boolean;
|
||||
set unrealBloomPassEnabled(enable: boolean);
|
||||
setOutlinePassSelectObjects(objects: THREE.Object3D[]): void;
|
||||
enableModelEdges(enable: boolean): void;
|
||||
showVertexNormals(show: boolean, size?: number): void;
|
||||
render(): void;
|
||||
destroy(): void;
|
||||
}
|
||||
1
demo/libs/types/core/effect/index.d.ts
vendored
Normal file
1
demo/libs/types/core/effect/index.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from "./EffectManager";
|
||||
@ -7,6 +7,7 @@ export declare class LoadingHelper {
|
||||
private font?;
|
||||
private manager?;
|
||||
constructor(manager?: THREE.LoadingManager);
|
||||
setLoadManager(manager?: THREE.LoadingManager): void;
|
||||
/**
|
||||
* Loads a model from local
|
||||
* @param url Created by URL.createObjectURL(file)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import * as THREE from "three";
|
||||
import { CameraControlsEx } from "../../core/controls";
|
||||
import CameraControls from "../../core/camera-controls";
|
||||
/**
|
||||
* Helper class to adjust object visual size
|
||||
*/
|
||||
@ -8,6 +8,6 @@ export declare class ObjectPixelSizeHelper {
|
||||
private camera;
|
||||
targetPixelHeight: number;
|
||||
canvasHeight: number;
|
||||
constructor(camera: THREE.Camera, controls: CameraControlsEx, object: THREE.Object3D, targetPixelHeight: number, canvasHeight: number);
|
||||
constructor(camera: THREE.Camera, controls: CameraControls, object: THREE.Object3D, targetPixelHeight: number, canvasHeight: number);
|
||||
adjustSize(): void;
|
||||
}
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import * as THREE from "three";
|
||||
import type { BimViewer, DxfViewer } from "../../core/viewers";
|
||||
import type { BaseViewer } from "../../core/viewers";
|
||||
export declare class ZoomToRectHelper {
|
||||
protected viewer: DxfViewer | BimViewer;
|
||||
protected viewer: BaseViewer;
|
||||
private boxSelectHelper?;
|
||||
private active;
|
||||
constructor(viewer: DxfViewer | BimViewer);
|
||||
constructor(viewer: BaseViewer);
|
||||
private get viewerContainer();
|
||||
get camera(): THREE.OrthographicCamera | THREE.PerspectiveCamera;
|
||||
get raycaster(): THREE.Raycaster;
|
||||
|
||||
1
demo/libs/types/core/helpers/index.d.ts
vendored
1
demo/libs/types/core/helpers/index.d.ts
vendored
@ -1,4 +1,3 @@
|
||||
export * from "./ControlsHelper";
|
||||
export * from "./InstantiateHelper";
|
||||
export * from "./RafHelper";
|
||||
export * from "./BinaryReader";
|
||||
|
||||
23
demo/libs/types/core/indexeddb/ImageDataTable.d.ts
vendored
Normal file
23
demo/libs/types/core/indexeddb/ImageDataTable.d.ts
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
import { BaseTable } from "./BaseTable";
|
||||
export interface ImageDataTableRecord {
|
||||
fileName: string;
|
||||
data: Blob;
|
||||
}
|
||||
/**
|
||||
* DxfDataTable in IndexedDb
|
||||
* Table is known as ObjectStore in IndexedDb
|
||||
*/
|
||||
export declare class ImageDataTable extends BaseTable {
|
||||
tableName(): string;
|
||||
/**
|
||||
* Singleton design pattern
|
||||
*/
|
||||
private static _instance;
|
||||
static instance(): ImageDataTable;
|
||||
/**
|
||||
* Queires a dxf data
|
||||
* @param fileId should be a unique id to identify different dxf files
|
||||
*/
|
||||
query(fileName: string): Promise<ImageDataTableRecord>;
|
||||
queryAll(): Promise<ImageDataTableRecord[]>;
|
||||
}
|
||||
1
demo/libs/types/core/indexeddb/index.d.ts
vendored
1
demo/libs/types/core/indexeddb/index.d.ts
vendored
@ -4,3 +4,4 @@ export * from "./IndexedDbManager";
|
||||
export * from "./ViewpointTable";
|
||||
export * from "./DxfDataTable";
|
||||
export * from "./FontDataTable";
|
||||
export * from "./ImageDataTable";
|
||||
|
||||
@ -13,7 +13,7 @@ declare type MarkupEvents = {
|
||||
export declare class MarkupManager extends Event<MarkupEvents> {
|
||||
private viewer;
|
||||
private inputManager;
|
||||
overlayRender?: CanvasRender;
|
||||
overlayRender: CanvasRender;
|
||||
private drawableList;
|
||||
private lineWidth;
|
||||
private lineColor;
|
||||
@ -24,9 +24,6 @@ export declare class MarkupManager extends Event<MarkupEvents> {
|
||||
protected mouseDownPositionY?: number;
|
||||
protected mousedownPoint?: THREE.Vector2;
|
||||
private isSelectLeaderText;
|
||||
private tempKey?;
|
||||
private tempTouch?;
|
||||
private tempArrowKeys?;
|
||||
private selectedShape?;
|
||||
private type?;
|
||||
private isDrawing;
|
||||
@ -34,7 +31,6 @@ export declare class MarkupManager extends Event<MarkupEvents> {
|
||||
private creatingShape?;
|
||||
private tempPoints;
|
||||
private activated;
|
||||
protected exitButton?: HTMLButtonElement;
|
||||
constructor(viewer: BaseViewer, input: InputManager);
|
||||
get viewerCanvas(): HTMLCanvasElement;
|
||||
get camera(): THREE.OrthographicCamera | THREE.PerspectiveCamera;
|
||||
@ -43,7 +39,6 @@ export declare class MarkupManager extends Event<MarkupEvents> {
|
||||
setMarkupsVisibility(visible: boolean): void;
|
||||
clearAll(): void;
|
||||
isMarkupActive(): boolean;
|
||||
protected createMobileExitButton(): HTMLButtonElement;
|
||||
activate(): void;
|
||||
deactivate(): void;
|
||||
getActiveMarkupType(): MarkupType | undefined;
|
||||
|
||||
27
demo/libs/types/core/model/Model2d.d.ts
vendored
27
demo/libs/types/core/model/Model2d.d.ts
vendored
@ -11,6 +11,7 @@ import type { PdfData, PdfLayer } from "../../core/viewers/DxfViewer";
|
||||
export declare class Model2d extends Model {
|
||||
modelId: string;
|
||||
private modelData;
|
||||
modelObject: THREE.Object3D;
|
||||
private bbox?;
|
||||
constructor(modelData: ModelData2d);
|
||||
get pdfData(): PdfData | undefined;
|
||||
@ -74,6 +75,7 @@ export declare class Model2d extends Model {
|
||||
* Gets layout of dxf data.
|
||||
*/
|
||||
getLayouts(): ILayoutObject[];
|
||||
getLayoutByName(layoutName: string): ILayoutObject | undefined;
|
||||
/**
|
||||
* Gets layout extent of dxf data.
|
||||
* @internal
|
||||
@ -112,4 +114,29 @@ export declare class Model2d extends Model {
|
||||
* @internal
|
||||
*/
|
||||
switchTransformMs(layoutName: string): void;
|
||||
activateLayout(layoutName: string | undefined, isLayoutInitialized: boolean): void;
|
||||
getFilteredViewports(layout: ILayoutObject): IViewportEntity[];
|
||||
private generateObjectsByViewport;
|
||||
private setMaterialUniforms;
|
||||
private getObjectsByBoundingBox;
|
||||
/**
|
||||
* Shows objects for given layout, and hide any other layouts.
|
||||
*/
|
||||
showLayoutObjects(layoutName: string): void;
|
||||
/**
|
||||
* Checks if a layer is frozen for viewport (VP Freeze)
|
||||
*/
|
||||
private isLayerFrozenForViewport;
|
||||
addSpatialFilterSection(object: THREE.Object3D, dxfData: DxfData, bFromViewport?: boolean): void;
|
||||
private findSpatialFilter;
|
||||
private getAnyMaterial;
|
||||
private generateSectionsBySpatialFilter;
|
||||
private hasObject;
|
||||
private hasObjectWithId;
|
||||
/**
|
||||
* Highlights an object.
|
||||
*/
|
||||
highlightObject(object: THREE.Object3D): void;
|
||||
unHighlightObject(object: THREE.Object3D): void;
|
||||
clearHighlight(): void;
|
||||
}
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
declare const _default: "\n #if defined(USE_BC_OUTLINE)\n // Restore barycentric coordinates\n int barycentricX = int(barycentric) & 0x1;\n int barycentricY = int(barycentric) & 0x2;\n int barycentricZ = int(barycentric) & 0x4;\n vBarycentric = vec3(float(barycentricX), float(barycentricY), float(barycentricZ));\n #endif\n";
|
||||
declare const _default: "\n #ifdef USE_BC_OUTLINE\n // Restore barycentric coordinates\n int barycentricX = int(barycentric) & 0x1;\n int barycentricY = int(barycentric) & 0x2;\n int barycentricZ = int(barycentric) & 0x4;\n vBarycentric = vec3(float(barycentricX), float(barycentricY), float(barycentricZ));\n #endif\n";
|
||||
export default _default;
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
declare const _default: "\n #if defined(USE_BC_OUTLINE)\n vec3 finWireFrameColor = outlineColor;\n vec3 _tempColor = gl_FragColor.rgb;\n\n gl_FragColor.rgb = mix(finWireFrameColor, _tempColor, edgeFactor3());\n #endif\n";
|
||||
declare const _default: "\n #ifdef USE_BC_OUTLINE\n vec3 finWireframeColor = outlineColor;\n vec3 _tempColor = gl_FragColor.rgb;\n\n gl_FragColor.rgb = mix(finWireframeColor, _tempColor, edgeFactor3());\n #endif\n";
|
||||
export default _default;
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
declare const _default: "\n #if defined(USE_BC_OUTLINE)\n varying vec3 vBarycentric;\n uniform vec3 outlineColor;\n\n float edgeFactor3(){\n vec3 d = fwidth(vBarycentric);\n float minValue = 0.0000001;\n // make sure d is not 0\n d = clamp(d, vec3(minValue), vec3(10.0));\n vec3 a3 = smoothstep(vec3(0.0), d*0.8, vBarycentric);\n return min(min(a3.x, a3.y), a3.z);\n }\n #endif\n";
|
||||
declare const _default: "\n #ifdef USE_BC_OUTLINE\n varying vec3 vBarycentric;\n uniform vec3 outlineColor;\n\n float edgeFactor3(){\n vec3 d = fwidth(vBarycentric);\n float minValue = 0.0000001;\n // make sure d is not 0\n d = clamp(d, vec3(minValue), vec3(10.0));\n vec3 a3 = smoothstep(vec3(0.0), d * 0.8, vBarycentric);\n return min(min(a3.x, a3.y), a3.z);\n }\n #endif\n";
|
||||
export default _default;
|
||||
|
||||
50
demo/libs/types/core/pick/PickManager.d.ts
vendored
Normal file
50
demo/libs/types/core/pick/PickManager.d.ts
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
import * as THREE from "three";
|
||||
import type { BaseViewer } from "../../core/viewers";
|
||||
export interface CpuIntersection {
|
||||
distance: number;
|
||||
/** The intersected object */
|
||||
object: THREE.Object3D;
|
||||
/** Point of intersection, in world coordinates */
|
||||
point: THREE.Vector3;
|
||||
face?: THREE.Face;
|
||||
instanceId?: number;
|
||||
}
|
||||
export interface GpuIntersection {
|
||||
bimTilesId: number;
|
||||
userId: number;
|
||||
}
|
||||
export declare class PickManager {
|
||||
private readonly CLEAR_COLOR;
|
||||
private readonly CLEAR_COLOR_ALPHA;
|
||||
private readonly EMPTY_MODEL_ID;
|
||||
private viewer;
|
||||
private raycaster;
|
||||
private pickingTexture;
|
||||
constructor(viewer: BaseViewer);
|
||||
get scene(): THREE.Scene;
|
||||
get camera(): THREE.OrthographicCamera;
|
||||
get renderer(): THREE.WebGLRenderer;
|
||||
get overlayRender(): import("..").CanvasRender;
|
||||
get viewerContainer(): HTMLElement;
|
||||
getRaycaster(): THREE.Raycaster;
|
||||
pickObjectByNdc(ndcCoord: THREE.Vector2, modelObject: THREE.Object3D | THREE.Object3D[]): {
|
||||
object: THREE.Object3D<THREE.Event>;
|
||||
point: THREE.Vector3;
|
||||
distance: number;
|
||||
face: THREE.Face | undefined;
|
||||
instanceId: number | undefined;
|
||||
} | undefined;
|
||||
pickObject(mousePosition: THREE.Vector2, modelObject: THREE.Object3D | THREE.Object3D[]): CpuIntersection | undefined;
|
||||
pickObjects(mousePosition: THREE.Vector2, modelObject: THREE.Object3D | THREE.Object3D[]): THREE.Intersection[];
|
||||
pickDrawable(worldPosition: THREE.Vector3): import("..").Drawable<Record<string, unknown>>[];
|
||||
/**
|
||||
*
|
||||
* @param mousePosition
|
||||
* @param width
|
||||
* @param height
|
||||
* @param pickScene
|
||||
* @returns
|
||||
* @description pick rect area buffer
|
||||
*/
|
||||
private pickBuffer;
|
||||
}
|
||||
1
demo/libs/types/core/pick/index.d.ts
vendored
Normal file
1
demo/libs/types/core/pick/index.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from "./PickManager";
|
||||
30
demo/libs/types/core/scene/SceneManager.d.ts
vendored
Normal file
30
demo/libs/types/core/scene/SceneManager.d.ts
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
import * as THREE from "three";
|
||||
import { Model } from "../../core/model";
|
||||
import type { BaseViewer } from "../../core/viewers/BaseViewer";
|
||||
export declare class SceneManager {
|
||||
private viewer;
|
||||
scene: THREE.Scene;
|
||||
renderer: THREE.WebGLRenderer;
|
||||
pmremGenerator?: THREE.PMREMGenerator;
|
||||
lights?: THREE.Group;
|
||||
lightsHelper?: THREE.Group;
|
||||
modelGroup: THREE.Group;
|
||||
constructor(viewer: BaseViewer);
|
||||
private initLights;
|
||||
private initPMREMGenerator;
|
||||
get maxFragmentUniforms(): number;
|
||||
addModel(model: Model): void;
|
||||
enableShadow(enable: boolean): void;
|
||||
enableClipping(enable: boolean): void;
|
||||
enableLights(enable: boolean): void;
|
||||
debugLights(enable: boolean): void;
|
||||
setBackground(background: THREE.Color | THREE.CubeTexture | THREE.Texture | null): void;
|
||||
get directionLight(): THREE.Object3D<THREE.Event> | undefined;
|
||||
get ambientLight(): THREE.Object3D<THREE.Event> | undefined;
|
||||
get hemisphereLight(): THREE.Object3D<THREE.Event> | undefined;
|
||||
setEnvironmentFromData(data?: Uint16Array): Promise<void>;
|
||||
setEnvironment(hdrUrl: string): Promise<void>;
|
||||
resize(): void;
|
||||
getRaycastableObjects(): THREE.Object3D<THREE.Event>[];
|
||||
destroy(): void;
|
||||
}
|
||||
1
demo/libs/types/core/scene/index.d.ts
vendored
Normal file
1
demo/libs/types/core/scene/index.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from "./SceneManager";
|
||||
2
demo/libs/types/core/utils/CommonUtils.d.ts
vendored
2
demo/libs/types/core/utils/CommonUtils.d.ts
vendored
@ -34,7 +34,7 @@ export declare class CommonUtils {
|
||||
/**
|
||||
* Converts vector to a string with proper fraction digits
|
||||
*/
|
||||
static vectorToString(vec: THREE.Vector2 | THREE.Vector3): string;
|
||||
static vectorToString(vec: THREE.Vector2 | THREE.Vector3 | number[]): string;
|
||||
/**
|
||||
* Converts number array to THREE.Vector2
|
||||
*/
|
||||
|
||||
1
demo/libs/types/core/utils/MergeUtils.d.ts
vendored
1
demo/libs/types/core/utils/MergeUtils.d.ts
vendored
@ -13,6 +13,7 @@ export interface Batch {
|
||||
indexCount: number;
|
||||
boundingSphere?: THREE.Sphere;
|
||||
userData?: object;
|
||||
parentUserData?: object;
|
||||
}
|
||||
/**
|
||||
* MergeHelper class is used to merge child objects for a given object
|
||||
|
||||
343
demo/libs/types/core/viewers/BaseViewer.d.ts
vendored
343
demo/libs/types/core/viewers/BaseViewer.d.ts
vendored
@ -1,17 +1,23 @@
|
||||
import type { TFunction } from "i18next";
|
||||
import * as THREE from "three";
|
||||
import { CSS2DRenderer } from "three/examples/jsm/renderers/CSS2DRenderer.js";
|
||||
import { Box2 } from "../Constants";
|
||||
import { ProgressBar, Spinner } from "../components";
|
||||
import { ViewerName } from "./Constants";
|
||||
import { Plugin } from "./Plugin";
|
||||
import { ViewerEvent } from "./ViewerEvent";
|
||||
import type { BaseViewerConfig, CameraConfig } from "../../core/Configs";
|
||||
import type { CanvasRender } from "../../core/canvas";
|
||||
import type { CameraControlsEx, VRControls } from "../../core/controls";
|
||||
import { EventInfo, InputManager } from "../../core/input/InputManager";
|
||||
import type { MarkupManager } from "../../core/markup";
|
||||
import { UndoRedoManager } from "../../core/undo-redo/UndoRedoManager";
|
||||
import { BaseViewerConfig, CameraConfig, ModelConfig } from "../../core/Configs";
|
||||
import { CameraInfo, CameraManager, CameraProjections } from "../../core/camera";
|
||||
import { CanvasRender } from "../../core/canvas";
|
||||
import { Container } from "../../core/components/Container";
|
||||
import { FontManager } from "../../core/font";
|
||||
import { ZoomToRectHelper } from "../../core/helpers";
|
||||
import { LoadingHelper } from "../../core/helpers/LoadingHelper";
|
||||
import { InputManager } from "../../core/input";
|
||||
import { Model } from "../../core/model";
|
||||
import { PickManager } from "../../core/pick";
|
||||
import { SceneManager } from "../../core/scene/SceneManager";
|
||||
import { UndoRedoManager } from "../../core/undo-redo";
|
||||
import { Event } from "../../core/utils";
|
||||
import { Plugin } from "../../core/viewers/Plugin";
|
||||
import type { MeasurementPlugin } from "../../plugins";
|
||||
import type { BaseSection } from "../../plugins/sections";
|
||||
/**
|
||||
* Screenshot result, which contains a result image and,
|
||||
* for DxfViewer, it also contains the view extent when the screenshot is taken,
|
||||
@ -42,191 +48,82 @@ export interface ScreenshotResult {
|
||||
*/
|
||||
base64Image: string;
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare enum ViewerName {
|
||||
BaseViewer = "BaseViewer",
|
||||
BimViewer = "BimViewer",
|
||||
DxfViewer = "DxfViewer",
|
||||
VRViewer = "VRViewer"
|
||||
}
|
||||
declare type ViewerEvents = {
|
||||
[K in ViewerEvent]: any;
|
||||
};
|
||||
/**
|
||||
* Abstract base class for DxfViewer, BimViewer, etc.
|
||||
*/
|
||||
export declare abstract class BaseViewer extends Event<ViewerEvents> {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
name: ViewerName;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
translate: TFunction;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
parentContainer?: HTMLElement;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
viewerContainer?: HTMLElement;
|
||||
container?: HTMLElement;
|
||||
protected inputManager?: InputManager;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
scene?: THREE.Scene;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
renderer?: THREE.WebGLRenderer;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
camera?: THREE.PerspectiveCamera | THREE.OrthographicCamera;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
controls?: CameraControlsEx | VRControls;
|
||||
protected height: number;
|
||||
protected width: number;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
widgetContainer?: HTMLElement;
|
||||
private spinner?;
|
||||
protected jobCount: number;
|
||||
protected viewerCfg: BaseViewerConfig;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
cameraCfg?: CameraConfig;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
groundPlane?: THREE.Mesh;
|
||||
/**
|
||||
* @describe overlay canvas
|
||||
* @internal
|
||||
*/
|
||||
overlayRender?: CanvasRender;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
loadedModels?: any;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
undoRedoManager?: UndoRedoManager;
|
||||
protected enableOverlayRenderer: boolean;
|
||||
private clock;
|
||||
protected fps: number;
|
||||
protected timeStamp: number;
|
||||
private renderEnabled;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
protected requestAnimationFrameHandle?: number;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
protected frustumSize: number;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
protected loadingProgressBar?: any;
|
||||
protected lastFrameExecuteTime: number;
|
||||
protected minFrameInterval: number;
|
||||
container: Container;
|
||||
protected plugins: Plugin[];
|
||||
loadedModels: Model[];
|
||||
private raf?;
|
||||
private timeoutSymbol?;
|
||||
protected homeView?: CameraConfig;
|
||||
protected inputManager: InputManager;
|
||||
protected cameraManager: CameraManager;
|
||||
protected sceneManager: SceneManager;
|
||||
protected fontManager?: FontManager;
|
||||
protected pickManager: PickManager;
|
||||
protected undoRedoManager: UndoRedoManager;
|
||||
protected overlayRender: CanvasRender;
|
||||
protected css2dRenderer: CSS2DRenderer;
|
||||
protected spinner: Spinner;
|
||||
protected progressBar: ProgressBar;
|
||||
protected loaderHelper: LoadingHelper;
|
||||
protected zoomToRectHelper?: ZoomToRectHelper;
|
||||
constructor(viewerCfg: BaseViewerConfig);
|
||||
private initLogLevel;
|
||||
private initLocalization;
|
||||
private initContainer;
|
||||
get viewerContainer(): HTMLElement;
|
||||
get widgetContainer(): HTMLElement;
|
||||
getUndoRedoManager(): UndoRedoManager;
|
||||
getInputManager(): InputManager;
|
||||
getCameraManager(): CameraManager;
|
||||
getOverlayRender(): CanvasRender;
|
||||
get renderer(): THREE.WebGLRenderer;
|
||||
get camera(): THREE.PerspectiveCamera | THREE.OrthographicCamera;
|
||||
get scene(): THREE.Scene;
|
||||
getRaycaster(): THREE.Raycaster;
|
||||
getViewConfig(): BaseViewerConfig;
|
||||
getSpinner(): Spinner;
|
||||
getFontManager(): FontManager | undefined;
|
||||
private initCSS2DRenderer;
|
||||
/**
|
||||
* Creates a viewerContainer under the container that user passed in.
|
||||
* There are some benifits to create a new one. e.g., its style won't affect
|
||||
* the container div user passed in.
|
||||
* In order to have a better performance, it should only render when necessary.
|
||||
* Usually, we should enable render for these cases:
|
||||
* - Anything added to, removed from scene, or objects' position, scale, rotation, opacity, material, etc. changed
|
||||
* - Anything selected/unselected
|
||||
* - Camera changed
|
||||
* - Render area resized
|
||||
* @internal
|
||||
*/
|
||||
private initViewerContainer;
|
||||
enableRender: (time?: number) => void;
|
||||
protected animate(): void;
|
||||
resize(): void;
|
||||
/**
|
||||
* Sets decoder path for draco loader.
|
||||
* Draco decoder will be used if a model is draco encoded.
|
||||
* @param decoderPath e.g., "libs/draco/gltf/"
|
||||
* @internal
|
||||
*/
|
||||
setDracoDecoderPath(path: string): void;
|
||||
abstract loadModel(modelCfg: ModelConfig, onProgress?: (event: ProgressEvent) => void): Promise<void>;
|
||||
addModel(model: Model): void;
|
||||
setFont(urls: string[]): Promise<void>;
|
||||
/**
|
||||
*
|
||||
* @description Create a div for ui widget, if widget need position, just reletive container, maybe remove later.
|
||||
*/
|
||||
private initWidgetContainer;
|
||||
protected initSpinner(): void;
|
||||
/**
|
||||
* Sets spinner visibility
|
||||
*/
|
||||
protected setSpinnerVisibility(visible: boolean): void;
|
||||
/**
|
||||
* Increases job count, and show spinner accordingly
|
||||
*/
|
||||
protected increaseJobCount(): void;
|
||||
/**
|
||||
* Decreases job count, and hide spinner accordingly
|
||||
*/
|
||||
protected decreaseJobCount(): void;
|
||||
protected resize(width: number, height: number): void;
|
||||
destroy(): void;
|
||||
/**
|
||||
* @internal
|
||||
* @description Global event input manager.eg:mousedown, mouseup, keydown.
|
||||
*/
|
||||
getInputManager(): InputManager | undefined;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
getViewConfig(): BaseViewerConfig;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
enableRender(): void;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
getRaycaster(): THREE.Raycaster | undefined;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
getRaycastableObjectsByMouse(event?: EventInfo): THREE.Object3D[];
|
||||
/**
|
||||
* Gets all objects' bounding box in viewer.
|
||||
* @internal
|
||||
*/
|
||||
getBBox(): THREE.Box3 | undefined;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
getActiveSection(): BaseSection | undefined;
|
||||
flyTo(position: THREE.Vector3, lookAt: THREE.Vector3): void;
|
||||
/**
|
||||
* If it is a 3d viewer.
|
||||
* DxfViewer is 2d, thus returns false.
|
||||
* @default true
|
||||
* @internal
|
||||
* @description 2d ignore position z.
|
||||
*/
|
||||
is3d(): boolean;
|
||||
/**
|
||||
* @description Compatible with older versions, use MeasurePlugin instead
|
||||
* @internal
|
||||
*/
|
||||
get measurePlugin(): MeasurementPlugin | undefined;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
getMarkupManager(): MarkupManager | undefined;
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
deactivateMeasurement(): void;
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
setMeasurementVisibility(id: string, visible: boolean): boolean;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
screenshot(config: any): Promise<undefined | string>;
|
||||
/**
|
||||
* Gets how long a pixel represents in world coordinate.
|
||||
* This works fine for OrthographicCamera.
|
||||
@ -235,10 +132,106 @@ export declare abstract class BaseViewer extends Event<ViewerEvents> {
|
||||
* @internal
|
||||
*/
|
||||
getPixelSizeInWorldCoord(): number;
|
||||
/**
|
||||
* @description {en} Asks user to select a box area, and zooms to it.
|
||||
* @description {zh} 询问用户选择一个框选区域,然后缩放到该区域。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* viewer.zoomToRect();
|
||||
* ```
|
||||
*/
|
||||
zoomToRect(): void;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
deactivateZoomRect(): void;
|
||||
/**
|
||||
* Gets an unique modelId in case the expected id is duplicated.
|
||||
*/
|
||||
protected getUniqueModelId(expectedModelId: string): string;
|
||||
/**
|
||||
* @description get all model box
|
||||
*/
|
||||
getBBox(): THREE.Box3;
|
||||
flyToObject(object: THREE.Object3D): void;
|
||||
flyToObjects(objects: THREE.Object3D[]): void;
|
||||
/**
|
||||
* Make camera fly to target position with given lookAt position
|
||||
* @param position camera's target position
|
||||
* @param lookAt camera's new lookAt position
|
||||
*/
|
||||
flyTo(position: THREE.Vector3, lookAt: THREE.Vector3): void;
|
||||
flyToDirection(direction: THREE.Vector3): void;
|
||||
/**
|
||||
* Goes to home view
|
||||
*/
|
||||
goToHomeView(): void;
|
||||
/**
|
||||
* Fits the camera to view all objects in scene
|
||||
*/
|
||||
viewFitAll(): void;
|
||||
/**
|
||||
*
|
||||
* @param bbox
|
||||
*/
|
||||
zoomToBBox(bbox: THREE.Box3): void;
|
||||
pickModel(mousePosition: {
|
||||
x: number;
|
||||
y: number;
|
||||
}): import("../../core/pick").CpuIntersection | undefined;
|
||||
pickObjectsByMouse(mousePosition: {
|
||||
x: number;
|
||||
y: number;
|
||||
}): THREE.Intersection<THREE.Object3D<THREE.Event>>[];
|
||||
getRaycastableObjects(): THREE.Object3D<THREE.Event>[];
|
||||
/**
|
||||
* @description {en} Sets background color.
|
||||
* @description {zh} 设置背景颜色。
|
||||
* @param r
|
||||
* - {en} Red channel value between 0 and 1.
|
||||
* - {zh} 红色通道值,介于 0 和 1 之间。
|
||||
* @param g
|
||||
* - {en} Green channel value between 0 and 1.
|
||||
* - {zh} 绿色通道值,介于 0 和 1 之间。
|
||||
* @param b
|
||||
* - {en} Blue channel value between 0 and 1.
|
||||
* -{zh} 蓝色通道值,介于 0 和 1 之间。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* // {en} Sets background to gray
|
||||
* // {zh} 设置背景为灰色
|
||||
* viewer.setBackgroundColor(0.5, 0.5, 0.5);
|
||||
* ```
|
||||
*/
|
||||
setBackgroundColor(r: number, g: number, b: number): void;
|
||||
setCameraProjection(projection: CameraProjections): void;
|
||||
enableControl(enable: boolean): void;
|
||||
enableRotate(enable: boolean): void;
|
||||
enableZoom(enable: boolean): void;
|
||||
enablePan(enable: boolean): void;
|
||||
getCameraInfo(): {
|
||||
near: number;
|
||||
far: number;
|
||||
zoom: number;
|
||||
eye: THREE.Vector3Tuple;
|
||||
up: THREE.Vector3Tuple;
|
||||
look: THREE.Vector3Tuple;
|
||||
};
|
||||
setCameraInfo(cameraInfo: CameraInfo): void;
|
||||
getCameraDirection(): THREE.Vector3;
|
||||
getRenderInfo(): {
|
||||
drawCalls: number;
|
||||
lines: number;
|
||||
points: number;
|
||||
triangles: number;
|
||||
geometries: number;
|
||||
textures: number;
|
||||
materials: number;
|
||||
};
|
||||
/**
|
||||
*
|
||||
*/
|
||||
destroy(): void;
|
||||
/**
|
||||
* Installs a Plugin.
|
||||
*/
|
||||
|
||||
260
demo/libs/types/core/viewers/BaseViewer.temp.d.ts
vendored
Normal file
260
demo/libs/types/core/viewers/BaseViewer.temp.d.ts
vendored
Normal file
@ -0,0 +1,260 @@
|
||||
import type { TFunction } from "i18next";
|
||||
import * as THREE from "three";
|
||||
import { Box2 } from "../Constants";
|
||||
import { ViewerEvent } from "./ViewerEvent";
|
||||
import type { BaseViewerConfig, CameraConfig } from "../../core/Configs";
|
||||
import type { CanvasRender } from "../../core/canvas";
|
||||
import type { CameraControlsEx, VRControls } from "../../core/controls";
|
||||
import { EventInfo, InputManager } from "../../core/input/InputManager";
|
||||
import type { MarkupManager } from "../../core/markup";
|
||||
import { UndoRedoManager } from "../../core/undo-redo/UndoRedoManager";
|
||||
import { Event } from "../../core/utils";
|
||||
import { Plugin } from "../../core/viewers/Plugin";
|
||||
import type { MeasurementPlugin } from "../../plugins";
|
||||
import type { BaseSection } from "../../plugins/sections";
|
||||
/**
|
||||
* Screenshot result, which contains a result image and,
|
||||
* for DxfViewer, it also contains the view extent when the screenshot is taken,
|
||||
* for BimViewer, it contains the camera's position and target.
|
||||
*/
|
||||
export interface ScreenshotResult {
|
||||
/**
|
||||
* The view extent when the screenshot is taken.
|
||||
* Note that, it is not the image's extent.
|
||||
* And, this is for DxfViewer only.
|
||||
*/
|
||||
viewExtent?: Box2;
|
||||
/**
|
||||
* Used for BimViewer
|
||||
* @internal
|
||||
*/
|
||||
/**
|
||||
* Used for BimViewer
|
||||
* @internal
|
||||
*/
|
||||
/**
|
||||
* Image type, which is "image/png" by default
|
||||
* @internal
|
||||
*/
|
||||
imageType: string;
|
||||
/**
|
||||
* The image, in base 64 format.
|
||||
*/
|
||||
base64Image: string;
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare enum ViewerName {
|
||||
BaseViewer = "BaseViewer",
|
||||
BimViewer = "BimViewer",
|
||||
DxfViewer = "DxfViewer",
|
||||
VRViewer = "VRViewer"
|
||||
}
|
||||
declare type ViewerEvents = {
|
||||
[K in ViewerEvent]: any;
|
||||
};
|
||||
/**
|
||||
* Abstract base class for DxfViewer, BimViewer, etc.
|
||||
*/
|
||||
export declare abstract class BaseViewer extends Event<ViewerEvents> {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
name: ViewerName;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
translate: TFunction;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
parentContainer?: HTMLElement;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
viewerContainer?: HTMLElement;
|
||||
container?: HTMLElement;
|
||||
protected inputManager?: InputManager;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
scene?: THREE.Scene;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
renderer?: THREE.WebGLRenderer;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
camera?: THREE.PerspectiveCamera | THREE.OrthographicCamera;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
controls?: CameraControlsEx | VRControls;
|
||||
protected height: number;
|
||||
protected width: number;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
widgetContainer?: HTMLElement;
|
||||
private spinner?;
|
||||
protected jobCount: number;
|
||||
protected viewerCfg: BaseViewerConfig;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
cameraCfg?: CameraConfig;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
groundPlane?: THREE.Mesh;
|
||||
/**
|
||||
* @describe overlay canvas
|
||||
* @internal
|
||||
*/
|
||||
overlayRender?: CanvasRender;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
loadedModels?: any;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
undoRedoManager?: UndoRedoManager;
|
||||
protected enableOverlayRenderer: boolean;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
protected requestAnimationFrameHandle?: number;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
protected frustumSize: number;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
protected loadingProgressBar?: any;
|
||||
protected lastFrameExecuteTime: number;
|
||||
protected minFrameInterval: number;
|
||||
protected plugins: Plugin[];
|
||||
constructor(viewerCfg: BaseViewerConfig);
|
||||
private initLogLevel;
|
||||
private initLocalization;
|
||||
private initContainer;
|
||||
/**
|
||||
* Creates a viewerContainer under the container that user passed in.
|
||||
* There are some benifits to create a new one. e.g., its style won't affect
|
||||
* the container div user passed in.
|
||||
*/
|
||||
private initViewerContainer;
|
||||
/**
|
||||
*
|
||||
* @description Create a div for ui widget, if widget need position, just reletive container, maybe remove later.
|
||||
*/
|
||||
private initWidgetContainer;
|
||||
protected initSpinner(): void;
|
||||
/**
|
||||
* Sets spinner visibility
|
||||
*/
|
||||
protected setSpinnerVisibility(visible: boolean): void;
|
||||
/**
|
||||
* Increases job count, and show spinner accordingly
|
||||
*/
|
||||
protected increaseJobCount(): void;
|
||||
/**
|
||||
* Decreases job count, and hide spinner accordingly
|
||||
*/
|
||||
protected decreaseJobCount(): void;
|
||||
protected resize(width: number, height: number): void;
|
||||
destroy(): void;
|
||||
/**
|
||||
* @internal
|
||||
* @description Global event input manager.eg:mousedown, mouseup, keydown.
|
||||
*/
|
||||
getInputManager(): InputManager | undefined;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
getViewConfig(): BaseViewerConfig;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
enableRender(): void;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
getRaycaster(): THREE.Raycaster | undefined;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
getRaycastableObjectsByMouse(event?: EventInfo): THREE.Object3D[];
|
||||
/**
|
||||
* Gets all objects' bounding box in viewer.
|
||||
* @internal
|
||||
*/
|
||||
getBBox(): THREE.Box3 | undefined;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
getActiveSection(): BaseSection | undefined;
|
||||
flyTo(position: THREE.Vector3, lookAt: THREE.Vector3): void;
|
||||
/**
|
||||
* If it is a 3d viewer.
|
||||
* DxfViewer is 2d, thus returns false.
|
||||
* @default true
|
||||
* @internal
|
||||
*/
|
||||
is3d(): boolean;
|
||||
/**
|
||||
* @description Compatible with older versions, use MeasurePlugin instead
|
||||
* @internal
|
||||
*/
|
||||
get measurePlugin(): MeasurementPlugin | undefined;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
getMarkupManager(): MarkupManager | undefined;
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
deactivateMeasurement(): void;
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
setMeasurementVisibility(id: string, visible: boolean): boolean;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
screenshot(config: any): Promise<undefined | string>;
|
||||
/**
|
||||
* Gets how long a pixel represents in world coordinate.
|
||||
* This works fine for OrthographicCamera.
|
||||
* As for PerspectiveCamera, a pixel represents different size for different position,
|
||||
* depends on how far the camera is and its fov, etc. We'll simply take the camera target as the position to calculate.
|
||||
* @internal
|
||||
*/
|
||||
getPixelSizeInWorldCoord(): number;
|
||||
/**
|
||||
* Gets an unique modelId in case the expected id is duplicated.
|
||||
*/
|
||||
protected getUniqueModelId(expectedModelId: string): string;
|
||||
/**
|
||||
* Installs a Plugin.
|
||||
*/
|
||||
addPlugin(plugin: Plugin): void;
|
||||
/**
|
||||
* Uninstalls a Plugin, clearing content from it first.
|
||||
*/
|
||||
removePlugin(plugin: Plugin): void;
|
||||
/**
|
||||
* Clears all plugins.
|
||||
* A plugin is not created by viewer, thus, won't be destroyed by viewer.
|
||||
*/
|
||||
clearPlugins(): void;
|
||||
/**
|
||||
* Finds a Plugin.
|
||||
*/
|
||||
findPlugin(id: string): Plugin | undefined;
|
||||
}
|
||||
export {};
|
||||
526
demo/libs/types/core/viewers/BimViewer.d.ts
vendored
526
demo/libs/types/core/viewers/BimViewer.d.ts
vendored
@ -1,493 +1,24 @@
|
||||
import * as THREE from "three";
|
||||
import { Settings as SettingsType } from "../../components/settings";
|
||||
import { Model3d } from "../model";
|
||||
import { CpuIntersection } from "../pick";
|
||||
import { BaseViewer } from "./BaseViewer";
|
||||
import { ViewerName } from "./Constants";
|
||||
import { BimViewerConfig, CameraConfig, ModelConfig } from "../../core/Configs";
|
||||
import { SectionType, Vector3 } from "../../core/Constants";
|
||||
import { Drawable } from "../../core/canvas";
|
||||
import { FontManager } from "../../core/font";
|
||||
import { EventInfo } from "../../core/input/InputManager";
|
||||
import { Model3d, ModelData3d } from "../../core/model";
|
||||
import { BaseViewer, ViewerName } from "../../core/viewers/BaseViewer";
|
||||
import { MeasurementData, MeasurementPlugin, MeasurementType } from "../../plugins/measure";
|
||||
import { SectionPlugin } from "../../plugins/sections";
|
||||
export declare class BimViewer extends BaseViewer {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
name: ViewerName;
|
||||
private timer;
|
||||
protected fontManager?: FontManager;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
ambientLight?: THREE.AmbientLight;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
directionalLight?: THREE.DirectionalLight;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
hemisphereLight?: THREE.HemisphereLight;
|
||||
enableSelection: boolean;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
selectedObject: any | Drawable | undefined;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
loadedModels: Model3d[];
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
pmremGenerator?: THREE.PMREMGenerator;
|
||||
private perspectiveCamera?;
|
||||
private orthoCamera?;
|
||||
private perspectiveCameraControls?;
|
||||
private orthoCameraConrols?;
|
||||
private css2dRenderer?;
|
||||
private composerRenderEnabled;
|
||||
private composerEnabled;
|
||||
private composer?;
|
||||
private renderPass?;
|
||||
private effectFxaaPass?;
|
||||
private ssaoPass?;
|
||||
private saoPass?;
|
||||
private outlinePass?;
|
||||
private ssaaRenderPass?;
|
||||
private bloomPass?;
|
||||
private unrealBloomPass?;
|
||||
private raycaster?;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
sectionType?: string;
|
||||
private zoomToRectHelper?;
|
||||
private shadowCameraHelper?;
|
||||
private directionalLightHelper?;
|
||||
private webcam?;
|
||||
private webcamPlane?;
|
||||
private raf?;
|
||||
private clock;
|
||||
private renderEnabled;
|
||||
private timeoutSymbol?;
|
||||
private enableModelLevelFrustumCulling;
|
||||
private isFrustumInsectChecking;
|
||||
private settings;
|
||||
private twoDModelCount;
|
||||
private vertexNormalsHelpers?;
|
||||
enableFastOperation: boolean;
|
||||
private operationTimeout?;
|
||||
private edgesVisible;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
distanceCullingFactor: number;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
operationTimeoutMs: number;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
private bbox;
|
||||
enableAnchorPointer: boolean;
|
||||
private anchor?;
|
||||
selectedObject?: THREE.Object3D;
|
||||
private effect;
|
||||
enableSelection: boolean;
|
||||
constructor(viewerCfg: BimViewerConfig, cameraCfg?: CameraConfig);
|
||||
/**
|
||||
* Initialize everything it needs
|
||||
* @internal
|
||||
*/
|
||||
init(): void;
|
||||
private initThree;
|
||||
private initDom;
|
||||
private initScene;
|
||||
private initRenderer;
|
||||
private initCSS2DRenderer;
|
||||
private initCamera;
|
||||
private initControls;
|
||||
private initRotateToCursor;
|
||||
private onResize;
|
||||
private onKeyDown;
|
||||
private initLights;
|
||||
/**
|
||||
* Initialize mouse/pointer events
|
||||
*/
|
||||
private initEvents;
|
||||
private initOthers;
|
||||
private initLoadingProgressBar;
|
||||
private sycnCameraAndControls;
|
||||
/**
|
||||
* Sets to orthographic or perspective camera.
|
||||
* @param toOrtho Set to orthographic camera if true.
|
||||
* @returns
|
||||
*/
|
||||
setToOrthographicCamera(toOrtho?: boolean): void;
|
||||
protected animate(): void;
|
||||
private update3dTiles;
|
||||
/**
|
||||
* This is a method called in animate() in order to optimize rendering speed.
|
||||
* The idea is to hide any model out of view frustum.
|
||||
* This should have a better performance than THREE's frustum culling, because we did it in
|
||||
* model level to avoid iterating all its objects.
|
||||
*/
|
||||
private frustumCullingByModelBBox;
|
||||
/**
|
||||
* In order to have a better performance, it should only render when necessary.
|
||||
* Usually, we should enable render for these cases:
|
||||
* - Anything added to, removed from scene, or objects' position, scale, rotation, opacity, material, etc. changed
|
||||
* - Anything selected/unselected
|
||||
* - Camera changed
|
||||
* - Render area resized
|
||||
* @internal
|
||||
*/
|
||||
enableRender: (time?: number) => void;
|
||||
destroy(): void;
|
||||
/**
|
||||
* Loads a 3d model from local
|
||||
* @internal
|
||||
*/
|
||||
protected setupDefaultEvents(): void;
|
||||
protected setDefaultBackground(): void;
|
||||
protected handleAnchorPoint(intersect?: CpuIntersection): void;
|
||||
protected handleClickObject(object: THREE.Object3D): void;
|
||||
is3d(): boolean;
|
||||
loadLocalModel(url: string, modelCfg: ModelConfig, manager?: THREE.LoadingManager, onProgress?: (event: ProgressEvent) => void): Promise<void>;
|
||||
/**
|
||||
* Loads a 3d model
|
||||
*/
|
||||
loadModel(modelCfg: ModelConfig, onProgress?: (event: ProgressEvent) => void): Promise<void>;
|
||||
/**
|
||||
* Loads 3dtiles
|
||||
* TODO: Temporarily does not support 3dtiles version 1.0 above
|
||||
* The coordinate system is not processed yet
|
||||
* @internal
|
||||
*/
|
||||
load3dTiles(modelCfg: ModelConfig): Promise<void>;
|
||||
/**
|
||||
* Sets font.
|
||||
* This needs to be called before loading a dxf, it won't affect any loaded text.
|
||||
* It accepts shx or typeface formats. For typeface, it only support passing in 1 font file in the array for now.
|
||||
* @param urls font file urls
|
||||
*/
|
||||
setFont(urls: string[]): Promise<void>;
|
||||
/**
|
||||
* Sets decoder path for draco loader.
|
||||
* Draco decoder will be used if a model is draco encoded.
|
||||
* @param decoderPath e.g., "libs/draco/gltf/"
|
||||
* @internal
|
||||
*/
|
||||
setDracoDecoderPath(path: string): void;
|
||||
/**
|
||||
* Applies options and add object to scene.
|
||||
*/
|
||||
private applyOptionsAndAddToScene;
|
||||
/**
|
||||
*
|
||||
* @param model
|
||||
* @returns
|
||||
* @description Add model data to viewer.
|
||||
*/
|
||||
addModel(model: ModelData3d): void;
|
||||
private calculateMeshSurfaceArea;
|
||||
setAllModelTransparent(opacity: number): void;
|
||||
clearAllModelTransparent(): void;
|
||||
setObjectTransparent(object: THREE.Object3D, opacity: number): void;
|
||||
clearObjectTransparent(object: THREE.Object3D): void;
|
||||
setOthersObjectTransparent(object: THREE.Object3D): void;
|
||||
setModelTransparent(modelId: string): void;
|
||||
clearModelTransparent(modelId: string): void;
|
||||
setObjectVisible(object: THREE.Object3D, visible: boolean): void;
|
||||
hideOthersObject(object: THREE.Object3D): void;
|
||||
setModelVisible(modelId: string, visible: boolean): void;
|
||||
setAllModelVisible(visible: boolean): void;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
showVertexNormals(show: boolean, size?: number): void;
|
||||
protected resize(width: number, height: number): void;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
getRaycaster(): THREE.Raycaster | undefined;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
getRaycastableObjectsByMouse(event?: EventInfo): THREE.Object3D[];
|
||||
private getRaycastableObjects;
|
||||
/**
|
||||
* Gets intersections by given mouse location.
|
||||
* If no MouseEvent is passed in, use (0, 0) as the raycaster's origin.
|
||||
*/
|
||||
private getIntersections;
|
||||
private getAllIntersections;
|
||||
/**
|
||||
* Handles mouse click event
|
||||
*/
|
||||
private getClickedObject;
|
||||
/**
|
||||
* Handles mouse click event
|
||||
*/
|
||||
private handleMouseClick;
|
||||
/**
|
||||
* Select or unselect an object.
|
||||
* It doesn't support selecting more than one objects.
|
||||
* It doesn't support selecting a parent object which doesn't have material itself.
|
||||
* In order to support de-select, we'll need to store some information, we do this via userData:
|
||||
* For InstancedMesh, there are two cases:
|
||||
* 1) One Mesh in InstancedMesh is selected
|
||||
* it adds following to selected object: userData \{
|
||||
* instanceId: number,
|
||||
* originalMatrix: THREE.Matrix4,
|
||||
* clonedMesh: THREE.Mesh
|
||||
* \}
|
||||
* 2) The whole InstancedMesh is selected. This case is no different from a normal Mesh is selected, so:
|
||||
* For Mesh, it adds: userData \{
|
||||
* originalMaterial: THREE.Material
|
||||
* \}
|
||||
* @param object
|
||||
* @param instanceId pass in instanceId if an InstancedMesh is selected
|
||||
* @param depthTest set to false if caller want to make sure user can see it. When an object is
|
||||
* selected by user manually, we don't need to make sure user can see it. While if selection is
|
||||
* made by program, we parbably need to make sure user can see it, in other words, the selected
|
||||
* object won't be blocked by other objects.
|
||||
* @internal
|
||||
*/
|
||||
selectObject(object?: THREE.Object3D | Drawable, instanceId?: number, batchId?: number, depthTest?: boolean | undefined): void;
|
||||
/**
|
||||
* Clears the current selection
|
||||
*/
|
||||
clearSelection(): void;
|
||||
/**
|
||||
* Gets bounding box
|
||||
* @internal
|
||||
*/
|
||||
getBBox(): THREE.Box3 | undefined;
|
||||
/**
|
||||
* Enables/disables model edges.
|
||||
*/
|
||||
enableModelEdges(enable: boolean, onProgress?: (event: ProgressEvent) => void): Promise<void>;
|
||||
/**
|
||||
* Make camera fly to objects
|
||||
*/
|
||||
protected flyToObjects(objects: THREE.Object3D[]): void;
|
||||
/**
|
||||
* Make camera fly to an object
|
||||
* @internal
|
||||
*/
|
||||
flyToObject(object: THREE.Object3D): void;
|
||||
/**
|
||||
* Flies to current selected object if any
|
||||
*/
|
||||
protected flyToSelectedObject(): void;
|
||||
/**
|
||||
* Flies to a random object (by "R" key).
|
||||
* It is useful when either the data is wrong or there is bug in program,
|
||||
* then we cannot see anything in the scene!
|
||||
*/
|
||||
protected flyToRandomObject(): void;
|
||||
/**
|
||||
* Make camera fly to target position with given lookAt position
|
||||
* @param position camera's target position
|
||||
* @param lookAt camera's new lookAt position
|
||||
*/
|
||||
flyTo(position: THREE.Vector3, lookAt: THREE.Vector3): void;
|
||||
/**
|
||||
* Fits the camera to view all objects in scene
|
||||
*/
|
||||
viewFitAll(): void;
|
||||
/**
|
||||
* Goes to home view
|
||||
*/
|
||||
goToHomeView(): void;
|
||||
zoomToBBox(bbox: THREE.Box3): void;
|
||||
/**
|
||||
* Tries to adjust camera near/far clip plane according to objects size in scene.
|
||||
* Do this to avoid the case when objects are too small or big thus clipped!
|
||||
*/
|
||||
private tryAdjustCameraNearAndFar;
|
||||
private tryAdjustDirectionalLight;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
updateDirectionalLight(): void;
|
||||
private updateDirectionalLightShadow;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
showDirectionalLightHelper(visible: boolean): void;
|
||||
/**** Anchor rotation related interface start ****/
|
||||
private setOrbitPoint;
|
||||
private onAnchorPointerDown;
|
||||
private setAnchorPosition;
|
||||
private createAnchor;
|
||||
private disposeAnchor;
|
||||
private onAnchorPointerUp;
|
||||
private disposeRotateToCursor;
|
||||
/******* Anchor rotation related interface end *********/
|
||||
/**
|
||||
* Enables or disable Composer
|
||||
* @internal
|
||||
*/
|
||||
enableComposer(enable: boolean): void;
|
||||
/**
|
||||
* Enables or disable RenderPass
|
||||
* @internal
|
||||
*/
|
||||
enableRenderPass(enable: boolean): void;
|
||||
/**
|
||||
* Enables or disable FxaaPass
|
||||
* @internal
|
||||
*/
|
||||
enableFxaaPass(enable: boolean): void;
|
||||
/**
|
||||
* Enables or disable SAOPass
|
||||
* @internal
|
||||
*/
|
||||
enableSaoPass(enable: boolean): void;
|
||||
/**
|
||||
* Enables or disable SSAOPass
|
||||
* @internal
|
||||
*/
|
||||
enableSsaoPass(enable: boolean): void;
|
||||
/**
|
||||
* Enables or disable OutlinePass
|
||||
* @internal
|
||||
*/
|
||||
enableOutlinePass(enable: boolean): void;
|
||||
/**
|
||||
* Enables or disable SSAARenderPass
|
||||
* @internal
|
||||
*/
|
||||
enableSsaaPass(enable: boolean): void;
|
||||
/**
|
||||
* Enables or disable BloomPass
|
||||
* @internal
|
||||
*/
|
||||
enableBloomPass(enable: boolean): void;
|
||||
/**
|
||||
* Enables or disable UnrealBloomPass
|
||||
* @internal
|
||||
*/
|
||||
enableUnrealBloomPass(enable: boolean): void;
|
||||
/**
|
||||
* Triggered when there is any operation, like pan, rotate, zoom, etc.
|
||||
* We'll do these at this time:
|
||||
* - Enable distance culling
|
||||
* - Hide object edge if there is
|
||||
* - Disable shadow
|
||||
*/
|
||||
protected onOperation: () => void;
|
||||
/**
|
||||
* @description Compatible with older versions, use SectionPlugin instead
|
||||
* @internal
|
||||
* @deprecated use SectionPlugin instead
|
||||
*/
|
||||
get sectionPlugin(): SectionPlugin | undefined;
|
||||
/**
|
||||
* Enable section.
|
||||
* Currently, it only implemented local(object) box section.
|
||||
* @deprecated use SectionPlugin instead
|
||||
*/
|
||||
activateSection(type?: SectionType): void;
|
||||
/**
|
||||
* Deactivates section
|
||||
* @deprecated use SectionPlugin instead
|
||||
*/
|
||||
deactivateSection(): void;
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated use SectionPlugin instead
|
||||
*/
|
||||
getActiveSection(): import("../../plugins/sections").BaseSection | undefined;
|
||||
/**
|
||||
* @description Compatible with older versions, use MeasurePlugin instead
|
||||
* @internal
|
||||
* @description use MeasurementPlugin instead
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
get measurePlugin(): MeasurementPlugin | undefined;
|
||||
/**
|
||||
* Gets measurement data
|
||||
* @internal
|
||||
*/
|
||||
getMeasurements(): MeasurementData[];
|
||||
/**
|
||||
* Activates one of "Distance", "Area" or "Angle" measurement
|
||||
* @param type "Distance", "Area" or "Angle"
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
activateMeasurement(type: MeasurementType): void;
|
||||
/**
|
||||
* Deactivates measurement
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
deactivateMeasurement(): void;
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
setMeasurementVisibility(id: string, visible: boolean): boolean;
|
||||
/**
|
||||
* Clears all measurement results
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
clearMeasurements(): void;
|
||||
/**
|
||||
* Zooms to selected box area.
|
||||
*/
|
||||
zoomToRect(): void;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
deactivateZoomRect(): void;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
enableWebCam(): void;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
disableWebCam(): void;
|
||||
/**
|
||||
* Sets environment for the scene.
|
||||
* @param hdrUrl Full path of picture url in hdr format
|
||||
*/
|
||||
setEnvironment(hdrUrl: string): void;
|
||||
/**
|
||||
* Sets environment for the scene.
|
||||
* @param data Uint16Array of the hdr content
|
||||
* @internal
|
||||
*/
|
||||
setEnvironmentFromDataArray(data?: Uint16Array): void;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
takeObjectsScreenshot(uniqueIds: string[]): Promise<unknown>;
|
||||
/**
|
||||
* Sets object to a specific color. Note that:
|
||||
* - The change is permanent, and cannot be recovered to the original color or material.
|
||||
* - If a material is shared, it may affect other objects.
|
||||
* @param color A color number in format of "0x000000"
|
||||
* @internal
|
||||
*/
|
||||
setObjectColor(object: THREE.Object3D, color: number): void;
|
||||
/**
|
||||
* Updates raycaster threshold to a proper value, so user can easily pick points and lines
|
||||
*/
|
||||
private updateRaycasterThreshold;
|
||||
/**
|
||||
* Merges leaf nodes of given object.
|
||||
* If objects' materials are the same, they can be merged.
|
||||
* TODO: change merge() and MergeUtils.deepMerge to async
|
||||
* @param object
|
||||
*/
|
||||
private merge;
|
||||
/**
|
||||
* Updates project settings
|
||||
* @internal
|
||||
*/
|
||||
updateProjectSettings(settings: SettingsType): void;
|
||||
/**
|
||||
* Compute bounding box of loaded models
|
||||
* @internal
|
||||
*/
|
||||
computeBoundingBox(): THREE.Box3;
|
||||
loadModel(modelCfg: ModelConfig, onProgress?: ((event: ProgressEvent<EventTarget>) => void) | undefined): Promise<void>;
|
||||
/**
|
||||
* Sets distance culling factor in order to improve performance.
|
||||
* 0 means distance culling is disabled.
|
||||
@ -500,11 +31,28 @@ export declare class BimViewer extends BaseViewer {
|
||||
* @internal
|
||||
*/
|
||||
getDistanceCullingFactor(): number;
|
||||
/**
|
||||
* Gets camera position and direction.
|
||||
*/
|
||||
getCameraPositionAndDirection(): {
|
||||
position: Vector3;
|
||||
direction: Vector3;
|
||||
} | undefined;
|
||||
setAllModelTransparent(opacity: number): void;
|
||||
clearAllModelTransparent(): void;
|
||||
setObjectTransparent(object: THREE.Object3D, opacity: number): void;
|
||||
clearObjectTransparent(object: THREE.Object3D): void;
|
||||
setOthersObjectTransparent(object: THREE.Object3D): void;
|
||||
setModelTransparent(modelId: string): void;
|
||||
clearModelTransparent(modelId: string): void;
|
||||
setObjectVisible(object: THREE.Object3D, visible: boolean): void;
|
||||
hideOthersObject(object: THREE.Object3D): void;
|
||||
setModelVisible(modelId: string, visible: boolean): void;
|
||||
setAllModelVisible(visible: boolean): void;
|
||||
setObjectHighlight(object: THREE.Object3D): void;
|
||||
clearHighlight(): void;
|
||||
clearSelection(): void;
|
||||
enableSsao(enable: boolean): void;
|
||||
setEnvironmentData(data?: Uint16Array): Promise<void>;
|
||||
setEnvironment(hdrUrl: string): Promise<void>;
|
||||
showVertexNormals(show: boolean, size?: number): void;
|
||||
getLights(): {
|
||||
sun: THREE.Object3D<THREE.Event> | undefined;
|
||||
ambient: THREE.Object3D<THREE.Event> | undefined;
|
||||
hemisphere: THREE.Object3D<THREE.Event> | undefined;
|
||||
};
|
||||
debugLights(enable: boolean): void;
|
||||
}
|
||||
|
||||
510
demo/libs/types/core/viewers/BimViewer.temp.d.ts
vendored
Normal file
510
demo/libs/types/core/viewers/BimViewer.temp.d.ts
vendored
Normal file
@ -0,0 +1,510 @@
|
||||
import * as THREE from "three";
|
||||
import { Settings as SettingsType } from "../../components/settings";
|
||||
import { BimViewerConfig, CameraConfig, ModelConfig } from "../../core/Configs";
|
||||
import { SectionType, Vector3 } from "../../core/Constants";
|
||||
import { Drawable } from "../../core/canvas";
|
||||
import { FontManager } from "../../core/font";
|
||||
import { EventInfo } from "../../core/input/InputManager";
|
||||
import { Model3d, ModelData3d } from "../../core/model";
|
||||
import { BaseViewer } from "../../core/viewers/BaseViewer";
|
||||
import { MeasurementData, MeasurementPlugin, MeasurementType } from "../../plugins/measure";
|
||||
import { SectionPlugin } from "../../plugins/sections";
|
||||
export declare class BimViewer extends BaseViewer {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
name: any;
|
||||
private timer;
|
||||
protected fontManager?: FontManager;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
ambientLight?: THREE.AmbientLight;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
directionalLight?: THREE.DirectionalLight;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
hemisphereLight?: THREE.HemisphereLight;
|
||||
enableSelection: boolean;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
selectedObject: any | Drawable | undefined;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
loadedModels: Model3d[];
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
pmremGenerator?: THREE.PMREMGenerator;
|
||||
private perspectiveCamera?;
|
||||
private orthoCamera?;
|
||||
private perspectiveCameraControls?;
|
||||
private orthoCameraConrols?;
|
||||
private css2dRenderer?;
|
||||
private composerRenderEnabled;
|
||||
private composerEnabled;
|
||||
private composer?;
|
||||
private renderPass?;
|
||||
private effectFxaaPass?;
|
||||
private ssaoPass?;
|
||||
private saoPass?;
|
||||
private outlinePass?;
|
||||
private ssaaRenderPass?;
|
||||
private bloomPass?;
|
||||
private unrealBloomPass?;
|
||||
private raycaster?;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
sectionType?: string;
|
||||
private zoomToRectHelper?;
|
||||
private shadowCameraHelper?;
|
||||
private directionalLightHelper?;
|
||||
private webcam?;
|
||||
private webcamPlane?;
|
||||
private raf?;
|
||||
private clock;
|
||||
private renderEnabled;
|
||||
private timeoutSymbol?;
|
||||
private enableModelLevelFrustumCulling;
|
||||
private isFrustumInsectChecking;
|
||||
private settings;
|
||||
private twoDModelCount;
|
||||
private vertexNormalsHelpers?;
|
||||
enableFastOperation: boolean;
|
||||
private operationTimeout?;
|
||||
private edgesVisible;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
distanceCullingFactor: number;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
operationTimeoutMs: number;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
private bbox;
|
||||
enableAnchorPointer: boolean;
|
||||
private anchor?;
|
||||
constructor(viewerCfg: BimViewerConfig, cameraCfg?: CameraConfig);
|
||||
/**
|
||||
* Initialize everything it needs
|
||||
* @internal
|
||||
*/
|
||||
init(): void;
|
||||
private initThree;
|
||||
private initDom;
|
||||
private initScene;
|
||||
private initRenderer;
|
||||
private initCSS2DRenderer;
|
||||
private initCamera;
|
||||
private initControls;
|
||||
private initRotateToCursor;
|
||||
private onResize;
|
||||
private onKeyDown;
|
||||
private initLights;
|
||||
/**
|
||||
* Initialize mouse/pointer events
|
||||
*/
|
||||
private initEvents;
|
||||
private initOthers;
|
||||
private initLoadingProgressBar;
|
||||
private sycnCameraAndControls;
|
||||
/**
|
||||
* Sets to orthographic or perspective camera.
|
||||
* @param toOrtho Set to orthographic camera if true.
|
||||
* @returns
|
||||
*/
|
||||
setToOrthographicCamera(toOrtho?: boolean): void;
|
||||
protected animate(): void;
|
||||
private update3dTiles;
|
||||
/**
|
||||
* This is a method called in animate() in order to optimize rendering speed.
|
||||
* The idea is to hide any model out of view frustum.
|
||||
* This should have a better performance than THREE's frustum culling, because we did it in
|
||||
* model level to avoid iterating all its objects.
|
||||
*/
|
||||
private frustumCullingByModelBBox;
|
||||
/**
|
||||
* In order to have a better performance, it should only render when necessary.
|
||||
* Usually, we should enable render for these cases:
|
||||
* - Anything added to, removed from scene, or objects' position, scale, rotation, opacity, material, etc. changed
|
||||
* - Anything selected/unselected
|
||||
* - Camera changed
|
||||
* - Render area resized
|
||||
* @internal
|
||||
*/
|
||||
enableRender: (time?: number) => void;
|
||||
destroy(): void;
|
||||
/**
|
||||
* Loads a 3d model from local
|
||||
* @internal
|
||||
*/
|
||||
loadLocalModel(url: string, modelCfg: ModelConfig, manager?: THREE.LoadingManager, onProgress?: (event: ProgressEvent) => void): Promise<void>;
|
||||
/**
|
||||
* Loads a 3d model
|
||||
*/
|
||||
loadModel(modelCfg: ModelConfig, onProgress?: (event: ProgressEvent) => void): Promise<void>;
|
||||
/**
|
||||
* Loads 3dtiles
|
||||
* TODO: Temporarily does not support 3dtiles version 1.0 above
|
||||
* The coordinate system is not processed yet
|
||||
* @internal
|
||||
*/
|
||||
load3dTiles(modelCfg: ModelConfig): Promise<void>;
|
||||
/**
|
||||
* Sets font.
|
||||
* This needs to be called before loading a dxf, it won't affect any loaded text.
|
||||
* It accepts shx or typeface formats. For typeface, it only support passing in 1 font file in the array for now.
|
||||
* @param urls font file urls
|
||||
*/
|
||||
setFont(urls: string[]): Promise<void>;
|
||||
/**
|
||||
* Sets decoder path for draco loader.
|
||||
* Draco decoder will be used if a model is draco encoded.
|
||||
* @param decoderPath e.g., "libs/draco/gltf/"
|
||||
* @internal
|
||||
*/
|
||||
setDracoDecoderPath(path: string): void;
|
||||
/**
|
||||
* Applies options and add object to scene.
|
||||
*/
|
||||
private applyOptionsAndAddToScene;
|
||||
/**
|
||||
*
|
||||
* @param model
|
||||
* @returns
|
||||
* @description Add model data to viewer.
|
||||
*/
|
||||
addModel(model: ModelData3d): void;
|
||||
private calculateMeshSurfaceArea;
|
||||
setAllModelTransparent(opacity: number): void;
|
||||
clearAllModelTransparent(): void;
|
||||
setObjectTransparent(object: THREE.Object3D, opacity: number): void;
|
||||
clearObjectTransparent(object: THREE.Object3D): void;
|
||||
setOthersObjectTransparent(object: THREE.Object3D): void;
|
||||
setModelTransparent(modelId: string): void;
|
||||
clearModelTransparent(modelId: string): void;
|
||||
setObjectVisible(object: THREE.Object3D, visible: boolean): void;
|
||||
hideOthersObject(object: THREE.Object3D): void;
|
||||
setModelVisible(modelId: string, visible: boolean): void;
|
||||
setAllModelVisible(visible: boolean): void;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
showVertexNormals(show: boolean, size?: number): void;
|
||||
protected resize(width: number, height: number): void;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
getRaycaster(): THREE.Raycaster | undefined;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
getRaycastableObjectsByMouse(event?: EventInfo): THREE.Object3D[];
|
||||
private getRaycastableObjects;
|
||||
/**
|
||||
* Gets intersections by given mouse location.
|
||||
* If no MouseEvent is passed in, use (0, 0) as the raycaster's origin.
|
||||
*/
|
||||
private getIntersections;
|
||||
private getAllIntersections;
|
||||
/**
|
||||
* Handles mouse click event
|
||||
*/
|
||||
private getClickedObject;
|
||||
/**
|
||||
* Handles mouse click event
|
||||
*/
|
||||
private handleMouseClick;
|
||||
/**
|
||||
* Select or unselect an object.
|
||||
* It doesn't support selecting more than one objects.
|
||||
* It doesn't support selecting a parent object which doesn't have material itself.
|
||||
* In order to support de-select, we'll need to store some information, we do this via userData:
|
||||
* For InstancedMesh, there are two cases:
|
||||
* 1) One Mesh in InstancedMesh is selected
|
||||
* it adds following to selected object: userData \{
|
||||
* instanceId: number,
|
||||
* originalMatrix: THREE.Matrix4,
|
||||
* clonedMesh: THREE.Mesh
|
||||
* \}
|
||||
* 2) The whole InstancedMesh is selected. This case is no different from a normal Mesh is selected, so:
|
||||
* For Mesh, it adds: userData \{
|
||||
* originalMaterial: THREE.Material
|
||||
* \}
|
||||
* @param object
|
||||
* @param instanceId pass in instanceId if an InstancedMesh is selected
|
||||
* @param depthTest set to false if caller want to make sure user can see it. When an object is
|
||||
* selected by user manually, we don't need to make sure user can see it. While if selection is
|
||||
* made by program, we parbably need to make sure user can see it, in other words, the selected
|
||||
* object won't be blocked by other objects.
|
||||
* @internal
|
||||
*/
|
||||
selectObject(object?: THREE.Object3D | Drawable, instanceId?: number, batchId?: number, depthTest?: boolean | undefined): void;
|
||||
/**
|
||||
* Clears the current selection
|
||||
*/
|
||||
clearSelection(): void;
|
||||
/**
|
||||
* Gets bounding box
|
||||
* @internal
|
||||
*/
|
||||
getBBox(): THREE.Box3 | undefined;
|
||||
/**
|
||||
* Enables/disables model edges.
|
||||
*/
|
||||
enableModelEdges(enable: boolean, onProgress?: (event: ProgressEvent) => void): Promise<void>;
|
||||
/**
|
||||
* Make camera fly to objects
|
||||
*/
|
||||
protected flyToObjects(objects: THREE.Object3D[]): void;
|
||||
/**
|
||||
* Make camera fly to an object
|
||||
* @internal
|
||||
*/
|
||||
flyToObject(object: THREE.Object3D): void;
|
||||
/**
|
||||
* Flies to current selected object if any
|
||||
*/
|
||||
protected flyToSelectedObject(): void;
|
||||
/**
|
||||
* Flies to a random object (by "R" key).
|
||||
* It is useful when either the data is wrong or there is bug in program,
|
||||
* then we cannot see anything in the scene!
|
||||
*/
|
||||
protected flyToRandomObject(): void;
|
||||
/**
|
||||
* Make camera fly to target position with given lookAt position
|
||||
* @param position camera's target position
|
||||
* @param lookAt camera's new lookAt position
|
||||
*/
|
||||
flyTo(position: THREE.Vector3, lookAt: THREE.Vector3): void;
|
||||
/**
|
||||
* Fits the camera to view all objects in scene
|
||||
*/
|
||||
viewFitAll(): void;
|
||||
/**
|
||||
* Goes to home view
|
||||
*/
|
||||
goToHomeView(): void;
|
||||
zoomToBBox(bbox: THREE.Box3): void;
|
||||
/**
|
||||
* Tries to adjust camera near/far clip plane according to objects size in scene.
|
||||
* Do this to avoid the case when objects are too small or big thus clipped!
|
||||
*/
|
||||
private tryAdjustCameraNearAndFar;
|
||||
private tryAdjustDirectionalLight;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
updateDirectionalLight(): void;
|
||||
private updateDirectionalLightShadow;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
showDirectionalLightHelper(visible: boolean): void;
|
||||
/**** Anchor rotation related interface start ****/
|
||||
private setOrbitPoint;
|
||||
private onAnchorPointerDown;
|
||||
private setAnchorPosition;
|
||||
private createAnchor;
|
||||
private disposeAnchor;
|
||||
private onAnchorPointerUp;
|
||||
private disposeRotateToCursor;
|
||||
/******* Anchor rotation related interface end *********/
|
||||
/**
|
||||
* Enables or disable Composer
|
||||
* @internal
|
||||
*/
|
||||
enableComposer(enable: boolean): void;
|
||||
/**
|
||||
* Enables or disable RenderPass
|
||||
* @internal
|
||||
*/
|
||||
enableRenderPass(enable: boolean): void;
|
||||
/**
|
||||
* Enables or disable FxaaPass
|
||||
* @internal
|
||||
*/
|
||||
enableFxaaPass(enable: boolean): void;
|
||||
/**
|
||||
* Enables or disable SAOPass
|
||||
* @internal
|
||||
*/
|
||||
enableSaoPass(enable: boolean): void;
|
||||
/**
|
||||
* Enables or disable SSAOPass
|
||||
* @internal
|
||||
*/
|
||||
enableSsaoPass(enable: boolean): void;
|
||||
/**
|
||||
* Enables or disable OutlinePass
|
||||
* @internal
|
||||
*/
|
||||
enableOutlinePass(enable: boolean): void;
|
||||
/**
|
||||
* Enables or disable SSAARenderPass
|
||||
* @internal
|
||||
*/
|
||||
enableSsaaPass(enable: boolean): void;
|
||||
/**
|
||||
* Enables or disable BloomPass
|
||||
* @internal
|
||||
*/
|
||||
enableBloomPass(enable: boolean): void;
|
||||
/**
|
||||
* Enables or disable UnrealBloomPass
|
||||
* @internal
|
||||
*/
|
||||
enableUnrealBloomPass(enable: boolean): void;
|
||||
/**
|
||||
* Triggered when there is any operation, like pan, rotate, zoom, etc.
|
||||
* We'll do these at this time:
|
||||
* - Enable distance culling
|
||||
* - Hide object edge if there is
|
||||
* - Disable shadow
|
||||
*/
|
||||
protected onOperation: () => void;
|
||||
/**
|
||||
* @description Compatible with older versions, use SectionPlugin instead
|
||||
* @internal
|
||||
* @deprecated use SectionPlugin instead
|
||||
*/
|
||||
get sectionPlugin(): SectionPlugin | undefined;
|
||||
/**
|
||||
* Enable section.
|
||||
* Currently, it only implemented local(object) box section.
|
||||
* @deprecated use SectionPlugin instead
|
||||
*/
|
||||
activateSection(type?: SectionType): void;
|
||||
/**
|
||||
* Deactivates section
|
||||
* @deprecated use SectionPlugin instead
|
||||
*/
|
||||
deactivateSection(): void;
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated use SectionPlugin instead
|
||||
*/
|
||||
getActiveSection(): import("../../plugins/sections").BaseSection | undefined;
|
||||
/**
|
||||
* @description Compatible with older versions, use MeasurePlugin instead
|
||||
* @internal
|
||||
* @description use MeasurementPlugin instead
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
get measurePlugin(): MeasurementPlugin | undefined;
|
||||
/**
|
||||
* Gets measurement data
|
||||
* @internal
|
||||
*/
|
||||
getMeasurements(): MeasurementData[];
|
||||
/**
|
||||
* Activates one of "Distance", "Area" or "Angle" measurement
|
||||
* @param type "Distance", "Area" or "Angle"
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
activateMeasurement(type: MeasurementType): void;
|
||||
/**
|
||||
* Deactivates measurement
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
deactivateMeasurement(): void;
|
||||
/**
|
||||
* @internal
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
setMeasurementVisibility(id: string, visible: boolean): boolean;
|
||||
/**
|
||||
* Clears all measurement results
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
clearMeasurements(): void;
|
||||
/**
|
||||
* Zooms to selected box area.
|
||||
*/
|
||||
zoomToRect(): void;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
deactivateZoomRect(): void;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
enableWebCam(): void;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
disableWebCam(): void;
|
||||
/**
|
||||
* Sets environment for the scene.
|
||||
* @param hdrUrl Full path of picture url in hdr format
|
||||
*/
|
||||
setEnvironment(hdrUrl: string): void;
|
||||
/**
|
||||
* Sets environment for the scene.
|
||||
* @param data Uint16Array of the hdr content
|
||||
* @internal
|
||||
*/
|
||||
setEnvironmentFromDataArray(data?: Uint16Array): void;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
takeObjectsScreenshot(uniqueIds: string[]): Promise<unknown>;
|
||||
/**
|
||||
* Sets object to a specific color. Note that:
|
||||
* - The change is permanent, and cannot be recovered to the original color or material.
|
||||
* - If a material is shared, it may affect other objects.
|
||||
* @param color A color number in format of "0x000000"
|
||||
* @internal
|
||||
*/
|
||||
setObjectColor(object: THREE.Object3D, color: number): void;
|
||||
/**
|
||||
* Updates raycaster threshold to a proper value, so user can easily pick points and lines
|
||||
*/
|
||||
private updateRaycasterThreshold;
|
||||
/**
|
||||
* Merges leaf nodes of given object.
|
||||
* If objects' materials are the same, they can be merged.
|
||||
* TODO: change merge() and MergeUtils.deepMerge to async
|
||||
* @param object
|
||||
*/
|
||||
private merge;
|
||||
/**
|
||||
* Updates project settings
|
||||
* @internal
|
||||
*/
|
||||
updateProjectSettings(settings: SettingsType): void;
|
||||
/**
|
||||
* Compute bounding box of loaded models
|
||||
* @internal
|
||||
*/
|
||||
computeBoundingBox(): THREE.Box3;
|
||||
/**
|
||||
* Sets distance culling factor in order to improve performance.
|
||||
* 0 means distance culling is disabled.
|
||||
* 100 means a 1x1 squre mesh is visible within 100.
|
||||
* @internal
|
||||
*/
|
||||
setDistanceCullingFactor(val: number): void;
|
||||
/**
|
||||
* Gets distance culling factor.
|
||||
* @internal
|
||||
*/
|
||||
getDistanceCullingFactor(): number;
|
||||
/**
|
||||
* Gets camera position and direction.
|
||||
*/
|
||||
getCameraPositionAndDirection(): {
|
||||
position: Vector3;
|
||||
direction: Vector3;
|
||||
} | undefined;
|
||||
}
|
||||
9
demo/libs/types/core/viewers/Constants.d.ts
vendored
Normal file
9
demo/libs/types/core/viewers/Constants.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export declare enum ViewerName {
|
||||
BaseViewer = "BaseViewer",
|
||||
BimViewer = "BimViewer",
|
||||
DxfViewer = "DxfViewer",
|
||||
VRViewer = "VRViewer"
|
||||
}
|
||||
684
demo/libs/types/core/viewers/DxfViewer.d.ts
vendored
684
demo/libs/types/core/viewers/DxfViewer.d.ts
vendored
@ -1,17 +1,13 @@
|
||||
import * as THREE from "three";
|
||||
import { CSS2DRenderer } from "three/examples/jsm/renderers/CSS2DRenderer.js";
|
||||
import { BaseViewer } from "./BaseViewer";
|
||||
import { ViewerName } from "./Constants";
|
||||
import { DxfModelConfig, DxfViewerConfig } from "../../core/Configs";
|
||||
import { Box2, Vector2 } from "../../core/Constants";
|
||||
import { Drawable, DrawableData } from "../../core/canvas";
|
||||
import { DxfLayer } from "../../core/dxf";
|
||||
import { ILayoutObject } from "../../core/dxf-parser";
|
||||
import { FontManager } from "../../core/font";
|
||||
import { EventInfo } from "../../core/input/InputManager";
|
||||
import { MarkupManager, MarkupType } from "../../core/markup";
|
||||
import { Model2d, ModelData2d } from "../../core/model";
|
||||
import { BaseViewer, ViewerName } from "../../core/viewers/BaseViewer";
|
||||
import { MeasurementData, MeasurementType } from "../../plugins/measure";
|
||||
import type { MeasurementPlugin } from "../../plugins/measure";
|
||||
import { Model2d } from "../../core/model";
|
||||
/**
|
||||
* Markup for DxfViewer contains additional information, e.g. layoutName.
|
||||
*
|
||||
@ -146,110 +142,29 @@ export interface PdfData {
|
||||
* ```
|
||||
*/
|
||||
export declare class DxfViewer extends BaseViewer {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
name: ViewerName;
|
||||
private readonly CAMERA_Z_POSITION;
|
||||
private readonly CAMERA_MIN_ZOOM;
|
||||
private timer;
|
||||
protected css2dRenderer?: CSS2DRenderer;
|
||||
protected fontManager?: FontManager;
|
||||
protected enableSelection?: boolean;
|
||||
protected selectedObject?: THREE.Object3D | Drawable;
|
||||
/**
|
||||
* The record "key" is modelId or src.
|
||||
* @internal
|
||||
*/
|
||||
enableSelection: boolean;
|
||||
loadedModels: Model2d[];
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
masterModelId: string;
|
||||
private activeLayoutName;
|
||||
private dxfLayoutBar?;
|
||||
private loadingManager?;
|
||||
private raycaster?;
|
||||
private cameraUpdateInterval?;
|
||||
protected selected: boolean;
|
||||
private markupManager?;
|
||||
private zoomToRectHelper?;
|
||||
private raf?;
|
||||
private clock;
|
||||
protected renderEnabled: boolean;
|
||||
private timeoutSymbol?;
|
||||
private layoutInfos;
|
||||
private units;
|
||||
private enableHideVisuallySmallObjects;
|
||||
private sortedHidableObjects;
|
||||
private lastCameraZoom;
|
||||
private lastFrame;
|
||||
private activeLayoutName;
|
||||
private layoutInfos;
|
||||
private units;
|
||||
private raycastableObjects;
|
||||
private fpsUtils;
|
||||
groundPlane?: THREE.Mesh;
|
||||
raycastableObjects?: THREE.Object3D[];
|
||||
selectedObject?: THREE.Object3D | Drawable;
|
||||
private markupManager?;
|
||||
constructor(viewerCfg: DxfViewerConfig);
|
||||
/**
|
||||
* Initialize everything it needs
|
||||
* @internal
|
||||
*/
|
||||
protected init(): void;
|
||||
private initInputManager;
|
||||
private initThree;
|
||||
private initDom;
|
||||
private initScene;
|
||||
private initRenderer;
|
||||
protected initCSS2DRenderer(): void;
|
||||
private initCamera;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
protected initControls(): void;
|
||||
private onResize;
|
||||
protected onControlsChange(viewer: DxfViewer): () => void;
|
||||
/**
|
||||
* Initialize mouse/pointer events
|
||||
*/
|
||||
private initEvents;
|
||||
protected initOthers(): void;
|
||||
private initLoadingProgressBar;
|
||||
/**
|
||||
* Shows the layout bar
|
||||
* @internal
|
||||
*/
|
||||
showLayoutBar(): void;
|
||||
/**
|
||||
* Hides the layout bar
|
||||
* @internal
|
||||
*/
|
||||
hideLayoutBar(): void;
|
||||
protected animate(): void;
|
||||
/**
|
||||
* In order to have a better performance, it should only render when necessary.
|
||||
* Usually, we should enable render for these cases:
|
||||
* - Anything added to, removed from scene, or objects' position, scale, rotation, opacity, material, etc. changed
|
||||
* - Anything selected/unselected
|
||||
* - Camera changed
|
||||
* - Render area resized
|
||||
* @internal
|
||||
*/
|
||||
enableRender: (time?: number) => void;
|
||||
/**
|
||||
* Gets current FPS value
|
||||
* @internal
|
||||
*/
|
||||
getFps(): number;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
is3d(): boolean;
|
||||
/**
|
||||
* @description {en} Destroys DxfViewer.
|
||||
* @description {zh} 销毁 DxfViewer。
|
||||
* @example
|
||||
* ```typescript
|
||||
* viewer.destroy();
|
||||
* ```
|
||||
*/
|
||||
destroy(): void;
|
||||
get camera(): THREE.OrthographicCamera;
|
||||
private setupDefaultEvents;
|
||||
protected handleMouseClick(e: EventInfo): void;
|
||||
private setDefaultBackground;
|
||||
/**
|
||||
* Used to indicate how many dxf is loading
|
||||
*/
|
||||
@ -291,28 +206,42 @@ export declare class DxfViewer extends BaseViewer {
|
||||
* ```
|
||||
*/
|
||||
loadModelAsync(modelCfg: DxfModelConfig, onProgress?: (event: ProgressEvent) => void): Promise<void>;
|
||||
loadModel(modelCfg: DxfModelConfig, onProgress?: ((event: ProgressEvent<EventTarget>) => void) | undefined): Promise<void>;
|
||||
addModel(model: Model2d): void;
|
||||
private getDxfUnits;
|
||||
private handleOverlayDxf;
|
||||
setObjectHighlight(object: THREE.Object3D): void;
|
||||
setObjectUnHighlight(object: THREE.Object3D): void;
|
||||
clearHighlight(): void;
|
||||
clearSelection(): void;
|
||||
/**
|
||||
* Unloads a dxf
|
||||
* @internal
|
||||
* Creates a ground plane which is much bigger than bbox.
|
||||
*/
|
||||
unloadDxf(): void;
|
||||
private updateGroundPlane;
|
||||
getRaycastableObjects(): THREE.Object3D<THREE.Event>[];
|
||||
/**
|
||||
*
|
||||
* @param model
|
||||
* @returns
|
||||
* @description Add model data to viewer.
|
||||
* Gets the corresponding viewport by judging that the point is in the viewport
|
||||
*/
|
||||
addModel(modelData: ModelData2d): Model2d | undefined;
|
||||
private getViewportByPoint;
|
||||
pickPosition(mousePosition: {
|
||||
x: number;
|
||||
y: number;
|
||||
}): THREE.Vector3 | undefined;
|
||||
/**
|
||||
* Gets loaded entity count
|
||||
* @internal
|
||||
* @returns {number}
|
||||
* @description {en} Activates a layout.
|
||||
* @description {zh} 激活布局。
|
||||
* @param layoutName
|
||||
* - {en} The name of the layout to be activated.
|
||||
* - {zh} 要激活的布局名称。
|
||||
* @example
|
||||
* ```typescript
|
||||
* viewer.activateLayout('Layout1');
|
||||
* ```
|
||||
*/
|
||||
getEntitiesCount(): number;
|
||||
/**
|
||||
* Gets loaded dxf model id array
|
||||
*/
|
||||
protected getLoadedDxfModelIds(): string[];
|
||||
activateLayout(layoutName?: string): void;
|
||||
private getLayoutExtentEx;
|
||||
private getActiveLayoutInfo;
|
||||
private getLayoutByName;
|
||||
/**
|
||||
* @description {en} Gets layout names of the master model.
|
||||
* @description {zh} 获取主模型的布局名称。
|
||||
@ -327,140 +256,11 @@ export declare class DxfViewer extends BaseViewer {
|
||||
*/
|
||||
getLayoutNames(): string[];
|
||||
/**
|
||||
* Gets layouts.
|
||||
* Only returns master model's layouts.
|
||||
* Gets LayoutInfo by layoutName. It creats LayoutInfo if doesn't exist.
|
||||
*/
|
||||
protected getLayouts(): ILayoutObject[];
|
||||
private handleOverlayDxf;
|
||||
/**
|
||||
* @description {en} Activates a layout.
|
||||
* @description {zh} 激活布局。
|
||||
* @param layoutName
|
||||
* - {en} The name of the layout to be activated.
|
||||
* - {zh} 要激活的布局名称。
|
||||
* @example
|
||||
* ```typescript
|
||||
* viewer.activateLayout('Layout1');
|
||||
* ```
|
||||
*/
|
||||
activateLayout(layoutName: string): void;
|
||||
private cancelAllOperations;
|
||||
/**
|
||||
* @description {en} Gets active layout.
|
||||
* @description {zh} 获取当前布局。
|
||||
* @returns
|
||||
* - {en} Active layout name or undefined.
|
||||
* - {zh} 当前激活的布局名称或undefined。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* const activeLayout = viewer.getActiveLayoutName();
|
||||
* console.log(activeLayout);
|
||||
* ```
|
||||
*/
|
||||
getActiveLayoutName(): string | undefined;
|
||||
/**
|
||||
* @description {en} Gets dxf layers.
|
||||
* @description {zh} 获取dxf图层。
|
||||
* @returns
|
||||
* - {en} Dxf layers.
|
||||
* - {zh} dxf图层。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* const dxfLayers = viewer.getLayers();
|
||||
* for (let i = 0; i < dxfLayers.length; ++i) {
|
||||
* const layers = dxfLayers[i].layers;
|
||||
* const layerNames = Object.keys(layers).sort();
|
||||
* console.log(layerNames);
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
getLayers(): (DxfLayers | PdfLayers)[];
|
||||
/**
|
||||
* Sets model's (aka, a dxf file) visibility.
|
||||
* @throws Throws exception if modelId doesn't exist.
|
||||
* @internal
|
||||
*/
|
||||
setModelVisibility(modelId: string, visible: boolean): void;
|
||||
/**
|
||||
* @description {en} Sets layer's visibility.
|
||||
* @description {zh} 设置图层的可见性。
|
||||
* @param layerName
|
||||
* - {en} Layer's name to show or hide.
|
||||
* - {zh} 要显示或隐藏的图层名称。
|
||||
* @param visible
|
||||
* - {en} Layer's target visibility.
|
||||
* - {zh} 图层的目标可见性。
|
||||
* @param modelId
|
||||
* - {en} Useful when more than one model is loaded, if not specified, will use the master model.
|
||||
* - {zh} 当加载了多个模型时有用,如果未指定,将使用主模型。
|
||||
* @throws Error
|
||||
* - {en}: Throws exception if given modelId doesn't exist.
|
||||
* - {zh} 如果给定的modelId不存在,则抛出异常。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* // Hides layer "0"
|
||||
* viewer.setLayerVisibility("0", false);
|
||||
* ```
|
||||
*/
|
||||
setLayerVisibility(layerName: string, visible: boolean, modelId?: string): void;
|
||||
/**
|
||||
* Sets layer's opacity
|
||||
* @internal
|
||||
*/
|
||||
setLayerOpacity(layerName: string, opacity: number, modelId?: string): void;
|
||||
/**
|
||||
* Sets layer's color
|
||||
* @throws Throws exception if layer doesn't exist.
|
||||
* @internal
|
||||
*/
|
||||
setLayerColor(layerName: string, color: number, modelId?: string): void;
|
||||
/**
|
||||
* Resets a layer's color.
|
||||
* @internal
|
||||
*/
|
||||
resetLayerColor(layerName: string, modelId?: string): void;
|
||||
/**
|
||||
* @description {en} Sets font.
|
||||
* This needs to be called before loading a dxf, it won't affect any loaded text.
|
||||
* It accepts shx or typeface formats. For typeface, it only support passing in 1 font file in the array for now.
|
||||
* @description {zh} 设置字体。
|
||||
* 需要在加载dxf之前调用,不会影响已加载的文字。
|
||||
* 支持shx或typeface格式。对于typeface,目前只支持传入1个字体文件。
|
||||
* @param urls
|
||||
* - {en} font file urls.
|
||||
* - {zh} 字体文件链接。
|
||||
* @example
|
||||
* ```typescript
|
||||
* viewer.setFont(["https://example.com/xxx.shx"]);
|
||||
* ```
|
||||
*/
|
||||
setFont(urls: string[]): Promise<void>;
|
||||
getFont(): FontManager | undefined;
|
||||
/**
|
||||
* Sets loading manager.
|
||||
* @internal
|
||||
* This needs to be called before loading a dxf, used to load local external links.
|
||||
* @param manager
|
||||
*/
|
||||
setLoadingManager(manager: THREE.LoadingManager): void;
|
||||
/**
|
||||
* Sets display length units.
|
||||
* @internal Not implemented yet!
|
||||
* @default Millimeters
|
||||
*/
|
||||
setDisplayLengthUnits(): void;
|
||||
/**
|
||||
* Sets display area units
|
||||
* @internal Not implemented yet!
|
||||
* @default Meters
|
||||
*/
|
||||
setDisplayAreaUnits(): void;
|
||||
/**
|
||||
* Sets display decimal digits
|
||||
* @internal Not implemented yet!
|
||||
* @default 2
|
||||
*/
|
||||
setDisplayPrecision(): void;
|
||||
private getLayoutInfo;
|
||||
goToHomeView(): void;
|
||||
zoomToBBox(bbox: THREE.Box3): void;
|
||||
/**
|
||||
* @description {en} Gets current view extent.
|
||||
* This is useful for user to save this value as a viewpoint, and jump to this viewpoint next time.
|
||||
@ -474,127 +274,26 @@ export declare class DxfViewer extends BaseViewer {
|
||||
*/
|
||||
getCurrentViewExtent(): Box2;
|
||||
/**
|
||||
* @description Compatible with older versions, use MeasurePlugin instead
|
||||
* Gets hit result by Normalized Device Coordinates.
|
||||
* Lower left coordinate: (-1, -1)
|
||||
* Upper right coordinate: (1, 1)
|
||||
*/
|
||||
protected getHitResultByNdcCoordinate(coord: Vector2): Vector2 | undefined;
|
||||
/**
|
||||
* Gets mouse hit result in world coordinate
|
||||
* @example
|
||||
* ``` typescript
|
||||
* document.addEventListener("click", (event) => {
|
||||
* const result = viewer.getHitResult(event);
|
||||
* const loc = result?.location;
|
||||
* if (loc) {
|
||||
* console.log(`Clicked at x: ${loc[0]}, y: ${loc[1]}`);
|
||||
* }
|
||||
* });
|
||||
* ```
|
||||
* @internal
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
get measurePlugin(): MeasurementPlugin | undefined;
|
||||
/**
|
||||
* @description {en} Activates one of "Distance", "Area" or "Angle" measurement
|
||||
* @description {zh} 激活"距离", "面积" 或者 "角度"测量
|
||||
* @param type
|
||||
* - "Distance", "Area" or "Angle"
|
||||
* @example
|
||||
* ``` typescript
|
||||
* viewer.activateMeasurement(MeasurementType.Distance);
|
||||
* ```
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
activateMeasurement(type: MeasurementType): void;
|
||||
/**
|
||||
* @description {en} Deactivates measurement.
|
||||
* @description {zh} 退出测量。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* viewer.deactivateMeasurement();
|
||||
* ```
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
deactivateMeasurement(): void;
|
||||
/**
|
||||
* @description {en} Gets active measurement type.
|
||||
* @description {zh} 获取当前激活的测量类型。
|
||||
* @returns
|
||||
* - "Distance", "Area" or "Angle" or undefined
|
||||
* @example
|
||||
* ``` typescript
|
||||
* const measurementType = viewer.getActiveMeasurementType();
|
||||
* console.log(measurementType);
|
||||
* ```
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
getActiveMeasurementType(): MeasurementType | undefined;
|
||||
/**
|
||||
* @description {en} Gets all measurements.
|
||||
* @description {zh} 获取所有测量数据。
|
||||
* @returns
|
||||
* - {en} measurement data array.
|
||||
* - {zh} 测量数据数组。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* const measurementData = viewer.getMeasurements();
|
||||
* console.log(measurementData);
|
||||
* ```
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
getMeasurements(): MeasurementData[];
|
||||
/**
|
||||
* @description {en} Cancels current measurement. This won't deactivate measurement, rather, you can start a new measurement.
|
||||
* @description {zh} 取消当前的测量绘制。这并不会退出测量,用户可以开始一个新的测量。
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
cancelMeasurement(): void;
|
||||
/**
|
||||
* @description {en} Sets measurement data.
|
||||
* @description {zh} 设置测量数据。
|
||||
* @param measurementData
|
||||
* - {en} measurement data array.
|
||||
* - {zh} 测量数据数组。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* const measurementData = [{
|
||||
* type: "Distance",
|
||||
* id: "c6ea70a3-ddb0-4dd0-87c8-bd2491936428",
|
||||
* points: [[0, 1000], [5000, 1000]],
|
||||
* }];
|
||||
* viewer.setMeasurements(measurementData);
|
||||
* ```
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
setMeasurements(measurementData: MeasurementData[]): void;
|
||||
/**
|
||||
* Selects a measurement by id
|
||||
* @internal
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
selectMeasurement(id: string): void;
|
||||
/**
|
||||
* Unselects a measurement.
|
||||
* @internal
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
unselectMeasurement(): void;
|
||||
/**
|
||||
* @description {en} Removes a measurement by id.
|
||||
* @description {zh} 根据id删除测量数据。
|
||||
* @param id
|
||||
* - {en} Measurement data id.
|
||||
* - {zh} 测量数据id。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* const id = "c6ea70a3-ddb0-4dd0-87c8-bd2491936428";
|
||||
* viewer.removeMeasurement(id);
|
||||
* ```
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
removeMeasurement(id: string): void;
|
||||
/**
|
||||
* Sets a measurement's visibility.
|
||||
* Note that, the markup should belong to active layout. You shouldn't update a markup of an inactive layout.
|
||||
* @internal
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
setMeasurementVisibility(id: string, visible: boolean): boolean;
|
||||
/**
|
||||
* @description {en} Clears measurement results.
|
||||
* @description {zh} 清除测量结果。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* viewer.clearMeasurements();
|
||||
* ```
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
clearMeasurements(): void;
|
||||
getHitResult(event: MouseEvent | PointerEvent | EventInfo): Vector2 | undefined;
|
||||
/** markup start **/
|
||||
/**
|
||||
* @internal
|
||||
@ -760,222 +459,91 @@ export declare class DxfViewer extends BaseViewer {
|
||||
clearMarkups(): void;
|
||||
/** markup end **/
|
||||
/**
|
||||
* Gets mouse hit result in world coordinate
|
||||
* @description {en} Gets active layout.
|
||||
* @description {zh} 获取当前布局。
|
||||
* @returns
|
||||
* - {en} Active layout name or undefined.
|
||||
* - {zh} 当前激活的布局名称或undefined。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* document.addEventListener("click", (event) => {
|
||||
* const result = viewer.getHitResult(event);
|
||||
* const loc = result?.location;
|
||||
* if (loc) {
|
||||
* console.log(`Clicked at x: ${loc[0]}, y: ${loc[1]}`);
|
||||
* const activeLayout = viewer.getActiveLayoutName();
|
||||
* console.log(activeLayout);
|
||||
* ```
|
||||
*/
|
||||
getActiveLayoutName(): string | undefined;
|
||||
zoomIn(step?: number): void;
|
||||
zoomOut(step?: number): void;
|
||||
/**
|
||||
* @description {en} Gets dxf layers.
|
||||
* @description {zh} 获取dxf图层。
|
||||
* @returns
|
||||
* - {en} Dxf layers.
|
||||
* - {zh} dxf图层。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* const dxfLayers = viewer.getLayers();
|
||||
* for (let i = 0; i < dxfLayers.length; ++i) {
|
||||
* const layers = dxfLayers[i].layers;
|
||||
* const layerNames = Object.keys(layers).sort();
|
||||
* console.log(layerNames);
|
||||
* }
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
getLayers(): (DxfLayers | PdfLayers)[];
|
||||
/**
|
||||
* Sets model's (aka, a dxf file) visibility.
|
||||
* @throws Throws exception if modelId doesn't exist.
|
||||
* @internal
|
||||
*/
|
||||
getHitResult(event: MouseEvent | PointerEvent | EventInfo): Vector2 | undefined;
|
||||
setModelVisibility(modelId: string, visible: boolean): void;
|
||||
/**
|
||||
* Gets hit result by Normalized Device Coordinates.
|
||||
* Lower left coordinate: (-1, -1)
|
||||
* Upper right coordinate: (1, 1)
|
||||
*/
|
||||
protected getHitResultByNdcCoordinate(coord: Vector2): Vector2 | undefined;
|
||||
/**
|
||||
* @description {en} Asks user to select a box area, and zooms to it.
|
||||
* @description {zh} 询问用户选择一个框选区域,然后缩放到该区域。
|
||||
* @description {en} Sets layer's visibility.
|
||||
* @description {zh} 设置图层的可见性。
|
||||
* @param layerName
|
||||
* - {en} Layer's name to show or hide.
|
||||
* - {zh} 要显示或隐藏的图层名称。
|
||||
* @param visible
|
||||
* - {en} Layer's target visibility.
|
||||
* - {zh} 图层的目标可见性。
|
||||
* @param modelId
|
||||
* - {en} Useful when more than one model is loaded, if not specified, will use the master model.
|
||||
* - {zh} 当加载了多个模型时有用,如果未指定,将使用主模型。
|
||||
* @throws Error
|
||||
* - {en}: Throws exception if given modelId doesn't exist.
|
||||
* - {zh} 如果给定的modelId不存在,则抛出异常。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* viewer.zoomToRect();
|
||||
* // Hides layer "0"
|
||||
* viewer.setLayerVisibility("0", false);
|
||||
* ```
|
||||
*/
|
||||
zoomToRect(): void;
|
||||
setLayerVisibility(layerName: string, visible: boolean, modelId?: string): void;
|
||||
/**
|
||||
* Sets layer's opacity
|
||||
* @internal
|
||||
*/
|
||||
deactivateZoomRect(): void;
|
||||
private getLayoutByName;
|
||||
private getActiveLayoutInfo;
|
||||
private getMsTransformMatrix;
|
||||
private getLayoutExtentEx;
|
||||
/**
|
||||
* Shows objects for given layout, and hide any other layouts.
|
||||
*/
|
||||
private showLayoutObjects;
|
||||
private getLayoutViewports;
|
||||
private setMaterialUniforms;
|
||||
/**
|
||||
* Checks if a layer is frozen for viewport (VP Freeze)
|
||||
*/
|
||||
private isLayerFrozenForViewport;
|
||||
private getFilteredViewports;
|
||||
private generateObjectsByViewport;
|
||||
private findSpatialFilter;
|
||||
private getAnyMaterial;
|
||||
private addSpatialFilterSection;
|
||||
private getObjectsByBoundingBox;
|
||||
private getDxfUnits;
|
||||
private generateSectionsBySpatialFilter;
|
||||
/**
|
||||
* @description {en} resize viewer
|
||||
* @description {zh} 重置视图大小
|
||||
* @param {number} width
|
||||
* - {en} width of viewer
|
||||
* - {zh} 视图宽度。
|
||||
* @param {number} height
|
||||
* - {en} height of viewer
|
||||
* - {zh} 视图高度。
|
||||
* @example
|
||||
* ```typescript
|
||||
* const width = 800;
|
||||
* const height = 600;
|
||||
* viewer.resize(width, height);
|
||||
* ```
|
||||
*/
|
||||
protected resize(width: number, height: number): void;
|
||||
setLayerOpacity(layerName: string, opacity: number, modelId?: string): void;
|
||||
/**
|
||||
* Sets layer's color
|
||||
* @throws Throws exception if layer doesn't exist.
|
||||
* @internal
|
||||
*/
|
||||
getRaycaster(): THREE.Raycaster | undefined;
|
||||
setLayerColor(layerName: string, color: number, modelId?: string): void;
|
||||
/**
|
||||
* Gets the corresponding viewport by judging that the point is in the viewport
|
||||
*/
|
||||
private getViewportByPoint;
|
||||
/**
|
||||
* Gets raycast-able objects by mouseEvent.
|
||||
* Resets a layer's color.
|
||||
* @internal
|
||||
*/
|
||||
getRaycastableObjectsByMouse(event?: EventInfo): THREE.Object3D<THREE.Event>[];
|
||||
/**
|
||||
* Gets intersections by given mouse location.
|
||||
* If no MouseEvent is passed in, use (0, 0) as the raycaster's origin.
|
||||
*/
|
||||
private getIntersections;
|
||||
/**
|
||||
* Handles mouse click event
|
||||
*/
|
||||
private handleMouseClick;
|
||||
private selectDrawableByEvent;
|
||||
/**
|
||||
* Select or unselect an object.
|
||||
* depthTest is turned off by default. The highlighting is more pronounced when objects cover each other.
|
||||
*/
|
||||
protected selectObject(object?: THREE.Object3D, depthTest?: boolean): void;
|
||||
/**
|
||||
* Clears the current selection
|
||||
* @internal
|
||||
*/
|
||||
clearSelection(): void;
|
||||
/**
|
||||
* Makes camera fly to objects
|
||||
*/
|
||||
protected flyToObjects(objects: THREE.Object3D[]): void;
|
||||
/**
|
||||
* Make camera fly to an object
|
||||
*/
|
||||
protected flyToObject(object: THREE.Object3D): void;
|
||||
/**
|
||||
* Flies to current selected object if any
|
||||
*/
|
||||
protected flyToSelectedObject(): void;
|
||||
/**
|
||||
* Flies to a random object (by alt + r).
|
||||
* It is useful when either the data is wrong or there is bug in program,
|
||||
* then we cannot see anything in the scene!
|
||||
*/
|
||||
protected flyToRandomObject(): void;
|
||||
/**
|
||||
* Makes camera fly to target position with given lookAt position
|
||||
* @param position camera's target position
|
||||
* @param lookAt camera's new lookAt position
|
||||
* @param targetCameraZoom camera's target zoom value
|
||||
* @internal
|
||||
*/
|
||||
flyTo(position: THREE.Vector3, lookAt: THREE.Vector3, targetCameraZoom?: number, animate?: boolean): void;
|
||||
/**
|
||||
* Moves camera to target position
|
||||
* @param position 2d position
|
||||
* @internal
|
||||
*/
|
||||
goTo(position: Vector2, targetCameraZoom?: number, animate?: boolean): void;
|
||||
/**
|
||||
* @description {en} Moves camera to home view.
|
||||
* @description {zh} 移动相机到主视图.
|
||||
* @example
|
||||
* ``` typescript
|
||||
* viewer.goToHomeView();
|
||||
* ```
|
||||
*/
|
||||
goToHomeView(): void;
|
||||
/**
|
||||
* @description {en} Zooms to specific bounding box.
|
||||
* @description {zh} 缩放到指定的包围盒.
|
||||
* @param bbox
|
||||
* - {en} 2d bounding box
|
||||
* - {zh} 2d 包围盒。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* const box = { min: { x: 0, y: 0 }, max: { x: 10000, y: 10000} };
|
||||
* viewer.zoomToBBox(box);
|
||||
* ```
|
||||
*/
|
||||
zoomToBBox(bbox: Box2): void;
|
||||
/**
|
||||
* @description {en} Zooms to view extent.
|
||||
* @description {zh} 缩放到视图范围.
|
||||
* @example
|
||||
* ``` typescript
|
||||
* viewer.zoomToExtent();
|
||||
* ```
|
||||
*/
|
||||
zoomToExtent(): void;
|
||||
/**
|
||||
* @description {en} Sets background color.
|
||||
* @description {zh} 设置背景颜色。
|
||||
* @param r
|
||||
* - {en} Red channel value between 0 and 1.
|
||||
* - {zh} 红色通道值,介于 0 和 1 之间。
|
||||
* @param g
|
||||
* - {en} Green channel value between 0 and 1.
|
||||
* - {zh} 绿色通道值,介于 0 和 1 之间。
|
||||
* @param b
|
||||
* - {en} Blue channel value between 0 and 1.
|
||||
* -{zh} 蓝色通道值,介于 0 和 1 之间。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* // {en} Sets background to gray
|
||||
* // {zh} 设置背景为灰色
|
||||
* viewer.setBackgroundColor(0.5, 0.5, 0.5);
|
||||
* ```
|
||||
*/
|
||||
setBackgroundColor(r: number, g: number, b: number): void;
|
||||
/**
|
||||
* Gets LayoutInfo by layoutName. It creats LayoutInfo if doesn't exist.
|
||||
*/
|
||||
private getLayoutInfo;
|
||||
/**
|
||||
* Creates a ground plane which is much bigger than bbox.
|
||||
*/
|
||||
private updateGroundPlane;
|
||||
/**
|
||||
* Compute bounding box of loaded models for active layout
|
||||
* @internal
|
||||
*/
|
||||
computeBoundingBox(): THREE.Box3;
|
||||
/**
|
||||
* Checks if an expected zoom value is valid, and adjust its value if necessary.
|
||||
*/
|
||||
private checkAndGetLimitedCameraZoom;
|
||||
resetLayerColor(layerName: string, modelId?: string): void;
|
||||
private getVisiblePixelSize;
|
||||
private setLayoutHidableObjectArray;
|
||||
private statObjects;
|
||||
/**
|
||||
* Updates hidable objects' visibility once camera.zoom changed.
|
||||
*/
|
||||
private updateHidableObjectsVisibility;
|
||||
/**
|
||||
* Updates raycaster threshold to a proper value, so user can easily pick points and lines
|
||||
*/
|
||||
private updateRaycasterThreshold;
|
||||
/**
|
||||
* Updates hidable objects' visibility once camera.zoom changed.
|
||||
*/
|
||||
private updateHidableObjectsVisibility;
|
||||
/**
|
||||
* Updates camera zoom value for shader materials, which are created in DxfLoader
|
||||
*/
|
||||
|
||||
970
demo/libs/types/core/viewers/DxfViewer.temp.d.ts
vendored
Normal file
970
demo/libs/types/core/viewers/DxfViewer.temp.d.ts
vendored
Normal file
@ -0,0 +1,970 @@
|
||||
import * as THREE from "three";
|
||||
import { CSS2DRenderer } from "three/examples/jsm/renderers/CSS2DRenderer.js";
|
||||
import { DxfModelConfig, DxfViewerConfig } from "../../core/Configs";
|
||||
import { Box2, Vector2 } from "../../core/Constants";
|
||||
import { Drawable, DrawableData } from "../../core/canvas";
|
||||
import { DxfLayer } from "../../core/dxf";
|
||||
import { ILayoutObject } from "../../core/dxf-parser";
|
||||
import { FontManager } from "../../core/font";
|
||||
import { EventInfo } from "../../core/input/InputManager";
|
||||
import { MarkupManager, MarkupType } from "../../core/markup";
|
||||
import { Model2d, ModelData2d } from "../../core/model";
|
||||
import { BaseViewer } from "../../core/viewers/BaseViewer";
|
||||
import { MeasurementData, MeasurementType } from "../../plugins/measure";
|
||||
import type { MeasurementPlugin } from "../../plugins/measure";
|
||||
/**
|
||||
* Markup for DxfViewer contains additional information, e.g. layoutName.
|
||||
*
|
||||
* DxfViewer doesn't maintain the relationship between model and markup data,
|
||||
* business logic should knows which model a set of markup data belong to.
|
||||
*/
|
||||
export declare type MarkupData = DrawableData;
|
||||
export interface EntityData {
|
||||
modelId: string;
|
||||
layerName: string;
|
||||
}
|
||||
/**
|
||||
* A group of dxf/dwg layers for a drawing.
|
||||
*/
|
||||
export interface DxfLayers {
|
||||
modelId: string;
|
||||
layers: Record<string, DxfLayer>;
|
||||
}
|
||||
export interface PdfLayers {
|
||||
modelId: string;
|
||||
layers: Record<string, PdfLayer>;
|
||||
}
|
||||
export interface PdfLayer {
|
||||
name: string;
|
||||
id: string;
|
||||
index: string;
|
||||
visible: boolean;
|
||||
}
|
||||
export interface PdfData {
|
||||
threejsObject: THREE.Object3D;
|
||||
layers: Record<string, PdfLayer>;
|
||||
layersAndThreejsObjects?: Record<string, THREE.Object3D[]>;
|
||||
loadedEntityCount: number;
|
||||
}
|
||||
/**
|
||||
* Threejs objects are organized in tree view as below:
|
||||
*
|
||||
* - modelLevelObject1 (THREE.Group, name = <modelId>)
|
||||
* - layoutLevelObject1 (THREE.Group, name = <layout name>, used to control layout visibility)
|
||||
* - entityLevelObject1 (THREE.Point/Line/Mesh/Group)
|
||||
*
|
||||
* - Layer threejs objects
|
||||
* {
|
||||
* layerName:[threejsObject1,threejsObject2,threejsObject3,...] (THREE.Point/Line/Mesh)
|
||||
* }
|
||||
*/
|
||||
/**
|
||||
* "dwg" is short for "drawing", it is a file format saved by AutoCAD.
|
||||
* And "dxf" is data exchange format, which can be converted from a dwg file.
|
||||
* We cannot read dwg directly, and need to convert it to dxf first via ODA.
|
||||
*
|
||||
* Supported dxf version: AutoCAD 2018. Both binary and ascii are supported.
|
||||
*
|
||||
* Json Encoding: UTF-8 encoding without BOM
|
||||
*
|
||||
* Coordinate system: right-handed, y-up
|
||||
*
|
||||
* About units:
|
||||
* - The unit of distance follows the master dxf file's unit
|
||||
* - The unit of area follows the master dxf file's unit
|
||||
* - The unit of angle is "degree", counterclockwise
|
||||
* - The unit of time is "second"
|
||||
*
|
||||
* Color: use rgb/rgba, values between 0-1
|
||||
*
|
||||
* About Measurement in DxfViewer:
|
||||
* - A measurement is generated by DxfViewer.
|
||||
* - Measurements data should be stored by users, so users can restore measurements data into DxfViewer later.
|
||||
* - DxfViewer manages measurements data, it can be created, removed, hidden, etc.
|
||||
* - DxfViewer doesn't maintain the relationship between measurement and layout.
|
||||
*
|
||||
* About Markup in DxfViewer:
|
||||
* Markup is pretty similar to measurement.
|
||||
*
|
||||
* About Hotpoint in DxfViewer:
|
||||
* - A hotpoint is created and stored by user.
|
||||
* - A hotpoint can be added to, and removed from DxfViewer.
|
||||
* - Caller should set a hotpointId that is unique in the session of current DxfViewer.
|
||||
* - DxfViewer doesn't hide a hotpoint, user is able to do it.
|
||||
* - DxfViewer doesn't maintain the relationship between hotpoint and layout.
|
||||
*
|
||||
* About layouts
|
||||
* - Each layout has its own home view.
|
||||
* - When switching to another layout, it clears all measurements, markups and hotpoints.
|
||||
* - When switching to another layout, it deactivates any in-progress operation like measurement, markup, etc.
|
||||
*
|
||||
* About overlay
|
||||
* - It supports to add as many models as user want, as long as the browser has sufficient memory, cpu/gpu, etc.
|
||||
* - The first model is called "master" model, others are called "overlay" models.
|
||||
* - It ignores an overlay model's paper space.
|
||||
* - An overlay model's unit should be converted to master model's unit if they are not the same.
|
||||
* - We'll append modelId as prefix for getLayers()
|
||||
*
|
||||
* About comparision
|
||||
* - It compares just "Model" spaces.
|
||||
* - It compares entities with the same handles and types.
|
||||
* - It compares entities' geometries, positions, scales, etc.
|
||||
* - It ignores a layer's visibility, freeze settings.
|
||||
* - It ignores an entity's properties, like linetype, line width, fill pattern, font, color, etc.
|
||||
* - It ignores spatial filters (xclip) of block references.
|
||||
* - It ignores layer relative operations, like moving an entity to another layer, changing a layer color, etc.
|
||||
* - By default, an "Added" entity is rendered in green, a "Removed" entity is in red, a "Modified" entity is composed by two parts, one "Removed" and another "Added".
|
||||
*
|
||||
* About undo/redo
|
||||
* - It supports undo/redo for measurement and markup operations. E.g., creating/deleting/moving a markup.
|
||||
* - Setting/removing a batch of measurements or markups will be taken as one operation.
|
||||
* - Switching to another layout clears all undo/redo history.
|
||||
*
|
||||
* About OSnap
|
||||
* - It supports snapping to the end points and middle point of a line.
|
||||
* - It supports snapping to the intersection point of two lines.
|
||||
* - It supports snapping to the foot of perpendicular against a line.
|
||||
* - It supports snapping to any point along a line.
|
||||
*
|
||||
* @example
|
||||
* ``` typescript
|
||||
* const viewerCfg = {
|
||||
* containerId: "myCanvas",
|
||||
* enableSpinner: true,
|
||||
* enableLayoutBar: true,
|
||||
* };
|
||||
* const modelCfg = {
|
||||
* modelId: "id_0",
|
||||
* name: "sample",
|
||||
* src: "http://www.abc.com/sample.dxf",
|
||||
* }
|
||||
* const fontFiles = ["http://www.abc.com/hztxt.shx", "http://www.abc.com/simplex.shx"];
|
||||
*
|
||||
* const viewer = new DxfViewer(viewerCfg);
|
||||
* await viewer.setFont(fontFiles);
|
||||
* await viewer.loadModelAsync(modelCfg);
|
||||
* ```
|
||||
*/
|
||||
export declare class DxfViewer extends BaseViewer {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
name: any;
|
||||
private readonly CAMERA_Z_POSITION;
|
||||
private readonly CAMERA_MIN_ZOOM;
|
||||
private timer;
|
||||
protected css2dRenderer?: CSS2DRenderer;
|
||||
protected fontManager?: FontManager;
|
||||
protected enableSelection?: boolean;
|
||||
protected selectedObject?: THREE.Object3D | Drawable;
|
||||
/**
|
||||
* The record "key" is modelId or src.
|
||||
* @internal
|
||||
*/
|
||||
loadedModels: Model2d[];
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
masterModelId: string;
|
||||
private dxfLayoutBar?;
|
||||
private loadingManager?;
|
||||
private raycaster?;
|
||||
private cameraUpdateInterval?;
|
||||
protected selected: boolean;
|
||||
private markupManager?;
|
||||
private zoomToRectHelper?;
|
||||
private raf?;
|
||||
private clock;
|
||||
protected renderEnabled: boolean;
|
||||
private timeoutSymbol?;
|
||||
private enableHideVisuallySmallObjects;
|
||||
private sortedHidableObjects;
|
||||
private lastCameraZoom;
|
||||
private lastFrame;
|
||||
private activeLayoutName;
|
||||
private layoutInfos;
|
||||
private units;
|
||||
private raycastableObjects;
|
||||
private fpsUtils;
|
||||
constructor(viewerCfg: DxfViewerConfig);
|
||||
/**
|
||||
* Initialize everything it needs
|
||||
* @internal
|
||||
*/
|
||||
protected init(): void;
|
||||
private initInputManager;
|
||||
private initThree;
|
||||
private initDom;
|
||||
private initScene;
|
||||
private initRenderer;
|
||||
protected initCSS2DRenderer(): void;
|
||||
private initCamera;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
protected initControls(): void;
|
||||
private onResize;
|
||||
protected onControlsChange(viewer: DxfViewer): () => void;
|
||||
/**
|
||||
* Initialize mouse/pointer events
|
||||
*/
|
||||
private initEvents;
|
||||
protected initOthers(): void;
|
||||
private initLoadingProgressBar;
|
||||
/**
|
||||
* Shows the layout bar
|
||||
* @internal
|
||||
*/
|
||||
showLayoutBar(): void;
|
||||
/**
|
||||
* Hides the layout bar
|
||||
* @internal
|
||||
*/
|
||||
hideLayoutBar(): void;
|
||||
protected animate(): void;
|
||||
/**
|
||||
* In order to have a better performance, it should only render when necessary.
|
||||
* Usually, we should enable render for these cases:
|
||||
* - Anything added to, removed from scene, or objects' position, scale, rotation, opacity, material, etc. changed
|
||||
* - Anything selected/unselected
|
||||
* - Camera changed
|
||||
* - Render area resized
|
||||
* @internal
|
||||
*/
|
||||
enableRender: (time?: number) => void;
|
||||
/**
|
||||
* Gets current FPS value
|
||||
* @internal
|
||||
*/
|
||||
getFps(): number;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
is3d(): boolean;
|
||||
/**
|
||||
* @description {en} Destroys DxfViewer.
|
||||
* @description {zh} 销毁 DxfViewer。
|
||||
* @example
|
||||
* ```typescript
|
||||
* viewer.destroy();
|
||||
* ```
|
||||
*/
|
||||
destroy(): void;
|
||||
/**
|
||||
* Used to indicate how many dxf is loading
|
||||
*/
|
||||
private loadingDxfCount;
|
||||
/**
|
||||
* @description {en} Loads a dxf file.
|
||||
* The first loaded file will be taken as a "master" model.
|
||||
* Any other files are non-master, we call "overlay" model.
|
||||
* We'll load everything of a master model, including model and paper space.
|
||||
* For an overlay model, we'll only load its model space. And its model space can only
|
||||
* overly to master model's model space.
|
||||
* @description {zh} 加载 dxf 文件。
|
||||
* 第一个加载的文件将被视为“主”模型。
|
||||
* 任何其他文件都是非主文件,我们称之为“叠加”模型。
|
||||
* 我们将加载主模型的所有内容,包括模型和图纸空间。
|
||||
* 对于叠加模型,我们只会加载其模型空间。并且它的模型空间只能叠加到主模型的模型空间上。
|
||||
* @param modelCfg
|
||||
* - {en} The configuration of the model to be loaded.
|
||||
* - {zh} 要加载的模型的配置。
|
||||
* @param onProgress
|
||||
* - {en} A callback function to indicate the loading progress.
|
||||
* - {zh} 用于指示加载进度的回调函数。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* const viewerCfg = {
|
||||
* containerId: "myCanvas",
|
||||
* };
|
||||
* const modelCfg = {
|
||||
* modelId: "id_0",
|
||||
* name: "dxf 0",
|
||||
* src: "http://www.abc.com/sample.dxf",
|
||||
* }
|
||||
* const viewer = new DxfViewer(viewerCfg);
|
||||
* await viewer.loadModelAsync(modelCfg, (event) => {
|
||||
* const progress = (event.loaded * 100) / event.total;
|
||||
* console.log(`Loading progress: ${progress}%`);
|
||||
* });
|
||||
* console.log("Loaded");
|
||||
* ```
|
||||
*/
|
||||
loadModelAsync(modelCfg: DxfModelConfig, onProgress?: (event: ProgressEvent) => void): Promise<void>;
|
||||
/**
|
||||
* Unloads a dxf
|
||||
* @internal
|
||||
*/
|
||||
unloadDxf(): void;
|
||||
/**
|
||||
*
|
||||
* @param model
|
||||
* @returns
|
||||
* @description Add model data to viewer.
|
||||
*/
|
||||
addModel(modelData: ModelData2d): Model2d | undefined;
|
||||
/**
|
||||
* Gets loaded entity count
|
||||
* @internal
|
||||
* @returns {number}
|
||||
*/
|
||||
getEntitiesCount(): number;
|
||||
/**
|
||||
* Gets loaded dxf model id array
|
||||
*/
|
||||
protected getLoadedDxfModelIds(): string[];
|
||||
/**
|
||||
* @description {en} Gets layout names of the master model.
|
||||
* @description {zh} 获取主模型的布局名称。
|
||||
* @returns
|
||||
* - {en} Layout names of the master model.
|
||||
* - {zh} 主模型的布局名称。
|
||||
* @example
|
||||
* ```typescript
|
||||
* const layoutNames = dxfViewer.getLayoutNames();
|
||||
* console.log(layoutNames); // ['Model', 'Layout1', 'Layout2']
|
||||
* ```
|
||||
*/
|
||||
getLayoutNames(): string[];
|
||||
/**
|
||||
* Gets layouts.
|
||||
* Only returns master model's layouts.
|
||||
*/
|
||||
protected getLayouts(): ILayoutObject[];
|
||||
private handleOverlayDxf;
|
||||
/**
|
||||
* @description {en} Activates a layout.
|
||||
* @description {zh} 激活布局。
|
||||
* @param layoutName
|
||||
* - {en} The name of the layout to be activated.
|
||||
* - {zh} 要激活的布局名称。
|
||||
* @example
|
||||
* ```typescript
|
||||
* viewer.activateLayout('Layout1');
|
||||
* ```
|
||||
*/
|
||||
activateLayout(layoutName: string): void;
|
||||
private cancelAllOperations;
|
||||
/**
|
||||
* @description {en} Gets active layout.
|
||||
* @description {zh} 获取当前布局。
|
||||
* @returns
|
||||
* - {en} Active layout name or undefined.
|
||||
* - {zh} 当前激活的布局名称或undefined。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* const activeLayout = viewer.getActiveLayoutName();
|
||||
* console.log(activeLayout);
|
||||
* ```
|
||||
*/
|
||||
getActiveLayoutName(): string | undefined;
|
||||
/**
|
||||
* @description {en} Gets dxf layers.
|
||||
* @description {zh} 获取dxf图层。
|
||||
* @returns
|
||||
* - {en} Dxf layers.
|
||||
* - {zh} dxf图层。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* const dxfLayers = viewer.getLayers();
|
||||
* for (let i = 0; i < dxfLayers.length; ++i) {
|
||||
* const layers = dxfLayers[i].layers;
|
||||
* const layerNames = Object.keys(layers).sort();
|
||||
* console.log(layerNames);
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
getLayers(): (DxfLayers | PdfLayers)[];
|
||||
/**
|
||||
* Sets model's (aka, a dxf file) visibility.
|
||||
* @throws Throws exception if modelId doesn't exist.
|
||||
* @internal
|
||||
*/
|
||||
setModelVisibility(modelId: string, visible: boolean): void;
|
||||
/**
|
||||
* @description {en} Sets layer's visibility.
|
||||
* @description {zh} 设置图层的可见性。
|
||||
* @param layerName
|
||||
* - {en} Layer's name to show or hide.
|
||||
* - {zh} 要显示或隐藏的图层名称。
|
||||
* @param visible
|
||||
* - {en} Layer's target visibility.
|
||||
* - {zh} 图层的目标可见性。
|
||||
* @param modelId
|
||||
* - {en} Useful when more than one model is loaded, if not specified, will use the master model.
|
||||
* - {zh} 当加载了多个模型时有用,如果未指定,将使用主模型。
|
||||
* @throws Error
|
||||
* - {en}: Throws exception if given modelId doesn't exist.
|
||||
* - {zh} 如果给定的modelId不存在,则抛出异常。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* // Hides layer "0"
|
||||
* viewer.setLayerVisibility("0", false);
|
||||
* ```
|
||||
*/
|
||||
setLayerVisibility(layerName: string, visible: boolean, modelId?: string): void;
|
||||
/**
|
||||
* Sets layer's opacity
|
||||
* @internal
|
||||
*/
|
||||
setLayerOpacity(layerName: string, opacity: number, modelId?: string): void;
|
||||
/**
|
||||
* Sets layer's color
|
||||
* @throws Throws exception if layer doesn't exist.
|
||||
* @internal
|
||||
*/
|
||||
setLayerColor(layerName: string, color: number, modelId?: string): void;
|
||||
/**
|
||||
* Resets a layer's color.
|
||||
* @internal
|
||||
*/
|
||||
resetLayerColor(layerName: string, modelId?: string): void;
|
||||
/**
|
||||
* @description {en} Sets font.
|
||||
* This needs to be called before loading a dxf, it won't affect any loaded text.
|
||||
* It accepts shx or typeface formats. For typeface, it only support passing in 1 font file in the array for now.
|
||||
* @description {zh} 设置字体。
|
||||
* 需要在加载dxf之前调用,不会影响已加载的文字。
|
||||
* 支持shx或typeface格式。对于typeface,目前只支持传入1个字体文件。
|
||||
* @param urls
|
||||
* - {en} font file urls.
|
||||
* - {zh} 字体文件链接。
|
||||
* @example
|
||||
* ```typescript
|
||||
* viewer.setFont(["https://example.com/xxx.shx"]);
|
||||
* ```
|
||||
*/
|
||||
setFont(urls: string[]): Promise<void>;
|
||||
getFont(): FontManager | undefined;
|
||||
/**
|
||||
* Sets loading manager.
|
||||
* @internal
|
||||
* This needs to be called before loading a dxf, used to load local external links.
|
||||
* @param manager
|
||||
*/
|
||||
setLoadingManager(manager: THREE.LoadingManager): void;
|
||||
/**
|
||||
* Sets display length units.
|
||||
* @internal Not implemented yet!
|
||||
* @default Millimeters
|
||||
*/
|
||||
setDisplayLengthUnits(): void;
|
||||
/**
|
||||
* Sets display area units
|
||||
* @internal Not implemented yet!
|
||||
* @default Meters
|
||||
*/
|
||||
setDisplayAreaUnits(): void;
|
||||
/**
|
||||
* Sets display decimal digits
|
||||
* @internal Not implemented yet!
|
||||
* @default 2
|
||||
*/
|
||||
setDisplayPrecision(): void;
|
||||
/**
|
||||
* @description {en} Gets current view extent.
|
||||
* This is useful for user to save this value as a viewpoint, and jump to this viewpoint next time.
|
||||
* @description {zh} 获取当前视图范围。
|
||||
* 用户可使用该接口获取当前视口范围,并在适当的场景下跳转到该视口范围。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* const box = viewer.getCurrentViewExtent();
|
||||
* console.log("Current view extent:", box);
|
||||
* ```
|
||||
*/
|
||||
getCurrentViewExtent(): Box2;
|
||||
/**
|
||||
* @description Compatible with older versions, use MeasurePlugin instead
|
||||
* @internal
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
get measurePlugin(): MeasurementPlugin | undefined;
|
||||
/**
|
||||
* @description {en} Activates one of "Distance", "Area" or "Angle" measurement
|
||||
* @description {zh} 激活"距离", "面积" 或者 "角度"测量
|
||||
* @param type
|
||||
* - "Distance", "Area" or "Angle"
|
||||
* @example
|
||||
* ``` typescript
|
||||
* viewer.activateMeasurement(MeasurementType.Distance);
|
||||
* ```
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
activateMeasurement(type: MeasurementType): void;
|
||||
/**
|
||||
* @description {en} Deactivates measurement.
|
||||
* @description {zh} 退出测量。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* viewer.deactivateMeasurement();
|
||||
* ```
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
deactivateMeasurement(): void;
|
||||
/**
|
||||
* @description {en} Gets active measurement type.
|
||||
* @description {zh} 获取当前激活的测量类型。
|
||||
* @returns
|
||||
* - "Distance", "Area" or "Angle" or undefined
|
||||
* @example
|
||||
* ``` typescript
|
||||
* const measurementType = viewer.getActiveMeasurementType();
|
||||
* console.log(measurementType);
|
||||
* ```
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
getActiveMeasurementType(): MeasurementType | undefined;
|
||||
/**
|
||||
* @description {en} Gets all measurements.
|
||||
* @description {zh} 获取所有测量数据。
|
||||
* @returns
|
||||
* - {en} measurement data array.
|
||||
* - {zh} 测量数据数组。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* const measurementData = viewer.getMeasurements();
|
||||
* console.log(measurementData);
|
||||
* ```
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
getMeasurements(): MeasurementData[];
|
||||
/**
|
||||
* @description {en} Cancels current measurement. This won't deactivate measurement, rather, you can start a new measurement.
|
||||
* @description {zh} 取消当前的测量绘制。这并不会退出测量,用户可以开始一个新的测量。
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
cancelMeasurement(): void;
|
||||
/**
|
||||
* @description {en} Sets measurement data.
|
||||
* @description {zh} 设置测量数据。
|
||||
* @param measurementData
|
||||
* - {en} measurement data array.
|
||||
* - {zh} 测量数据数组。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* const measurementData = [{
|
||||
* type: "Distance",
|
||||
* id: "c6ea70a3-ddb0-4dd0-87c8-bd2491936428",
|
||||
* points: [[0, 1000], [5000, 1000]],
|
||||
* }];
|
||||
* viewer.setMeasurements(measurementData);
|
||||
* ```
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
setMeasurements(measurementData: MeasurementData[]): void;
|
||||
/**
|
||||
* Selects a measurement by id
|
||||
* @internal
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
selectMeasurement(id: string): void;
|
||||
/**
|
||||
* Unselects a measurement.
|
||||
* @internal
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
unselectMeasurement(): void;
|
||||
/**
|
||||
* @description {en} Removes a measurement by id.
|
||||
* @description {zh} 根据id删除测量数据。
|
||||
* @param id
|
||||
* - {en} Measurement data id.
|
||||
* - {zh} 测量数据id。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* const id = "c6ea70a3-ddb0-4dd0-87c8-bd2491936428";
|
||||
* viewer.removeMeasurement(id);
|
||||
* ```
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
removeMeasurement(id: string): void;
|
||||
/**
|
||||
* Sets a measurement's visibility.
|
||||
* Note that, the markup should belong to active layout. You shouldn't update a markup of an inactive layout.
|
||||
* @internal
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
setMeasurementVisibility(id: string, visible: boolean): boolean;
|
||||
/**
|
||||
* @description {en} Clears measurement results.
|
||||
* @description {zh} 清除测量结果。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* viewer.clearMeasurements();
|
||||
* ```
|
||||
* @deprecated use MeasurePlugin instead
|
||||
*/
|
||||
clearMeasurements(): void;
|
||||
/** markup start **/
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
getMarkupManager(): MarkupManager | undefined;
|
||||
/**
|
||||
* @description {en} Activates markup feature.
|
||||
* @description {zh} 激活标注功能。
|
||||
* @param type
|
||||
* - {en} markup type.
|
||||
* - {zh} 标注类型。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* const markupType = MarkupType.Arrow;
|
||||
* viewer.activateMarkup(markupType);
|
||||
* ```
|
||||
* @deprecated
|
||||
*/
|
||||
activateMarkup(type: MarkupType): void;
|
||||
/**
|
||||
* @description {en} Deactivates markup feature.
|
||||
* @description {zh} 退出标注功能。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* viewer.deactivateMarkup();
|
||||
* ```
|
||||
*/
|
||||
deactivateMarkup(): void;
|
||||
/**
|
||||
* @description {en} Gets active markup type.
|
||||
* @description {zh} 获取激活的标注类型。
|
||||
* @returns
|
||||
* - {en} markup type.
|
||||
* - {zh} 标注类型。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* const markupType = viewer.getActiveMarkupType();
|
||||
* console.log(markupType);
|
||||
* ```
|
||||
*/
|
||||
getActiveMarkupType(): MarkupType | undefined;
|
||||
/**
|
||||
* Set markup stroke color
|
||||
* @internal
|
||||
*/
|
||||
setMarkupLineColor(r: number, g: number, b: number, a: number): void;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
getMarkupLineColor(): number[] | undefined;
|
||||
/**
|
||||
* Set markup fill color
|
||||
* @internal
|
||||
*/
|
||||
setMarkupFillColor(r: number, g: number, b: number, a: number): void;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
getMarkupFillColor(): number[] | undefined;
|
||||
/**
|
||||
* Set markup stroke line width
|
||||
* @internal
|
||||
*/
|
||||
setMarkupLineWidth(lineWidth: number): void;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
getMarkupLineWidth(): number | undefined;
|
||||
/**
|
||||
* Set markup font size
|
||||
* @internal
|
||||
*/
|
||||
setMarkupFontSize(fontSize: number): void;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
getMarkupFontSize(): number | undefined;
|
||||
/**
|
||||
* @description {en} Gets all markups.
|
||||
* @description {zh} 获取所有标注数据。
|
||||
* @returns
|
||||
* - {en} markup data array.
|
||||
* - {zh} 标注数据数组。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* const markupData = viewer.getMarkups();
|
||||
* console.log(markupData);
|
||||
* ```
|
||||
*/
|
||||
getMarkups(): MarkupData[];
|
||||
/**
|
||||
* @description {en} Adds markups to active layout.
|
||||
* @description {zh} 添加标注到当前布局。
|
||||
* @param markupDataArray
|
||||
* - {en} markup data array.
|
||||
* - {zh} 标注数据数组。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* const markupData = [{
|
||||
* type: "ArrowMarkup",
|
||||
* id: "c6ea70a3-ddb0-4dd0-87c8-bd2491936428",
|
||||
* lineWidth: 2,
|
||||
* strokeStyle: "#ff0000",
|
||||
* fillStyle: "#ff000030",
|
||||
* points: [[0, 0], [1000, 1000]],
|
||||
* }];
|
||||
* viewer.setMarkups(markupData);
|
||||
* ```
|
||||
*/
|
||||
setMarkups(markupDataArray: MarkupData[]): void;
|
||||
/**
|
||||
* Sets a markup's visibility by id.
|
||||
* Note that, the markup should belong to active layout. You shouldn't update a markup of an inactive layout.
|
||||
* @internal
|
||||
*/
|
||||
setMarkupVisibility(id: string, visible: boolean): boolean;
|
||||
/**
|
||||
* @description {en} Updates a markup.
|
||||
* @description {zh} 更新标注。
|
||||
* @param {MarkupData} markup
|
||||
* - {en} markup data.
|
||||
* - {zh} 标注数据。
|
||||
* @returns
|
||||
* - {en} Whether update successfully, true means success, false means failure.
|
||||
* - {zh} 是否更新成功,true表示成功,false表示失败。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* const markupData = {
|
||||
* type: "ArrowMarkup",
|
||||
* id: "c6ea70a3-ddb0-4dd0-87c8-bd2491936428",
|
||||
* lineWidth: 3,
|
||||
* strokeStyle: "#ff0000",
|
||||
* fillStyle: "#ff000030",
|
||||
* points: [[0, 0], [1000, 1000]],
|
||||
* };
|
||||
* viewer.updateMarkup(markupData);
|
||||
*/
|
||||
updateMarkup(markup: MarkupData): boolean;
|
||||
/**
|
||||
* @description {en} Removes a markup by markup id.
|
||||
* @description {zh} 根据标注id删除标注。
|
||||
* @param {string} id
|
||||
* - {en} markup id.
|
||||
* - {zh} 标注id。
|
||||
* @returns
|
||||
* - {en} Whether remove successfully, true means success, false means failure.
|
||||
* - {zh} 是否删除成功,true表示成功,false表示失败。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* const markupId = "c6ea70a3-ddb0-4dd0-87c8-bd2491936428";
|
||||
* viewer.removeMarkup(markupId);
|
||||
* ```
|
||||
*/
|
||||
removeMarkup(id: string): boolean;
|
||||
/**
|
||||
* @description {en} Clears markups.
|
||||
* @description {zh} 清除所有标注。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* viewer.clearMarkups();
|
||||
* ```
|
||||
*/
|
||||
clearMarkups(): void;
|
||||
/** markup end **/
|
||||
/**
|
||||
* Gets mouse hit result in world coordinate
|
||||
* @example
|
||||
* ``` typescript
|
||||
* document.addEventListener("click", (event) => {
|
||||
* const result = viewer.getHitResult(event);
|
||||
* const loc = result?.location;
|
||||
* if (loc) {
|
||||
* console.log(`Clicked at x: ${loc[0]}, y: ${loc[1]}`);
|
||||
* }
|
||||
* });
|
||||
* ```
|
||||
* @internal
|
||||
*/
|
||||
getHitResult(event: MouseEvent | PointerEvent | EventInfo): Vector2 | undefined;
|
||||
/**
|
||||
* Gets hit result by Normalized Device Coordinates.
|
||||
* Lower left coordinate: (-1, -1)
|
||||
* Upper right coordinate: (1, 1)
|
||||
*/
|
||||
protected getHitResultByNdcCoordinate(coord: Vector2): Vector2 | undefined;
|
||||
private getLayoutByName;
|
||||
private getActiveLayoutInfo;
|
||||
private getMsTransformMatrix;
|
||||
private getLayoutExtentEx;
|
||||
/**
|
||||
* Shows objects for given layout, and hide any other layouts.
|
||||
*/
|
||||
private showLayoutObjects;
|
||||
private getLayoutViewports;
|
||||
private setMaterialUniforms;
|
||||
/**
|
||||
* Checks if a layer is frozen for viewport (VP Freeze)
|
||||
*/
|
||||
private isLayerFrozenForViewport;
|
||||
private getFilteredViewports;
|
||||
private generateObjectsByViewport;
|
||||
private findSpatialFilter;
|
||||
private getAnyMaterial;
|
||||
private addSpatialFilterSection;
|
||||
private getObjectsByBoundingBox;
|
||||
private getDxfUnits;
|
||||
private generateSectionsBySpatialFilter;
|
||||
/**
|
||||
* @description {en} resize viewer
|
||||
* @description {zh} 重置视图大小
|
||||
* @param {number} width
|
||||
* - {en} width of viewer
|
||||
* - {zh} 视图宽度。
|
||||
* @param {number} height
|
||||
* - {en} height of viewer
|
||||
* - {zh} 视图高度。
|
||||
* @example
|
||||
* ```typescript
|
||||
* const width = 800;
|
||||
* const height = 600;
|
||||
* viewer.resize(width, height);
|
||||
* ```
|
||||
*/
|
||||
protected resize(width: number, height: number): void;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
getRaycaster(): THREE.Raycaster | undefined;
|
||||
/**
|
||||
* Gets the corresponding viewport by judging that the point is in the viewport
|
||||
*/
|
||||
private getViewportByPoint;
|
||||
/**
|
||||
* Gets raycast-able objects by mouseEvent.
|
||||
* @internal
|
||||
*/
|
||||
getRaycastableObjectsByMouse(event?: EventInfo): THREE.Object3D<THREE.Event>[];
|
||||
/**
|
||||
* Gets intersections by given mouse location.
|
||||
* If no MouseEvent is passed in, use (0, 0) as the raycaster's origin.
|
||||
*/
|
||||
private getIntersections;
|
||||
/**
|
||||
* Handles mouse click event
|
||||
*/
|
||||
private handleMouseClick;
|
||||
private selectDrawableByEvent;
|
||||
/**
|
||||
* Select or unselect an object.
|
||||
* depthTest is turned off by default. The highlighting is more pronounced when objects cover each other.
|
||||
*/
|
||||
protected selectObject(object?: THREE.Object3D, depthTest?: boolean): void;
|
||||
/**
|
||||
* Clears the current selection
|
||||
* @internal
|
||||
*/
|
||||
clearSelection(): void;
|
||||
/**
|
||||
* Makes camera fly to objects
|
||||
*/
|
||||
protected flyToObjects(objects: THREE.Object3D[]): void;
|
||||
/**
|
||||
* Make camera fly to an object
|
||||
*/
|
||||
protected flyToObject(object: THREE.Object3D): void;
|
||||
/**
|
||||
* Flies to current selected object if any
|
||||
*/
|
||||
protected flyToSelectedObject(): void;
|
||||
/**
|
||||
* Flies to a random object (by alt + r).
|
||||
* It is useful when either the data is wrong or there is bug in program,
|
||||
* then we cannot see anything in the scene!
|
||||
*/
|
||||
protected flyToRandomObject(): void;
|
||||
/**
|
||||
* Makes camera fly to target position with given lookAt position
|
||||
* @param position camera's target position
|
||||
* @param lookAt camera's new lookAt position
|
||||
* @param targetCameraZoom camera's target zoom value
|
||||
* @internal
|
||||
*/
|
||||
flyTo(position: THREE.Vector3, lookAt: THREE.Vector3, targetCameraZoom?: number, animate?: boolean): void;
|
||||
/**
|
||||
* Moves camera to target position
|
||||
* @param position 2d position
|
||||
* @internal
|
||||
*/
|
||||
goTo(position: Vector2, targetCameraZoom?: number, animate?: boolean): void;
|
||||
/**
|
||||
* @description {en} Moves camera to home view.
|
||||
* @description {zh} 移动相机到主视图.
|
||||
* @example
|
||||
* ``` typescript
|
||||
* viewer.goToHomeView();
|
||||
* ```
|
||||
*/
|
||||
goToHomeView(): void;
|
||||
/**
|
||||
* @description {en} Zooms to specific bounding box.
|
||||
* @description {zh} 缩放到指定的包围盒.
|
||||
* @param bbox
|
||||
* - {en} 2d bounding box
|
||||
* - {zh} 2d 包围盒。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* const box = { min: { x: 0, y: 0 }, max: { x: 10000, y: 10000} };
|
||||
* viewer.zoomToBBox(box);
|
||||
* ```
|
||||
*/
|
||||
zoomToBBox(bbox: Box2): void;
|
||||
/**
|
||||
* @description {en} Zooms to view extent.
|
||||
* @description {zh} 缩放到视图范围.
|
||||
* @example
|
||||
* ``` typescript
|
||||
* viewer.zoomToExtent();
|
||||
* ```
|
||||
*/
|
||||
zoomToExtent(): void;
|
||||
/**
|
||||
* @description {en} Sets background color.
|
||||
* @description {zh} 设置背景颜色。
|
||||
* @param r
|
||||
* - {en} Red channel value between 0 and 1.
|
||||
* - {zh} 红色通道值,介于 0 和 1 之间。
|
||||
* @param g
|
||||
* - {en} Green channel value between 0 and 1.
|
||||
* - {zh} 绿色通道值,介于 0 和 1 之间。
|
||||
* @param b
|
||||
* - {en} Blue channel value between 0 and 1.
|
||||
* -{zh} 蓝色通道值,介于 0 和 1 之间。
|
||||
* @example
|
||||
* ``` typescript
|
||||
* // {en} Sets background to gray
|
||||
* // {zh} 设置背景为灰色
|
||||
* viewer.setBackgroundColor(0.5, 0.5, 0.5);
|
||||
* ```
|
||||
*/
|
||||
setBackgroundColor(r: number, g: number, b: number): void;
|
||||
/**
|
||||
* Gets LayoutInfo by layoutName. It creats LayoutInfo if doesn't exist.
|
||||
*/
|
||||
private getLayoutInfo;
|
||||
/**
|
||||
* Creates a ground plane which is much bigger than bbox.
|
||||
*/
|
||||
private updateGroundPlane;
|
||||
/**
|
||||
* Compute bounding box of loaded models for active layout
|
||||
* @internal
|
||||
*/
|
||||
computeBoundingBox(): THREE.Box3;
|
||||
/**
|
||||
* Checks if an expected zoom value is valid, and adjust its value if necessary.
|
||||
*/
|
||||
private checkAndGetLimitedCameraZoom;
|
||||
private getVisiblePixelSize;
|
||||
private setLayoutHidableObjectArray;
|
||||
private statObjects;
|
||||
/**
|
||||
* Updates hidable objects' visibility once camera.zoom changed.
|
||||
*/
|
||||
private updateHidableObjectsVisibility;
|
||||
/**
|
||||
* Updates raycaster threshold to a proper value, so user can easily pick points and lines
|
||||
*/
|
||||
private updateRaycasterThreshold;
|
||||
/**
|
||||
* Updates camera zoom value for shader materials, which are created in DxfLoader
|
||||
*/
|
||||
private updateCameraZoomUniform;
|
||||
}
|
||||
265
demo/libs/types/core/viewers/VRViewer.d.ts
vendored
265
demo/libs/types/core/viewers/VRViewer.d.ts
vendored
@ -1,188 +1,23 @@
|
||||
import { CSS2DObject, CSS2DRenderer } from "three/examples/jsm/renderers/CSS2DRenderer.js";
|
||||
import { CSS3DRenderer } from "three/examples/jsm/renderers/CSS3DRenderer.js";
|
||||
import { CameraConfig, Hotpoint, ModelConfig, Panorama, VRViewerConfig, VRViewpoint } from "../../core/Configs";
|
||||
import { Vector3 } from "../../core/Constants";
|
||||
import { ModelData3d } from "../../core/model";
|
||||
import { BaseViewer, ViewerName } from "../../core/viewers/BaseViewer";
|
||||
import { BaseVRMesh } from "../../core/vr";
|
||||
interface ViewpointAssets {
|
||||
panoramas: [
|
||||
{
|
||||
id: string;
|
||||
box: BaseVRMesh;
|
||||
}
|
||||
];
|
||||
css2dObjects: CSS2DObject[];
|
||||
}
|
||||
import * as THREE from "three";
|
||||
import { ViewerName } from "./Constants";
|
||||
import { Hotpoint, ModelConfig, Panorama, VRViewerConfig, VRViewpoint } from "../../core/Configs";
|
||||
import { BaseViewer } from "../../core/viewers/BaseViewer";
|
||||
export declare class VRViewer extends BaseViewer {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
name: ViewerName;
|
||||
private timer;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
loadedModels: ModelData3d[];
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
css2dRenderer?: CSS2DRenderer;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
css3dRenderer?: CSS3DRenderer;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
minFov: number;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
maxFov: number;
|
||||
private raycaster;
|
||||
private autoRotate;
|
||||
private events;
|
||||
private isMousePressing;
|
||||
private settings;
|
||||
private viewpoints;
|
||||
private imageManager;
|
||||
private activeViewpointId;
|
||||
private activePanoramaId;
|
||||
viewpointAssetsMap: Map<string, ViewpointAssets>;
|
||||
private controlsHelper?;
|
||||
private cameraUpdateInterval?;
|
||||
private fianlCameraPosition?;
|
||||
private finalCameraTarget?;
|
||||
private loadingPanos;
|
||||
onHotpointClicked?: (hotpoint: Hotpoint) => void;
|
||||
handleDragEnd?: () => void;
|
||||
constructor(vrViewerCfg: VRViewerConfig, cameraCfg?: CameraConfig);
|
||||
/**
|
||||
* Initialize everything it needs
|
||||
*/
|
||||
private init;
|
||||
private initScene;
|
||||
private initRenderer;
|
||||
private initCamera;
|
||||
private initControls;
|
||||
private onKeyDown;
|
||||
private initLights;
|
||||
private initInputManager;
|
||||
private initEvents;
|
||||
private initOthers;
|
||||
protected animate(): void;
|
||||
clearAllCachedPanoramas(): void;
|
||||
destroy(): void;
|
||||
private onResize;
|
||||
private onMouseWheel;
|
||||
private updateFov;
|
||||
setMinAndMaxFov(minFov: number, maxFov: number): void;
|
||||
protected resize(width: number, height: number): void;
|
||||
/**
|
||||
* Enables/Disables orbit controls to automatically rotate.
|
||||
*/
|
||||
enableAutoRotate(enable: boolean): void;
|
||||
/**
|
||||
* Sets orbit controls' rotate speed.
|
||||
* It requires (3600 / speed / fps) seconds for a around
|
||||
* When speed is 1, 60fps, it requires 60s;
|
||||
* When speed is 2, 60fps, it requires 30s;
|
||||
*/
|
||||
setAutoRotateSpeed(speed?: number): void;
|
||||
/**
|
||||
* Sets camera fov. Usually 45 - 90.
|
||||
*/
|
||||
setCameraFov(fov?: number): void;
|
||||
/**
|
||||
* Calls addEventListener of a node.
|
||||
* This makes sure to removeEventListener properly
|
||||
* @param node window, dom element, etc.
|
||||
* @param type 'change', 'keydown', etc.
|
||||
* @param func event callback
|
||||
*/
|
||||
private addEvent;
|
||||
/**
|
||||
* Sets camera position and direction.
|
||||
*/
|
||||
setCameraPositionAndDirection(position: Vector3 | number[], direction?: Vector3 | number[], animate?: boolean): void;
|
||||
/**
|
||||
* Gets camera position and direction.
|
||||
*/
|
||||
getCameraPositionAndDirection(): {
|
||||
position: Vector3;
|
||||
direction: Vector3;
|
||||
} | undefined;
|
||||
/**
|
||||
* Gets camera's fov value.
|
||||
*/
|
||||
getCameraFov(): number | undefined;
|
||||
/**
|
||||
* Sets a group of viewpoints
|
||||
*/
|
||||
setViewpoints(viewpoints: VRViewpoint[]): void;
|
||||
/**
|
||||
* Loads a 3d model.
|
||||
* @internal
|
||||
*/
|
||||
loadModel(modelCfg: ModelConfig, onProgress?: (event: ProgressEvent) => void): Promise<void>;
|
||||
/**
|
||||
* Sets a model's visibility.
|
||||
* @throws Throws exception if modelId doesn't exist.
|
||||
* @internal
|
||||
*/
|
||||
setModelVisibility(modelId: string, visible: boolean): void;
|
||||
/**
|
||||
* Applies options and add object to scene.
|
||||
*/
|
||||
private applyOptionsAndAddToScene;
|
||||
/**
|
||||
*
|
||||
* @param model
|
||||
* @returns
|
||||
* @description Add model data to viewer.
|
||||
*/
|
||||
addModel(model: ModelData3d): void;
|
||||
/**
|
||||
* Adds a panorama to a viewpoint
|
||||
*/
|
||||
addPanorama(viewpointId: string, panorama: Panorama): void;
|
||||
/**
|
||||
* Checks if a panorama exists in a viewpoint
|
||||
*/
|
||||
findPanorama(viewpointId: string, panoramaId: string): Panorama | undefined;
|
||||
/**
|
||||
* Sets hotpoints visibility for one or all viewpoints
|
||||
* @param visible true or false
|
||||
* @param viewpointId target viewpointId. Will apply to all if no viewpointId is specified
|
||||
* @param hotpointIds target hotpointIds. Will apply to all if no hotpointIds is specified
|
||||
*/
|
||||
setHotpointsVisibility(visible: boolean, viewpointId?: string, hotpointIds?: string[]): void;
|
||||
/**
|
||||
* Adds hotpoint to active viewpoint
|
||||
*/
|
||||
addHotpoints(hotpoints: Hotpoint[]): void;
|
||||
/**
|
||||
* Removes hotpoint of active viewpoint
|
||||
*/
|
||||
removeHotpoints(hotpointIds: string[]): void;
|
||||
/**
|
||||
* @deprecated use activatePanoramaById() instead
|
||||
*/
|
||||
/**
|
||||
* Activates a panorama by viewpointId and panoramaId
|
||||
*/
|
||||
activatePanoramaById(viewpointId: string, panoramaId: string, setCameraToInitialDirection?: boolean, animate?: boolean, onSuccess?: (viewpoint: VRViewpoint) => void, onError?: (event: ErrorEvent) => void): void;
|
||||
removeCachedPanoramas(excludePanoramas?: Record<string, string[]>): void;
|
||||
/**
|
||||
* Unlimits controls and show all assets. This is useful for debugging.
|
||||
* @internal
|
||||
*/
|
||||
unlimitControlsAndShowAssets(showAllHotpoints?: boolean): void;
|
||||
private relocateAnchorIfTooCloseToCamera;
|
||||
/**
|
||||
* Activates a viewpoint
|
||||
*/
|
||||
private activatePanorama;
|
||||
private enableCache;
|
||||
private autoRotateSpeed;
|
||||
private autoRotate;
|
||||
private enableAutoRotate;
|
||||
private delayAutoRotateTimeout?;
|
||||
constructor(vrViewerCfg: VRViewerConfig);
|
||||
private setDefaultBackground;
|
||||
private setupDefaultEvents;
|
||||
private setupAutoRotateEvents;
|
||||
private delayAutoRotate;
|
||||
/**
|
||||
* Creates box by 1, 6 or 24 images.
|
||||
* For 6/24 images, caller must make sure the order is correct. The reason is that,
|
||||
@ -191,6 +26,7 @@ export declare class VRViewer extends BaseViewer {
|
||||
* 24 images must be in order of: 4 for right(1_1, 1_2, 2_1, 2_2), 4 for left, top, bottom, front, back...
|
||||
*/
|
||||
private createBoxByImageOrImages;
|
||||
private setVrMeshDefault;
|
||||
/**
|
||||
* Creates a box with proper size and texture from an image.
|
||||
*/
|
||||
@ -200,30 +36,61 @@ export declare class VRViewer extends BaseViewer {
|
||||
*/
|
||||
private createBoxBy6Images;
|
||||
private createBoxBy24Images;
|
||||
private adjustCamera;
|
||||
private setCss2dObjectsVisible;
|
||||
private relocateAnchorIfTooCloseToCamera;
|
||||
loadModel(modelCfg: ModelConfig, onProgress?: ((event: ProgressEvent<EventTarget>) => void) | undefined): Promise<void>;
|
||||
/**
|
||||
* Gets intersection by given mouse location.
|
||||
* If no MouseEvent is passed in, use (0, 0) as the raycaster's origin.
|
||||
* Gets a group of viewpoints
|
||||
*/
|
||||
private getIntersection;
|
||||
private fadeIn;
|
||||
private fadeOut;
|
||||
private handleCameraUpdateInterval;
|
||||
getViewpoint(id: string): VRViewpoint | undefined;
|
||||
/**
|
||||
* Gets mouse hit result
|
||||
* Sets a group of viewpoints
|
||||
*/
|
||||
getHitResult(event: MouseEvent): {
|
||||
location: Vector3 | null;
|
||||
setViewpoints(viewpoints: VRViewpoint[]): void;
|
||||
/**
|
||||
* Activates a panorama by viewpointId and panoramaId
|
||||
*/
|
||||
activatePanoramaById(viewpointId: string, panoramaId: string, setCameraToInitialDirection?: boolean): Promise<void>;
|
||||
private activatePanorama;
|
||||
/**
|
||||
* Adds a panorama to a viewpoint
|
||||
*/
|
||||
addPanorama(viewpointId: string, panorama: Panorama): void;
|
||||
/**
|
||||
* Checks if a panorama exists in a viewpoint
|
||||
*/
|
||||
findPanorama(viewpointId: string, panoramaId: string): Panorama | undefined;
|
||||
addHotpoints(hotpoints: Hotpoint[]): void;
|
||||
removeHotpoints(hotpointIds: string[]): void;
|
||||
setHotpointsVisibility(visible: boolean, viewpointId?: string, hotpointIds?: string[]): void;
|
||||
clearImageCache(): Promise<void>;
|
||||
removeImageCache(urls: string[] | string): Promise<void>;
|
||||
/**
|
||||
* Sets camera position and direction.
|
||||
*/
|
||||
setCameraPositionAndDirection(position: number[], direction?: number[]): void;
|
||||
/**
|
||||
* Gets camera position and direction.
|
||||
*/
|
||||
getCameraPositionAndDirection(): {
|
||||
position: number[];
|
||||
direction: number[];
|
||||
};
|
||||
/**
|
||||
* Makes camera look to specific position
|
||||
* @param position target position to look to
|
||||
* Unlimits controls and show all assets. This is useful for debugging.
|
||||
* @internal
|
||||
*/
|
||||
lookToPosition(position: [number, number, number]): void;
|
||||
/**
|
||||
* Merges leaf nodes of given object.
|
||||
* If objects' materials are the same, they can be merged.
|
||||
* @param object
|
||||
*/
|
||||
private merge;
|
||||
unlimitControlsAndShowPanorama(showAllHotpoints?: boolean): void;
|
||||
getHitResult(event: {
|
||||
x: number;
|
||||
y: number;
|
||||
}): THREE.Vector3 | undefined;
|
||||
lookToPosition(position: number[]): void;
|
||||
setMinAndMaxZoom(minZoom: number, maxZoom: number): void;
|
||||
setZoom(zoom: number): void;
|
||||
getZoom(): number;
|
||||
setAutoRotateEnabled(enable: boolean): void;
|
||||
setAutoRotateSpeed(speed: number): void;
|
||||
destroy(): void;
|
||||
}
|
||||
export {};
|
||||
|
||||
230
demo/libs/types/core/viewers/VRViewer.temp.d.ts
vendored
Normal file
230
demo/libs/types/core/viewers/VRViewer.temp.d.ts
vendored
Normal file
@ -0,0 +1,230 @@
|
||||
import { CSS2DObject, CSS2DRenderer } from "three/examples/jsm/renderers/CSS2DRenderer.js";
|
||||
import { CSS3DRenderer } from "three/examples/jsm/renderers/CSS3DRenderer.js";
|
||||
import { ViewerName } from "./Constants";
|
||||
import { CameraConfig, Hotpoint, ModelConfig, Panorama, VRViewerConfig, VRViewpoint } from "../../core/Configs";
|
||||
import { Vector3 } from "../../core/Constants";
|
||||
import { ModelData3d } from "../../core/model";
|
||||
import { BaseViewer } from "../../core/viewers/BaseViewer";
|
||||
import { BaseVRMesh } from "../../core/vr";
|
||||
interface ViewpointAssets {
|
||||
panoramas: [
|
||||
{
|
||||
id: string;
|
||||
box: BaseVRMesh;
|
||||
}
|
||||
];
|
||||
css2dObjects: CSS2DObject[];
|
||||
}
|
||||
export declare class VRViewer extends BaseViewer {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
name: ViewerName;
|
||||
private timer;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
loadedModels: ModelData3d[];
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
css2dRenderer?: CSS2DRenderer;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
css3dRenderer?: CSS3DRenderer;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
minFov: number;
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
maxFov: number;
|
||||
private raycaster;
|
||||
private autoRotate;
|
||||
private events;
|
||||
private isMousePressing;
|
||||
private settings;
|
||||
private viewpoints;
|
||||
private activeViewpointId;
|
||||
private activePanoramaId;
|
||||
viewpointAssetsMap: Map<string, ViewpointAssets>;
|
||||
private controlsHelper?;
|
||||
private cameraUpdateInterval?;
|
||||
private fianlCameraPosition?;
|
||||
private finalCameraTarget?;
|
||||
private loadingPanos;
|
||||
onHotpointClicked?: (hotpoint: Hotpoint) => void;
|
||||
handleDragEnd?: () => void;
|
||||
constructor(vrViewerCfg: VRViewerConfig, cameraCfg?: CameraConfig);
|
||||
/**
|
||||
* Initialize everything it needs
|
||||
*/
|
||||
private init;
|
||||
private initScene;
|
||||
private initRenderer;
|
||||
private initCamera;
|
||||
private initControls;
|
||||
private onKeyDown;
|
||||
private initLights;
|
||||
private initInputManager;
|
||||
private initEvents;
|
||||
private initOthers;
|
||||
protected animate(): void;
|
||||
clearAllCachedPanoramas(): void;
|
||||
destroy(): void;
|
||||
private onResize;
|
||||
private onMouseWheel;
|
||||
private updateFov;
|
||||
setMinAndMaxFov(minFov: number, maxFov: number): void;
|
||||
protected resize(width: number, height: number): void;
|
||||
/**
|
||||
* Enables/Disables orbit controls to automatically rotate.
|
||||
*/
|
||||
enableAutoRotate(enable: boolean): void;
|
||||
/**
|
||||
* Sets orbit controls' rotate speed.
|
||||
* It requires (3600 / speed / fps) seconds for a around
|
||||
* When speed is 1, 60fps, it requires 60s;
|
||||
* When speed is 2, 60fps, it requires 30s;
|
||||
*/
|
||||
setAutoRotateSpeed(speed?: number): void;
|
||||
/**
|
||||
* Sets camera fov. Usually 45 - 90.
|
||||
*/
|
||||
setCameraFov(fov?: number): void;
|
||||
/**
|
||||
* Calls addEventListener of a node.
|
||||
* This makes sure to removeEventListener properly
|
||||
* @param node window, dom element, etc.
|
||||
* @param type 'change', 'keydown', etc.
|
||||
* @param func event callback
|
||||
*/
|
||||
private addEvent;
|
||||
/**
|
||||
* Sets camera position and direction.
|
||||
*/
|
||||
setCameraPositionAndDirection(position: Vector3 | number[], direction?: Vector3 | number[], animate?: boolean): void;
|
||||
/**
|
||||
* Gets camera position and direction.
|
||||
*/
|
||||
getCameraPositionAndDirection(): {
|
||||
position: Vector3;
|
||||
direction: Vector3;
|
||||
} | undefined;
|
||||
/**
|
||||
* Gets camera's fov value.
|
||||
*/
|
||||
getCameraFov(): number | undefined;
|
||||
/**
|
||||
* Sets a group of viewpoints
|
||||
*/
|
||||
setViewpoints(viewpoints: VRViewpoint[]): void;
|
||||
/**
|
||||
* Loads a 3d model.
|
||||
* @internal
|
||||
*/
|
||||
loadModel(modelCfg: ModelConfig, onProgress?: (event: ProgressEvent) => void): Promise<void>;
|
||||
/**
|
||||
* Sets a model's visibility.
|
||||
* @throws Throws exception if modelId doesn't exist.
|
||||
* @internal
|
||||
*/
|
||||
setModelVisibility(modelId: string, visible: boolean): void;
|
||||
/**
|
||||
* Applies options and add object to scene.
|
||||
*/
|
||||
private applyOptionsAndAddToScene;
|
||||
/**
|
||||
*
|
||||
* @param model
|
||||
* @returns
|
||||
* @description Add model data to viewer.
|
||||
*/
|
||||
addModel(model: ModelData3d): void;
|
||||
/**
|
||||
* Adds a panorama to a viewpoint
|
||||
*/
|
||||
addPanorama(viewpointId: string, panorama: Panorama): void;
|
||||
/**
|
||||
* Checks if a panorama exists in a viewpoint
|
||||
*/
|
||||
findPanorama(viewpointId: string, panoramaId: string): Panorama | undefined;
|
||||
/**
|
||||
* Sets hotpoints visibility for one or all viewpoints
|
||||
* @param visible true or false
|
||||
* @param viewpointId target viewpointId. Will apply to all if no viewpointId is specified
|
||||
* @param hotpointIds target hotpointIds. Will apply to all if no hotpointIds is specified
|
||||
*/
|
||||
setHotpointsVisibility(visible: boolean, viewpointId?: string, hotpointIds?: string[]): void;
|
||||
/**
|
||||
* Adds hotpoint to active viewpoint
|
||||
*/
|
||||
addHotpoints(hotpoints: Hotpoint[]): void;
|
||||
/**
|
||||
* Removes hotpoint of active viewpoint
|
||||
*/
|
||||
removeHotpoints(hotpointIds: string[]): void;
|
||||
/**
|
||||
* @deprecated use activatePanoramaById() instead
|
||||
*/
|
||||
/**
|
||||
* Activates a panorama by viewpointId and panoramaId
|
||||
*/
|
||||
activatePanoramaById(viewpointId: string, panoramaId: string, setCameraToInitialDirection?: boolean, animate?: boolean, onSuccess?: (viewpoint: VRViewpoint) => void, onError?: (event: ErrorEvent) => void): void;
|
||||
removeCachedPanoramas(excludePanoramas?: Record<string, string[]>): void;
|
||||
/**
|
||||
* Unlimits controls and show all assets. This is useful for debugging.
|
||||
* @internal
|
||||
*/
|
||||
unlimitControlsAndShowAssets(showAllHotpoints?: boolean): void;
|
||||
private relocateAnchorIfTooCloseToCamera;
|
||||
/**
|
||||
* Activates a viewpoint
|
||||
*/
|
||||
private activatePanorama;
|
||||
/**
|
||||
* Creates box by 1, 6 or 24 images.
|
||||
* For 6/24 images, caller must make sure the order is correct. The reason is that,
|
||||
* the url can be really complex that we cannot order them here!
|
||||
* 6 images must be in order of: right, left, top, bottom, front, back
|
||||
* 24 images must be in order of: 4 for right(1_1, 1_2, 2_1, 2_2), 4 for left, top, bottom, front, back...
|
||||
*/
|
||||
private createBoxByImageOrImages;
|
||||
/**
|
||||
* Creates a box with proper size and texture from an image.
|
||||
*/
|
||||
private createBoxByImage;
|
||||
/**
|
||||
* Creates a box with proper size and texture from 6 images.
|
||||
*/
|
||||
private createBoxBy6Images;
|
||||
private createBoxBy24Images;
|
||||
/**
|
||||
* Gets intersection by given mouse location.
|
||||
* If no MouseEvent is passed in, use (0, 0) as the raycaster's origin.
|
||||
*/
|
||||
private getIntersection;
|
||||
private fadeIn;
|
||||
private fadeOut;
|
||||
private handleCameraUpdateInterval;
|
||||
/**
|
||||
* Gets mouse hit result
|
||||
*/
|
||||
getHitResult(event: MouseEvent): {
|
||||
location: Vector3 | null;
|
||||
};
|
||||
/**
|
||||
* Makes camera look to specific position
|
||||
* @param position target position to look to
|
||||
*/
|
||||
lookToPosition(position: [number, number, number]): void;
|
||||
/**
|
||||
* Merges leaf nodes of given object.
|
||||
* If objects' materials are the same, they can be merged.
|
||||
* @param object
|
||||
*/
|
||||
private merge;
|
||||
}
|
||||
export {};
|
||||
11
demo/libs/types/core/viewers/ViewerEvent.d.ts
vendored
11
demo/libs/types/core/viewers/ViewerEvent.d.ts
vendored
@ -37,6 +37,11 @@ export declare enum ViewerEvent {
|
||||
* @internal
|
||||
*/
|
||||
CameraChanged = "CameraChanged",
|
||||
/**
|
||||
* Triggered when control end
|
||||
* @internal
|
||||
*/
|
||||
ControlChanged = "ControlChanged",
|
||||
/**
|
||||
* Triggered when box select activated
|
||||
*/
|
||||
@ -83,5 +88,9 @@ export declare enum ViewerEvent {
|
||||
/**
|
||||
* Triggered when a measure is removed
|
||||
*/
|
||||
MeasurementRemoved = "MeasurementRemoved"
|
||||
MeasurementRemoved = "MeasurementRemoved",
|
||||
/**
|
||||
* Triggered when click hotpoint
|
||||
*/
|
||||
HotpointClicked = "HotpointClicked"
|
||||
}
|
||||
|
||||
1
demo/libs/types/core/viewers/index.d.ts
vendored
1
demo/libs/types/core/viewers/index.d.ts
vendored
@ -1,3 +1,4 @@
|
||||
export * from "./Constants";
|
||||
export * from "./BaseViewer";
|
||||
export * from "./BimViewer";
|
||||
export * from "./DxfViewer";
|
||||
|
||||
10
demo/libs/types/core/vr/BaseVRMesh.d.ts
vendored
10
demo/libs/types/core/vr/BaseVRMesh.d.ts
vendored
@ -1,9 +1,11 @@
|
||||
import * as THREE from "three";
|
||||
import type { ImageManager } from "./ImageManager";
|
||||
/**
|
||||
* The base class of vr mesh.
|
||||
*/
|
||||
export declare class BaseVRMesh extends THREE.Group {
|
||||
protected textureLoader: THREE.TextureLoader;
|
||||
protected imageManager: ImageManager;
|
||||
protected images: string[];
|
||||
protected mesh?: THREE.Object3D;
|
||||
protected thumbnailImages?: string[];
|
||||
@ -11,7 +13,9 @@ export declare class BaseVRMesh extends THREE.Group {
|
||||
protected size: number;
|
||||
private fadingInInterval?;
|
||||
private fadingOutInterval?;
|
||||
constructor(images: string[], thumbnailImages?: string[], size?: number);
|
||||
render?: () => void;
|
||||
private enableCache;
|
||||
constructor(manager: ImageManager, images: string[], thumbnailImages?: string[], size?: number);
|
||||
/**
|
||||
* Fades in by changing its opacity
|
||||
*/
|
||||
@ -30,8 +34,8 @@ export declare class BaseVRMesh extends THREE.Group {
|
||||
protected getMaterials(): THREE.Material[];
|
||||
protected create(): void;
|
||||
protected createThumbnailMesh(size: number): Promise<void>;
|
||||
protected loadTextures(images: string[]): THREE.Texture[];
|
||||
protected loadTexturesAsync(images: string[]): Promise<THREE.Texture[]>;
|
||||
protected loadTexturesAsync(images: string[], isCache?: boolean): Promise<THREE.Texture[]>;
|
||||
setCacheEnabled(enable: boolean): void;
|
||||
destroyMesh(mesh: THREE.Mesh): void;
|
||||
destroy(): void;
|
||||
}
|
||||
|
||||
15
demo/libs/types/core/vr/ImageManager.d.ts
vendored
Normal file
15
demo/libs/types/core/vr/ImageManager.d.ts
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
export declare class ImageManager {
|
||||
private loader;
|
||||
enableCache: boolean;
|
||||
constructor();
|
||||
private setImageToInedxdb;
|
||||
private getImageFromIndexdb;
|
||||
private removeImageFromIndexdb;
|
||||
private clearImageFromIndexdb;
|
||||
private saveImageData;
|
||||
get(url: string): Promise<HTMLImageElement>;
|
||||
remove(url: string): Promise<void>;
|
||||
clear(): Promise<void>;
|
||||
static getFileName(url: string): string;
|
||||
destroy(): void;
|
||||
}
|
||||
3
demo/libs/types/core/vr/VRCube.d.ts
vendored
3
demo/libs/types/core/vr/VRCube.d.ts
vendored
@ -1,11 +1,12 @@
|
||||
import { BaseVRMesh } from "./BaseVRMesh";
|
||||
import type { ImageManager } from "./ImageManager";
|
||||
/**
|
||||
* A cube contains 6 planes
|
||||
* "r" | "l" | "u" | "d" | "f" | "b": means left, right, up, down, front, back
|
||||
* x, -x, y, -y, z, -z, aka, right, left, up/top, down/bottom, front, back
|
||||
*/
|
||||
export declare class VRCube extends BaseVRMesh {
|
||||
constructor(images: string[], thumbnailImages?: string[], size?: number);
|
||||
constructor(manager: ImageManager, images: string[], thumbnailImages?: string[], size?: number);
|
||||
create(): Promise<void>;
|
||||
private updateMesh;
|
||||
protected createMesh(): Promise<void>;
|
||||
|
||||
3
demo/libs/types/core/vr/VRCube24Faces.d.ts
vendored
3
demo/libs/types/core/vr/VRCube24Faces.d.ts
vendored
@ -1,4 +1,5 @@
|
||||
import { BaseVRMesh } from "./BaseVRMesh";
|
||||
import type { ImageManager } from "./ImageManager";
|
||||
/**
|
||||
* A cube contains 6 planes, each plane contains 4 sub-planes as bellow:
|
||||
* ratio, 1 : 1
|
||||
@ -37,7 +38,7 @@ export declare class VRCube24Faces extends BaseVRMesh {
|
||||
* @param images must be in order of right, left, up/top, down/bottom, front, back
|
||||
* And the 4 images for each side, must be in order of 1_1, 1_2, 2_1, 2_2.
|
||||
*/
|
||||
constructor(images: string[], thumbnailImages?: string[], size?: number);
|
||||
constructor(manager: ImageManager, images: string[], thumbnailImages?: string[], size?: number);
|
||||
create(): Promise<void>;
|
||||
protected createMesh(): Promise<void>;
|
||||
private createPlaneOfAFace;
|
||||
|
||||
3
demo/libs/types/core/vr/VRSphere.d.ts
vendored
3
demo/libs/types/core/vr/VRSphere.d.ts
vendored
@ -1,9 +1,10 @@
|
||||
import { BaseVRMesh } from "./BaseVRMesh";
|
||||
import type { ImageManager } from "./ImageManager";
|
||||
/**
|
||||
* A sphere that maps the one image. More than one may be included later.
|
||||
*/
|
||||
export declare class VRSphere extends BaseVRMesh {
|
||||
constructor(images: string[], thumbnailImages?: string[], size?: number);
|
||||
constructor(manager: ImageManager, images: string[], thumbnailImages?: string[], size?: number);
|
||||
create(): Promise<void>;
|
||||
protected createMesh(): Promise<void>;
|
||||
}
|
||||
|
||||
@ -89,5 +89,14 @@ export declare class HotpointPlugin extends Plugin {
|
||||
*/
|
||||
setVisible(hotpointId: string, visible: boolean): void;
|
||||
protected findHotpointObject(hotpointId: string): CSS2DObject | undefined;
|
||||
/**
|
||||
*
|
||||
* @param hotpointId
|
||||
* @param zoom
|
||||
* @returns
|
||||
* @description Fly to hotpoint by hotpointId.
|
||||
*/
|
||||
flyToHotpoint(hotpointId: string, zoom?: any): void;
|
||||
destroy(): void;
|
||||
protected onAfterRender: () => void;
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { IUploader } from "./IUploader";
|
||||
import type { DxfViewer, ModelConfig } from "../../core";
|
||||
import { DxfViewer, ModelConfig } from "../../core";
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
||||
@ -62,7 +62,7 @@ export declare abstract class BaseMeasurement extends Event<MeasurementEvents> {
|
||||
private inputManager;
|
||||
protected drawList: DrawableList;
|
||||
protected osnapHelper: OSnapHelper;
|
||||
protected raycaster?: THREE.Raycaster;
|
||||
protected actived: boolean;
|
||||
protected mouseMoved: boolean;
|
||||
protected mouseDowned: boolean;
|
||||
protected touchDowned: boolean;
|
||||
@ -82,8 +82,7 @@ export declare abstract class BaseMeasurement extends Event<MeasurementEvents> {
|
||||
protected firstPickedListener?: () => void;
|
||||
protected completedListener?: () => void;
|
||||
constructor(type: MeasurementType, viewer: BaseViewer, input: InputManager, drawList: DrawableList, osnapHelper: OSnapHelper);
|
||||
get canvas(): HTMLCanvasElement;
|
||||
get camera(): THREE.Camera;
|
||||
get overlayRender(): import("../..").CanvasRender;
|
||||
get renderer(): THREE.WebGLRenderer;
|
||||
/**
|
||||
* If measurement is active.
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { OrthographicCamera, Scene, Vector3 } from "three";
|
||||
import { CSS3DRenderer } from "three/examples/jsm/renderers/CSS3DRenderer.js";
|
||||
import { NavCube } from "./NavCube";
|
||||
import { Plugin, type BaseViewer, PluginConfig } from "../../core/viewers";
|
||||
import { type BaseViewer, Plugin, PluginConfig } from "../../core/viewers";
|
||||
/**
|
||||
* ViewCube plugin config.
|
||||
*/
|
||||
|
||||
@ -141,6 +141,7 @@ export declare class OverviewMapPlugin extends Plugin<Record<OverviewMapPluginEv
|
||||
*/
|
||||
getViewConfig(): OverviewMapPluginConfig;
|
||||
is3d(): boolean;
|
||||
getRaycaster(): THREE.Raycaster | undefined;
|
||||
/**
|
||||
* Gets how long a pixel represents in world coordinate.
|
||||
* This works fine for OrthographicCamera.
|
||||
|
||||
3
demo/libs/types/plugins/pdf/PdfLoader.d.ts
vendored
3
demo/libs/types/plugins/pdf/PdfLoader.d.ts
vendored
@ -37,6 +37,7 @@ export declare class PdfLoader extends THREE.Loader {
|
||||
viewportScale: number;
|
||||
baseTransform: THREE.Matrix4;
|
||||
pdfDocumentGroup?: THREE.Group;
|
||||
viewportMesh?: THREE.Mesh;
|
||||
pdfPageGroup?: THREE.Group;
|
||||
currentTransform: THREE.Matrix4;
|
||||
transformStack: THREE.Matrix4[];
|
||||
@ -64,6 +65,8 @@ export declare class PdfLoader extends THREE.Loader {
|
||||
* @returns
|
||||
*/
|
||||
loadAsync(modelCfg: DxfModelConfig, onProgress: (event: ProgressEvent) => void): Promise<ModelData2d>;
|
||||
loadPage(page: number, onProgress?: (event: ProgressEvent) => void): Promise<undefined>;
|
||||
getPageCount(): number | undefined;
|
||||
private getOperatorList;
|
||||
private _pumpOperatorList;
|
||||
private tryCleanup;
|
||||
|
||||
32
demo/libs/types/plugins/pdf/PdfLoaderPlugin.d.ts
vendored
32
demo/libs/types/plugins/pdf/PdfLoaderPlugin.d.ts
vendored
@ -1,10 +1,10 @@
|
||||
import { BaseViewer, DxfModelConfig, FontManager, Plugin, PluginConfig } from "../../core";
|
||||
import type { ModelData2d } from "../../core/model/Constants";
|
||||
import { PdfLoader } from "./PdfLoader";
|
||||
import { BaseViewer, DxfModelConfig, FontManager, Plugin, PluginConfig, Model2d, Vector2 } from "../../core";
|
||||
/**
|
||||
* Pdf loader plugin config.
|
||||
*/
|
||||
export interface PdfLoaderPluginConfig extends Partial<PluginConfig> {
|
||||
font: FontManager;
|
||||
font?: FontManager;
|
||||
/**
|
||||
* Whether to use progressive load or not.
|
||||
* @default true
|
||||
@ -18,6 +18,7 @@ export interface PdfLoaderPluginConfig extends Partial<PluginConfig> {
|
||||
export declare class PdfLoaderPlugin extends Plugin {
|
||||
static DEFAULT_ID: string;
|
||||
protected cfg: PdfLoaderPluginConfig;
|
||||
loader?: PdfLoader;
|
||||
constructor(viewer: BaseViewer, cfg: PdfLoaderPluginConfig);
|
||||
/**
|
||||
* Loads a pdf.
|
||||
@ -25,5 +26,28 @@ export declare class PdfLoaderPlugin extends Plugin {
|
||||
* @param onProgress
|
||||
* @returns
|
||||
*/
|
||||
loadAsync(modelCfg: DxfModelConfig, onProgress: (event: ProgressEvent) => void): Promise<ModelData2d>;
|
||||
loadAsync(modelCfg: DxfModelConfig, onProgress: (event: ProgressEvent) => void): Promise<Model2d>;
|
||||
/**
|
||||
*
|
||||
* @param page
|
||||
* @param onProgress
|
||||
* @returns
|
||||
* @description load specified pdf page
|
||||
*/
|
||||
loadPage(page: number, onProgress?: (event: ProgressEvent) => void): Promise<undefined>;
|
||||
/**
|
||||
*
|
||||
* @returns {Number}
|
||||
* @description Get pdf pages number.
|
||||
*/
|
||||
getPageCount(): number | undefined;
|
||||
private getPdfViewport;
|
||||
worldPosition2PdfPoint(position: Vector2): {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
pdfPoint2WorldPosition(point: Vector2): {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import * as THREE from "three";
|
||||
import { BaseViewer, BoxSelectHelper, PickMarkupHelper, Plugin, PluginConfig, ScreenshotMode, ScreenshotResult } from "../../core";
|
||||
import { type BaseViewer, BoxSelectHelper, PickMarkupHelper, Plugin, PluginConfig, ScreenshotMode, ScreenshotResult } from "../../core";
|
||||
/**
|
||||
* Screenshot plugin config.
|
||||
*/
|
||||
@ -11,7 +11,13 @@ export interface ScreenshotPluginConfig extends Partial<PluginConfig> {
|
||||
/**
|
||||
* Image quality.
|
||||
*/
|
||||
quality?: 0.8;
|
||||
quality?: number;
|
||||
/**
|
||||
* Sets background transparent, this must be used for "image/png" format.
|
||||
* @default false
|
||||
* @internal
|
||||
*/
|
||||
setBackgroundTransparent?: boolean;
|
||||
}
|
||||
/**
|
||||
* Screenshot plugin
|
||||
@ -21,6 +27,8 @@ export declare class ScreenshotPlugin extends Plugin {
|
||||
protected cfg: ScreenshotPluginConfig;
|
||||
protected boxSelectHelper?: BoxSelectHelper;
|
||||
protected pickMarkupHelper?: PickMarkupHelper;
|
||||
protected originalBackground: THREE.Color | undefined;
|
||||
protected originalClearAlpha: number;
|
||||
constructor(viewer: BaseViewer, cfg?: ScreenshotPluginConfig);
|
||||
/**
|
||||
* @description {en} Gets screenshot of current canvas. Returns an image in format of base64 string.
|
||||
@ -85,4 +93,14 @@ export declare class ScreenshotPlugin extends Plugin {
|
||||
* Cancel current operation if any.
|
||||
*/
|
||||
cancel(): void;
|
||||
/**
|
||||
* Sets scene background transparent.
|
||||
* This is useful when taking screenshop of png format.
|
||||
* In some cases, user don't want the background with a fixed background color.
|
||||
*/
|
||||
private setBackgroundTransparent;
|
||||
/**
|
||||
* Recovers to original background settings.
|
||||
*/
|
||||
private recoverBackgroundTransparency;
|
||||
}
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import * as THREE from "three";
|
||||
import type { CameraControlsEx } from "../../core/controls/CameraControlsEx";
|
||||
import { EventInfo, InputManager } from "../../core/input/InputManager";
|
||||
import type { BaseViewer } from "../../core/viewers";
|
||||
/**
|
||||
@ -32,7 +31,6 @@ export declare abstract class BaseSection {
|
||||
protected get canvas(): HTMLCanvasElement;
|
||||
get isActive(): boolean;
|
||||
protected get camera(): THREE.Camera;
|
||||
protected get controls(): CameraControlsEx;
|
||||
private setGlobalClippingEnabled;
|
||||
private setObjectClippingEnabled;
|
||||
clearClippingObjectIds(): void;
|
||||
|
||||
@ -32,5 +32,5 @@ export declare class PickPlaneSection extends BaseSection {
|
||||
onDragEnd(e: EventInfo): void;
|
||||
getIntersectObjects(): THREE.Object3D<THREE.Event>[];
|
||||
activateSelectedObject(active: boolean): void;
|
||||
pickFace(e: EventInfo): THREE.Intersection<THREE.Object3D<THREE.Event>> | undefined;
|
||||
pickFace(e: EventInfo): import("../../core/pick").CpuIntersection | undefined;
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import * as THREE from "three";
|
||||
import { GradientColorSkybox } from "./GradientColorSkybox";
|
||||
import { BaseViewer, Plugin, PluginConfig } from "../../core";
|
||||
import { Plugin, PluginConfig } from "../../core";
|
||||
import type { BaseViewer } from "../../core/viewers/BaseViewer";
|
||||
/**
|
||||
* Skybox plugin config.
|
||||
*/
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { Plugin, type BaseViewer, PluginConfig } from "../../core/viewers";
|
||||
import { Plugin, PluginConfig } from "../../core/viewers";
|
||||
import type { BaseViewer } from "../../core/viewers/BaseViewer";
|
||||
export interface ViewCubePluginConfig extends Partial<PluginConfig> {
|
||||
containerId?: string;
|
||||
context?: WebGLRenderingContext | WebGL2RenderingContext;
|
||||
showAxes?: boolean;
|
||||
lineColor?: number;
|
||||
}
|
||||
@ -10,24 +10,23 @@ export declare class ViewCubePlugin extends Plugin {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
private container?;
|
||||
private cfg;
|
||||
private container;
|
||||
private scene?;
|
||||
private camera?;
|
||||
private cfg;
|
||||
private renderer?;
|
||||
private directionalLight?;
|
||||
private width;
|
||||
private height;
|
||||
private requestAnimationFrameHandle?;
|
||||
private raycaster;
|
||||
private pickManager;
|
||||
private renderEnabled;
|
||||
private inputManager?;
|
||||
private viewCube?;
|
||||
private lastCoords?;
|
||||
constructor(viewer: BaseViewer, cfg?: ViewCubePluginConfig);
|
||||
get viewerContainer(): HTMLElement;
|
||||
private init;
|
||||
private initDom;
|
||||
private initInputManager;
|
||||
private initScene;
|
||||
private initCamera;
|
||||
private initRenderer;
|
||||
@ -40,8 +39,6 @@ export declare class ViewCubePlugin extends Plugin {
|
||||
private onClick;
|
||||
private updateViewerCamera;
|
||||
private updateActivateMeshName;
|
||||
private getNdcPointByEvent;
|
||||
private getIntersects;
|
||||
private updateCameraAndMeshName;
|
||||
/**
|
||||
* Update viewCube according to camera direction.
|
||||
|
||||
@ -1 +1 @@
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="./logo192.png"/><link rel="manifest" href="./manifest.json"/><title>React App</title><script defer="defer" src="./static/js/main.b6487067.js"></script><link href="./static/css/main.f052ad65.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="./logo192.png"/><link rel="manifest" href="./manifest.json"/><title>React App</title><script defer="defer" src="./static/js/main.f09baa39.js"></script><link href="./static/css/main.90df8265.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
||||
12
static/css/main.90df8265.css
Normal file
12
static/css/main.90df8265.css
Normal file
File diff suppressed because one or more lines are too long
1
static/css/main.90df8265.css.map
Normal file
1
static/css/main.90df8265.css.map
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
static/js/787.55649ca3.chunk.js
Normal file
2
static/js/787.55649ca3.chunk.js
Normal file
@ -0,0 +1,2 @@
|
||||
"use strict";(self.webpackChunkgemini_viewer_examples=self.webpackChunkgemini_viewer_examples||[]).push([[787],{787:(e,t,n)=>{n.r(t),n.d(t,{getCLS:()=>y,getFCP:()=>g,getFID:()=>C,getLCP:()=>P,getTTFB:()=>D});var i,r,a,o,u=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:"v2-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},c=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if("first-input"===e&&!("PerformanceEventTiming"in self))return;var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch(e){}},s=function(e,t){var n=function n(i){"pagehide"!==i.type&&"hidden"!==document.visibilityState||(e(i),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},f=function(e){addEventListener("pageshow",(function(t){t.persisted&&e(t)}),!0)},m=function(e,t,n){var i;return function(r){t.value>=0&&(r||n)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},v=-1,p=function(){return"hidden"===document.visibilityState?0:1/0},d=function(){s((function(e){var t=e.timeStamp;v=t}),!0)},l=function(){return v<0&&(v=p(),d(),f((function(){setTimeout((function(){v=p(),d()}),0)}))),{get firstHiddenTime(){return v}}},g=function(e,t){var n,i=l(),r=u("FCP"),a=function(e){"first-contentful-paint"===e.name&&(s&&s.disconnect(),e.startTime<i.firstHiddenTime&&(r.value=e.startTime,r.entries.push(e),n(!0)))},o=window.performance&&performance.getEntriesByName&&performance.getEntriesByName("first-contentful-paint")[0],s=o?null:c("paint",a);(o||s)&&(n=m(e,r,t),o&&a(o),f((function(i){r=u("FCP"),n=m(e,r,t),requestAnimationFrame((function(){requestAnimationFrame((function(){r.value=performance.now()-i.timeStamp,n(!0)}))}))})))},h=!1,T=-1,y=function(e,t){h||(g((function(e){T=e.value})),h=!0);var n,i=function(t){T>-1&&e(t)},r=u("CLS",0),a=0,o=[],v=function(e){if(!e.hadRecentInput){var t=o[0],i=o[o.length-1];a&&e.startTime-i.startTime<1e3&&e.startTime-t.startTime<5e3?(a+=e.value,o.push(e)):(a=e.value,o=[e]),a>r.value&&(r.value=a,r.entries=o,n())}},p=c("layout-shift",v);p&&(n=m(i,r,t),s((function(){p.takeRecords().map(v),n(!0)})),f((function(){a=0,T=-1,r=u("CLS",0),n=m(i,r,t)})))},E={passive:!0,capture:!0},w=new Date,L=function(e,t){i||(i=t,r=e,a=new Date,F(removeEventListener),S())},S=function(){if(r>=0&&r<a-w){var e={entryType:"first-input",name:i.type,target:i.target,cancelable:i.cancelable,startTime:i.timeStamp,processingStart:i.timeStamp+r};o.forEach((function(t){t(e)})),o=[]}},b=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){L(e,t),r()},i=function(){r()},r=function(){removeEventListener("pointerup",n,E),removeEventListener("pointercancel",i,E)};addEventListener("pointerup",n,E),addEventListener("pointercancel",i,E)}(t,e):L(t,e)}},F=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,b,E)}))},C=function(e,t){var n,a=l(),v=u("FID"),p=function(e){e.startTime<a.firstHiddenTime&&(v.value=e.processingStart-e.startTime,v.entries.push(e),n(!0))},d=c("first-input",p);n=m(e,v,t),d&&s((function(){d.takeRecords().map(p),d.disconnect()}),!0),d&&f((function(){var a;v=u("FID"),n=m(e,v,t),o=[],r=-1,i=null,F(addEventListener),a=p,o.push(a),S()}))},k={},P=function(e,t){var n,i=l(),r=u("LCP"),a=function(e){var t=e.startTime;t<i.firstHiddenTime&&(r.value=t,r.entries.push(e),n())},o=c("largest-contentful-paint",a);if(o){n=m(e,r,t);var v=function(){k[r.id]||(o.takeRecords().map(a),o.disconnect(),k[r.id]=!0,n(!0))};["keydown","click"].forEach((function(e){addEventListener(e,v,{once:!0,capture:!0})})),s(v,!0),f((function(i){r=u("LCP"),n=m(e,r,t),requestAnimationFrame((function(){requestAnimationFrame((function(){r.value=performance.now()-i.timeStamp,k[r.id]=!0,n(!0)}))}))}))}},D=function(e){var t,n=u("TTFB");t=function(){try{var t=performance.getEntriesByType("navigation")[0]||function(){var e=performance.timing,t={entryType:"navigation",startTime:0};for(var n in e)"navigationStart"!==n&&"toJSON"!==n&&(t[n]=Math.max(e[n]-e.navigationStart,0));return t}();if(n.value=n.delta=t.responseStart,n.value<0||n.value>performance.now())return;n.entries=[t],e(n)}catch(e){}},"complete"===document.readyState?setTimeout(t,0):addEventListener("load",(function(){return setTimeout(t,0)}))}}}]);
|
||||
//# sourceMappingURL=787.55649ca3.chunk.js.map
|
||||
File diff suppressed because one or more lines are too long
@ -1,2 +0,0 @@
|
||||
"use strict";(self.webpackChunkgemini_viewer_examples=self.webpackChunkgemini_viewer_examples||[]).push([[787],{787:function(e,n,t){t.r(n),t.d(n,{getCLS:function(){return y},getFCP:function(){return g},getFID:function(){return C},getLCP:function(){return P},getTTFB:function(){return D}});var i,r,a,o,u=function(e,n){return{name:e,value:void 0===n?-1:n,delta:0,entries:[],id:"v2-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},c=function(e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if("first-input"===e&&!("PerformanceEventTiming"in self))return;var t=new PerformanceObserver((function(e){return e.getEntries().map(n)}));return t.observe({type:e,buffered:!0}),t}}catch(e){}},f=function(e,n){var t=function t(i){"pagehide"!==i.type&&"hidden"!==document.visibilityState||(e(i),n&&(removeEventListener("visibilitychange",t,!0),removeEventListener("pagehide",t,!0)))};addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},s=function(e){addEventListener("pageshow",(function(n){n.persisted&&e(n)}),!0)},m=function(e,n,t){var i;return function(r){n.value>=0&&(r||t)&&(n.delta=n.value-(i||0),(n.delta||void 0===i)&&(i=n.value,e(n)))}},v=-1,p=function(){return"hidden"===document.visibilityState?0:1/0},d=function(){f((function(e){var n=e.timeStamp;v=n}),!0)},l=function(){return v<0&&(v=p(),d(),s((function(){setTimeout((function(){v=p(),d()}),0)}))),{get firstHiddenTime(){return v}}},g=function(e,n){var t,i=l(),r=u("FCP"),a=function(e){"first-contentful-paint"===e.name&&(f&&f.disconnect(),e.startTime<i.firstHiddenTime&&(r.value=e.startTime,r.entries.push(e),t(!0)))},o=window.performance&&performance.getEntriesByName&&performance.getEntriesByName("first-contentful-paint")[0],f=o?null:c("paint",a);(o||f)&&(t=m(e,r,n),o&&a(o),s((function(i){r=u("FCP"),t=m(e,r,n),requestAnimationFrame((function(){requestAnimationFrame((function(){r.value=performance.now()-i.timeStamp,t(!0)}))}))})))},h=!1,T=-1,y=function(e,n){h||(g((function(e){T=e.value})),h=!0);var t,i=function(n){T>-1&&e(n)},r=u("CLS",0),a=0,o=[],v=function(e){if(!e.hadRecentInput){var n=o[0],i=o[o.length-1];a&&e.startTime-i.startTime<1e3&&e.startTime-n.startTime<5e3?(a+=e.value,o.push(e)):(a=e.value,o=[e]),a>r.value&&(r.value=a,r.entries=o,t())}},p=c("layout-shift",v);p&&(t=m(i,r,n),f((function(){p.takeRecords().map(v),t(!0)})),s((function(){a=0,T=-1,r=u("CLS",0),t=m(i,r,n)})))},E={passive:!0,capture:!0},w=new Date,L=function(e,n){i||(i=n,r=e,a=new Date,F(removeEventListener),S())},S=function(){if(r>=0&&r<a-w){var e={entryType:"first-input",name:i.type,target:i.target,cancelable:i.cancelable,startTime:i.timeStamp,processingStart:i.timeStamp+r};o.forEach((function(n){n(e)})),o=[]}},b=function(e){if(e.cancelable){var n=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,n){var t=function(){L(e,n),r()},i=function(){r()},r=function(){removeEventListener("pointerup",t,E),removeEventListener("pointercancel",i,E)};addEventListener("pointerup",t,E),addEventListener("pointercancel",i,E)}(n,e):L(n,e)}},F=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(n){return e(n,b,E)}))},C=function(e,n){var t,a=l(),v=u("FID"),p=function(e){e.startTime<a.firstHiddenTime&&(v.value=e.processingStart-e.startTime,v.entries.push(e),t(!0))},d=c("first-input",p);t=m(e,v,n),d&&f((function(){d.takeRecords().map(p),d.disconnect()}),!0),d&&s((function(){var a;v=u("FID"),t=m(e,v,n),o=[],r=-1,i=null,F(addEventListener),a=p,o.push(a),S()}))},k={},P=function(e,n){var t,i=l(),r=u("LCP"),a=function(e){var n=e.startTime;n<i.firstHiddenTime&&(r.value=n,r.entries.push(e),t())},o=c("largest-contentful-paint",a);if(o){t=m(e,r,n);var v=function(){k[r.id]||(o.takeRecords().map(a),o.disconnect(),k[r.id]=!0,t(!0))};["keydown","click"].forEach((function(e){addEventListener(e,v,{once:!0,capture:!0})})),f(v,!0),s((function(i){r=u("LCP"),t=m(e,r,n),requestAnimationFrame((function(){requestAnimationFrame((function(){r.value=performance.now()-i.timeStamp,k[r.id]=!0,t(!0)}))}))}))}},D=function(e){var n,t=u("TTFB");n=function(){try{var n=performance.getEntriesByType("navigation")[0]||function(){var e=performance.timing,n={entryType:"navigation",startTime:0};for(var t in e)"navigationStart"!==t&&"toJSON"!==t&&(n[t]=Math.max(e[t]-e.navigationStart,0));return n}();if(t.value=t.delta=n.responseStart,t.value<0||t.value>performance.now())return;t.entries=[n],e(t)}catch(e){}},"complete"===document.readyState?setTimeout(n,0):addEventListener("load",(function(){return setTimeout(n,0)}))}}}]);
|
||||
//# sourceMappingURL=787.cf5efa72.chunk.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
static/js/main.f09baa39.js
Normal file
2
static/js/main.f09baa39.js
Normal file
File diff suppressed because one or more lines are too long
1
static/js/main.f09baa39.js.map
Normal file
1
static/js/main.f09baa39.js.map
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user