@realsee/dnalogel 3.51.0 → 3.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/Object3DHelperPlugin/Controller.d.ts +9 -9
- package/dist/Object3DHelperPlugin/FiveControllerWrapper.d.ts +4 -2
- package/dist/PanoMeasurePlugin/Model/area.d.ts +1 -1
- package/dist/PanoMeasurePlugin/Model/polygon.d.ts +1 -1
- package/dist/PanoMeasurePlugin/typings/data.d.ts +1 -2
- package/dist/Sculpt/Editors/BoxMeshEditor.d.ts +5 -0
- package/dist/Sculpt/Editors/CircleMeshEditor.d.ts +5 -0
- package/dist/Sculpt/Editors/CylinderMeshEditor.d.ts +5 -0
- package/dist/Sculpt/Editors/PrismMeshEditor.d.ts +5 -0
- package/dist/Sculpt/Editors/RectangleMeshEditor.d.ts +5 -0
- package/dist/Sculpt/Meshes/Box.d.ts +6 -24
- package/dist/Sculpt/Meshes/Circle.d.ts +0 -4
- package/dist/Sculpt/Meshes/Cylinder.d.ts +0 -1
- package/dist/Sculpt/Meshes/Line.d.ts +9 -22
- package/dist/Sculpt/Meshes/Polygon.d.ts +1 -5
- package/dist/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
- package/dist/Sculpt/Meshes/Prism.d.ts +29 -10
- package/dist/Sculpt/Meshes/Rectangle.d.ts +1 -1
- package/dist/Sculpt/Objects/Base/index.d.ts +2 -1
- package/dist/Sculpt/Objects/Box/index.d.ts +7 -2
- package/dist/Sculpt/Objects/Circle/index.d.ts +3 -0
- package/dist/Sculpt/Objects/Cylinder/index.d.ts +3 -0
- package/dist/Sculpt/Objects/Line/index.d.ts +3 -0
- package/dist/Sculpt/Objects/Point/index.d.ts +3 -0
- package/dist/Sculpt/Objects/Polygon/index.d.ts +3 -0
- package/dist/Sculpt/Objects/Polyline/index.d.ts +3 -0
- package/dist/Sculpt/Objects/Prism/index.d.ts +3 -0
- package/dist/Sculpt/Objects/Rectangle/index.d.ts +12 -0
- package/dist/Sculpt/index.d.ts +11 -10
- package/dist/Sculpt/typings/style.d.ts +6 -0
- package/dist/Sculpt/utils/export.d.ts +24 -18
- package/dist/Sculpt/utils/sortPositionsByCameraPosition.d.ts +5 -0
- package/dist/Sculpt/utils/three/ColoredMesh.d.ts +4 -0
- package/dist/index.cjs.js +88 -3009
- package/dist/index.d.ts +79 -1
- package/dist/index.js +35153 -54255
- package/dist/index.umd.js +81 -3002
- package/dist/shared-utils/Object3DHelper/Base/BaseController.d.ts +1 -0
- package/dist/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +7 -3
- package/dist/shared-utils/Object3DHelper/Controller/ScaleController.d.ts +0 -1
- package/dist/shared-utils/Object3DHelper/Helper/BoundingBoxHelper.d.ts +3 -1
- package/dist/shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.d.ts +2 -0
- package/dist/shared-utils/Object3DHelper/Helper/MoveHelper.d.ts +2 -1
- package/dist/shared-utils/Object3DHelper/Helper/RotateHelper.d.ts +2 -1
- package/dist/shared-utils/Object3DHelper/Helper/ScaleHelper.d.ts +4 -2
- package/dist/shared-utils/Object3DHelper/typings/index.d.ts +1 -1
- package/dist/shared-utils/Object3DHelper/utils/calculateScaleByCamera.d.ts +4 -1
- package/dist/shared-utils/five/FiveLine.d.ts +18 -14
- package/dist/shared-utils/index.d.ts +0 -1
- package/dist/shared-utils/math/planimetry.d.ts +1 -1
- package/dist/shared-utils/tag.d.ts +5 -7
- package/dist/shared-utils/three/boundingBox.d.ts +14 -20
- package/dist/shared-utils/three/core/LineGeometry.d.ts +13 -0
- package/dist/shared-utils/three/core/PrismGeometry.d.ts +14 -0
- package/dist/shared-utils/three/geometryUtil.d.ts +8 -0
- package/dist/shared-utils/three/getNormal.d.ts +5 -2
- package/libs/AreaMakerPlugin/Controller.js +47 -100
- package/libs/AreaMakerPlugin/index.js +12 -65
- package/libs/AreaMakerPlugin/utils/Item.js +102 -157
- package/libs/CSS3DRenderPlugin/Controller.js +45 -93
- package/libs/CSS3DRenderPlugin/index.js +15 -63
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +51 -106
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +79 -131
- package/libs/CruisePlugin/BaseController.js +90 -143
- package/libs/CruisePlugin/Move.js +39 -83
- package/libs/CruisePlugin/Work.js +52 -96
- package/libs/CruisePlugin/index.js +23 -67
- package/libs/CurrentPanoImagePlugin/Controller.js +88 -141
- package/libs/CurrentPanoImagePlugin/index.js +11 -64
- package/libs/GuideLinePlugin/Controller.js +13 -57
- package/libs/GuideLinePlugin/GuideLineItem.js +20 -64
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +3 -8
- package/libs/GuideLinePlugin/GuideLineModeItem.js +15 -59
- package/libs/GuideLinePlugin/index.js +23 -67
- package/libs/ModelMakerPlugin/Controller.js +125 -165
- package/libs/ModelMakerPlugin/index.js +23 -63
- package/libs/ModelMakerPlugin/item/baseItem.js +2 -3
- package/libs/ModelMakerPlugin/item/boxItem.js +2 -3
- package/libs/ModelMakerPlugin/item/polygonItem.js +6 -7
- package/libs/ModelMakerPlugin/item/prismItem.js +2 -3
- package/libs/ModelMakerPlugin/utils/getFiveDomEvent.js +2 -3
- package/libs/ModelTVVideoPlugin/Plugin.js +49 -97
- package/libs/ModelTVVideoPlugin/index.js +8 -56
- package/libs/Object3DHelperPlugin/Controller.d.ts +9 -9
- package/libs/Object3DHelperPlugin/Controller.js +105 -92
- package/libs/Object3DHelperPlugin/FiveControllerWrapper.d.ts +4 -2
- package/libs/Object3DHelperPlugin/FiveControllerWrapper.js +35 -30
- package/libs/Object3DHelperPlugin/index.js +15 -30
- package/libs/PanoCompassPlugin/Controller.js +46 -93
- package/libs/PanoCompassPlugin/index.js +17 -64
- package/libs/PanoCursorRaycasterPlugin/index.js +4 -3
- package/libs/PanoDoorLabelPlugin/BaseController.js +27 -80
- package/libs/PanoDoorLabelPlugin/Controller.js +80 -133
- package/libs/PanoDoorLabelPlugin/index.js +11 -64
- package/libs/PanoMeasurePlugin/Components/Controller0.js +79 -128
- package/libs/PanoMeasurePlugin/Components/Controller1.js +92 -141
- package/libs/PanoMeasurePlugin/Controller/BaseController.js +3 -2
- package/libs/PanoMeasurePlugin/Controller/EditController.js +73 -122
- package/libs/PanoMeasurePlugin/Controller/MixedController.js +3 -2
- package/libs/PanoMeasurePlugin/Controller/ViewController.js +3 -2
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +72 -121
- package/libs/PanoMeasurePlugin/Controller/index.js +89 -135
- package/libs/PanoMeasurePlugin/Model/area.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Model/area.js +25 -74
- package/libs/PanoMeasurePlugin/Model/index.js +3 -2
- package/libs/PanoMeasurePlugin/Model/line.js +1 -0
- package/libs/PanoMeasurePlugin/Model/polygon.d.ts +1 -1
- package/libs/PanoMeasurePlugin/Model/polygon.js +7 -7
- package/libs/PanoMeasurePlugin/Model/polyline.js +3 -2
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +1 -56
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +17 -66
- package/libs/PanoMeasurePlugin/index.js +18 -64
- package/libs/PanoMeasurePlugin/typings/data.d.ts +1 -2
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +5 -59
- package/libs/PanoMeasurePlugin/utils/line.js +3 -2
- package/libs/PanoRulerProPlugin/Controller.js +34 -89
- package/libs/PanoRulerProPlugin/RulerItems.js +92 -147
- package/libs/PanoRulerProPlugin/index.js +10 -65
- package/libs/PanoSpatialTagPlugin/Plugin.js +130 -178
- package/libs/PanoSpatialTagPlugin/index.js +6 -54
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +61 -116
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +138 -193
- package/libs/PanoTagPlugin/Components/Tag/index.js +140 -194
- package/libs/PanoTagPlugin/Components/TagContainer.js +58 -112
- package/libs/PanoTagPlugin/Components/TagItem.js +137 -191
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +109 -164
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +22 -76
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +33 -87
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +39 -94
- package/libs/PanoTagPlugin/controller/TagRender.js +18 -62
- package/libs/PanoTagPlugin/controller/TagUtil.js +80 -124
- package/libs/PanoTagPlugin/controller/index.js +37 -81
- package/libs/PanoTagPlugin/index.js +28 -72
- package/libs/PanoTagPlugin/utils/model/mediaPlane.js +14 -14
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +22 -77
- package/libs/PanoVideoPlugin/Controller.js +43 -96
- package/libs/PanoVideoPlugin/VideoMeshController.js +64 -119
- package/libs/PanoVideoPlugin/index.js +14 -67
- package/libs/PipelinePlugin/Controller.js +123 -176
- package/libs/PipelinePlugin/index.js +11 -64
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +15 -70
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +3 -58
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +42 -97
- package/libs/Sculpt/Editors/BoxMeshEditor.d.ts +5 -0
- package/libs/Sculpt/Editors/BoxMeshEditor.js +98 -0
- package/libs/Sculpt/Editors/CircleMeshEditor.d.ts +5 -0
- package/libs/Sculpt/Editors/CircleMeshEditor.js +9 -0
- package/libs/Sculpt/Editors/CylinderMeshEditor.d.ts +5 -0
- package/libs/Sculpt/Editors/CylinderMeshEditor.js +41 -0
- package/libs/Sculpt/Editors/PrismMeshEditor.d.ts +5 -0
- package/libs/Sculpt/Editors/PrismMeshEditor.js +43 -0
- package/libs/Sculpt/Editors/RectangleMeshEditor.d.ts +5 -0
- package/libs/Sculpt/Editors/RectangleMeshEditor.js +70 -0
- package/libs/Sculpt/Meshes/Box.d.ts +6 -24
- package/libs/Sculpt/Meshes/Box.js +22 -93
- package/libs/Sculpt/Meshes/Circle.d.ts +0 -4
- package/libs/Sculpt/Meshes/Circle.js +18 -27
- package/libs/Sculpt/Meshes/Cylinder.d.ts +0 -1
- package/libs/Sculpt/Meshes/Cylinder.js +17 -24
- package/libs/Sculpt/Meshes/Line.d.ts +9 -22
- package/libs/Sculpt/Meshes/Line.js +85 -104
- package/libs/Sculpt/Meshes/LineWithDots.js +10 -14
- package/libs/Sculpt/Meshes/Point.js +29 -34
- package/libs/Sculpt/Meshes/Polygon.d.ts +1 -5
- package/libs/Sculpt/Meshes/Polygon.js +40 -53
- package/libs/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
- package/libs/Sculpt/Meshes/Prism.d.ts +29 -10
- package/libs/Sculpt/Meshes/Prism.js +108 -84
- package/libs/Sculpt/Meshes/Rectangle.d.ts +1 -1
- package/libs/Sculpt/Meshes/Rectangle.js +7 -10
- package/libs/Sculpt/Meshes/RectangleWithEdge.js +17 -20
- package/libs/Sculpt/Objects/Base/index.d.ts +2 -1
- package/libs/Sculpt/Objects/Base/index.js +16 -17
- package/libs/Sculpt/Objects/Box/index.d.ts +7 -2
- package/libs/Sculpt/Objects/Box/index.js +72 -60
- package/libs/Sculpt/Objects/Circle/index.d.ts +3 -0
- package/libs/Sculpt/Objects/Circle/index.js +34 -30
- package/libs/Sculpt/Objects/Cylinder/index.d.ts +3 -0
- package/libs/Sculpt/Objects/Cylinder/index.js +46 -42
- package/libs/Sculpt/Objects/Line/Editor.js +8 -10
- package/libs/Sculpt/Objects/Line/index.d.ts +3 -0
- package/libs/Sculpt/Objects/Line/index.js +45 -41
- package/libs/Sculpt/Objects/Point/index.d.ts +3 -0
- package/libs/Sculpt/Objects/Point/index.js +33 -29
- package/libs/Sculpt/Objects/Polygon/index.d.ts +3 -0
- package/libs/Sculpt/Objects/Polygon/index.js +67 -63
- package/libs/Sculpt/Objects/Polyline/index.d.ts +3 -0
- package/libs/Sculpt/Objects/Polyline/index.js +46 -42
- package/libs/Sculpt/Objects/Prism/index.d.ts +3 -0
- package/libs/Sculpt/Objects/Prism/index.js +58 -53
- package/libs/Sculpt/Objects/Rectangle/index.d.ts +12 -0
- package/libs/Sculpt/Objects/Rectangle/index.js +142 -81
- package/libs/Sculpt/index.d.ts +11 -10
- package/libs/Sculpt/index.js +105 -107
- package/libs/Sculpt/typings/style.d.ts +6 -0
- package/libs/Sculpt/utils/export.d.ts +24 -18
- package/libs/Sculpt/utils/export.js +52 -19
- package/libs/Sculpt/utils/sortPositionsByCameraPosition.d.ts +5 -0
- package/libs/Sculpt/utils/sortPositionsByCameraPosition.js +9 -0
- package/libs/Sculpt/utils/three/ColoredMesh.d.ts +4 -0
- package/libs/Sculpt/utils/three/ColoredMesh.js +40 -37
- package/libs/base/BasePlugin.js +10 -15
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +96 -147
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +12 -63
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +53 -105
- package/libs/floorplan/ModelFloorplanPlugin/index.js +11 -63
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +65 -118
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +11 -64
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +54 -106
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +11 -63
- package/libs/floorplan/index.js +0 -5
- package/libs/index.d.ts +79 -1
- package/libs/index.js +229 -215
- package/libs/shared-utils/Object3DHelper/Base/BaseController.d.ts +1 -0
- package/libs/shared-utils/Object3DHelper/Base/BaseController.js +112 -122
- package/libs/shared-utils/Object3DHelper/Base/BaseHelper.d.ts +7 -3
- package/libs/shared-utils/Object3DHelper/Base/BaseHelper.js +60 -39
- package/libs/shared-utils/Object3DHelper/Controller/RotateController.js +47 -47
- package/libs/shared-utils/Object3DHelper/Controller/ScaleController.d.ts +0 -1
- package/libs/shared-utils/Object3DHelper/Controller/ScaleController.js +28 -28
- package/libs/shared-utils/Object3DHelper/Helper/BoundingBoxHelper.d.ts +3 -1
- package/libs/shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js +25 -18
- package/libs/shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.d.ts +2 -0
- package/libs/shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js +18 -14
- package/libs/shared-utils/Object3DHelper/Helper/MoveHelper.d.ts +2 -1
- package/libs/shared-utils/Object3DHelper/Helper/MoveHelper.js +1 -0
- package/libs/shared-utils/Object3DHelper/Helper/RotateHelper.d.ts +2 -1
- package/libs/shared-utils/Object3DHelper/Helper/RotateHelper.js +2 -1
- package/libs/shared-utils/Object3DHelper/Helper/ScaleHelper.d.ts +4 -2
- package/libs/shared-utils/Object3DHelper/Helper/ScaleHelper.js +40 -28
- package/libs/shared-utils/Object3DHelper/typings/index.d.ts +1 -1
- package/libs/shared-utils/Object3DHelper/utils/calculateScaleByCamera.d.ts +4 -1
- package/libs/shared-utils/Object3DHelper/utils/calculateScaleByCamera.js +4 -4
- package/libs/shared-utils/five/FiveDomEvents.js +88 -88
- package/libs/shared-utils/five/FiveLine.d.ts +18 -14
- package/libs/shared-utils/five/FiveLine.js +31 -13
- package/libs/shared-utils/five/index.js +2 -7
- package/libs/shared-utils/five/lookObject.js +27 -32
- package/libs/shared-utils/index.d.ts +0 -1
- package/libs/shared-utils/index.js +31 -33
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/math/planimetry.d.ts +1 -1
- package/libs/shared-utils/tag.d.ts +5 -7
- package/libs/shared-utils/tag.js +1 -1
- package/libs/shared-utils/three/boundingBox.d.ts +14 -20
- package/libs/shared-utils/three/core/LineGeometry.d.ts +13 -0
- package/libs/shared-utils/three/core/LineGeometry.js +26 -0
- package/libs/shared-utils/three/core/PrismGeometry.d.ts +14 -0
- package/libs/shared-utils/three/core/PrismGeometry.js +42 -0
- package/libs/shared-utils/three/earcut3D.js +5 -5
- package/libs/shared-utils/three/geometryUtil.d.ts +8 -0
- package/libs/shared-utils/three/geometryUtil.js +3 -1
- package/libs/shared-utils/three/getNormal.d.ts +5 -2
- package/libs/shared-utils/three/getNormal.js +6 -5
- package/libs/shared-utils/three/index.js +0 -5
- package/package.json +1 -1
- package/dist/Sculpt/Objects/Box/Editor.d.ts +0 -5
- package/dist/Sculpt/Objects/Circle/Editor.d.ts +0 -5
- package/dist/Sculpt/Objects/Cylinder/Editor.d.ts +0 -5
- package/dist/Sculpt/Objects/Prism/Editor.d.ts +0 -5
- package/dist/Sculpt/Objects/Rectangle/Editor.d.ts +0 -5
- package/dist/Sculpt/utils/getBetterNormal.d.ts +0 -2
- package/libs/Sculpt/Objects/Box/Editor.d.ts +0 -5
- package/libs/Sculpt/Objects/Box/Editor.js +0 -44
- package/libs/Sculpt/Objects/Circle/Editor.d.ts +0 -5
- package/libs/Sculpt/Objects/Circle/Editor.js +0 -9
- package/libs/Sculpt/Objects/Cylinder/Editor.d.ts +0 -5
- package/libs/Sculpt/Objects/Cylinder/Editor.js +0 -41
- package/libs/Sculpt/Objects/Prism/Editor.d.ts +0 -5
- package/libs/Sculpt/Objects/Prism/Editor.js +0 -44
- package/libs/Sculpt/Objects/Rectangle/Editor.d.ts +0 -5
- package/libs/Sculpt/Objects/Rectangle/Editor.js +0 -9
- package/libs/Sculpt/utils/getBetterNormal.d.ts +0 -2
- package/libs/Sculpt/utils/getBetterNormal.js +0 -8
- package/libs/vendor/three/build/three.module.js +0 -19336
- package/libs/vendor/three/examples/jsm/lines/LineGeometry.js +0 -28
- package/libs/vendor/three/examples/jsm/lines/LineSegmentsGeometry.js +0 -69
|
@@ -29,80 +29,27 @@ import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
|
|
|
29
29
|
import "../shared-utils/three/centerPoint.js";
|
|
30
30
|
import "../shared-utils/three/getObjectVisible.js";
|
|
31
31
|
import "@realsee/five/line";
|
|
32
|
-
import "../
|
|
33
|
-
import "../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
|
|
34
|
-
import "../vendor/three/build/three.module.js";
|
|
32
|
+
import "../shared-utils/isNil.js";
|
|
35
33
|
import "../shared-utils/three/core/Sphere.js";
|
|
36
34
|
import "animejs";
|
|
37
|
-
import "../shared-utils/isNil.js";
|
|
38
35
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
39
|
-
import "../
|
|
40
|
-
import "../shared-utils/
|
|
41
|
-
import "../shared-utils/three/earcut3D.js";
|
|
42
|
-
import "earcut";
|
|
43
|
-
import "../shared-utils/three/getNormal.js";
|
|
44
|
-
import "../PanoMeasurePlugin/utils/isIntersecting.js";
|
|
45
|
-
import "../Sculpt/typings/style.js";
|
|
46
|
-
import "../Sculpt/utils/three/ColoredMesh.js";
|
|
47
|
-
import "../shared-utils/three/IObject3D.js";
|
|
48
|
-
import "../Sculpt/utils/Modules/Global.js";
|
|
49
|
-
import "../Sculpt/utils/Modules/Cursor.js";
|
|
50
|
-
import "../Object3DHelperPlugin/Controller.js";
|
|
51
|
-
import "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
52
|
-
import "../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
53
|
-
import "../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
54
|
-
import "../shared-utils/three/boundingBox.js";
|
|
55
|
-
import "../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
56
|
-
import "../shared-utils/Object3DHelper/utils/direction.js";
|
|
57
|
-
import "../shared-utils/Object3DHelper/Constants/color.js";
|
|
58
|
-
import "../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
59
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
36
|
+
import "../shared-utils/three/PointSelector/utils/html.js";
|
|
37
|
+
import "../shared-utils/five/initialCSS3DRender.js";
|
|
60
38
|
import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
61
39
|
import "../CSS3DRenderPlugin/utils/three/THREEJS_CSS3DRenderer.js";
|
|
62
40
|
import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
|
|
63
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
64
|
-
import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
65
|
-
import "../shared-utils/util.js";
|
|
66
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
67
|
-
import "../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
68
|
-
import "../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
69
|
-
import "../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
70
|
-
import "../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
71
|
-
import "../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
72
|
-
import "../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
73
|
-
import "../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
74
|
-
import "../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
75
|
-
import "../shared-utils/threex/domevents/index.js";
|
|
76
|
-
import "../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
77
|
-
import "../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
78
|
-
import "../Sculpt/utils/three/rayOnLine.js";
|
|
79
|
-
import "../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
80
|
-
import "../shared-utils/Object3DHelper/index.js";
|
|
81
|
-
import "../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
82
|
-
import "../shared-utils/math/rad2Deg.js";
|
|
83
|
-
import "../shared-utils/math/deg2Rad.js";
|
|
84
|
-
import "../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
85
|
-
import "../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
86
|
-
import "../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
87
|
-
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
88
|
-
import "../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
89
|
-
import "../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
90
|
-
import "../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
91
|
-
import "../shared-utils/five/fiveModelLoad.js";
|
|
92
|
-
import "../shared-utils/five/FiveDomEvents.js";
|
|
93
|
-
import "../shared-utils/five/calculateThreeMouse.js";
|
|
94
|
-
import "../shared-utils/isTouchDevice.js";
|
|
95
|
-
import "../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
96
|
-
import "../shared-utils/three/geometryUtil.js";
|
|
97
|
-
import "../Sculpt/utils/Meshes/getLengthHTML.js";
|
|
98
|
-
import "../shared-utils/three/applyObjectMatrixWorld.js";
|
|
99
|
-
import "../shared-utils/three/PointSelector/utils/html.js";
|
|
100
|
-
import "../shared-utils/five/initialCSS3DRender.js";
|
|
101
41
|
import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
102
42
|
import "../Sculpt/Meshes/Line.js";
|
|
43
|
+
import "../Sculpt/typings/style.js";
|
|
103
44
|
import "../shared-utils/five/FiveLine.js";
|
|
45
|
+
import "../shared-utils/three/IObject3D.js";
|
|
104
46
|
import "../Sculpt/utils/removeAllTag.js";
|
|
47
|
+
import "../Sculpt/utils/Meshes/getLengthHTML.js";
|
|
48
|
+
import "../shared-utils/three/applyObjectMatrixWorld.js";
|
|
49
|
+
import "../shared-utils/util.js";
|
|
50
|
+
import "../shared-utils/three/core/LineGeometry.js";
|
|
105
51
|
import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
52
|
+
import "../shared-utils/isTouchDevice.js";
|
|
106
53
|
import "../shared-utils/five/getPosition.js";
|
|
107
54
|
import "../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
108
55
|
import "../shared-utils/three/PointSelector/utils/contents.js";
|
|
@@ -118,7 +65,7 @@ import "../components/AreaLabel/LabelItem.js";
|
|
|
118
65
|
import "../vendor/svelte/internal/index.js";
|
|
119
66
|
import "../components/AreaLabel/Assets/roomLabelBg.js";
|
|
120
67
|
import "../shared-utils/math/planimetry.js";
|
|
121
|
-
const
|
|
68
|
+
const wr = (r, o) => new t(r, o);
|
|
122
69
|
export {
|
|
123
|
-
|
|
70
|
+
wr as AreaMakerPlugin
|
|
124
71
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var b = Object.defineProperty;
|
|
2
|
-
var k = (a,
|
|
3
|
-
var
|
|
2
|
+
var k = (a, e, t) => e in a ? b(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
|
|
3
|
+
var i = (a, e, t) => (k(a, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
4
|
import * as r from "three";
|
|
5
5
|
import "../../shared-utils/tag.js";
|
|
6
6
|
import "hammerjs";
|
|
@@ -8,16 +8,11 @@ import { Subscribe as y } from "../../shared-utils/Subscribe.js";
|
|
|
8
8
|
import "../../shared-utils/three/PointSelector/index.js";
|
|
9
9
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
10
10
|
import "@realsee/five/line";
|
|
11
|
-
import "../../vendor/three/examples/jsm/lines/LineGeometry.js";
|
|
12
11
|
import { Object3D as T } from "../../shared-utils/three/core/Object3D.js";
|
|
13
12
|
import { LineSegments as C } from "../../shared-utils/three/core/LineSegments.js";
|
|
14
13
|
import "../../shared-utils/three/core/Sphere.js";
|
|
15
14
|
import "animejs";
|
|
16
15
|
import { BetterTween as O } from "../../shared-utils/animationFrame/BetterTween.js";
|
|
17
|
-
import "../../Sculpt/Meshes/Polygon.js";
|
|
18
|
-
import "../../Sculpt/utils/Modules/Global.js";
|
|
19
|
-
import "../../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
20
|
-
import "../../Sculpt/utils/three/rayOnLine.js";
|
|
21
16
|
import { LabelItem as v } from "../../components/AreaLabel/LabelItem.js";
|
|
22
17
|
import { getCenterPointOfPoints as M } from "../../shared-utils/math/planimetry.js";
|
|
23
18
|
import { resizeObserver as V } from "../../shared-utils/dom/resizeObserver.js";
|
|
@@ -56,136 +51,86 @@ import "../../Sculpt/utils/removeAllTag.js";
|
|
|
56
51
|
import "../../Sculpt/utils/Meshes/getLengthHTML.js";
|
|
57
52
|
import "../../shared-utils/three/applyObjectMatrixWorld.js";
|
|
58
53
|
import "../../shared-utils/util.js";
|
|
54
|
+
import "../../shared-utils/three/core/LineGeometry.js";
|
|
59
55
|
import "../../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
60
56
|
import "../../shared-utils/isTouchDevice.js";
|
|
61
57
|
import "../../shared-utils/five/getPosition.js";
|
|
62
58
|
import "../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
63
59
|
import "../../shared-utils/three/PointSelector/utils/contents.js";
|
|
64
|
-
import "../../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
|
|
65
|
-
import "../../vendor/three/build/three.module.js";
|
|
66
60
|
import "../../shared-utils/animationFrame/index.js";
|
|
67
|
-
import "../../shared-utils/three/generatePolygonGeometry.js";
|
|
68
|
-
import "../../shared-utils/three/earcut3D.js";
|
|
69
|
-
import "earcut";
|
|
70
|
-
import "../../shared-utils/three/getNormal.js";
|
|
71
|
-
import "../../PanoMeasurePlugin/utils/isIntersecting.js";
|
|
72
|
-
import "../../Sculpt/utils/three/ColoredMesh.js";
|
|
73
|
-
import "../../shared-utils/three/geometryUtil.js";
|
|
74
|
-
import "../../Sculpt/utils/Modules/Cursor.js";
|
|
75
|
-
import "../../Object3DHelperPlugin/Controller.js";
|
|
76
|
-
import "../../base/BasePlugin.js";
|
|
77
|
-
import "../../shared-utils/url/absoluteUrl.js";
|
|
78
|
-
import "../../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
79
|
-
import "../../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
80
|
-
import "../../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
81
|
-
import "../../shared-utils/three/boundingBox.js";
|
|
82
|
-
import "../../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
83
|
-
import "../../shared-utils/Object3DHelper/utils/direction.js";
|
|
84
|
-
import "../../shared-utils/Object3DHelper/Constants/color.js";
|
|
85
|
-
import "../../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
86
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
87
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
88
|
-
import "../../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
89
|
-
import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
90
|
-
import "../../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
91
|
-
import "../../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
92
|
-
import "../../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
93
|
-
import "../../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
94
|
-
import "../../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
95
|
-
import "../../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
96
|
-
import "../../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
97
|
-
import "../../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
98
|
-
import "../../shared-utils/threex/domevents/index.js";
|
|
99
|
-
import "../../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
100
|
-
import "../../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
101
|
-
import "../../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
102
|
-
import "../../shared-utils/Object3DHelper/index.js";
|
|
103
|
-
import "../../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
104
|
-
import "../../shared-utils/math/rad2Deg.js";
|
|
105
|
-
import "../../shared-utils/math/deg2Rad.js";
|
|
106
|
-
import "../../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
107
|
-
import "../../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
108
|
-
import "../../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
109
|
-
import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
110
|
-
import "../../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
111
|
-
import "../../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
112
|
-
import "../../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
113
|
-
import "../../shared-utils/five/fiveModelLoad.js";
|
|
114
|
-
import "../../shared-utils/five/FiveDomEvents.js";
|
|
115
|
-
import "../../shared-utils/five/calculateThreeMouse.js";
|
|
116
|
-
import "../../shared-utils/three/core/Raycaster.js";
|
|
117
61
|
import "../../vendor/svelte/internal/index.js";
|
|
118
62
|
import "../../components/AreaLabel/Assets/roomLabelBg.js";
|
|
63
|
+
import "../../shared-utils/three/core/Raycaster.js";
|
|
119
64
|
class P extends T {
|
|
120
65
|
constructor(t) {
|
|
121
66
|
super();
|
|
122
|
-
|
|
67
|
+
i(this, "areaMakerItem");
|
|
123
68
|
this.areaMakerItem = t;
|
|
124
69
|
}
|
|
125
|
-
raycast(t,
|
|
126
|
-
this.areaMakerItem.makerObject.raycast(t,
|
|
70
|
+
raycast(t, s) {
|
|
71
|
+
this.areaMakerItem.makerObject.raycast(t, s);
|
|
127
72
|
}
|
|
128
73
|
}
|
|
129
|
-
class
|
|
130
|
-
constructor(
|
|
131
|
-
|
|
74
|
+
class It {
|
|
75
|
+
constructor(e, t) {
|
|
76
|
+
i(this, "id");
|
|
132
77
|
/** 标注名称 */
|
|
133
|
-
|
|
78
|
+
i(this, "name", "");
|
|
134
79
|
/** 标注几何体 */
|
|
135
|
-
|
|
80
|
+
i(this, "makerObject");
|
|
136
81
|
/** 标注几何体的边框 */
|
|
137
|
-
|
|
82
|
+
i(this, "outline");
|
|
138
83
|
/** 标注底面 Y 坐标 */
|
|
139
|
-
|
|
84
|
+
i(this, "bottomY");
|
|
140
85
|
/** 标注透明度 */
|
|
141
|
-
|
|
86
|
+
i(this, "opacity");
|
|
142
87
|
/** 标注高度 */
|
|
143
|
-
|
|
88
|
+
i(this, "height");
|
|
144
89
|
/** 标注所在楼层 */
|
|
145
|
-
|
|
90
|
+
i(this, "floorIndex");
|
|
146
91
|
/** 标注底面形状 */
|
|
147
|
-
|
|
92
|
+
i(this, "shape");
|
|
148
93
|
/** 是否被挂载 */
|
|
149
|
-
|
|
94
|
+
i(this, "mounted", !1);
|
|
150
95
|
/** 查询问题使用的调试对象 */
|
|
151
|
-
|
|
96
|
+
i(this, "checkMsg", {
|
|
152
97
|
/** 当标注没有展示时,可以通过这个字段查看原因 */
|
|
153
98
|
checkVisibleMsg: "",
|
|
154
99
|
/** 当标注标签没有展示时,可以通过这个字段查看原因 */
|
|
155
100
|
checkTagVisibleMsg: ""
|
|
156
101
|
});
|
|
157
102
|
/** 模型容器 */
|
|
158
|
-
|
|
103
|
+
i(this, "modelGroup");
|
|
159
104
|
/** 标注是否可见 */
|
|
160
|
-
|
|
105
|
+
i(this, "visible", !0);
|
|
161
106
|
// ==================== 标签相关 ====================
|
|
162
107
|
/** 标注标签实例 */
|
|
163
|
-
|
|
108
|
+
i(this, "tagApp");
|
|
164
109
|
/** 标注标签是否可见 */
|
|
165
|
-
|
|
110
|
+
i(this, "tagVisible", null);
|
|
166
111
|
/** 标注标签的世界坐标 */
|
|
167
|
-
|
|
112
|
+
i(this, "tagPosition", new r.Vector3());
|
|
168
113
|
/** 标注标签的 NDC 坐标 */
|
|
169
|
-
|
|
114
|
+
i(this, "tagNDCPosition", new r.Vector3());
|
|
170
115
|
/** 标注标签的 transform */
|
|
171
|
-
|
|
116
|
+
i(this, "tagTransform", { left: 0, top: 0 });
|
|
172
117
|
/** 标注标签的显示层级 */
|
|
173
|
-
|
|
118
|
+
i(this, "tagZIndex", 0);
|
|
174
119
|
/** 标注实例的事件处理器 */
|
|
175
|
-
|
|
120
|
+
i(this, "hooks", new y());
|
|
176
121
|
/** 自定义 Dom */
|
|
177
|
-
|
|
122
|
+
i(this, "itemRenderer");
|
|
178
123
|
/** 数据 */
|
|
179
|
-
|
|
124
|
+
i(this, "data");
|
|
180
125
|
/** Plugin 实例 */
|
|
181
|
-
|
|
126
|
+
i(this, "plugin");
|
|
182
127
|
/** 标注透明度动画 */
|
|
183
|
-
|
|
128
|
+
i(this, "opacityAnime");
|
|
184
129
|
/** 是否在容器 resize 动画中 */
|
|
185
|
-
|
|
130
|
+
i(this, "isInContainerResizeAnimation", !1);
|
|
186
131
|
/** 监听容器 resize 的计时器 id,用于判断 resize 过程是否结束 */
|
|
187
|
-
|
|
188
|
-
|
|
132
|
+
i(this, "containerResizeTimeoutID", null);
|
|
133
|
+
i(this, "resizeObserver");
|
|
189
134
|
/** 显示标注 */
|
|
190
135
|
// public show() {
|
|
191
136
|
// return this.doOpacityAnime({
|
|
@@ -205,111 +150,111 @@ class Si {
|
|
|
205
150
|
// })
|
|
206
151
|
// }
|
|
207
152
|
/** 透明度动画 */
|
|
208
|
-
|
|
209
|
-
var
|
|
210
|
-
(
|
|
211
|
-
const t =
|
|
153
|
+
i(this, "doOpacityAnime", (e) => {
|
|
154
|
+
var m;
|
|
155
|
+
(m = this.opacityAnime) == null || m.dispose();
|
|
156
|
+
const t = e.duration, [s, o] = e.makerObjectOpacity, [h, n] = e.outlineOpacity;
|
|
212
157
|
if (t === 0) {
|
|
213
|
-
this.makerObject.material.opacity =
|
|
158
|
+
this.makerObject.material.opacity = o, this.outline.material.opacity = n;
|
|
214
159
|
return;
|
|
215
160
|
}
|
|
216
|
-
return new Promise((
|
|
217
|
-
this.opacityAnime = new O({ makerObjectOpacity:
|
|
218
|
-
makerObjectOpacity:
|
|
161
|
+
return new Promise((p) => {
|
|
162
|
+
this.opacityAnime = new O({ makerObjectOpacity: s, outlineOpacity: h }).to({
|
|
163
|
+
makerObjectOpacity: o,
|
|
219
164
|
outlineOpacity: n
|
|
220
165
|
}).onUpdate(({ makerObjectOpacity: l, outlineOpacity: c }) => {
|
|
221
166
|
this.makerObject.material.opacity = l, this.outline.material.opacity = c, this.plugin.five.needsRender = !0;
|
|
222
|
-
}).onComplete(() =>
|
|
223
|
-
this.makerObject.material.opacity =
|
|
167
|
+
}).onComplete(() => p(!0)).onDispose(() => {
|
|
168
|
+
this.makerObject.material.opacity = o, this.outline.material.opacity = n, this.plugin.five.needsRender = !0, p(!1);
|
|
224
169
|
}).play();
|
|
225
170
|
});
|
|
226
171
|
});
|
|
227
172
|
/** 插件 Config 变化时更新自身 depthTest */
|
|
228
|
-
|
|
229
|
-
this.makerObject.material.depthTest =
|
|
173
|
+
i(this, "onPluginConfigChange", (e) => {
|
|
174
|
+
this.makerObject.material.depthTest = e.config.modelDepthTest, this.outline.material.depthTest = e.config.modelDepthTest, this.plugin.five.needsRender = !0;
|
|
230
175
|
});
|
|
231
176
|
/** 插件整体可见性变化时,需要更新自身可见性 */
|
|
232
|
-
|
|
177
|
+
i(this, "onPluginStateChange", () => {
|
|
233
178
|
this.updateVisible(), this.updateTagVisible();
|
|
234
179
|
});
|
|
235
180
|
/** 更新标注可见性 */
|
|
236
|
-
|
|
237
|
-
var
|
|
238
|
-
const { result:
|
|
239
|
-
if (this.checkMsg.checkVisibleMsg = t, this.visible ===
|
|
181
|
+
i(this, "updateVisible", () => {
|
|
182
|
+
var o;
|
|
183
|
+
const { result: e, msg: t } = this.checkVisible();
|
|
184
|
+
if (this.checkMsg.checkVisibleMsg = t, this.visible === e)
|
|
240
185
|
return;
|
|
241
|
-
this.visible =
|
|
242
|
-
const
|
|
243
|
-
this.modelGroup.visible =
|
|
186
|
+
this.visible = e;
|
|
187
|
+
const s = (o = this.data.object_data.visible) != null ? o : !0;
|
|
188
|
+
this.modelGroup.visible = e && s, this.plugin.five.needsRender = !0;
|
|
244
189
|
});
|
|
245
190
|
/** 检测标注是否可见 */
|
|
246
|
-
|
|
191
|
+
i(this, "checkVisible", () => {
|
|
247
192
|
if (!this.plugin.state.visible)
|
|
248
193
|
return { result: !1, msg: "插件不可见" };
|
|
249
194
|
const t = this.plugin.fiveUtil.model.shownFloor;
|
|
250
195
|
return t === null || t === this.floorIndex ? { result: !0, msg: "" } : { result: !1, msg: `模型高亮楼层不符合展示条件, 当前高亮楼层为:${t}` };
|
|
251
196
|
});
|
|
252
197
|
/** 更新标注标签 */
|
|
253
|
-
|
|
198
|
+
i(this, "updateTag", () => {
|
|
254
199
|
this.tagApp && (this.updateTagNDCPosition(), this.updateTagDomTransform(), this.updateTagVisible());
|
|
255
200
|
});
|
|
256
201
|
/** 更新标注标签的 NDC Position */
|
|
257
|
-
|
|
202
|
+
i(this, "updateTagNDCPosition", () => {
|
|
258
203
|
const t = this.tagPosition.clone().project(this.plugin.five.camera);
|
|
259
204
|
this.tagNDCPosition.copy(t);
|
|
260
205
|
});
|
|
261
206
|
/** 更新标注标签的 transform */
|
|
262
|
-
|
|
263
|
-
var
|
|
264
|
-
const
|
|
265
|
-
this.tagTransform.left === t && this.tagTransform.top ===
|
|
207
|
+
i(this, "updateTagDomTransform", () => {
|
|
208
|
+
var o;
|
|
209
|
+
const e = this.tagNDCPosition, t = Math.round((e.x + 1) / 2 * this.plugin.tagDomContainer.clientWidth), s = Math.round((-e.y + 1) / 2 * this.plugin.tagDomContainer.clientHeight);
|
|
210
|
+
this.tagTransform.left === t && this.tagTransform.top === s || (this.tagTransform = { left: t, top: s }, (o = this.tagApp) == null || o.$set({ transform: `translate(${t}px, ${s}px)` }));
|
|
266
211
|
});
|
|
267
212
|
/** 更新标注标签可见性 */
|
|
268
|
-
|
|
269
|
-
var
|
|
270
|
-
const { result:
|
|
271
|
-
this.checkMsg.checkTagVisibleMsg = t, this.tagVisible !==
|
|
213
|
+
i(this, "updateTagVisible", () => {
|
|
214
|
+
var s;
|
|
215
|
+
const { result: e, msg: t } = this.checkTagVisible();
|
|
216
|
+
this.checkMsg.checkTagVisibleMsg = t, this.tagVisible !== e && (this.tagVisible = e, this.tagApp && (this.tagVisible ? this.hooks.emit("tagShow") : this.hooks.emit("tagHide"), (s = this.tagApp) == null || s.$set({ visible: e })));
|
|
272
217
|
});
|
|
273
218
|
/** 检测标注标签是否可见 */
|
|
274
|
-
|
|
219
|
+
i(this, "checkTagVisible", () => {
|
|
275
220
|
if (!this.visible)
|
|
276
221
|
return { result: !1, msg: "标注整体不可见" };
|
|
277
222
|
if (this.isInContainerResizeAnimation)
|
|
278
223
|
return { result: !1, msg: "处于容器 resize 动画中" };
|
|
279
|
-
const t = this.plugin.five,
|
|
280
|
-
d.set(
|
|
281
|
-
const [
|
|
282
|
-
if (
|
|
224
|
+
const t = this.plugin.five, s = t.camera.position.clone();
|
|
225
|
+
d.set(s.clone(), this.tagPosition.clone().sub(s).normalize());
|
|
226
|
+
const [o] = this.plugin.fiveUtil.model.intersectRaycaster(d), h = this.tagPosition.distanceTo(t.camera.position);
|
|
227
|
+
if (o && o.distance + 0.1 < h)
|
|
283
228
|
return { result: !1, msg: "标注标签被 Five 模型遮挡" };
|
|
284
229
|
const n = this.tagNDCPosition;
|
|
285
230
|
return Math.abs(n.x) > 1.2 || Math.abs(n.y) > 1.2 || Math.abs(n.z) > 1 ? { result: !1, msg: "标注标签不在屏幕内" } : { result: !0, msg: "" };
|
|
286
231
|
});
|
|
287
232
|
/** 相机位姿发生变化时,更新标签 */
|
|
288
|
-
|
|
233
|
+
i(this, "onFiveCameraUpdate", () => {
|
|
289
234
|
this.tagApp && this.visible && (this.updateTagNDCPosition(), this.updateTagDomTransform(), this.updateTagVisible());
|
|
290
235
|
});
|
|
291
236
|
/** tag container DOM 发生 resize */
|
|
292
|
-
|
|
237
|
+
i(this, "onContainerResize", () => {
|
|
293
238
|
this.isInContainerResizeAnimation === !1 && (this.isInContainerResizeAnimation = !0, this.updateTag());
|
|
294
239
|
const t = () => {
|
|
295
240
|
this.isInContainerResizeAnimation = !1, this.containerResizeTimeoutID = null, this.updateTag();
|
|
296
241
|
};
|
|
297
242
|
this.containerResizeTimeoutID && clearTimeout(this.containerResizeTimeoutID), this.containerResizeTimeoutID = setTimeout(t, 100);
|
|
298
243
|
});
|
|
299
|
-
var
|
|
300
|
-
const
|
|
301
|
-
this.data = t, this.id = t.id, this.name = (c = t.name) != null ? c : "", this.plugin =
|
|
244
|
+
var p, l, c, g;
|
|
245
|
+
const s = t.object_data, o = s.bottom_y, h = s.height, n = new r.Color((p = s.color) != null ? p : "#FFFFFF"), m = (l = s.opacity) != null ? l : 0.4;
|
|
246
|
+
this.data = t, this.id = t.id, this.name = (c = t.name) != null ? c : "", this.plugin = e, this.height = h, this.bottomY = o, this.opacity = m, this.shape = new r.Shape().fromJSON(s.shape), this.floorIndex = t.floor_index, this.makerObject = new r.Mesh(f(this.shape, h), j(n, m)), u(this.makerObject, o), this.makerObject.material.depthTest = this.plugin.config.modelDepthTest, this.outline = new C(
|
|
302
247
|
new r.EdgesGeometry(this.makerObject.geometry),
|
|
303
248
|
new r.LineBasicMaterial({ color: n, transparent: !0 })
|
|
304
|
-
), u(this.outline,
|
|
249
|
+
), u(this.outline, o), this.outline.material.depthTest = this.plugin.config.modelDepthTest, this.setHeight(h), this.modelGroup = new P(this), this.modelGroup.visible = (g = s.visible) != null ? g : !0;
|
|
305
250
|
}
|
|
306
251
|
/** 挂载标注 */
|
|
307
252
|
mount() {
|
|
308
253
|
if (this.mounted)
|
|
309
254
|
return;
|
|
310
255
|
this.mounted = !0, this.updateVisible(), this.makerObject.material.depthTest = this.plugin.config.modelDepthTest, this.outline.material.depthTest = this.plugin.config.modelDepthTest, this.modelGroup.add(this.makerObject, this.outline);
|
|
311
|
-
const
|
|
312
|
-
|
|
256
|
+
const e = !!this.name, t = this.plugin.tagDomContainer;
|
|
257
|
+
e && (this.tagApp = new v({
|
|
313
258
|
target: t,
|
|
314
259
|
props: {
|
|
315
260
|
rendererData: this.data,
|
|
@@ -317,39 +262,39 @@ class Si {
|
|
|
317
262
|
visible: this.tagVisible,
|
|
318
263
|
rendererIfNeed: this.itemRenderer,
|
|
319
264
|
transform: `translate(${this.tagTransform.left}px, ${this.tagTransform.top}px)`,
|
|
320
|
-
onClick: (
|
|
265
|
+
onClick: (s) => this.hooks.emit("tagClick", { target: this, nativeEvent: s })
|
|
321
266
|
}
|
|
322
267
|
}), this.updateTag()), this.plugin.five.needsRender = !0, this.plugin.hooks.on("stateChange", this.onPluginStateChange), this.plugin.hooks.on("configChange", this.onPluginConfigChange), this.plugin.five.on("modeChange", this.updateVisible), this.plugin.five.on("modelShownFloorChange", this.updateVisible), this.plugin.five.on("cameraUpdate", this.onFiveCameraUpdate), this.resizeObserver = V(this.onContainerResize, t), this.resizeObserver.observe();
|
|
323
268
|
}
|
|
324
269
|
/** 卸载标注 */
|
|
325
270
|
unmount() {
|
|
326
|
-
var
|
|
327
|
-
this.mounted && (this.mounted = !1, this.modelGroup.remove(...this.modelGroup.children), (
|
|
271
|
+
var e, t;
|
|
272
|
+
this.mounted && (this.mounted = !1, this.modelGroup.remove(...this.modelGroup.children), (e = this.tagApp) == null || e.$destroy(), this.tagApp = null, this.plugin.hooks.off("stateChange", this.onPluginStateChange), this.plugin.hooks.off("configChange", this.onPluginConfigChange), this.plugin.five.off("modeChange", this.updateVisible), this.plugin.five.off("modelShownFloorChange", this.updateVisible), this.plugin.five.off("cameraUpdate", this.onFiveCameraUpdate), (t = this.resizeObserver) == null || t.unobserve());
|
|
328
273
|
}
|
|
329
274
|
/** 更改标注透明度
|
|
330
275
|
* @param opacity 标注透明度,范围:0-1
|
|
331
276
|
*/
|
|
332
|
-
setOpacity(
|
|
277
|
+
setOpacity(e) {
|
|
333
278
|
var t;
|
|
334
|
-
this.opacity =
|
|
279
|
+
this.opacity = e, (t = this.opacityAnime) == null || t.dispose(), this.makerObject.material.opacity = e, this.plugin.five.needsRender = !0;
|
|
335
280
|
}
|
|
336
281
|
/** 更改标注颜色
|
|
337
282
|
* @param color 标注颜色,支持 hex
|
|
338
283
|
* @example setColor('#FF0000')
|
|
339
284
|
*/
|
|
340
|
-
setColor(
|
|
341
|
-
const t = new r.Color(
|
|
285
|
+
setColor(e) {
|
|
286
|
+
const t = new r.Color(e);
|
|
342
287
|
this.makerObject.material.color = t, this.outline.material.color = t, this.plugin.five.needsRender = !0;
|
|
343
288
|
}
|
|
344
289
|
/** 更改标注高度
|
|
345
290
|
* @param height 标注高度,单位:米
|
|
346
291
|
*/
|
|
347
|
-
setHeight(
|
|
348
|
-
if (
|
|
292
|
+
setHeight(e) {
|
|
293
|
+
if (e <= 0)
|
|
349
294
|
throw new Error("高度必须大于 0");
|
|
350
|
-
this.height =
|
|
351
|
-
const t = this.shape.extractPoints(10).shape.slice(0, -1),
|
|
352
|
-
u(
|
|
295
|
+
this.height = e, this.makerObject.geometry = f(this.shape, e), this.outline.geometry = new r.EdgesGeometry(this.makerObject.geometry);
|
|
296
|
+
const t = this.shape.extractPoints(10).shape.slice(0, -1), s = M(t), o = new r.Vector3(s.x, s.y, e);
|
|
297
|
+
u(o, this.bottomY), this.tagPosition.copy(o), this.updateTag(), this.plugin.five.needsRender = !0;
|
|
353
298
|
}
|
|
354
299
|
/** 更改标注标签的显示层级
|
|
355
300
|
* @description 为什么需要这个方法
|
|
@@ -359,28 +304,28 @@ class Si {
|
|
|
359
304
|
* - 标签 A <- 标签 B <- 相机: 标签 A 在标签 B 的后面
|
|
360
305
|
* 但是当前元素是无法感知到这种变化的,所以需要通过父元素调用这个方法来更新标签的层级。
|
|
361
306
|
*/
|
|
362
|
-
setTagZIndex(
|
|
307
|
+
setTagZIndex(e) {
|
|
363
308
|
var t;
|
|
364
|
-
this.tagZIndex !==
|
|
309
|
+
this.tagZIndex !== e && ((t = this.tagApp) == null || t.$set({ zIndex: e }));
|
|
365
310
|
}
|
|
366
311
|
}
|
|
367
|
-
function f(a,
|
|
312
|
+
function f(a, e) {
|
|
368
313
|
return new r.ExtrudeBufferGeometry(a, {
|
|
369
|
-
depth:
|
|
314
|
+
depth: e,
|
|
370
315
|
bevelEnabled: !1
|
|
371
316
|
});
|
|
372
317
|
}
|
|
373
|
-
function j(a,
|
|
318
|
+
function j(a, e) {
|
|
374
319
|
return new r.MeshBasicMaterial({
|
|
375
320
|
color: a,
|
|
376
|
-
opacity:
|
|
321
|
+
opacity: e,
|
|
377
322
|
transparent: !0
|
|
378
323
|
});
|
|
379
324
|
}
|
|
380
|
-
function u(a,
|
|
381
|
-
const t = new r.Matrix4(),
|
|
382
|
-
t.multiply(
|
|
325
|
+
function u(a, e) {
|
|
326
|
+
const t = new r.Matrix4(), s = new r.Matrix4().makeRotationX(Math.PI / 2), o = new r.Matrix4().makeTranslation(0, 0, -e), h = new r.Matrix4().makeScale(1, 1, -1);
|
|
327
|
+
t.multiply(s), t.multiply(o), t.multiply(h), a.applyMatrix4(t);
|
|
383
328
|
}
|
|
384
329
|
export {
|
|
385
|
-
|
|
330
|
+
It as AreaMakerItem
|
|
386
331
|
};
|