@realsee/dnalogel 3.51.0 → 3.52.1
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 +15 -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 -5
- package/dist/Sculpt/Objects/Base/index.d.ts +3 -3
- 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 +13 -2
- package/dist/Sculpt/index.d.ts +10 -19
- 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 +35141 -54254
- 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 -5
- package/libs/Sculpt/Meshes/Rectangle.js +12 -22
- package/libs/Sculpt/Meshes/RectangleWithEdge.js +17 -20
- package/libs/Sculpt/Objects/Base/index.d.ts +3 -3
- package/libs/Sculpt/Objects/Base/index.js +20 -25
- 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 +41 -37
- package/libs/Sculpt/Objects/Cylinder/index.d.ts +3 -0
- package/libs/Sculpt/Objects/Cylinder/index.js +66 -62
- 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 +13 -2
- package/libs/Sculpt/Objects/Rectangle/index.js +143 -81
- package/libs/Sculpt/index.d.ts +10 -19
- 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
|
@@ -37,6 +37,7 @@ export declare abstract class BaseController<T extends BaseHelper = BaseHelper,
|
|
|
37
37
|
originObject3D: K;
|
|
38
38
|
helperObject3D: T;
|
|
39
39
|
container: HTMLElement;
|
|
40
|
+
domEvents: DomEvents;
|
|
40
41
|
scene: THREE.Object3D;
|
|
41
42
|
onRender?: () => void;
|
|
42
43
|
sharedHooks?: Subscribe<HelperEventMap>;
|
|
@@ -27,8 +27,12 @@ export declare abstract class BaseHelper<OriginObject3D extends Object3D = Objec
|
|
|
27
27
|
hide(): void;
|
|
28
28
|
raycasterIntersectObject(raycaster: THREE.Raycaster, intersection?: THREE.Intersection[]): THREE.Intersection[];
|
|
29
29
|
initialPosition(offset?: THREE.Vector3): void;
|
|
30
|
-
setScaleByCamera(camera: THREE.PerspectiveCamera): void;
|
|
31
|
-
initQuaternion(
|
|
30
|
+
setScaleByCamera(camera: THREE.PerspectiveCamera | THREE.OrthographicCamera): void;
|
|
31
|
+
initQuaternion(config?: {
|
|
32
|
+
xAxis?: Vector3;
|
|
33
|
+
yAxis?: Vector3;
|
|
34
|
+
zAxis?: Vector3;
|
|
35
|
+
}): void;
|
|
32
36
|
applyHelperScaleMatrix4(matrix: THREE.Matrix4, origin?: Vector3): void;
|
|
33
37
|
setHelperQuaternion(quaternion: THREE.Quaternion, origin?: Vector3): void;
|
|
34
38
|
applyHelperQuaternion(quaternion: THREE.Quaternion, origin?: Vector3): void;
|
|
@@ -70,7 +74,7 @@ export declare abstract class RotateHelperAbstract<OriginObject3D extends Object
|
|
|
70
74
|
abstract showDraggingHelper(directions: Direction[]): void;
|
|
71
75
|
}
|
|
72
76
|
export declare abstract class ScaleHelperAbstract<OriginObject3D extends Object3D = Object3D> extends BaseHelper<OriginObject3D> {
|
|
73
|
-
abstract scaleMeshes: Array<
|
|
77
|
+
abstract scaleMeshes: Array<Object3D & {
|
|
74
78
|
scalePosition: ScalePosition;
|
|
75
79
|
}>;
|
|
76
80
|
}
|
|
@@ -5,7 +5,6 @@ export declare class ScaleController<T extends ScaleHelperAbstract = ScaleHelper
|
|
|
5
5
|
protected name: string;
|
|
6
6
|
private startInfo?;
|
|
7
7
|
constructor(...params: ConstructorParameters<typeof BaseController<T>>);
|
|
8
|
-
initialHelperQuaternion(): void;
|
|
9
8
|
initialHelperPosition(): void;
|
|
10
9
|
dragStart: (params: {
|
|
11
10
|
intersect: THREE.Intersection;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
2
|
import { BoundingBoxHelperAbstract } from '../Base/BaseHelper';
|
|
3
3
|
export declare class BoundingBoxHelper<T extends THREE.Object3D = THREE.Object3D> extends BoundingBoxHelperAbstract<T> {
|
|
4
|
+
name: string;
|
|
4
5
|
box: THREE.Mesh<THREE.BufferGeometry, THREE.MeshBasicMaterial>;
|
|
5
6
|
outline: THREE.LineSegments<THREE.BufferGeometry, THREE.LineBasicMaterial>;
|
|
6
|
-
private originObject;
|
|
7
7
|
private positionAttribute;
|
|
8
8
|
constructor(originObject: T);
|
|
9
|
+
initQuaternion(): void;
|
|
10
|
+
setHelperQuaternion(quaternion: THREE.Quaternion, origin?: THREE.Vector3): void;
|
|
9
11
|
raycasterIntersectObject(raycaster: THREE.Raycaster, intersection: THREE.Intersection[]): THREE.Intersection[];
|
|
10
12
|
raycast(raycaster: THREE.Raycaster, intersects: THREE.Intersection[]): void;
|
|
11
13
|
private update;
|
|
@@ -5,6 +5,7 @@ import type { Vector3 } from 'three';
|
|
|
5
5
|
import type { CSS3DObjectPlus } from '../../../CSS3DRenderPlugin/utils/three/CSS3DObject';
|
|
6
6
|
type NonVoid<T> = T extends void ? never : T;
|
|
7
7
|
export declare class CSS3DScaleHelper<T extends CSS3DObjectPlus = CSS3DObjectPlus> extends RectangleScaleHelperAbstract<T, HTMLElement> {
|
|
8
|
+
name: string;
|
|
8
9
|
points: RectangleScaleHelperAbstract<THREE.Object3D, HTMLElement>['points'];
|
|
9
10
|
cornerPositions: Vector3[];
|
|
10
11
|
css3DInstance?: NonVoid<Create3DElementReturnType>;
|
|
@@ -16,6 +17,7 @@ export declare class CSS3DScaleHelper<T extends CSS3DObjectPlus = CSS3DObjectPlu
|
|
|
16
17
|
private container;
|
|
17
18
|
private enabled;
|
|
18
19
|
constructor(originObject3D: T, container: HTMLElement, camera: THREE.Camera, scene: THREE.Scene);
|
|
20
|
+
initQuaternion(): void;
|
|
19
21
|
applyMatrix4(matrix: THREE.Matrix4): void;
|
|
20
22
|
showDraggingHelper(): void;
|
|
21
23
|
applyHelperScaleMatrix4(matrix: THREE.Matrix4, origin?: Vector3): void;
|
|
@@ -4,6 +4,7 @@ import { MoveHelperAbstract, type BaseHelperConfig } from '.';
|
|
|
4
4
|
import { ArrowGroup } from './Objects/ArrowGroup';
|
|
5
5
|
import type * as THREE from 'three';
|
|
6
6
|
export declare class MoveHelper extends MoveHelperAbstract {
|
|
7
|
+
name: string;
|
|
7
8
|
xArrow?: ArrowGroup;
|
|
8
9
|
yArrow?: ArrowGroup;
|
|
9
10
|
zArrow?: ArrowGroup;
|
|
@@ -13,7 +14,7 @@ export declare class MoveHelper extends MoveHelperAbstract {
|
|
|
13
14
|
zArrowEnable?: boolean;
|
|
14
15
|
} & BaseHelperConfig);
|
|
15
16
|
show(): void;
|
|
16
|
-
setScaleByCamera(camera: THREE.PerspectiveCamera): void;
|
|
17
|
+
setScaleByCamera(camera: THREE.PerspectiveCamera | THREE.OrthographicCamera): void;
|
|
17
18
|
showDraggingHelper(directions: Direction[]): void;
|
|
18
19
|
dispose(): void;
|
|
19
20
|
}
|
|
@@ -4,6 +4,7 @@ import { RotateHelperAbstract, type BaseHelperConfig } from '../Base/BaseHelper'
|
|
|
4
4
|
import type { Color, Direction } from '../typings';
|
|
5
5
|
import { tipsDom } from './HTML/tipsDom';
|
|
6
6
|
export declare class RotateHelper extends RotateHelperAbstract {
|
|
7
|
+
name: string;
|
|
7
8
|
xCircle?: RotateCircleGroup;
|
|
8
9
|
yCircle?: RotateCircleGroup;
|
|
9
10
|
zCircle?: RotateCircleGroup;
|
|
@@ -19,7 +20,7 @@ export declare class RotateHelper extends RotateHelperAbstract {
|
|
|
19
20
|
} & BaseHelperConfig);
|
|
20
21
|
hide(): void;
|
|
21
22
|
show(): void;
|
|
22
|
-
setScaleByCamera(camera: THREE.PerspectiveCamera): void;
|
|
23
|
+
setScaleByCamera(camera: THREE.PerspectiveCamera | THREE.OrthographicCamera): void;
|
|
23
24
|
showDraggingHelper(directions: Direction[]): void;
|
|
24
25
|
dispose(): void;
|
|
25
26
|
}
|
|
@@ -2,13 +2,15 @@ import * as THREE from 'three';
|
|
|
2
2
|
import { ScaleHelperAbstract, type BaseHelperConfig } from '../Base/BaseHelper';
|
|
3
3
|
import type { ScalePosition } from '../typings';
|
|
4
4
|
export declare class ScaleHelper<T extends THREE.Object3D = THREE.Object3D> extends ScaleHelperAbstract<T> {
|
|
5
|
-
|
|
5
|
+
name: string;
|
|
6
|
+
scaleMeshes: Array<THREE.Object3D & {
|
|
6
7
|
scalePosition: ScalePosition;
|
|
7
8
|
}>;
|
|
8
9
|
private positions;
|
|
9
10
|
constructor(originObject3D: T, config?: {
|
|
10
11
|
positions?: Array<ScalePosition> | (() => Array<ScalePosition>);
|
|
11
12
|
} & BaseHelperConfig);
|
|
13
|
+
initQuaternion(): void;
|
|
12
14
|
initialPosition(offset?: THREE.Vector3): void;
|
|
13
|
-
setScaleByCamera(camera: THREE.PerspectiveCamera): void;
|
|
15
|
+
setScaleByCamera(camera: THREE.PerspectiveCamera | THREE.OrthographicCamera): void;
|
|
14
16
|
}
|
|
@@ -27,9 +27,9 @@ export interface ObjectHelperControllers {
|
|
|
27
27
|
boundingBoxController?: BoundingBoxController;
|
|
28
28
|
}
|
|
29
29
|
export type ScaleCallback = (params: {
|
|
30
|
-
ratio: number;
|
|
31
30
|
intersectPoint: THREE.Vector3;
|
|
32
31
|
scalePosition: ScalePosition;
|
|
32
|
+
offset: THREE.Vector3;
|
|
33
33
|
}) => any;
|
|
34
34
|
export type ScalePosition = {
|
|
35
35
|
id?: string;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import type * as THREE from 'three';
|
|
2
|
-
export default function calculateScaleByCamera(camera:
|
|
2
|
+
export default function calculateScaleByCamera(camera: any, position: THREE.Vector3, limit?: {
|
|
3
|
+
min?: number;
|
|
4
|
+
max?: number;
|
|
5
|
+
}): number;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LineMaterial as Five_LineMaterial, THREE_Line2 as Five_THREE_Line2, Line as Five_Line } from '@realsee/five/line';
|
|
2
|
+
import * as THREE from 'three';
|
|
3
|
+
import type { Merge } from 'type-fest';
|
|
4
|
+
import type { LineGeometry } from '../three/core/LineGeometry';
|
|
5
|
+
export type Color = THREE.Color | string | number;
|
|
2
6
|
export declare class FiveLine extends Five_Line {
|
|
3
7
|
constructor(...args: ConstructorParameters<typeof Five_Line>);
|
|
4
8
|
toJSON(): {
|
|
@@ -7,27 +11,27 @@ export declare class FiveLine extends Five_Line {
|
|
|
7
11
|
};
|
|
8
12
|
}
|
|
9
13
|
export declare class THREE_Line2 extends Five_THREE_Line2 {
|
|
10
|
-
|
|
14
|
+
material: LineMaterial;
|
|
15
|
+
constructor(geometry: LineGeometry, material: LineMaterial);
|
|
11
16
|
toJSON(): {
|
|
12
17
|
type: string;
|
|
13
18
|
geometryAttributes: {
|
|
14
|
-
[name: string]:
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export declare class LineGeometry extends Five_LineGeometry {
|
|
19
|
-
constructor(...args: ConstructorParameters<typeof Five_LineGeometry>);
|
|
20
|
-
toJSON(): {
|
|
21
|
-
type: string;
|
|
22
|
-
attributes: {
|
|
23
|
-
[name: string]: import("three").BufferAttribute | import("three").InterleavedBufferAttribute;
|
|
19
|
+
[name: string]: THREE.BufferAttribute | THREE.InterleavedBufferAttribute;
|
|
24
20
|
};
|
|
25
21
|
};
|
|
26
22
|
}
|
|
27
23
|
export declare class LineMaterial extends Five_LineMaterial {
|
|
28
|
-
|
|
24
|
+
get three_color(): Color;
|
|
25
|
+
set three_color(value: Color);
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated Use `setDashed` to set
|
|
28
|
+
*/
|
|
29
|
+
dashed: boolean;
|
|
30
|
+
private _three_color;
|
|
31
|
+
constructor(params?: Merge<ConstructorParameters<typeof Five_LineMaterial>[0], THREE.MeshBasicMaterialParameters>);
|
|
32
|
+
setDashed(dashed: boolean): void;
|
|
29
33
|
toJSON(): {
|
|
30
34
|
type: string;
|
|
31
|
-
color: number |
|
|
35
|
+
color: number | THREE.Vector3;
|
|
32
36
|
};
|
|
33
37
|
}
|
|
@@ -111,6 +111,6 @@ export declare function getCenterPointOfPoints(points: Point[]): {
|
|
|
111
111
|
x: number;
|
|
112
112
|
y: number;
|
|
113
113
|
};
|
|
114
|
-
export declare function isIntersect(linePoints1: Point[], linePoints2: Point[]):
|
|
114
|
+
export declare function isIntersect(linePoints1: Point[], linePoints2: Point[]): 0 | 1;
|
|
115
115
|
export declare function getAreaSize(points: Point[]): number;
|
|
116
116
|
export declare function getAreaSizeWithoutLine(points: Point[]): number;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import type { Five } from '@realsee/five';
|
|
2
2
|
import { type AnyPosition } from './positionToVector3';
|
|
3
3
|
import * as THREE from 'three';
|
|
4
|
-
interface LightTagConfig {
|
|
5
|
-
wrapper?: HTMLElement;
|
|
6
|
-
positionsForRotate?: AnyPosition[];
|
|
7
|
-
namespace?: string;
|
|
8
|
-
}
|
|
9
4
|
export declare class LightTag {
|
|
10
5
|
/**
|
|
11
6
|
* @description 单个标签 dom
|
|
@@ -55,7 +50,11 @@ export declare class LightTag {
|
|
|
55
50
|
private config;
|
|
56
51
|
private fiveUtil;
|
|
57
52
|
private disposers;
|
|
58
|
-
constructor(five: Five, position?: AnyPosition, config?:
|
|
53
|
+
constructor(five: Five, position?: AnyPosition, config?: {
|
|
54
|
+
wrapper?: HTMLElement;
|
|
55
|
+
positionsForRotate?: AnyPosition[];
|
|
56
|
+
namespace?: string;
|
|
57
|
+
});
|
|
59
58
|
/**
|
|
60
59
|
* @description 显示标签
|
|
61
60
|
*/
|
|
@@ -93,4 +92,3 @@ export declare class LightTag {
|
|
|
93
92
|
private addResizeListener;
|
|
94
93
|
}
|
|
95
94
|
export declare function tag(...params: ConstructorParameters<typeof LightTag>): LightTag;
|
|
96
|
-
export {};
|
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
+
import type { Vector3Position } from '../../typings/math.type';
|
|
2
3
|
export declare function boxVertexes(box: {
|
|
3
|
-
max:
|
|
4
|
-
|
|
5
|
-
y: number;
|
|
6
|
-
z: number;
|
|
7
|
-
};
|
|
8
|
-
min: {
|
|
9
|
-
x: number;
|
|
10
|
-
y: number;
|
|
11
|
-
z: number;
|
|
12
|
-
};
|
|
4
|
+
max: Vector3Position;
|
|
5
|
+
min: Vector3Position;
|
|
13
6
|
}): THREE.Vector3[];
|
|
7
|
+
/**
|
|
8
|
+
* @description
|
|
9
|
+
* ```markdown
|
|
10
|
+
5____4
|
|
11
|
+
1/___0/|
|
|
12
|
+
| 6__|_7
|
|
13
|
+
2/___3/
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
14
16
|
export declare function boxVertex(box: {
|
|
15
|
-
max:
|
|
16
|
-
|
|
17
|
-
y: number;
|
|
18
|
-
z: number;
|
|
19
|
-
};
|
|
20
|
-
min: {
|
|
21
|
-
x: number;
|
|
22
|
-
y: number;
|
|
23
|
-
z: number;
|
|
24
|
-
};
|
|
17
|
+
max: Vector3Position;
|
|
18
|
+
min: Vector3Position;
|
|
25
19
|
}, index: number): THREE.Vector3;
|
|
26
20
|
export declare function boundingBox(object3D: THREE.Object3D): THREE.Box3;
|
|
27
21
|
export declare function boundingSphere(object3D: THREE.Object3D): THREE.Sphere;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { WireframeGeometry } from 'three';
|
|
2
|
+
import { LineGeometry as Five_LineGeometry } from '@realsee/five/line';
|
|
3
|
+
import * as THREE from 'three';
|
|
4
|
+
export declare class LineGeometry extends Five_LineGeometry {
|
|
5
|
+
constructor(...args: ConstructorParameters<typeof Five_LineGeometry>);
|
|
6
|
+
fromEdgesGeometry(geometry: WireframeGeometry): this;
|
|
7
|
+
toJSON(): {
|
|
8
|
+
type: string;
|
|
9
|
+
attributes: {
|
|
10
|
+
[name: string]: THREE.BufferAttribute | THREE.InterleavedBufferAttribute;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
export declare class PrismGeometry extends THREE.BufferGeometry {
|
|
3
|
+
bottomPositions: number[][];
|
|
4
|
+
topPosition: number[];
|
|
5
|
+
/**
|
|
6
|
+
* @description 设置底面和顶面的位置
|
|
7
|
+
* @param params.bottomPositions 底面多边形的有序顶点,顺时针或逆时针均可
|
|
8
|
+
* @param params.topPosition 底面多边形的第一个点对应的顶面的顶点
|
|
9
|
+
*/
|
|
10
|
+
setPosition(params: {
|
|
11
|
+
bottomPositions?: number[][];
|
|
12
|
+
topPosition?: number[];
|
|
13
|
+
}): void;
|
|
14
|
+
}
|
|
@@ -5,3 +5,11 @@ export declare function getGeometryInfo(geometry: THREE.BufferGeometry): {
|
|
|
5
5
|
center: Vector3;
|
|
6
6
|
area: number;
|
|
7
7
|
} | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* @description: 计算三角形的面积
|
|
10
|
+
*/
|
|
11
|
+
export declare function triangleArea(p1: Vector3, p2: Vector3, p3: Vector3): number;
|
|
12
|
+
/**
|
|
13
|
+
* @description: 计算三角形的质心
|
|
14
|
+
*/
|
|
15
|
+
export declare function triangleCenter(p1: Vector3, p2: Vector3, p3: Vector3, area?: number): Vector3;
|
|
@@ -2,30 +2,30 @@ var M = Object.defineProperty, C = Object.defineProperties;
|
|
|
2
2
|
var S = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var f = Object.getOwnPropertySymbols;
|
|
4
4
|
var A = Object.prototype.hasOwnProperty, _ = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
6
|
-
for (var t in
|
|
7
|
-
A.call(
|
|
5
|
+
var p = (h, n, t) => n in h ? M(h, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[n] = t, d = (h, n) => {
|
|
6
|
+
for (var t in n || (n = {}))
|
|
7
|
+
A.call(n, t) && p(h, t, n[t]);
|
|
8
8
|
if (f)
|
|
9
|
-
for (var t of f(
|
|
10
|
-
_.call(
|
|
11
|
-
return
|
|
12
|
-
}, u = (
|
|
13
|
-
var a = (
|
|
14
|
-
var
|
|
9
|
+
for (var t of f(n))
|
|
10
|
+
_.call(n, t) && p(h, t, n[t]);
|
|
11
|
+
return h;
|
|
12
|
+
}, u = (h, n) => C(h, S(n));
|
|
13
|
+
var a = (h, n, t) => (p(h, typeof n != "symbol" ? n + "" : n, t), t);
|
|
14
|
+
var l = (h, n, t) => new Promise((i, e) => {
|
|
15
15
|
var o = (s) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
18
|
-
} catch (
|
|
19
|
-
e(
|
|
17
|
+
m(t.next(s));
|
|
18
|
+
} catch (c) {
|
|
19
|
+
e(c);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, r = (s) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
24
|
-
} catch (
|
|
25
|
-
e(
|
|
23
|
+
m(t.throw(s));
|
|
24
|
+
} catch (c) {
|
|
25
|
+
e(c);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, m = (s) => s.done ? i(s.value) : Promise.resolve(s.value).then(o, r);
|
|
28
|
+
m((t = t.apply(h, n)).next());
|
|
29
29
|
});
|
|
30
30
|
import * as g from "three";
|
|
31
31
|
import { Controller as k } from "../base/BasePluginWithData.js";
|
|
@@ -34,15 +34,10 @@ import "hammerjs";
|
|
|
34
34
|
import "../shared-utils/three/PointSelector/index.js";
|
|
35
35
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
36
36
|
import "@realsee/five/line";
|
|
37
|
-
import "../vendor/three/examples/jsm/lines/LineGeometry.js";
|
|
38
37
|
import "../shared-utils/three/core/Sphere.js";
|
|
39
38
|
import "animejs";
|
|
40
39
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
41
40
|
import { equal as I } from "../shared-utils/equal.js";
|
|
42
|
-
import "../Sculpt/Meshes/Polygon.js";
|
|
43
|
-
import "../Sculpt/utils/Modules/Global.js";
|
|
44
|
-
import "../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
45
|
-
import "../Sculpt/utils/three/rayOnLine.js";
|
|
46
41
|
import { AreaMakerItem as D } from "./utils/Item.js";
|
|
47
42
|
import "../base/BasePlugin.js";
|
|
48
43
|
import "../shared-utils/Subscribe.js";
|
|
@@ -83,61 +78,13 @@ import "../Sculpt/utils/removeAllTag.js";
|
|
|
83
78
|
import "../Sculpt/utils/Meshes/getLengthHTML.js";
|
|
84
79
|
import "../shared-utils/three/applyObjectMatrixWorld.js";
|
|
85
80
|
import "../shared-utils/util.js";
|
|
81
|
+
import "../shared-utils/three/core/LineGeometry.js";
|
|
86
82
|
import "../CSS3DRenderPlugin/utils/three/CSS3DSprite.js";
|
|
87
83
|
import "../shared-utils/isTouchDevice.js";
|
|
88
84
|
import "../shared-utils/five/getPosition.js";
|
|
89
85
|
import "../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
90
86
|
import "../shared-utils/three/PointSelector/utils/contents.js";
|
|
91
|
-
import "../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
|
|
92
|
-
import "../vendor/three/build/three.module.js";
|
|
93
87
|
import "../shared-utils/isTruelyObject.js";
|
|
94
|
-
import "../shared-utils/three/generatePolygonGeometry.js";
|
|
95
|
-
import "../shared-utils/three/earcut3D.js";
|
|
96
|
-
import "earcut";
|
|
97
|
-
import "../shared-utils/three/getNormal.js";
|
|
98
|
-
import "../PanoMeasurePlugin/utils/isIntersecting.js";
|
|
99
|
-
import "../Sculpt/utils/three/ColoredMesh.js";
|
|
100
|
-
import "../shared-utils/three/geometryUtil.js";
|
|
101
|
-
import "../Sculpt/utils/Modules/Cursor.js";
|
|
102
|
-
import "../Object3DHelperPlugin/Controller.js";
|
|
103
|
-
import "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
104
|
-
import "../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
105
|
-
import "../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
106
|
-
import "../shared-utils/three/boundingBox.js";
|
|
107
|
-
import "../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
108
|
-
import "../shared-utils/Object3DHelper/utils/direction.js";
|
|
109
|
-
import "../shared-utils/Object3DHelper/Constants/color.js";
|
|
110
|
-
import "../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
111
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DRender.js";
|
|
112
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
|
|
113
|
-
import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
|
|
114
|
-
import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
|
|
115
|
-
import "../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
116
|
-
import "../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
117
|
-
import "../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
118
|
-
import "../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
119
|
-
import "../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
120
|
-
import "../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
121
|
-
import "../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
122
|
-
import "../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
123
|
-
import "../shared-utils/threex/domevents/index.js";
|
|
124
|
-
import "../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
125
|
-
import "../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
126
|
-
import "../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
127
|
-
import "../shared-utils/Object3DHelper/index.js";
|
|
128
|
-
import "../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
129
|
-
import "../shared-utils/math/rad2Deg.js";
|
|
130
|
-
import "../shared-utils/math/deg2Rad.js";
|
|
131
|
-
import "../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
132
|
-
import "../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
133
|
-
import "../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
134
|
-
import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
135
|
-
import "../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
136
|
-
import "../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
137
|
-
import "../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
138
|
-
import "../shared-utils/five/fiveModelLoad.js";
|
|
139
|
-
import "../shared-utils/five/FiveDomEvents.js";
|
|
140
|
-
import "../shared-utils/five/calculateThreeMouse.js";
|
|
141
88
|
import "../shared-utils/three/core/Object3D.js";
|
|
142
89
|
import "../shared-utils/three/core/LineSegments.js";
|
|
143
90
|
import "../shared-utils/animationFrame/BetterTween.js";
|
|
@@ -146,7 +93,7 @@ import "../components/AreaLabel/LabelItem.js";
|
|
|
146
93
|
import "../vendor/svelte/internal/index.js";
|
|
147
94
|
import "../components/AreaLabel/Assets/roomLabelBg.js";
|
|
148
95
|
import "../shared-utils/math/planimetry.js";
|
|
149
|
-
class
|
|
96
|
+
class Ut extends k {
|
|
150
97
|
/** AreaMakerPlugin
|
|
151
98
|
* @param `five` `<Five>` Five 实例
|
|
152
99
|
* @param `params` `<PluginType.Params> | <undefined>` 插件初始化参数
|
|
@@ -193,11 +140,11 @@ class Oe extends k {
|
|
|
193
140
|
a(this, "onFiveCameraUpdate", () => {
|
|
194
141
|
const t = this.five.camera;
|
|
195
142
|
[...this.itemMap.values()].sort((e, o) => {
|
|
196
|
-
const
|
|
197
|
-
return o.tagPosition.distanceTo(t.position) -
|
|
143
|
+
const r = e.tagPosition.distanceTo(t.position);
|
|
144
|
+
return o.tagPosition.distanceTo(t.position) - r;
|
|
198
145
|
}).forEach((e, o) => {
|
|
199
|
-
var
|
|
200
|
-
(
|
|
146
|
+
var r;
|
|
147
|
+
(r = this.getMaskItemByID(e.id)) == null || r.setTagZIndex(o * 10);
|
|
201
148
|
});
|
|
202
149
|
});
|
|
203
150
|
a(this, "onFiveModeChange", () => {
|
|
@@ -213,9 +160,9 @@ class Oe extends k {
|
|
|
213
160
|
})).filter(({ intersects: s }) => s.length > 0);
|
|
214
161
|
if (i.length === 0)
|
|
215
162
|
return;
|
|
216
|
-
const e = i.reduce((s,
|
|
217
|
-
const v = s.intersects[0].distance, b =
|
|
218
|
-
return v < b ? s :
|
|
163
|
+
const e = i.reduce((s, c) => {
|
|
164
|
+
const v = s.intersects[0].distance, b = c.intersects[0].distance;
|
|
165
|
+
return v < b ? s : c;
|
|
219
166
|
}), o = this.fiveUtil.model.intersectRaycaster(t)[0];
|
|
220
167
|
if (this.config.modelDepthTest && o && o.distance < e.intersects[0].distance)
|
|
221
168
|
return;
|
|
@@ -231,14 +178,14 @@ class Oe extends k {
|
|
|
231
178
|
visible: !0
|
|
232
179
|
};
|
|
233
180
|
this.state = Object.assign(e, i == null ? void 0 : i.initialState);
|
|
234
|
-
const o =
|
|
181
|
+
const o = d({
|
|
235
182
|
modelDepthTest: !0
|
|
236
183
|
}, i == null ? void 0 : i.config);
|
|
237
184
|
this._config = o, this.modelGroup = new g.Group(), this.modelGroup.name = "ModelMakerPluginGroup", this.itemMap = /* @__PURE__ */ new Map(), this.state.enabled && this._enable({ userAction: !1 });
|
|
238
185
|
}
|
|
239
186
|
/** 插件配置项 */
|
|
240
187
|
get config() {
|
|
241
|
-
return
|
|
188
|
+
return d({}, this._config);
|
|
242
189
|
}
|
|
243
190
|
/** 是否已经被销毁 */
|
|
244
191
|
get disposed() {
|
|
@@ -246,7 +193,7 @@ class Oe extends k {
|
|
|
246
193
|
}
|
|
247
194
|
/** 加载数据,重复调用会使用新数据覆盖旧数据 */
|
|
248
195
|
load(t) {
|
|
249
|
-
return
|
|
196
|
+
return l(this, null, function* () {
|
|
250
197
|
const i = this.data;
|
|
251
198
|
this.data = this.formatData(t), this.hooks.emit("dataChange", this.data, i), this.modelGroup.remove(...this.modelGroup.children), this.itemMap.forEach((e) => e.unmount()), this.itemMap.clear(), this.childrenMountedState = !1, this.checkMsg.childrenMountedState = "", this.data.list.forEach((e) => {
|
|
252
199
|
const o = new D(this, e);
|
|
@@ -285,12 +232,12 @@ class Oe extends k {
|
|
|
285
232
|
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
286
233
|
*/
|
|
287
234
|
show(t) {
|
|
288
|
-
return
|
|
235
|
+
return l(this, null, function* () {
|
|
289
236
|
if (this.state.visible)
|
|
290
237
|
return Promise.resolve();
|
|
291
238
|
if (this.disposed)
|
|
292
239
|
return Promise.reject(new Error("不能在已销毁的插件上调用 show"));
|
|
293
|
-
const i =
|
|
240
|
+
const i = d({ userAction: !0 }, t);
|
|
294
241
|
this.updateState({ visible: !0 }, i.userAction), yield this._show(i);
|
|
295
242
|
});
|
|
296
243
|
}
|
|
@@ -299,10 +246,10 @@ class Oe extends k {
|
|
|
299
246
|
* @param `options.userAction` `<boolean> | <undefined>` 是否是用户操作。默认是 true。
|
|
300
247
|
*/
|
|
301
248
|
hide(t) {
|
|
302
|
-
return
|
|
249
|
+
return l(this, null, function* () {
|
|
303
250
|
if (this.state.visible === !1)
|
|
304
251
|
return;
|
|
305
|
-
const i =
|
|
252
|
+
const i = d({ userAction: !0 }, t);
|
|
306
253
|
this.updateState({ visible: !1 }, i.userAction), yield this._hide(i);
|
|
307
254
|
});
|
|
308
255
|
}
|
|
@@ -351,8 +298,8 @@ class Oe extends k {
|
|
|
351
298
|
return;
|
|
352
299
|
const o = i.userAction !== void 0 ? i.userAction : !0;
|
|
353
300
|
if (this.updateState(t, o), t.enabled !== void 0 && e.enabled !== t.enabled && (t.enabled ? this._enable({ userAction: o }) : this._disable({ userAction: o })), t.visible !== void 0 && e.visible !== t.visible) {
|
|
354
|
-
const
|
|
355
|
-
t.visible ? this._show(
|
|
301
|
+
const r = { userAction: o, anime: { duration: 500 } };
|
|
302
|
+
t.visible ? this._show(r) : this._hide(r);
|
|
356
303
|
}
|
|
357
304
|
}
|
|
358
305
|
/** 更改插件 Config
|
|
@@ -360,9 +307,9 @@ class Oe extends k {
|
|
|
360
307
|
* @param `options` `<Option> | <undefined>`
|
|
361
308
|
*/
|
|
362
309
|
updateConfig(t, i = {}) {
|
|
363
|
-
var
|
|
364
|
-
const e = this.config, o =
|
|
365
|
-
this._config = o, this.hooks.emit("configChange", { prevConfig: e, config: o, userAction: (
|
|
310
|
+
var r;
|
|
311
|
+
const e = this.config, o = d(d({}, e), t);
|
|
312
|
+
this._config = o, this.hooks.emit("configChange", { prevConfig: e, config: o, userAction: (r = i.userAction) != null ? r : !0 });
|
|
366
313
|
}
|
|
367
314
|
/** 根据 ID 获取标注 */
|
|
368
315
|
getMaskItemByID(t) {
|
|
@@ -374,11 +321,11 @@ class Oe extends k {
|
|
|
374
321
|
}
|
|
375
322
|
return i(t) ? {
|
|
376
323
|
list: t.list.filter((e) => e.object_data.points.length >= 3).map((e) => {
|
|
377
|
-
const o = new g.Shape(),
|
|
378
|
-
return o.moveTo(
|
|
324
|
+
const o = new g.Shape(), r = e.object_data.points[0];
|
|
325
|
+
return o.moveTo(r[0], r[2]), e.object_data.points.slice(1).forEach((s) => o.lineTo(s[0], s[2])), o.lineTo(r[0], r[2]), u(d({}, e), {
|
|
379
326
|
floor_index: e.object_data.floorIndex,
|
|
380
|
-
object_data: u(
|
|
381
|
-
bottom_y:
|
|
327
|
+
object_data: u(d({}, e.object_data), {
|
|
328
|
+
bottom_y: r[1] + e.object_data.fixedY,
|
|
382
329
|
shape: o.toJSON(),
|
|
383
330
|
height: e.object_data.height + e.object_data.fixedHeight
|
|
384
331
|
})
|
|
@@ -401,7 +348,7 @@ class Oe extends k {
|
|
|
401
348
|
}
|
|
402
349
|
updateState(t, i) {
|
|
403
350
|
const e = this.state;
|
|
404
|
-
this.state =
|
|
351
|
+
this.state = d(d({}, this.state), t), this.hooks.emit("stateChange", { state: this.state, prevState: e, userAction: i });
|
|
405
352
|
}
|
|
406
353
|
_enable(t) {
|
|
407
354
|
this.hooks.emit("enable", { userAction: t.userAction }), this.five.scene.add(this.modelGroup), this.updateChildrenMountedState(), this.five.needsRender = !0, this.five.on("wantsTapGesture", this.onWantsFiveTapGesture), this.five.on("initAnimationWillStart", this.onFiveInitAnimationWillStart), this.five.on("initAnimationEnded", this.onFiveInitAnimationEnded), this.five.on("modeChange", this.onFiveModeChange), this.five.on("cameraUpdate", this.onFiveCameraUpdate);
|
|
@@ -410,16 +357,16 @@ class Oe extends k {
|
|
|
410
357
|
this.hooks.emit("disable", { userAction: t.userAction }), this.five.scene.remove(this.modelGroup), this.updateChildrenMountedState(), this.five.needsRender = !0, this.five.off("wantsTapGesture", this.onWantsFiveTapGesture), this.five.off("initAnimationWillStart", this.onFiveInitAnimationWillStart), this.five.off("initAnimationEnded", this.onFiveInitAnimationEnded), this.five.off("modeChange", this.onFiveModeChange), this.five.off("cameraUpdate", this.onFiveCameraUpdate);
|
|
411
358
|
}
|
|
412
359
|
_show(t) {
|
|
413
|
-
return
|
|
360
|
+
return l(this, null, function* () {
|
|
414
361
|
this.hooks.emit("show", t), this.five.needsRender = !0;
|
|
415
362
|
});
|
|
416
363
|
}
|
|
417
364
|
_hide(t) {
|
|
418
|
-
return
|
|
365
|
+
return l(this, null, function* () {
|
|
419
366
|
this.hooks.emit("hide", t), this.five.needsRender = !0;
|
|
420
367
|
});
|
|
421
368
|
}
|
|
422
369
|
}
|
|
423
370
|
export {
|
|
424
|
-
|
|
371
|
+
Ut as Controller
|
|
425
372
|
};
|