@realsee/dnalogel 3.47.7 → 3.47.9
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 +6 -0
- package/dist/PanoTagPlugin/controller/Tag/PointTag.d.ts +0 -1
- package/dist/Sculpt/Meshes/Rectangle.d.ts +0 -1
- package/dist/Sculpt/Meshes/RectangleWithEdge.d.ts +9 -0
- package/dist/Sculpt/Objects/Line/index.d.ts +3 -3
- package/dist/Sculpt/Objects/Polygon/index.d.ts +3 -3
- package/dist/Sculpt/Objects/Polyline/index.d.ts +3 -3
- package/dist/Sculpt/Objects/Rectangle/index.d.ts +6 -2
- package/dist/Sculpt/typings/style.d.ts +8 -1
- package/dist/index.cjs.js +32 -32
- package/dist/index.js +1455 -1441
- package/dist/index.umd.js +33 -33
- package/dist/shared-utils/tag.d.ts +5 -0
- package/libs/AreaMakerPlugin/Controller.js +1 -1
- package/libs/AreaMakerPlugin/index.js +1 -1
- package/libs/AreaMakerPlugin/utils/Item.js +1 -1
- package/libs/CSS3DRenderPlugin/Controller.js +1 -1
- package/libs/CSS3DRenderPlugin/index.js +1 -1
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +1 -1
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +1 -1
- package/libs/CruisePlugin/BaseController.js +1 -1
- package/libs/CruisePlugin/Move.js +1 -1
- package/libs/CruisePlugin/Work.js +1 -1
- package/libs/CruisePlugin/index.js +1 -1
- package/libs/CurrentPanoImagePlugin/Controller.js +1 -1
- package/libs/CurrentPanoImagePlugin/index.js +1 -1
- package/libs/GuideLinePlugin/Controller.js +1 -1
- package/libs/GuideLinePlugin/GuideLineItem.js +1 -1
- package/libs/GuideLinePlugin/GuideLineModeItem.js +1 -1
- package/libs/GuideLinePlugin/index.js +1 -1
- package/libs/ModelMakerPlugin/Controller.js +1 -1
- package/libs/ModelMakerPlugin/index.js +1 -1
- package/libs/ModelMakerPlugin/item/baseItem.js +1 -1
- package/libs/ModelMakerPlugin/item/boxItem.js +1 -1
- package/libs/ModelMakerPlugin/item/polygonItem.js +1 -1
- package/libs/ModelMakerPlugin/item/prismItem.js +1 -1
- package/libs/ModelTVVideoPlugin/Plugin.js +1 -1
- package/libs/ModelTVVideoPlugin/index.js +1 -1
- package/libs/Object3DHelperPlugin/Controller.js +1 -1
- package/libs/Object3DHelperPlugin/index.js +1 -1
- package/libs/PanoCompassPlugin/Controller.js +1 -1
- package/libs/PanoCompassPlugin/index.js +1 -1
- package/libs/PanoDoorLabelPlugin/BaseController.js +1 -1
- package/libs/PanoDoorLabelPlugin/Controller.js +1 -1
- package/libs/PanoDoorLabelPlugin/index.js +1 -1
- package/libs/PanoMeasurePlugin/Components/Controller0.js +1 -1
- package/libs/PanoMeasurePlugin/Components/Controller1.js +1 -1
- package/libs/PanoMeasurePlugin/Controller/EditController.js +1 -1
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +1 -1
- package/libs/PanoMeasurePlugin/Controller/index.js +1 -1
- package/libs/PanoMeasurePlugin/Model/area.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +1 -1
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +1 -1
- package/libs/PanoMeasurePlugin/index.js +1 -1
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +1 -1
- package/libs/PanoSpatialTagPlugin/Plugin.js +1 -1
- package/libs/PanoSpatialTagPlugin/index.js +1 -1
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +1 -1
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +1 -1
- package/libs/PanoTagPlugin/Components/Tag/index.js +1 -1
- package/libs/PanoTagPlugin/Components/TagContainer.js +1 -1
- package/libs/PanoTagPlugin/Components/TagItem.js +1 -1
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +1 -1
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +1 -1
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +1 -1
- package/libs/PanoTagPlugin/controller/Tag/PointTag.d.ts +0 -1
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +1 -4
- package/libs/PanoTagPlugin/controller/TagRender.js +55 -55
- package/libs/PanoTagPlugin/controller/TagUtil.js +1 -1
- package/libs/PanoTagPlugin/controller/index.js +1 -1
- package/libs/PanoTagPlugin/index.js +1 -1
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +1 -1
- package/libs/PanoVideoPlugin/Controller.js +1 -1
- package/libs/PanoVideoPlugin/VideoMeshController.js +1 -1
- package/libs/PanoVideoPlugin/index.js +1 -1
- package/libs/PipelinePlugin/Controller.js +1 -1
- package/libs/PipelinePlugin/index.js +1 -1
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +1 -1
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +1 -1
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +1 -1
- package/libs/Sculpt/Meshes/Box.js +10 -10
- package/libs/Sculpt/Meshes/Line.js +18 -15
- package/libs/Sculpt/Meshes/Rectangle.d.ts +0 -1
- package/libs/Sculpt/Meshes/Rectangle.js +14 -17
- package/libs/Sculpt/Meshes/RectangleWithEdge.d.ts +9 -0
- package/libs/Sculpt/Meshes/RectangleWithEdge.js +29 -19
- package/libs/Sculpt/Objects/Line/index.d.ts +3 -3
- package/libs/Sculpt/Objects/Polygon/index.d.ts +3 -3
- package/libs/Sculpt/Objects/Polyline/index.d.ts +3 -3
- package/libs/Sculpt/Objects/Rectangle/index.d.ts +6 -2
- package/libs/Sculpt/Objects/Rectangle/index.js +77 -67
- package/libs/Sculpt/typings/style.d.ts +8 -1
- package/libs/Sculpt/utils/Meshes/getLengthHTML.js +2 -2
- package/libs/Sculpt/utils/three/RectangleGeometry.js +1 -1
- package/libs/base/BasePlugin.js +1 -1
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +1 -1
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +1 -1
- package/libs/floorplan/ModelFloorplanPlugin/index.js +1 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +1 -1
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +1 -1
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +1 -1
- package/libs/index.js +1 -1
- package/libs/shared-utils/five/vector3ToScreen.js +5 -7
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/tag.d.ts +5 -0
- package/libs/shared-utils/tag.js +31 -26
- package/package.json +1 -1
- /package/dist/shared-utils/three/{raycaster.d.ts → temp.d.ts} +0 -0
- /package/libs/shared-utils/three/{raycaster.d.ts → temp.d.ts} +0 -0
- /package/libs/shared-utils/three/{raycaster.js → temp.js} +0 -0
|
@@ -95,7 +95,7 @@ import "../../shared-utils/three/IObject3D.js";
|
|
|
95
95
|
import "../../shared-utils/three/centerPoint.js";
|
|
96
96
|
import "../../shared-utils/tag.js";
|
|
97
97
|
import "../../shared-utils/five/vector3ToScreen.js";
|
|
98
|
-
import "../../shared-utils/three/
|
|
98
|
+
import "../../shared-utils/three/temp.js";
|
|
99
99
|
import "../../Sculpt/utils/Modules/Global.js";
|
|
100
100
|
import "../../Sculpt/utils/Modules/Cursor.js";
|
|
101
101
|
import "../../Object3DHelperPlugin/Controller.js";
|
|
@@ -55,11 +55,11 @@ import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
|
55
55
|
import "../../shared-utils/tag.js";
|
|
56
56
|
import "../../shared-utils/five/vector3ToScreen.js";
|
|
57
57
|
import "../../shared-utils/five/getFiveModel.js";
|
|
58
|
-
import "../../shared-utils/three/raycaster.js";
|
|
59
58
|
import "../../shared-utils/Utils/FiveUtil.js";
|
|
60
59
|
import "../../shared-utils/Utils/BaseUtil.js";
|
|
61
60
|
import "../../shared-utils/Utils/WorkUtil.js";
|
|
62
61
|
import "../../shared-utils/five/transformPosition.js";
|
|
62
|
+
import "../../shared-utils/three/temp.js";
|
|
63
63
|
import "../../Sculpt/utils/Modules/Global.js";
|
|
64
64
|
import "../../Sculpt/utils/Modules/Cursor.js";
|
|
65
65
|
import "../../Object3DHelperPlugin/Controller.js";
|
|
@@ -94,7 +94,7 @@ import "../../shared-utils/three/IObject3D.js";
|
|
|
94
94
|
import "../../shared-utils/three/centerPoint.js";
|
|
95
95
|
import "../../shared-utils/tag.js";
|
|
96
96
|
import "../../shared-utils/five/vector3ToScreen.js";
|
|
97
|
-
import "../../shared-utils/three/
|
|
97
|
+
import "../../shared-utils/three/temp.js";
|
|
98
98
|
import "../../Sculpt/utils/Modules/Global.js";
|
|
99
99
|
import "../../Sculpt/utils/Modules/Cursor.js";
|
|
100
100
|
import "../../Object3DHelperPlugin/Controller.js";
|
|
@@ -56,11 +56,11 @@ import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
|
56
56
|
import "../../shared-utils/tag.js";
|
|
57
57
|
import "../../shared-utils/five/vector3ToScreen.js";
|
|
58
58
|
import "../../shared-utils/five/getFiveModel.js";
|
|
59
|
-
import "../../shared-utils/three/raycaster.js";
|
|
60
59
|
import "../../shared-utils/Utils/FiveUtil.js";
|
|
61
60
|
import "../../shared-utils/Utils/BaseUtil.js";
|
|
62
61
|
import "../../shared-utils/Utils/WorkUtil.js";
|
|
63
62
|
import "../../shared-utils/five/transformPosition.js";
|
|
63
|
+
import "../../shared-utils/three/temp.js";
|
|
64
64
|
import "../../Sculpt/utils/Modules/Global.js";
|
|
65
65
|
import "../../Sculpt/utils/Modules/Cursor.js";
|
|
66
66
|
import "../../Object3DHelperPlugin/Controller.js";
|
|
@@ -65,11 +65,11 @@ import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
|
65
65
|
import "../../shared-utils/tag.js";
|
|
66
66
|
import "../../shared-utils/five/vector3ToScreen.js";
|
|
67
67
|
import "../../shared-utils/five/getFiveModel.js";
|
|
68
|
-
import "../../shared-utils/three/raycaster.js";
|
|
69
68
|
import "../../shared-utils/Utils/FiveUtil.js";
|
|
70
69
|
import "../../shared-utils/Utils/BaseUtil.js";
|
|
71
70
|
import "../../shared-utils/Utils/WorkUtil.js";
|
|
72
71
|
import "../../shared-utils/five/transformPosition.js";
|
|
72
|
+
import "../../shared-utils/three/temp.js";
|
|
73
73
|
import "../../Sculpt/utils/Modules/Global.js";
|
|
74
74
|
import "../../Sculpt/utils/Modules/Cursor.js";
|
|
75
75
|
import "../../Object3DHelperPlugin/Controller.js";
|
|
@@ -36,11 +36,11 @@ import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
|
36
36
|
import "../../shared-utils/tag.js";
|
|
37
37
|
import "../../shared-utils/five/vector3ToScreen.js";
|
|
38
38
|
import "../../shared-utils/five/getFiveModel.js";
|
|
39
|
-
import "../../shared-utils/three/raycaster.js";
|
|
40
39
|
import "../../shared-utils/Utils/FiveUtil.js";
|
|
41
40
|
import "../../shared-utils/Utils/BaseUtil.js";
|
|
42
41
|
import "../../shared-utils/Utils/WorkUtil.js";
|
|
43
42
|
import "../../shared-utils/five/transformPosition.js";
|
|
43
|
+
import "../../shared-utils/three/temp.js";
|
|
44
44
|
import "../../Sculpt/utils/Modules/Global.js";
|
|
45
45
|
import "../../Sculpt/utils/Modules/Cursor.js";
|
|
46
46
|
import "../../Object3DHelperPlugin/Controller.js";
|
|
@@ -92,7 +92,7 @@ import "../../shared-utils/three/IObject3D.js";
|
|
|
92
92
|
import "../../shared-utils/three/centerPoint.js";
|
|
93
93
|
import "../../shared-utils/tag.js";
|
|
94
94
|
import "../../shared-utils/five/vector3ToScreen.js";
|
|
95
|
-
import "../../shared-utils/three/
|
|
95
|
+
import "../../shared-utils/three/temp.js";
|
|
96
96
|
import "../../Sculpt/utils/Modules/Global.js";
|
|
97
97
|
import "../../Sculpt/utils/Modules/Cursor.js";
|
|
98
98
|
import "../../Object3DHelperPlugin/Controller.js";
|
|
@@ -54,11 +54,11 @@ import "../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
|
54
54
|
import "../../shared-utils/tag.js";
|
|
55
55
|
import "../../shared-utils/five/vector3ToScreen.js";
|
|
56
56
|
import "../../shared-utils/five/getFiveModel.js";
|
|
57
|
-
import "../../shared-utils/three/raycaster.js";
|
|
58
57
|
import "../../shared-utils/Utils/FiveUtil.js";
|
|
59
58
|
import "../../shared-utils/Utils/BaseUtil.js";
|
|
60
59
|
import "../../shared-utils/Utils/WorkUtil.js";
|
|
61
60
|
import "../../shared-utils/five/transformPosition.js";
|
|
61
|
+
import "../../shared-utils/three/temp.js";
|
|
62
62
|
import "../../Sculpt/utils/Modules/Global.js";
|
|
63
63
|
import "../../Sculpt/utils/Modules/Cursor.js";
|
|
64
64
|
import "../../Object3DHelperPlugin/Controller.js";
|
package/libs/index.js
CHANGED
|
@@ -83,12 +83,12 @@ import "./shared-utils/isNil.js";
|
|
|
83
83
|
import "./shared-utils/tag.js";
|
|
84
84
|
import "./shared-utils/five/vector3ToScreen.js";
|
|
85
85
|
import "./shared-utils/five/getFiveModel.js";
|
|
86
|
-
import "./shared-utils/three/raycaster.js";
|
|
87
86
|
import "./shared-utils/Utils/FiveUtil.js";
|
|
88
87
|
import "./shared-utils/Utils/BaseUtil.js";
|
|
89
88
|
import "./shared-utils/Subscribe.js";
|
|
90
89
|
import "./shared-utils/Utils/WorkUtil.js";
|
|
91
90
|
import "./shared-utils/five/transformPosition.js";
|
|
91
|
+
import "./shared-utils/three/temp.js";
|
|
92
92
|
import "./Sculpt/utils/Modules/Global.js";
|
|
93
93
|
import "./Sculpt/utils/Modules/Cursor.js";
|
|
94
94
|
import "./shared-utils/five/FiveDomEvents.js";
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function x(t, n, o) {
|
|
4
|
-
const { x: e, y: c, z: r } = n.clone().project(t);
|
|
1
|
+
function i(t, n, o) {
|
|
2
|
+
const { x: c, y: e, z: r } = n.clone().project(t);
|
|
5
3
|
return r > 1 ? void 0 : {
|
|
6
|
-
leftPx: (
|
|
7
|
-
topPx: (-
|
|
4
|
+
leftPx: (c + 1) / 2 * o.x,
|
|
5
|
+
topPx: (-e + 1) / 2 * o.y
|
|
8
6
|
};
|
|
9
7
|
}
|
|
10
8
|
export {
|
|
11
|
-
|
|
9
|
+
i as vector3ToScreen
|
|
12
10
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function A() {
|
|
2
2
|
console.debug(
|
|
3
|
-
"%c %c@realsee/dnalogel %cv3.47.
|
|
3
|
+
"%c %c@realsee/dnalogel %cv3.47.9",
|
|
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",
|
|
@@ -7,6 +7,11 @@ export declare class LightTag {
|
|
|
7
7
|
enabled: boolean;
|
|
8
8
|
wrapper: HTMLElement;
|
|
9
9
|
positionsForRotate?: THREE.Vector3[];
|
|
10
|
+
/**
|
|
11
|
+
* @description 碰撞检测
|
|
12
|
+
* @default true
|
|
13
|
+
*/
|
|
14
|
+
intersectCheck: boolean;
|
|
10
15
|
private tagWrapper;
|
|
11
16
|
private five;
|
|
12
17
|
private originPosition?;
|
package/libs/shared-utils/tag.js
CHANGED
|
@@ -1,44 +1,49 @@
|
|
|
1
1
|
var u = Object.defineProperty;
|
|
2
2
|
var g = (h, t, e) => t in h ? u(h, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[t] = e;
|
|
3
|
-
var
|
|
3
|
+
var s = (h, t, e) => (g(h, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
4
|
import { anyPositionToVector3 as d } from "./positionToVector3.js";
|
|
5
5
|
import * as b from "three";
|
|
6
6
|
import { vector3ToScreen as l } from "./five/vector3ToScreen.js";
|
|
7
7
|
import { getFiveModel as x } from "./five/getFiveModel.js";
|
|
8
|
-
import { _raycaster as m } from "./three/raycaster.js";
|
|
9
8
|
import { FiveUtil as U } from "./Utils/FiveUtil.js";
|
|
9
|
+
import { _raycaster as m } from "./three/temp.js";
|
|
10
10
|
const v = "LightTagContainer_shgjakdhwakjdhsja", w = new b.Vector2();
|
|
11
11
|
class E {
|
|
12
|
-
constructor(t, e,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
12
|
+
constructor(t, e, o) {
|
|
13
|
+
s(this, "container");
|
|
14
|
+
s(this, "visible", !1);
|
|
15
|
+
s(this, "enabled", !1);
|
|
16
|
+
s(this, "wrapper");
|
|
17
|
+
s(this, "positionsForRotate");
|
|
18
|
+
/**
|
|
19
|
+
* @description 碰撞检测
|
|
20
|
+
* @default true
|
|
21
|
+
*/
|
|
22
|
+
s(this, "intersectCheck", !0);
|
|
23
|
+
s(this, "tagWrapper");
|
|
24
|
+
s(this, "five");
|
|
25
|
+
s(this, "originPosition");
|
|
26
|
+
s(this, "transformedPosition");
|
|
27
|
+
s(this, "disposer");
|
|
28
|
+
s(this, "config");
|
|
29
|
+
s(this, "fiveUtil");
|
|
30
|
+
s(this, "onCameraUpdate", () => {
|
|
26
31
|
this.visible !== !1 && this.updateScreenPosition();
|
|
27
32
|
});
|
|
28
|
-
|
|
33
|
+
s(this, "onFiveEveryReady", () => {
|
|
29
34
|
var t;
|
|
30
|
-
if (this.visible && this.five.state.mode !== "Panorama") {
|
|
35
|
+
if (this.intersectCheck && this.visible && this.five.state.mode !== "Panorama") {
|
|
31
36
|
let e = 0.01;
|
|
32
37
|
this.fiveUtil.workUtil.fromType === "poincare" && (e = 0.05), m.set(this.five.camera.position, this.transformedPosition.clone().sub(this.five.camera.position));
|
|
33
|
-
const
|
|
34
|
-
(
|
|
38
|
+
const o = (t = x(this.five).intersectRaycaster(m)) == null ? void 0 : t[0];
|
|
39
|
+
(o == null ? void 0 : o.distance) + e > this.transformedPosition.distanceTo(this.five.camera.position) ? (this.container.style.opacity = "1", this.container.style.pointerEvents = "auto") : (this.container.style.opacity = "0", this.container.style.pointerEvents = "none");
|
|
35
40
|
}
|
|
36
41
|
});
|
|
37
42
|
var n, r, a;
|
|
38
|
-
this.five = t, this.fiveUtil = (n = t.__fiveUtil__) != null ? n : t.__fiveUtil__ = new U(t), this.originPosition = e ? d(e).clone() : void 0, this.transformedPosition = (r = this.originPosition) == null ? void 0 : r.clone(), this.positionsForRotate = (a =
|
|
43
|
+
this.five = t, this.fiveUtil = (n = t.__fiveUtil__) != null ? n : t.__fiveUtil__ = new U(t), this.originPosition = e ? d(e).clone() : void 0, this.transformedPosition = (r = this.originPosition) == null ? void 0 : r.clone(), this.positionsForRotate = (a = o == null ? void 0 : o.positionsForRotate) == null ? void 0 : a.map((i) => d(i).clone()), this.container = (() => {
|
|
39
44
|
const i = document.createElement("div");
|
|
40
45
|
return i.style.width = "0", i.style.height = "0", i.style.position = "absolute", i.style.transition = "opacity 0.2s linear", i;
|
|
41
|
-
})(), this.config =
|
|
46
|
+
})(), this.config = o != null ? o : {}, this.enable(), this.show();
|
|
42
47
|
}
|
|
43
48
|
show() {
|
|
44
49
|
this.visible = !0, this.container.style.opacity = "1", this.container.style.pointerEvents = "auto", this.onCameraUpdate();
|
|
@@ -47,10 +52,10 @@ class E {
|
|
|
47
52
|
this.visible = !1, this.container.style.opacity = "0", this.container.style.pointerEvents = "none";
|
|
48
53
|
}
|
|
49
54
|
enable() {
|
|
50
|
-
var
|
|
55
|
+
var o, n, r, a;
|
|
51
56
|
if (this.enabled)
|
|
52
57
|
return;
|
|
53
|
-
this.enabled = !0, this.wrapper = (r = (n = this.config.wrapper) != null ? n : (
|
|
58
|
+
this.enabled = !0, this.wrapper = (r = (n = this.config.wrapper) != null ? n : (o = this.five.getElement()) == null ? void 0 : o.parentElement) != null ? r : document.body, this.tagWrapper || (this.tagWrapper = (a = document.getElementById(v)) != null ? a : (() => {
|
|
54
59
|
const i = document.createElement("div");
|
|
55
60
|
return i.id = v, i.style.position = "absolute", i.style.top = "0", i.style.left = "0", i.style.width = "100%", i.style.height = "100%", i.style.pointerEvents = "none", i;
|
|
56
61
|
})(), this.wrapper.contains(this.tagWrapper) || this.wrapper.appendChild(this.tagWrapper)), this.tagWrapper.appendChild(this.container);
|
|
@@ -88,7 +93,7 @@ class E {
|
|
|
88
93
|
this.container.style.left = "-100%", this.container.style.top = "-100%";
|
|
89
94
|
return;
|
|
90
95
|
}
|
|
91
|
-
const
|
|
96
|
+
const o = (() => {
|
|
92
97
|
const r = 2 * Math.tan(0.5 * this.five.camera.fov / 180 * Math.PI), a = this.transformedPosition.distanceTo(this.five.camera.position);
|
|
93
98
|
return Math.max(Math.min(1 - r * a / 40, 1), 0.5);
|
|
94
99
|
})(), n = (() => {
|
|
@@ -97,7 +102,7 @@ class E {
|
|
|
97
102
|
const [r, a] = this.positionsForRotate, i = l(this.five.camera, r, t), c = l(this.five.camera, a, t), p = i.leftPx > c.leftPx ? c : i, f = i.leftPx > c.leftPx ? i : c, y = f.leftPx - p.leftPx, P = f.topPx - p.topPx;
|
|
98
103
|
return Math.atan2(P, y) * (180 / Math.PI);
|
|
99
104
|
})();
|
|
100
|
-
this.container.style.left = e.leftPx + "px", this.container.style.top = e.topPx + "px", this.container.style.transformOrigin = "center", this.container.style.transform = `scale(${
|
|
105
|
+
this.container.style.left = e.leftPx + "px", this.container.style.top = e.topPx + "px", this.container.style.transformOrigin = "center", this.container.style.transform = `scale(${o})`, n && (this.container.style.transform += ` rotate(${n}deg)`);
|
|
101
106
|
}
|
|
102
107
|
}
|
|
103
108
|
function S(h, t, e) {
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|