@realsee/dnalogel 3.50.14 → 3.50.15-alpha.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/README.md +116 -0
- package/dist/Sculpt/Objects/Base/index.d.ts +1 -1
- package/dist/Sculpt/index.d.ts +2 -2
- package/dist/index.cjs.js +255 -255
- package/dist/index.js +2733 -2732
- package/dist/index.umd.js +251 -251
- package/dist/shared-utils/tag.d.ts +1 -1
- package/dist/shared-utils/three/index.d.ts +1 -0
- package/libs/AreaMakerPlugin/Controller.js +104 -74
- package/libs/AreaMakerPlugin/index.js +33 -3
- package/libs/AreaMakerPlugin/utils/Item.js +66 -36
- package/libs/CSS3DRenderPlugin/Controller.js +35 -15
- package/libs/CSS3DRenderPlugin/index.js +34 -14
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +60 -35
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +98 -78
- package/libs/CruisePlugin/BaseController.js +59 -29
- package/libs/CruisePlugin/Move.js +32 -13
- package/libs/CruisePlugin/Work.js +65 -46
- package/libs/CruisePlugin/index.js +37 -18
- package/libs/CurrentPanoImagePlugin/Controller.js +68 -38
- package/libs/CurrentPanoImagePlugin/index.js +34 -4
- package/libs/GuideLinePlugin/Controller.js +59 -40
- package/libs/GuideLinePlugin/GuideLineItem.js +33 -14
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +3 -2
- package/libs/GuideLinePlugin/GuideLineModeItem.js +33 -14
- package/libs/GuideLinePlugin/index.js +37 -18
- package/libs/ModelMakerPlugin/Controller.js +50 -32
- package/libs/ModelMakerPlugin/index.js +33 -15
- package/libs/ModelTVVideoPlugin/Plugin.js +47 -27
- package/libs/ModelTVVideoPlugin/index.js +23 -3
- package/libs/Object3DHelperPlugin/Controller.js +49 -30
- package/libs/Object3DHelperPlugin/index.js +36 -17
- package/libs/PanoCompassPlugin/Controller.js +33 -13
- package/libs/PanoCompassPlugin/index.js +34 -14
- package/libs/PanoDoorLabelPlugin/BaseController.js +55 -25
- package/libs/PanoDoorLabelPlugin/Controller.js +99 -69
- package/libs/PanoDoorLabelPlugin/index.js +34 -4
- package/libs/PanoMeasurePlugin/Components/Controller0.js +8 -8
- package/libs/PanoMeasurePlugin/Components/Controller1.js +8 -8
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +75 -49
- package/libs/PanoMeasurePlugin/Controller/index.js +15 -15
- package/libs/PanoMeasurePlugin/Model/area.js +41 -15
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +29 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +8 -8
- package/libs/PanoMeasurePlugin/index.js +3 -3
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +43 -15
- package/libs/PanoRulerProPlugin/Controller.js +60 -30
- package/libs/PanoRulerProPlugin/RulerItems.js +85 -55
- package/libs/PanoRulerProPlugin/index.js +33 -3
- package/libs/PanoSpatialTagPlugin/Plugin.js +53 -33
- package/libs/PanoSpatialTagPlugin/index.js +21 -1
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +79 -49
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +235 -206
- package/libs/PanoTagPlugin/Components/Tag/index.js +152 -125
- package/libs/PanoTagPlugin/Components/TagContainer.js +97 -70
- package/libs/PanoTagPlugin/Components/TagItem.js +31 -4
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +29 -2
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +55 -28
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +53 -26
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +54 -27
- package/libs/PanoTagPlugin/controller/TagRender.js +47 -28
- package/libs/PanoTagPlugin/controller/TagUtil.js +32 -13
- package/libs/PanoTagPlugin/controller/index.js +45 -26
- package/libs/PanoTagPlugin/index.js +40 -21
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +59 -29
- package/libs/PanoVideoPlugin/Controller.js +91 -61
- package/libs/PanoVideoPlugin/VideoMeshController.js +56 -26
- package/libs/PanoVideoPlugin/index.js +36 -6
- package/libs/PipelinePlugin/Controller.js +80 -51
- package/libs/PipelinePlugin/index.js +34 -5
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +44 -14
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +43 -13
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +61 -31
- package/libs/Sculpt/Meshes/Box.js +3 -2
- package/libs/Sculpt/Meshes/Cylinder.js +3 -2
- package/libs/Sculpt/Meshes/Line.js +9 -8
- package/libs/Sculpt/Meshes/LineWithDots.js +8 -7
- package/libs/Sculpt/Meshes/Point.js +3 -2
- package/libs/Sculpt/Meshes/Polygon.js +3 -2
- package/libs/Sculpt/Meshes/Prism.js +8 -7
- package/libs/Sculpt/Meshes/Rectangle.js +3 -2
- package/libs/Sculpt/Objects/Base/index.d.ts +1 -1
- package/libs/Sculpt/Objects/Line/Editor.js +7 -6
- package/libs/Sculpt/index.d.ts +2 -2
- package/libs/Sculpt/index.js +3 -2
- package/libs/Sculpt/utils/three/ColoredMesh.js +6 -5
- package/libs/base/BasePlugin.js +4 -3
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +88 -59
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +34 -5
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +79 -50
- package/libs/floorplan/ModelFloorplanPlugin/index.js +34 -5
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +68 -38
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +34 -4
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +104 -75
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +34 -5
- package/libs/floorplan/index.js +1 -0
- package/libs/index.js +28 -28
- package/libs/shared-utils/five/index.js +3 -2
- package/libs/shared-utils/five/lookObject.js +3 -2
- package/libs/shared-utils/index.js +44 -42
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/tag.d.ts +1 -1
- package/libs/shared-utils/tag.js +41 -41
- package/libs/shared-utils/three/PointSelector/utils/PointSelectorHelper.js +3 -2
- package/libs/shared-utils/three/index.d.ts +1 -0
- package/libs/shared-utils/three/index.js +1 -0
- package/package.json +1 -1
|
@@ -2,20 +2,21 @@ var R = Object.defineProperty, F = Object.defineProperties;
|
|
|
2
2
|
var C = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var f = Object.getOwnPropertySymbols;
|
|
4
4
|
var O = Object.prototype.hasOwnProperty, S = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var d = (o, i, e) => i in o ? R(o, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[i] = e, a = (o, i) => {
|
|
6
6
|
for (var e in i || (i = {}))
|
|
7
|
-
O.call(i, e) &&
|
|
7
|
+
O.call(i, e) && d(o, e, i[e]);
|
|
8
8
|
if (f)
|
|
9
9
|
for (var e of f(i))
|
|
10
|
-
S.call(i, e) &&
|
|
10
|
+
S.call(i, e) && d(o, e, i[e]);
|
|
11
11
|
return o;
|
|
12
12
|
}, l = (o, i) => F(o, C(i));
|
|
13
|
-
var s = (o, i, e) => (
|
|
13
|
+
var s = (o, i, e) => (d(o, typeof i != "symbol" ? i + "" : i, e), e);
|
|
14
14
|
import { CSS3DRender as j } from "./utils/three/CSS3DRender.js";
|
|
15
15
|
import x from "./utils/generateBehindFiveElement.js";
|
|
16
16
|
import "../shared-utils/tag.js";
|
|
17
17
|
import "three";
|
|
18
18
|
import "hammerjs";
|
|
19
|
+
import "../shared-utils/three/PointSelector/index.js";
|
|
19
20
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
20
21
|
import "@realsee/five/line";
|
|
21
22
|
import "../vendor/three/examples/jsm/lines/LineGeometry.js";
|
|
@@ -47,10 +48,29 @@ import "../shared-utils/Utils/WorkUtil.js";
|
|
|
47
48
|
import "../shared-utils/five/transformPosition.js";
|
|
48
49
|
import "../shared-utils/three/temp.js";
|
|
49
50
|
import "../shared-utils/dom/resizeObserver.js";
|
|
51
|
+
import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
52
|
+
import "../shared-utils/three/Magnifier.js";
|
|
53
|
+
import "../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
54
|
+
import "../shared-utils/three/Assets/index.js";
|
|
55
|
+
import "../shared-utils/three/PointSelector/utils/html.js";
|
|
56
|
+
import "../shared-utils/five/initialCSS3DRender.js";
|
|
57
|
+
import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
58
|
+
import "../Sculpt/Meshes/Line.js";
|
|
59
|
+
import "../Sculpt/typings/style.js";
|
|
60
|
+
import "../shared-utils/five/FiveLine.js";
|
|
61
|
+
import "../shared-utils/three/IObject3D.js";
|
|
62
|
+
import "../Sculpt/utils/removeAllTag.js";
|
|
63
|
+
import "../Sculpt/utils/Meshes/getLengthHTML.js";
|
|
64
|
+
import "../shared-utils/three/applyObjectMatrixWorld.js";
|
|
65
|
+
import "./utils/three/CSS3DSprite.js";
|
|
66
|
+
import "../shared-utils/isTouchDevice.js";
|
|
67
|
+
import "../shared-utils/five/getPosition.js";
|
|
68
|
+
import "../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
69
|
+
import "../shared-utils/three/PointSelector/utils/contents.js";
|
|
50
70
|
import "../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
|
|
51
71
|
import "../vendor/three/build/three.module.js";
|
|
52
72
|
const b = "v2.0.1", E = `CSS3DRenderPlugin@${b}`;
|
|
53
|
-
class
|
|
73
|
+
class Ue extends j {
|
|
54
74
|
constructor(e) {
|
|
55
75
|
super();
|
|
56
76
|
s(this, "five");
|
|
@@ -98,16 +118,16 @@ class ue extends j {
|
|
|
98
118
|
if (this.state.disposed)
|
|
99
119
|
return;
|
|
100
120
|
const n = (() => {
|
|
101
|
-
var
|
|
121
|
+
var p;
|
|
102
122
|
(t == null ? void 0 : t.dpr) !== void 0 && console.warn(`${E}: please use "config.devicePixelRatio" replace "config.dpr"`);
|
|
103
|
-
const
|
|
123
|
+
const m = {
|
|
104
124
|
ratio: 216e-5,
|
|
105
|
-
devicePixelRatio: (
|
|
125
|
+
devicePixelRatio: (p = t == null ? void 0 : t.dpr) != null ? p : 1,
|
|
106
126
|
mode: "front",
|
|
107
127
|
autoRender: !0,
|
|
108
128
|
wrapperStyle: {}
|
|
109
129
|
};
|
|
110
|
-
return Object.assign(
|
|
130
|
+
return Object.assign(m, t, (t == null ? void 0 : t.mode) === "behind" ? { scene: this.five.scene } : void 0);
|
|
111
131
|
})(), { autoRender: h } = n;
|
|
112
132
|
n.mode === "behind" && n.behindFiveContainer && (this.behindFiveContainer = n.behindFiveContainer);
|
|
113
133
|
const r = this.create3DElement(this.five.camera, e, l(a({}, n), { autoRender: !1 }));
|
|
@@ -116,11 +136,11 @@ class ue extends j {
|
|
|
116
136
|
const D = r.dispose;
|
|
117
137
|
r.dispose = () => (this.created3DElementResults.includes(r) && this.created3DElementResults.splice(this.created3DElementResults.indexOf(r), 1), D());
|
|
118
138
|
const c = () => {
|
|
119
|
-
var
|
|
120
|
-
const
|
|
121
|
-
if (!
|
|
122
|
-
return console.error(`${E}: wrapper is ${
|
|
123
|
-
r.appendToElement(
|
|
139
|
+
var p, v;
|
|
140
|
+
const m = r.css3DObject.mode === "front" ? (v = this.frontFiveContainer) != null ? v : (p = this.five.getElement()) == null ? void 0 : p.parentElement : this.getBehindFiveElement();
|
|
141
|
+
if (!m)
|
|
142
|
+
return console.error(`${E}: wrapper is ${m}; mode is ${r.css3DObject.mode}`);
|
|
143
|
+
r.appendToElement(m), r.render(), this.created3DElementResults.push(r);
|
|
124
144
|
}, u = () => {
|
|
125
145
|
r.css3DObject.mode === "front" && c(), r.css3DObject.mode === "behind" && w(this.five).then(() => c());
|
|
126
146
|
};
|
|
@@ -163,5 +183,5 @@ class ue extends j {
|
|
|
163
183
|
}
|
|
164
184
|
export {
|
|
165
185
|
E as PLUGIN_NAME,
|
|
166
|
-
|
|
186
|
+
Ue as default
|
|
167
187
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import o from "./Controller.js";
|
|
2
|
-
import { CSS3DRender as
|
|
2
|
+
import { CSS3DRender as Sr } from "./utils/three/CSS3DRender.js";
|
|
3
3
|
import "./utils/generateBehindFiveElement.js";
|
|
4
4
|
import "../shared-utils/tag.js";
|
|
5
5
|
import "../shared-utils/positionToVector3.js";
|
|
@@ -14,32 +14,52 @@ import "../shared-utils/five/transformPosition.js";
|
|
|
14
14
|
import "../shared-utils/three/temp.js";
|
|
15
15
|
import "../shared-utils/dom/resizeObserver.js";
|
|
16
16
|
import "hammerjs";
|
|
17
|
+
import "../shared-utils/three/PointSelector/index.js";
|
|
18
|
+
import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
19
|
+
import "../shared-utils/three/Magnifier.js";
|
|
20
|
+
import "../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
21
|
+
import "../shared-utils/three/Assets/index.js";
|
|
22
|
+
import "./utils/three/CSS3DObject.js";
|
|
17
23
|
import "three/examples/jsm/renderers/CSS3DRenderer";
|
|
24
|
+
import "./utils/even.js";
|
|
25
|
+
import "./utils/three/OpacityMesh.js";
|
|
26
|
+
import "../shared-utils/three/centerPoint.js";
|
|
27
|
+
import "../shared-utils/three/getObjectVisible.js";
|
|
18
28
|
import "@realsee/five/line";
|
|
19
29
|
import "../vendor/three/examples/jsm/lines/LineGeometry.js";
|
|
20
30
|
import "../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
|
|
21
31
|
import "../vendor/three/build/three.module.js";
|
|
22
32
|
import "../shared-utils/three/core/Sphere.js";
|
|
23
33
|
import "animejs";
|
|
24
|
-
import "../shared-utils/
|
|
34
|
+
import "../shared-utils/isNil.js";
|
|
25
35
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
26
|
-
import "../shared-utils/
|
|
36
|
+
import "../shared-utils/three/PointSelector/utils/html.js";
|
|
37
|
+
import "../shared-utils/five/initialCSS3DRender.js";
|
|
27
38
|
import "./utils/three/CSS3DRenderer.js";
|
|
28
39
|
import "./utils/three/THREEJS_CSS3DRenderer.js";
|
|
29
40
|
import "./utils/createResizeObserver.js";
|
|
30
|
-
import "
|
|
31
|
-
import "
|
|
32
|
-
import "
|
|
33
|
-
import "../shared-utils/
|
|
34
|
-
import "../shared-utils/three/
|
|
35
|
-
import "../
|
|
41
|
+
import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
42
|
+
import "../Sculpt/Meshes/Line.js";
|
|
43
|
+
import "../Sculpt/typings/style.js";
|
|
44
|
+
import "../shared-utils/five/FiveLine.js";
|
|
45
|
+
import "../shared-utils/three/IObject3D.js";
|
|
46
|
+
import "../Sculpt/utils/removeAllTag.js";
|
|
47
|
+
import "../Sculpt/utils/Meshes/getLengthHTML.js";
|
|
48
|
+
import "../shared-utils/three/applyObjectMatrixWorld.js";
|
|
49
|
+
import "../shared-utils/util.js";
|
|
50
|
+
import "./utils/three/CSS3DSprite.js";
|
|
51
|
+
import "../shared-utils/isTouchDevice.js";
|
|
52
|
+
import "../shared-utils/five/getPosition.js";
|
|
53
|
+
import "../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
54
|
+
import "../shared-utils/three/PointSelector/utils/contents.js";
|
|
55
|
+
import "../shared-utils/url/absoluteUrl.js";
|
|
56
|
+
import "../shared-utils/five/fiveModelLoad.js";
|
|
36
57
|
import "./utils/three/CSS3DScene.js";
|
|
37
58
|
import "./utils/getAllCSS3DObject.js";
|
|
38
|
-
import "../shared-utils/util.js";
|
|
39
59
|
import "./utils/three/CSS3DGroup.js";
|
|
40
|
-
const
|
|
60
|
+
const er = (r) => new o(r);
|
|
41
61
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
62
|
+
Sr as CSS3DRender,
|
|
63
|
+
er as CSS3DRenderPlugin,
|
|
64
|
+
er as default
|
|
45
65
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var A = Object.defineProperty;
|
|
2
|
-
var D = (
|
|
3
|
-
var o = (
|
|
2
|
+
var D = (c, p, t) => p in c ? A(c, p, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[p] = t;
|
|
3
|
+
var o = (c, p, t) => (D(c, typeof p != "symbol" ? p + "" : p, t), t);
|
|
4
4
|
import { CSS3DObject as N } from "three/examples/jsm/renderers/CSS3DRenderer";
|
|
5
5
|
import { Vector3 as n } from "three";
|
|
6
6
|
import { even as E } from "../even.js";
|
|
@@ -10,6 +10,7 @@ import { centerPoint as L } from "../../../shared-utils/three/centerPoint.js";
|
|
|
10
10
|
import { getObjectVisible as T } from "../../../shared-utils/three/getObjectVisible.js";
|
|
11
11
|
import "../../../shared-utils/tag.js";
|
|
12
12
|
import "hammerjs";
|
|
13
|
+
import "../../../shared-utils/three/PointSelector/index.js";
|
|
13
14
|
import "@realsee/five/line";
|
|
14
15
|
import "../../../vendor/three/examples/jsm/lines/LineGeometry.js";
|
|
15
16
|
import "../../../shared-utils/three/core/Sphere.js";
|
|
@@ -25,31 +26,55 @@ import "../../../shared-utils/Utils/WorkUtil.js";
|
|
|
25
26
|
import "../../../shared-utils/five/transformPosition.js";
|
|
26
27
|
import "../../../shared-utils/three/temp.js";
|
|
27
28
|
import "../../../shared-utils/dom/resizeObserver.js";
|
|
29
|
+
import "../../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
30
|
+
import "../../../shared-utils/three/Magnifier.js";
|
|
31
|
+
import "../../../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
32
|
+
import "../../../shared-utils/three/Assets/index.js";
|
|
33
|
+
import "./CSS3DObject.js";
|
|
34
|
+
import "../../../shared-utils/three/PointSelector/utils/html.js";
|
|
35
|
+
import "../../../shared-utils/five/initialCSS3DRender.js";
|
|
36
|
+
import "./CSS3DRenderer.js";
|
|
37
|
+
import "./THREEJS_CSS3DRenderer.js";
|
|
38
|
+
import "../createResizeObserver.js";
|
|
39
|
+
import "../../../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
40
|
+
import "../../../Sculpt/Meshes/Line.js";
|
|
41
|
+
import "../../../Sculpt/typings/style.js";
|
|
42
|
+
import "../../../shared-utils/five/FiveLine.js";
|
|
43
|
+
import "../../../shared-utils/three/IObject3D.js";
|
|
44
|
+
import "../../../Sculpt/utils/removeAllTag.js";
|
|
45
|
+
import "../../../Sculpt/utils/Meshes/getLengthHTML.js";
|
|
46
|
+
import "../../../shared-utils/three/applyObjectMatrixWorld.js";
|
|
47
|
+
import "../../../shared-utils/util.js";
|
|
48
|
+
import "./CSS3DSprite.js";
|
|
49
|
+
import "../../../shared-utils/isTouchDevice.js";
|
|
50
|
+
import "../../../shared-utils/five/getPosition.js";
|
|
51
|
+
import "../../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
52
|
+
import "../../../shared-utils/three/PointSelector/utils/contents.js";
|
|
28
53
|
import "../../../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
|
|
29
54
|
import "../../../vendor/three/build/three.module.js";
|
|
30
55
|
const $ = 1, W = `CSS3DObjectPlus@${$}`, k = 216e-5, z = 3e-3;
|
|
31
|
-
class
|
|
56
|
+
class kt extends N {
|
|
32
57
|
constructor(t) {
|
|
33
58
|
var x, b, w, g, V;
|
|
34
59
|
if (O(t.cornerPoints) && O(t.width))
|
|
35
60
|
throw new Error("cornerPoints and width cannot be both empty");
|
|
36
|
-
const
|
|
37
|
-
const
|
|
61
|
+
const i = (x = t.container) != null ? x : document.createElement("div"), s = (b = t.cornerPoints) != null ? b : (() => {
|
|
62
|
+
const e = t.width / 2;
|
|
38
63
|
return [
|
|
39
|
-
new n(-
|
|
40
|
-
new n(-
|
|
41
|
-
new n(
|
|
42
|
-
new n(
|
|
64
|
+
new n(-e, e, 0),
|
|
65
|
+
new n(-e, -e, 0),
|
|
66
|
+
new n(e, -e, 0),
|
|
67
|
+
new n(e, e, 0)
|
|
43
68
|
];
|
|
44
|
-
})(), r = (w = t.ratio) != null ? w : z, P = (g = t.dpr) != null ? g : 1, F = (V = t.pointerEvents) != null ? V : "auto",
|
|
69
|
+
})(), r = (w = t.ratio) != null ? w : z, P = (g = t.dpr) != null ? g : 1, F = (V = t.pointerEvents) != null ? V : "auto", h = Math.max(k, r), l = s[0].distanceTo(s[1]), d = s[1].distanceTo(s[2]), m = E(l / r * P), a = E(d / r * P), y = L(...s);
|
|
45
70
|
let u;
|
|
46
|
-
if (
|
|
47
|
-
|
|
71
|
+
if (h === r)
|
|
72
|
+
i.style.width = `${m}px`, i.style.height = `${a}px`, u = i;
|
|
48
73
|
else {
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
const S = r /
|
|
52
|
-
|
|
74
|
+
const e = document.createElement("div");
|
|
75
|
+
e.style.width = `${m}px`, e.style.height = `${a}px`, e.style.pointerEvents = "none";
|
|
76
|
+
const S = r / h;
|
|
77
|
+
i.style.position = "absolute", i.style.left = "0", i.style.top = "0", i.style.width = `${S * m}px`, i.style.height = `${S * a}px`, e.appendChild(i), u = e;
|
|
53
78
|
}
|
|
54
79
|
super(u);
|
|
55
80
|
o(this, "version", $);
|
|
@@ -78,31 +103,31 @@ class Pt extends N {
|
|
|
78
103
|
* @description: 生成透明Mesh
|
|
79
104
|
*/
|
|
80
105
|
o(this, "createOpacityMesh", (t) => {
|
|
81
|
-
const { domWidthPx:
|
|
106
|
+
const { domWidthPx: i, domHeightPx: s } = t, r = new R(i, s);
|
|
82
107
|
return r.position.copy(t.position), r.rotation.copy(t.rotation), r.scale.copy(t.scale), r;
|
|
83
108
|
});
|
|
84
|
-
if (
|
|
85
|
-
this.width =
|
|
109
|
+
if (i.style.pointerEvents = F, Object.assign(i.style, t.style), this.scale.set(h, h, h), this.cornerPoints = s, this.ratio = r, this.container = i, t.mode && (this.mode = t.mode), h === r)
|
|
110
|
+
this.width = l, this.height = d, this.domWidthPx = m, this.domHeightPx = a, this.centerPosition = y;
|
|
86
111
|
else {
|
|
87
|
-
const
|
|
88
|
-
this.width =
|
|
112
|
+
const e = r / h;
|
|
113
|
+
this.width = e * l, this.height = e * d, this.domWidthPx = e * m, this.domHeightPx = e * a, this.centerPosition = new n().subVectors(y, s[0]).multiplyScalar(e).add(s[0]);
|
|
89
114
|
}
|
|
90
|
-
|
|
115
|
+
i.classList.add(`${W}__container`);
|
|
91
116
|
const C = new n().subVectors(s[1], s[0]), M = new n().subVectors(s[3], s[0]), H = new n().crossVectors(C, M).normalize();
|
|
92
117
|
this.lookAt(H);
|
|
93
118
|
const f = this.up.clone().applyQuaternion(this.quaternion), v = M.clone(), j = new n().crossVectors(f, v).normalize();
|
|
94
119
|
this.rotateOnWorldAxis(j, f.angleTo(v)), this.position.copy(y), this.addEventListener("added", () => {
|
|
95
|
-
var
|
|
96
|
-
this.mode === "front" && ((
|
|
120
|
+
var e;
|
|
121
|
+
this.mode === "front" && ((e = this.opacityMesh) == null || e.removeFromParent());
|
|
97
122
|
}), this.addEventListener("removed", () => {
|
|
98
|
-
var
|
|
99
|
-
(
|
|
123
|
+
var e;
|
|
124
|
+
(e = this.opacityMesh) == null || e.removeFromParent();
|
|
100
125
|
});
|
|
101
126
|
}
|
|
102
127
|
removeFromParent() {
|
|
103
|
-
var
|
|
128
|
+
var i;
|
|
104
129
|
const t = this.parent;
|
|
105
|
-
return t !== null && t.remove(this), (
|
|
130
|
+
return t !== null && t.remove(this), (i = this.opacityMesh) == null || i.removeFromParent(), this;
|
|
106
131
|
}
|
|
107
132
|
removeOpacityMesh() {
|
|
108
133
|
var t;
|
|
@@ -121,20 +146,20 @@ class Pt extends N {
|
|
|
121
146
|
}
|
|
122
147
|
}
|
|
123
148
|
applyMatrix4(t) {
|
|
124
|
-
var
|
|
125
|
-
super.applyMatrix4(t), (
|
|
149
|
+
var i;
|
|
150
|
+
super.applyMatrix4(t), (i = this.opacityMesh) == null || i.applyMatrix4(t);
|
|
126
151
|
}
|
|
127
152
|
applyQuaternion(t) {
|
|
128
|
-
var
|
|
129
|
-
return super.applyQuaternion(t), (
|
|
153
|
+
var i;
|
|
154
|
+
return super.applyQuaternion(t), (i = this.opacityMesh) == null || i.applyQuaternion(t), this;
|
|
130
155
|
}
|
|
131
156
|
applyScaleMatrix4(t) {
|
|
132
|
-
var
|
|
133
|
-
this.scale.applyMatrix4(t), (
|
|
157
|
+
var i;
|
|
158
|
+
this.scale.applyMatrix4(t), (i = this.opacityMesh) == null || i.scale.applyMatrix4(t);
|
|
134
159
|
}
|
|
135
160
|
}
|
|
136
161
|
export {
|
|
137
|
-
|
|
162
|
+
kt as CSS3DObjectPlus,
|
|
138
163
|
z as DefaultRatio,
|
|
139
164
|
k as MinRatio
|
|
140
165
|
};
|