@realsee/dnalogel 3.50.18-alpha.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 +13 -1
- 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/README.md +0 -116
- 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
|
@@ -9,23 +9,23 @@ var V = (o, e, t) => e in o ? B(o, e, { enumerable: !0, configurable: !0, writab
|
|
|
9
9
|
H.call(e, t) && V(o, t, e[t]);
|
|
10
10
|
return o;
|
|
11
11
|
};
|
|
12
|
-
var g = (o, e, t) => new Promise((
|
|
13
|
-
var u = (
|
|
12
|
+
var g = (o, e, t) => new Promise((r, m) => {
|
|
13
|
+
var u = (a) => {
|
|
14
14
|
try {
|
|
15
|
-
|
|
16
|
-
} catch (
|
|
17
|
-
|
|
15
|
+
l(t.next(a));
|
|
16
|
+
} catch (d) {
|
|
17
|
+
m(d);
|
|
18
18
|
}
|
|
19
|
-
}, s = (
|
|
19
|
+
}, s = (a) => {
|
|
20
20
|
try {
|
|
21
|
-
|
|
22
|
-
} catch (
|
|
23
|
-
|
|
21
|
+
l(t.throw(a));
|
|
22
|
+
} catch (d) {
|
|
23
|
+
m(d);
|
|
24
24
|
}
|
|
25
|
-
},
|
|
26
|
-
|
|
25
|
+
}, l = (a) => a.done ? r(a.value) : Promise.resolve(a.value).then(u, s);
|
|
26
|
+
l((t = t.apply(o, e)).next());
|
|
27
27
|
});
|
|
28
|
-
import * as
|
|
28
|
+
import * as n from "three";
|
|
29
29
|
import "hammerjs";
|
|
30
30
|
import "../three/PointSelector/index.js";
|
|
31
31
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
@@ -34,39 +34,34 @@ import { vectorToCoordinates as N } from "../vectorToCoordinate.js";
|
|
|
34
34
|
import { FiveUtil as O } from "../Utils/FiveUtil.js";
|
|
35
35
|
import { notNil as Y } from "../isNil.js";
|
|
36
36
|
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
37
|
-
import "../../Sculpt/Meshes/Polygon.js";
|
|
38
|
-
import "../../Sculpt/utils/Modules/Global.js";
|
|
39
37
|
import "@realsee/five/line";
|
|
40
|
-
import "../../vendor/three/examples/jsm/lines/LineGeometry.js";
|
|
41
|
-
import "../../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
42
|
-
import "../../Sculpt/utils/three/rayOnLine.js";
|
|
43
38
|
import { worldBoundingSphere as j } from "../three/boundingBox.js";
|
|
44
39
|
import "animejs";
|
|
45
|
-
function
|
|
40
|
+
function ot(o, e, t) {
|
|
46
41
|
return g(this, null, function* () {
|
|
47
42
|
var P, x, z;
|
|
48
43
|
if (!e)
|
|
49
44
|
return;
|
|
50
|
-
const
|
|
51
|
-
if (!
|
|
45
|
+
const r = j(e);
|
|
46
|
+
if (!r)
|
|
52
47
|
return;
|
|
53
|
-
const
|
|
54
|
-
let
|
|
48
|
+
const m = new O(o), u = (P = t == null ? void 0 : t.scale) != null ? P : 1.4, s = r.center, l = o.camera.position.clone().sub(s).setY(0).normalize(), a = o.state.mode === "Mapview" ? o.state.fov : 60, C = Math.max(1.5, r.radius * u), k = C * (1 / Math.tan(n.MathUtils.degToRad(a / 2)));
|
|
49
|
+
let p = 0;
|
|
55
50
|
const w = [], M = (c) => {
|
|
56
|
-
const i =
|
|
57
|
-
return
|
|
51
|
+
const i = n.MathUtils.degToRad(c);
|
|
52
|
+
return l.clone().applyAxisAngle(new n.Vector3(0, 1, 0), i).clone().multiplyScalar(k).add(new n.Vector3(0, C, 0)).add(s);
|
|
58
53
|
};
|
|
59
|
-
for (;
|
|
54
|
+
for (; p !== 360; ) {
|
|
60
55
|
let c = 0;
|
|
61
|
-
const i = M(
|
|
62
|
-
const I = y.distanceTo(i), _ = new
|
|
56
|
+
const i = M(p), f = (y) => {
|
|
57
|
+
const I = y.distanceTo(i), _ = new n.Raycaster(y, i.clone().sub(y).normalize()), h = m.model.intersectRaycaster(_, void 0, !0)[0], S = h == null ? void 0 : h.distance;
|
|
63
58
|
Y(S) ? S > I && (c += 1) : c += 1;
|
|
64
|
-
}, A =
|
|
59
|
+
}, A = r.clampPoint(i, new n.Vector3());
|
|
65
60
|
f(A);
|
|
66
|
-
const E = new
|
|
67
|
-
if (f(E), w[c] =
|
|
61
|
+
const E = new n.Vector3(s.x, i.y, s.z);
|
|
62
|
+
if (f(E), w[c] = p, c === 2)
|
|
68
63
|
break;
|
|
69
|
-
|
|
64
|
+
p += 30;
|
|
70
65
|
}
|
|
71
66
|
const R = M((z = (x = w[2]) != null ? x : w[1]) != null ? z : 0), v = R.distanceTo(s), b = N(s.clone().sub(R).normalize());
|
|
72
67
|
if (o.state.mode === "Mapview")
|
|
@@ -85,5 +80,5 @@ function nt(o, e, t) {
|
|
|
85
80
|
});
|
|
86
81
|
}
|
|
87
82
|
export {
|
|
88
|
-
|
|
83
|
+
ot as lookObject
|
|
89
84
|
};
|
|
@@ -4,8 +4,8 @@ import { convexHull as t } from "./math/convexHull.js";
|
|
|
4
4
|
import { inside as o } from "./math/inside.js";
|
|
5
5
|
import { LightTag as i, tag as m } from "./tag.js";
|
|
6
6
|
import { checkFiveModelLoaded as n } from "./five/index.js";
|
|
7
|
-
import { Magnifier as
|
|
8
|
-
import { getCoordsFromClient as
|
|
7
|
+
import { Magnifier as l } from "./three/Magnifier.js";
|
|
8
|
+
import { getCoordsFromClient as p, getCoordsFromElement as f } from "./three/getCoords.js";
|
|
9
9
|
import { PointSelector as a } from "./three/PointSelector/index.js";
|
|
10
10
|
import { PointHelper as d } from "./three/PointSelector/utils/PointHelper.js";
|
|
11
11
|
import { PointSelectorHelper as g } from "./three/PointSelector/utils/PointSelectorHelper.js";
|
|
@@ -13,34 +13,33 @@ import { Object3D as s } from "./three/core/Object3D.js";
|
|
|
13
13
|
import { LineSegments as u } from "./three/core/LineSegments.js";
|
|
14
14
|
import { bounding as b, boundingBox as c, boundingSphere as x, boxVertex as v, boxVertexes as F, worldBounding as L, worldBoundingBox as P, worldBoundingSphere as k } from "./three/boundingBox.js";
|
|
15
15
|
import { animeMap as w, blink as M, reblink as S } from "./three/blink.js";
|
|
16
|
-
import { isNil as B, notNil as
|
|
17
|
-
import { uuid as
|
|
18
|
-
import { absoluteUrl as
|
|
19
|
-
import { awaitNextFrame as
|
|
16
|
+
import { isNil as B, notNil as _ } from "./isNil.js";
|
|
17
|
+
import { uuid as h } from "./uuid.js";
|
|
18
|
+
import { absoluteUrl as j, isAbsoluteURL as I } from "./url/absoluteUrl.js";
|
|
19
|
+
import { awaitNextFrame as O, getFrameTime as T, nextFrame as y, requestAnimationFrameInterval as C } from "./animationFrame/index.js";
|
|
20
20
|
import { equal as H } from "./equal.js";
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
|
|
28
|
-
const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
21
|
+
import { isModelLike as N, isPanoramaLike as U } from "./five/mode.js";
|
|
22
|
+
import { lookObject as q } from "./five/lookObject.js";
|
|
23
|
+
import { lookPoint as A } from "./five/lookPoint.js";
|
|
24
|
+
import { fiveModelIsLoaded as D, waitFiveModelLoaded as E } from "./five/fiveModelLoad.js";
|
|
25
|
+
import { FiveDomEvents as R } from "./five/FiveDomEvents.js";
|
|
26
|
+
import { BetterTween as V, tweenProgress as z } from "./animationFrame/BetterTween.js";
|
|
27
|
+
const vo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
29
28
|
__proto__: null,
|
|
30
|
-
BetterTween:
|
|
31
|
-
FiveDomEvents:
|
|
29
|
+
BetterTween: V,
|
|
30
|
+
FiveDomEvents: R,
|
|
32
31
|
Interval: r,
|
|
33
32
|
LightTag: i,
|
|
34
33
|
LineSegments: u,
|
|
35
|
-
Magnifier:
|
|
34
|
+
Magnifier: l,
|
|
36
35
|
Object3D: s,
|
|
37
36
|
PointHelper: d,
|
|
38
37
|
PointSelector: a,
|
|
39
38
|
PointSelectorHelper: g,
|
|
40
39
|
Rectangle: e,
|
|
41
|
-
absoluteUrl:
|
|
40
|
+
absoluteUrl: j,
|
|
42
41
|
animeMap: w,
|
|
43
|
-
awaitNextFrame:
|
|
42
|
+
awaitNextFrame: O,
|
|
44
43
|
blink: M,
|
|
45
44
|
bounding: b,
|
|
46
45
|
boundingBox: c,
|
|
@@ -50,31 +49,30 @@ const Lo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
50
49
|
checkFiveModelLoaded: n,
|
|
51
50
|
convexHull: t,
|
|
52
51
|
equal: H,
|
|
53
|
-
fiveModelIsLoaded:
|
|
54
|
-
getCoordsFromClient:
|
|
52
|
+
fiveModelIsLoaded: D,
|
|
53
|
+
getCoordsFromClient: p,
|
|
55
54
|
getCoordsFromElement: f,
|
|
56
|
-
getFrameTime:
|
|
55
|
+
getFrameTime: T,
|
|
57
56
|
inside: o,
|
|
58
|
-
isAbsoluteURL:
|
|
59
|
-
isModelLike:
|
|
57
|
+
isAbsoluteURL: I,
|
|
58
|
+
isModelLike: N,
|
|
60
59
|
isNil: B,
|
|
61
|
-
isPanoramaLike:
|
|
62
|
-
lookObject:
|
|
63
|
-
lookPoint:
|
|
60
|
+
isPanoramaLike: U,
|
|
61
|
+
lookObject: q,
|
|
62
|
+
lookPoint: A,
|
|
64
63
|
nextFrame: y,
|
|
65
|
-
notNil:
|
|
64
|
+
notNil: _,
|
|
66
65
|
pointInPolygon: o,
|
|
67
66
|
reblink: S,
|
|
68
67
|
requestAnimationFrameInterval: C,
|
|
69
|
-
sculpt: N,
|
|
70
68
|
tag: m,
|
|
71
|
-
tweenProgress:
|
|
72
|
-
uuid:
|
|
73
|
-
waitFiveModelLoaded:
|
|
69
|
+
tweenProgress: z,
|
|
70
|
+
uuid: h,
|
|
71
|
+
waitFiveModelLoaded: E,
|
|
74
72
|
worldBounding: L,
|
|
75
73
|
worldBoundingBox: P,
|
|
76
74
|
worldBoundingSphere: k
|
|
77
75
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
78
76
|
export {
|
|
79
|
-
|
|
77
|
+
vo as _Util
|
|
80
78
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function A() {
|
|
2
2
|
console.debug(
|
|
3
|
-
"%c %c@realsee/dnalogel %cv3.
|
|
3
|
+
"%c %c@realsee/dnalogel %cv3.52.0",
|
|
4
4
|
[
|
|
5
5
|
"background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAMAAACHgmeRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABLFBMVEUAAAAapPoap/oaqvkbrfkbr/gZnfwZoPsaqfnD4v/E4/8Ylv0clPm93/+/4P/B4f8Yj/683/8Wif+33P8Uhv+x2f8ShP+s1v8Pgf+n0/8Nf/+h0f8Lff8Lff8Nf/9dl/+czv8KfP8KfP+Lxf+Uyv+Xy/+Hwv+Jw/+Mxf+Oxv+RyP8aovsapfoap/oZmfwZm/wZnvsYnPsYkf4YlP0NePsDYfgYcfi43f+63v8Xiv8Xjf4EWfwCV/sWZ/qz2v+02/8Vh/8WiP8EUf8CTf4WXv2u1/+v2P8Thf8Thv8ETf8CR/8VV/+o1f+q1f8Qgv8Rg/8DSv8BRf8UVP+j0v+k0v8OgP8Pgf8DR/8DQv9Nhf+dzv+fz/+Kv/+Vyv+Xy/+azf+Oxv+Qx/+SyP////8MUhLdAAAAK3RSTlMACEWQ2bd98uQECPXxqO7c+Pb49vj2+Pb49vj23Oul8fMHA+TwerXXjEIG2P+bHgAAAAFiS0dEY1y+LaoAAAB+SURBVAjXY2BgZGJmYWVgYGBgY9fW0eVg4ORi4NbTNzDk4eXjZxAwMjYxNTO3EGQQsrSytrG1sxdmEHFwdHJ2cXUTZRBz9/D08vbxFWeQ8PMPCAwKDpFkkAoNC4+IjIqWZpCRlZOPiY2LV2BQVGJQTkhMUlEFWaOmrqGpxQAAyg0S9Dq+VPYAAAAASUVORK5CYII=')",
|
|
6
6
|
"background-repeat: no-repeat",
|
|
@@ -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 {};
|
package/libs/shared-utils/tag.js
CHANGED
|
@@ -73,7 +73,7 @@ class w {
|
|
|
73
73
|
this.visible && (this.updateIntersectCheckVisible(), this.needsRender = !0);
|
|
74
74
|
});
|
|
75
75
|
i(this, "applyVisible", () => {
|
|
76
|
-
|
|
76
|
+
this.visibles.every((t) => t !== !1) ? (this.container.style.opacity = "1", this.container.style.pointerEvents = "auto") : (this.container.style.opacity = "0", this.container.style.pointerEvents = "none");
|
|
77
77
|
});
|
|
78
78
|
i(this, "updateIntersectCheckVisible", () => {
|
|
79
79
|
var n, r;
|
|
@@ -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,26 @@
|
|
|
1
|
+
import { LineGeometry as i } from "@realsee/five/line";
|
|
2
|
+
import * as t from "three";
|
|
3
|
+
class a extends i {
|
|
4
|
+
constructor(...e) {
|
|
5
|
+
super(...e), this.setAttribute("instanceStart", new t.BufferAttribute(new Float32Array(), 3)), this.setAttribute("instanceEnd", new t.BufferAttribute(new Float32Array(), 3));
|
|
6
|
+
}
|
|
7
|
+
fromEdgesGeometry(e) {
|
|
8
|
+
if (e.attributes.position.array.length < 6)
|
|
9
|
+
return this.setAttribute("position", new t.BufferAttribute(new Float32Array(), 3)), this.setAttribute("instanceStart", new t.BufferAttribute(new Float32Array(), 3)), this.setAttribute("instanceEnd", new t.BufferAttribute(new Float32Array(), 3)), this;
|
|
10
|
+
if (e instanceof t.EdgesGeometry) {
|
|
11
|
+
const r = new t.InstancedInterleavedBuffer(e.attributes.position.array, 6, 1);
|
|
12
|
+
this.setPositions(e.attributes.position.array), this.setAttribute("instanceStart", new t.InterleavedBufferAttribute(r, 3, 0)), this.setAttribute("instanceEnd", new t.InterleavedBufferAttribute(r, 3, 3));
|
|
13
|
+
} else
|
|
14
|
+
super.fromEdgesGeometry(e);
|
|
15
|
+
return this;
|
|
16
|
+
}
|
|
17
|
+
toJSON() {
|
|
18
|
+
return {
|
|
19
|
+
type: "FiveLineGeometry",
|
|
20
|
+
attributes: this.attributes
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
a as LineGeometry
|
|
26
|
+
};
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var a = Object.defineProperty;
|
|
2
|
+
var b = (l, s, e) => s in l ? a(l, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[s] = e;
|
|
3
|
+
var p = (l, s, e) => (b(l, typeof s != "symbol" ? s + "" : s, e), e);
|
|
4
|
+
import * as u from "three";
|
|
5
|
+
class x extends u.BufferGeometry {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
p(this, "bottomPositions", []);
|
|
9
|
+
p(this, "topPosition", []);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @description 设置底面和顶面的位置
|
|
13
|
+
* @param params.bottomPositions 底面多边形的有序顶点,顺时针或逆时针均可
|
|
14
|
+
* @param params.topPosition 底面多边形的第一个点对应的顶面的顶点
|
|
15
|
+
*/
|
|
16
|
+
setPosition(e) {
|
|
17
|
+
var g, m;
|
|
18
|
+
const i = (g = e.bottomPositions) != null ? g : this.bottomPositions, r = (m = e.topPosition) != null ? m : this.topPosition;
|
|
19
|
+
if (this.bottomPositions = i, this.topPosition = r, !i || i.length < 3) {
|
|
20
|
+
console.error("PrismGeometry: Invalid parameters", i, r, e), this.bottomPositions = [], this.setAttribute("position", new u.BufferAttribute(new Float32Array([]), 3));
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const n = [], t = [];
|
|
24
|
+
t.push(...i), t[0][0] === t.at(-1)[0] && t[0][1] === t.at(-1)[1] && t[0][2] === t.at(-1)[2] && (t.length -= 1);
|
|
25
|
+
for (let h = 0; h < t.length - 2; h++)
|
|
26
|
+
n.push(0, h + 1, h + 2);
|
|
27
|
+
if (r && r.length === 3) {
|
|
28
|
+
const h = [r[0] - i[0][0], r[1] - i[0][1], r[2] - i[0][2]], f = t.map((o) => [o[0] + h[0], o[1] + h[1], o[2] + h[2]]);
|
|
29
|
+
t.push(...f);
|
|
30
|
+
const P = n.map((o) => o + t.length / 2);
|
|
31
|
+
n.push(...P);
|
|
32
|
+
for (let o = 0; o < t.length / 2 - 1; o++)
|
|
33
|
+
n.push(o, o + 1, o + t.length / 2), n.push(o + 1, o + t.length / 2 + 1, o + t.length / 2);
|
|
34
|
+
n.push(0, t.length / 2, t.length / 2 - 1), n.push(t.length / 2, t.length - 1, t.length / 2 - 1);
|
|
35
|
+
}
|
|
36
|
+
const c = t.flat();
|
|
37
|
+
this.setAttribute("position", new u.Float32BufferAttribute(c, 3)), this.setIndex(n), this.computeBoundingSphere();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
x as PrismGeometry
|
|
42
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import c from "earcut";
|
|
2
|
-
import { getNormal as
|
|
2
|
+
import { getNormal as i } from "./getNormal.js";
|
|
3
3
|
import * as r from "three";
|
|
4
|
-
function
|
|
5
|
-
if (
|
|
4
|
+
function f(o) {
|
|
5
|
+
if (o.length < 3)
|
|
6
6
|
return [];
|
|
7
|
-
const
|
|
7
|
+
const n = i(o), e = new r.Quaternion().setFromUnitVectors(new r.Vector3(0, 1, 0), n), a = o.map((t) => t.clone().applyQuaternion(e)).flatMap((t) => [t.x, t.z]);
|
|
8
8
|
return c(a);
|
|
9
9
|
}
|
|
10
10
|
export {
|
|
11
|
-
|
|
11
|
+
f as earcut3D
|
|
12
12
|
};
|
|
@@ -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;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { Vector3 as e } from "three";
|
|
2
|
+
function l(r) {
|
|
3
|
+
if (r.length < 3) {
|
|
3
4
|
console.error("points.length < 3");
|
|
4
5
|
return;
|
|
5
6
|
}
|
|
6
|
-
const [
|
|
7
|
-
return
|
|
7
|
+
const [n, o, t] = r;
|
|
8
|
+
return new e().subVectors(t, o).cross(new e().subVectors(n, o)).normalize();
|
|
8
9
|
}
|
|
9
10
|
export {
|
|
10
|
-
|
|
11
|
+
l as getNormal
|
|
11
12
|
};
|
|
@@ -4,11 +4,6 @@ import "./PointSelector/index.js";
|
|
|
4
4
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
5
5
|
import "../tag.js";
|
|
6
6
|
import "@realsee/five/line";
|
|
7
|
-
import "../../vendor/three/examples/jsm/lines/LineGeometry.js";
|
|
8
7
|
import "./core/Sphere.js";
|
|
9
8
|
import "animejs";
|
|
10
9
|
import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
11
|
-
import "../../Sculpt/Meshes/Polygon.js";
|
|
12
|
-
import "../../Sculpt/utils/Modules/Global.js";
|
|
13
|
-
import "../../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
14
|
-
import "../../Sculpt/utils/three/rayOnLine.js";
|
package/package.json
CHANGED
package/README.md
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<a href="https://realsee.js.org/"><img src="https://vrlab-public.ljcdn.com/common/file/web/ea031fa5-ad82-46b3-86c8-7b20ec1e635a.jpg" width="60" /></a>
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<p align="center">
|
|
7
|
-
<a href="https://www.npmjs.com/package/@realsee/dnalogel">
|
|
8
|
-
<img src="https://img.shields.io/npm/v/@realsee/dnalogel.svg" alt="npm version" >
|
|
9
|
-
</a>
|
|
10
|
-
<a href="https://packagephobia.now.sh/result?p=@realsee/dnalogel">
|
|
11
|
-
<img src="https://packagephobia.now.sh/badge?p=@realsee/dnalogel" alt="install size" >
|
|
12
|
-
</a>
|
|
13
|
-
<a href="https://github.com/realsee-developer/dnalogel/blob/main/TERMS.txt">
|
|
14
|
-
<img src="https://img.shields.io/npm/l/@realsee/dnalogel.svg" alt="license">
|
|
15
|
-
</a>
|
|
16
|
-
</p>
|
|
17
|
-
|
|
18
|
-
<h1 align="center">@realsee/dnalogel</h1>
|
|
19
|
-
|
|
20
|
-
# 👀 Overview
|
|
21
|
-
|
|
22
|
-
@realsee/dnalogel 将 [如视(realsee.com)](https://realsee.com) **VR 空间交互** 常用能力沉淀,并以 `Five Plugins` 形式进行抽象。
|
|
23
|
-
结合[如视三维空间重建渲染引擎 Five](https://open-platform.realsee.com/developer/docs/five/intro/)
|
|
24
|
-
与 [如视开放 API](https://open-platform.realsee.com/developer/openapi/?id=1001) ,可以制作出丰富多彩的三维空间应用。不论是经过线上环境千锤百炼的刚需功能,还是灵感一现的炫酷尝试,所有已经落地的功能我们均毫无保留的开源至github [realsee-developer/dnalogel](https://github.com/realsee-developer/dnalogel) 。
|
|
25
|
-
|
|
26
|
-
# 🔨 Usage
|
|
27
|
-
|
|
28
|
-
**1、安装**
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
npm install @realsee/dnalogel
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
yarn add @realsee/dnalogel
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
**2、插件注册**
|
|
39
|
-
|
|
40
|
-
```js
|
|
41
|
-
import { Five } from '@realsee/five'
|
|
42
|
-
import { Plugin } from '@realsee/dnalogel'
|
|
43
|
-
const five = new Five({
|
|
44
|
-
plugins: [[Plugin, 'PluginName', initOptions]],
|
|
45
|
-
})
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
**3、插件方法使用**
|
|
49
|
-
|
|
50
|
-
```js
|
|
51
|
-
// 不同插件提供的方法可能存在差异,请参考各插件 API 文档
|
|
52
|
-
five.plugins.PluginName.load(data)
|
|
53
|
-
five.plugins.PluginName.enable()
|
|
54
|
-
five.plugins.PluginName.disable()
|
|
55
|
-
five.plugins.PluginName.dispose()
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
**4、插件依赖数据获取**
|
|
59
|
-
|
|
60
|
-
您可以通过 [open API](https://open-platform.realsee.com/developer/open/api#/) 查看数据获取方式及相关 open API 。
|
|
61
|
-
|
|
62
|
-
# 📖 Documents
|
|
63
|
-
|
|
64
|
-
- [说明文档](https://open-platform.realsee.com/developer/docs/dnalogel/intro/)
|
|
65
|
-
- [API 文档](https://open-platform.realsee.com/developer/openapi/?id=1001)
|
|
66
|
-
- [demo 源码](https://github.com/realsee-developer/dnalogel)
|
|
67
|
-
- [数据依赖来源:open API](https://open-platform.realsee.com/developer/openapi/?id=1001)
|
|
68
|
-
|
|
69
|
-
# 💡 Preview
|
|
70
|
-
|
|
71
|
-
我们为每个插件书写了简单的效果示例,您可点击预览:
|
|
72
|
-
[@realsee/dnalogel showcase](https://realsee-developer.github.io/dnalogel/)
|
|
73
|
-
|
|
74
|
-
# 🧾 Lists
|
|
75
|
-
|
|
76
|
-
- 🔌 ModelViewPlugin:模型小窗插件
|
|
77
|
-
- 🔌 PanoFloorplanRadarPlugin:全景户型雷达图插件
|
|
78
|
-
- 🔌 ModelRoomLabelPlugin:模型态房屋标签插件
|
|
79
|
-
- 🔌 TopviewFloorplanPlugin:俯视模型户型图插件
|
|
80
|
-
- 🔌 ModelChassisCompassPlugin:模型底盘指南针插件
|
|
81
|
-
- 🔌 ModelEntryDoorGuidePlugin:模型入户门引导插件
|
|
82
|
-
- 🔌 CSS3DRenderPlugin:CSS3D渲染插件
|
|
83
|
-
- 🔌 CameraMovementPlugin:相机运镜插件
|
|
84
|
-
- 🔌 ModelFloorplanPlugin:模型户型图插件
|
|
85
|
-
- 🔌 PanoRulerPlugin:全景标尺插件
|
|
86
|
-
- 🔌 PanoCompassPlugin:全景指南针插件
|
|
87
|
-
- 其他插件持续更新中...
|
|
88
|
-
|
|
89
|
-
# 可能遇到的问题
|
|
90
|
-
|
|
91
|
-
1. webpack打包出现以下错误
|
|
92
|
-
|
|
93
|
-
```bash
|
|
94
|
-
Module not found: Error: Can't resolve '@realsee/five/line' in 'xxx/node_modules/@realsee/dnalogel/libs'
|
|
95
|
-
Did you mean 'index.js'?
|
|
96
|
-
BREAKING CHANGE: The request '@realsee/five/line' failed to resolve only because it was resolved as fully specified
|
|
97
|
-
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
|
|
98
|
-
The extension in the request is mandatory for it to be fully specified.
|
|
99
|
-
Add the extension to the request.
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
解决方案:在webpack配置里加以下rule
|
|
103
|
-
参考:[resolvefullyspecified](https://webpack.js.org/configuration/module/#resolvefullyspecified)
|
|
104
|
-
|
|
105
|
-
```js
|
|
106
|
-
{
|
|
107
|
-
test: /\.m?js$/,
|
|
108
|
-
resolve: {
|
|
109
|
-
fullySpecified: false, // disable the behaviour
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
# License
|
|
115
|
-
|
|
116
|
-
[TERMS](https://github.com/realsee-developer/dnalogel/blob/main/TERMS.txt)
|