@realsee/dnalogel 3.44.5 → 3.46.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 +6 -0
- package/dist/Sculpt/Meshes/Area.d.ts +1 -1
- package/dist/Sculpt/Meshes/Box.d.ts +1 -1
- package/dist/Sculpt/Meshes/Circle.d.ts +1 -1
- package/dist/Sculpt/Meshes/CircleWithEdge.d.ts +1 -1
- package/dist/Sculpt/Meshes/Line.d.ts +8 -2
- package/dist/Sculpt/Meshes/LineWithDots.d.ts +1 -1
- package/dist/Sculpt/Meshes/Point.d.ts +1 -1
- package/dist/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
- package/dist/Sculpt/Meshes/Prism.d.ts +1 -1
- package/dist/Sculpt/Meshes/RectangleWithEdge.d.ts +3 -4
- package/dist/Sculpt/Objects/Line/Editor.d.ts +22 -0
- package/dist/Sculpt/Objects/Line/index.d.ts +33 -0
- package/dist/Sculpt/Objects/Point/index.d.ts +1 -1
- package/dist/Sculpt/Objects/Polygon/Editor.d.ts +2 -2
- package/dist/Sculpt/Objects/Polygon/index.d.ts +3 -2
- package/dist/Sculpt/Objects/Polyline/Editor.d.ts +3 -17
- package/dist/Sculpt/Objects/Polyline/index.d.ts +7 -6
- package/dist/Sculpt/index.d.ts +5 -0
- package/dist/Sculpt/typings/index.d.ts +11 -6
- package/dist/Sculpt/{utils/color.d.ts → typings/style.d.ts} +7 -0
- package/dist/Sculpt/typings/utils.type.d.ts +2 -0
- package/dist/Sculpt/utils/three/ColoredMesh.d.ts +1 -1
- package/dist/Sculpt/utils/three/rayOnLine.d.ts +3 -5
- package/dist/index.cjs.js +56 -56
- package/dist/index.js +29820 -29686
- package/dist/index.umd.js +49 -49
- package/dist/shared-utils/Utils/WorkUtil.d.ts +6 -6
- package/dist/shared-utils/tag.d.ts +6 -3
- package/libs/AreaMakerPlugin/Controller.js +150 -78
- package/libs/AreaMakerPlugin/index.js +76 -4
- package/libs/AreaMakerPlugin/utils/Item.js +190 -111
- package/libs/CSS3DRenderPlugin/Controller.js +89 -29
- package/libs/CSS3DRenderPlugin/index.js +75 -15
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +132 -58
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +181 -116
- package/libs/CruisePlugin/BaseController.js +121 -49
- package/libs/CruisePlugin/Move.js +73 -21
- package/libs/CruisePlugin/Work.js +98 -46
- package/libs/CruisePlugin/index.js +79 -27
- package/libs/CurrentPanoImagePlugin/Controller.js +176 -104
- package/libs/CurrentPanoImagePlugin/index.js +76 -4
- package/libs/GuideLinePlugin/Controller.js +82 -30
- package/libs/GuideLinePlugin/GuideLineItem.js +82 -30
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +3 -2
- package/libs/GuideLinePlugin/GuideLineModeItem.js +81 -29
- package/libs/GuideLinePlugin/index.js +79 -27
- package/libs/ModelMakerPlugin/Controller.js +140 -83
- package/libs/ModelMakerPlugin/index.js +75 -18
- package/libs/ModelTVVideoPlugin/Plugin.js +117 -57
- package/libs/ModelTVVideoPlugin/index.js +68 -8
- package/libs/Object3DHelperPlugin/Controller.js +54 -31
- package/libs/Object3DHelperPlugin/index.js +35 -13
- package/libs/PanoCompassPlugin/Controller.js +97 -42
- package/libs/PanoCompassPlugin/index.js +71 -16
- package/libs/PanoDoorLabelPlugin/BaseController.js +98 -26
- package/libs/PanoDoorLabelPlugin/Controller.js +187 -115
- package/libs/PanoDoorLabelPlugin/index.js +76 -4
- package/libs/PanoMeasurePlugin/Components/Controller0.js +141 -89
- package/libs/PanoMeasurePlugin/Components/Controller1.js +179 -127
- package/libs/PanoMeasurePlugin/Controller/EditController.js +125 -73
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +167 -92
- package/libs/PanoMeasurePlugin/Controller/index.js +110 -65
- package/libs/PanoMeasurePlugin/Model/area.js +114 -38
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +78 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +98 -46
- package/libs/PanoMeasurePlugin/index.js +77 -32
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +98 -20
- package/libs/PanoSpatialTagPlugin/Plugin.js +210 -150
- package/libs/PanoSpatialTagPlugin/index.js +66 -6
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +133 -53
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +295 -216
- package/libs/PanoTagPlugin/Components/Tag/index.js +257 -187
- package/libs/PanoTagPlugin/Components/TagContainer.js +157 -87
- package/libs/PanoTagPlugin/Components/TagItem.js +144 -74
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +73 -3
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +109 -39
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +105 -35
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +113 -43
- package/libs/PanoTagPlugin/controller/TagRender.js +132 -80
- package/libs/PanoTagPlugin/controller/TagUtil.js +136 -84
- package/libs/PanoTagPlugin/controller/index.js +113 -61
- package/libs/PanoTagPlugin/index.js +89 -37
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +121 -41
- package/libs/PanoVideoPlugin/Controller.js +137 -65
- package/libs/PanoVideoPlugin/VideoMeshController.js +149 -69
- package/libs/PanoVideoPlugin/index.js +82 -10
- package/libs/PipelinePlugin/Controller.js +199 -128
- package/libs/PipelinePlugin/index.js +76 -5
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +102 -22
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +95 -15
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +136 -56
- package/libs/Sculpt/Meshes/Area.d.ts +1 -1
- package/libs/Sculpt/Meshes/Box.d.ts +1 -1
- package/libs/Sculpt/Meshes/Box.js +16 -15
- package/libs/Sculpt/Meshes/Circle.d.ts +1 -1
- package/libs/Sculpt/Meshes/Circle.js +1 -1
- package/libs/Sculpt/Meshes/CircleWithEdge.d.ts +1 -1
- package/libs/Sculpt/Meshes/Cylinder.js +8 -7
- package/libs/Sculpt/Meshes/Line.d.ts +8 -2
- package/libs/Sculpt/Meshes/Line.js +93 -65
- package/libs/Sculpt/Meshes/LineWithDots.d.ts +1 -1
- package/libs/Sculpt/Meshes/LineWithDots.js +26 -26
- package/libs/Sculpt/Meshes/Point.d.ts +1 -1
- package/libs/Sculpt/Meshes/Point.js +7 -6
- package/libs/Sculpt/Meshes/Polygon.js +1 -1
- package/libs/Sculpt/Meshes/PolygonWithEdge.d.ts +1 -1
- package/libs/Sculpt/Meshes/Polyline.js +5 -4
- package/libs/Sculpt/Meshes/Prism.d.ts +1 -1
- package/libs/Sculpt/Meshes/Rectangle.js +3 -2
- package/libs/Sculpt/Meshes/RectangleWithEdge.d.ts +3 -4
- package/libs/Sculpt/Objects/Box/index.js +41 -43
- package/libs/Sculpt/Objects/Cylinder/index.js +35 -37
- package/libs/Sculpt/Objects/Line/Editor.d.ts +22 -0
- package/libs/Sculpt/Objects/Line/Editor.js +62 -0
- package/libs/Sculpt/Objects/Line/index.d.ts +33 -0
- package/libs/Sculpt/Objects/Line/index.js +107 -0
- package/libs/Sculpt/Objects/Point/index.d.ts +1 -1
- package/libs/Sculpt/Objects/Polygon/Editor.d.ts +2 -2
- package/libs/Sculpt/Objects/Polygon/Editor.js +5 -5
- package/libs/Sculpt/Objects/Polygon/index.d.ts +3 -2
- package/libs/Sculpt/Objects/Polygon/index.js +80 -80
- package/libs/Sculpt/Objects/Polyline/Editor.d.ts +3 -17
- package/libs/Sculpt/Objects/Polyline/Editor.js +10 -48
- package/libs/Sculpt/Objects/Polyline/index.d.ts +7 -6
- package/libs/Sculpt/Objects/Polyline/index.js +63 -58
- package/libs/Sculpt/Objects/Prism/index.js +56 -58
- package/libs/Sculpt/index.d.ts +5 -0
- package/libs/Sculpt/index.js +58 -48
- package/libs/Sculpt/typings/index.d.ts +11 -6
- package/libs/Sculpt/{utils/color.d.ts → typings/style.d.ts} +7 -0
- package/libs/Sculpt/typings/utils.type.d.ts +2 -0
- package/libs/Sculpt/utils/three/ColoredMesh.d.ts +1 -1
- package/libs/Sculpt/utils/three/ColoredMesh.js +15 -14
- package/libs/Sculpt/utils/three/rayOnLine.d.ts +3 -5
- package/libs/Sculpt/utils/three/rayOnLine.js +15 -14
- package/libs/base/BasePlugin.js +14 -13
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +131 -61
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +75 -6
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +129 -59
- package/libs/floorplan/ModelFloorplanPlugin/index.js +75 -5
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +158 -86
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +76 -4
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +151 -81
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +75 -5
- package/libs/floorplan/index.js +1 -0
- package/libs/index.js +194 -192
- package/libs/shared-utils/Object3DHelper/Controller/MoveController.js +1 -1
- package/libs/shared-utils/Object3DHelper/Controller/ScaleController.js +23 -23
- package/libs/shared-utils/Utils/WorkUtil.d.ts +6 -6
- package/libs/shared-utils/Utils/WorkUtil.js +8 -7
- package/libs/shared-utils/five/index.js +3 -2
- package/libs/shared-utils/five/lookObject.js +3 -2
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/tag.d.ts +6 -3
- package/libs/shared-utils/tag.js +38 -24
- package/libs/shared-utils/three/PointSelector/utils/PointSelectorHelper.js +15 -15
- package/libs/shared-utils/three/index.js +1 -0
- package/package.json +1 -1
- package/dist/Sculpt/typings/SimplifyDeep.d.ts +0 -3
- package/libs/Sculpt/typings/SimplifyDeep.d.ts +0 -3
- /package/libs/Sculpt/{utils/color.js → typings/style.js} +0 -0
|
@@ -2,36 +2,36 @@ var $ = Object.defineProperty, _ = Object.defineProperties;
|
|
|
2
2
|
var k = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var R = Object.getOwnPropertySymbols;
|
|
4
4
|
var P = Object.prototype.hasOwnProperty, L = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var C = (
|
|
5
|
+
var C = (s, e, t) => e in s ? $(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, g = (s, e) => {
|
|
6
6
|
for (var t in e || (e = {}))
|
|
7
|
-
P.call(e, t) && C(
|
|
7
|
+
P.call(e, t) && C(s, t, e[t]);
|
|
8
8
|
if (R)
|
|
9
9
|
for (var t of R(e))
|
|
10
|
-
L.call(e, t) && C(
|
|
11
|
-
return
|
|
12
|
-
}, v = (
|
|
13
|
-
var
|
|
14
|
-
var
|
|
10
|
+
L.call(e, t) && C(s, t, e[t]);
|
|
11
|
+
return s;
|
|
12
|
+
}, v = (s, e) => _(s, k(e));
|
|
13
|
+
var n = (s, e, t) => (C(s, typeof e != "symbol" ? e + "" : e, t), t);
|
|
14
|
+
var f = (s, e, t) => new Promise((r, o) => {
|
|
15
15
|
var d = (c) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
18
|
-
} catch (
|
|
19
|
-
|
|
17
|
+
u(t.next(c));
|
|
18
|
+
} catch (a) {
|
|
19
|
+
o(a);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, m = (c) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
24
|
-
} catch (
|
|
25
|
-
|
|
23
|
+
u(t.throw(c));
|
|
24
|
+
} catch (a) {
|
|
25
|
+
o(a);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, u = (c) => c.done ? r(c.value) : Promise.resolve(c.value).then(d, m);
|
|
28
|
+
u((t = t.apply(s, e)).next());
|
|
29
29
|
});
|
|
30
30
|
import { anyPositionToVector3 as q } from "../../../shared-utils/positionToVector3.js";
|
|
31
31
|
import B from "./CSS3DRenderer.js";
|
|
32
32
|
import { Subscribe as A } from "../../../shared-utils/Subscribe.js";
|
|
33
33
|
import { CSS3DObjectPlus as W } from "./CSS3DObject.js";
|
|
34
|
-
import { MinRatio as
|
|
34
|
+
import { MinRatio as Nt } from "./CSS3DObject.js";
|
|
35
35
|
import { CSS3DFrontScene as H, CSS3DBehindScene as T } from "./CSS3DScene.js";
|
|
36
36
|
import { CSS3DFrontGroup as U, CSS3DBehindGroup as z } from "./CSS3DGroup.js";
|
|
37
37
|
import { CSS3DObject as j } from "three/examples/jsm/renderers/CSS3DRenderer";
|
|
@@ -44,15 +44,80 @@ import "../../../shared-utils/three/centerPoint.js";
|
|
|
44
44
|
import "../../../shared-utils/three/getObjectVisible.js";
|
|
45
45
|
import "hammerjs";
|
|
46
46
|
import "@realsee/five/line";
|
|
47
|
+
import "../../../Sculpt/utils/Modules/Global.js";
|
|
48
|
+
import "../../../Sculpt/utils/Modules/Cursor.js";
|
|
49
|
+
import "../../../Object3DHelperPlugin/Controller.js";
|
|
50
|
+
import "../../../base/BasePlugin.js";
|
|
47
51
|
import "../../../shared-utils/three/THREESphere.js";
|
|
48
52
|
import "animejs";
|
|
49
|
-
import "../../../shared-utils/
|
|
53
|
+
import "../../../shared-utils/Utils/FiveUtil.js";
|
|
54
|
+
import "../../../shared-utils/Utils/BaseUtil.js";
|
|
55
|
+
import "../../../shared-utils/Utils/WorkUtil.js";
|
|
56
|
+
import "../../../shared-utils/five/transformPosition.js";
|
|
57
|
+
import "../../../shared-utils/five/getFiveModel.js";
|
|
58
|
+
import "../../../shared-utils/url/absoluteUrl.js";
|
|
50
59
|
import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
51
|
-
import "
|
|
60
|
+
import "../../../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
61
|
+
import "../../../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
62
|
+
import "../../../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
63
|
+
import "../../../shared-utils/three/IObject3D.js";
|
|
64
|
+
import "../../../shared-utils/three/boundingBox.js";
|
|
65
|
+
import "../../../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
66
|
+
import "../../../shared-utils/Object3DHelper/utils/direction.js";
|
|
67
|
+
import "../../../shared-utils/Object3DHelper/Constants/color.js";
|
|
68
|
+
import "../../../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
69
|
+
import "./CSS3DRender.js";
|
|
70
|
+
import "../../../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
71
|
+
import "../../../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
72
|
+
import "../../../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
73
|
+
import "../../../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
74
|
+
import "../../../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
75
|
+
import "../../../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
76
|
+
import "../../../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
77
|
+
import "../../../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
78
|
+
import "../../../shared-utils/threex/domevents/index.js";
|
|
79
|
+
import "../../../shared-utils/isNil.js";
|
|
52
80
|
import "../../../shared-utils/util.js";
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
81
|
+
import "../../../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
82
|
+
import "../../../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
83
|
+
import "../../../Sculpt/utils/three/rayOnLine.js";
|
|
84
|
+
import "../../../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
85
|
+
import "../../../shared-utils/Object3DHelper/index.js";
|
|
86
|
+
import "../../../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
87
|
+
import "../../../shared-utils/math/rad2Deg.js";
|
|
88
|
+
import "../../../shared-utils/math/deg2Rad.js";
|
|
89
|
+
import "../../../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
90
|
+
import "../../../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
91
|
+
import "../../../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
92
|
+
import "../generateBehindFiveElement.js";
|
|
93
|
+
import "../../../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
94
|
+
import "../../../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
95
|
+
import "../../../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
96
|
+
import "../../../shared-utils/five/fiveModelLoad.js";
|
|
97
|
+
import "../../../shared-utils/five/FiveDomEvents.js";
|
|
98
|
+
import "../../../shared-utils/five/calculateThreeMouse.js";
|
|
99
|
+
import "../../../shared-utils/three/THREERaycaster.js";
|
|
100
|
+
import "../../../shared-utils/three/PointSelector/index.js";
|
|
101
|
+
import "../../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
102
|
+
import "../../../shared-utils/three/Magnifier.js";
|
|
103
|
+
import "../../../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
104
|
+
import "../../../shared-utils/three/Assets/index.js";
|
|
105
|
+
import "../../../shared-utils/three/PointSelector/utils/html.js";
|
|
106
|
+
import "../../../shared-utils/five/initialCSS3DRender.js";
|
|
107
|
+
import "../../../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
108
|
+
import "../../../Sculpt/Meshes/Line.js";
|
|
109
|
+
import "../../../Sculpt/typings/style.js";
|
|
110
|
+
import "../../../shared-utils/five/FiveLine.js";
|
|
111
|
+
import "../../../shared-utils/tag.js";
|
|
112
|
+
import "../../../shared-utils/five/vector3ToScreen.js";
|
|
113
|
+
import "./CSS3DSprite.js";
|
|
114
|
+
import "../../../shared-utils/isTouchDevice.js";
|
|
115
|
+
import "../../../shared-utils/five/getPosition.js";
|
|
116
|
+
import "../../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
117
|
+
import "../getAllCSS3DObject.js";
|
|
118
|
+
const J = 3, G = "CSS3DRenderer", l = `${G}@${J}`, S = () => {
|
|
119
|
+
console.error(`${l} is disposed`);
|
|
120
|
+
}, i = {
|
|
56
121
|
css3DObjects: [],
|
|
57
122
|
frontModeStore: {
|
|
58
123
|
css3DRenderer: new B()
|
|
@@ -61,26 +126,26 @@ const J = 3, G = "CSS3DRenderer", b = `${G}@${J}`, u = () => {
|
|
|
61
126
|
css3DRenderer: new B()
|
|
62
127
|
}
|
|
63
128
|
};
|
|
64
|
-
function w(
|
|
65
|
-
return
|
|
129
|
+
function w(s) {
|
|
130
|
+
return i.css3DObjects.find((e) => e.id === s);
|
|
66
131
|
}
|
|
67
|
-
function K(
|
|
68
|
-
|
|
132
|
+
function K(s) {
|
|
133
|
+
i.frontModeStore.css3DRenderer.setWrapper(s);
|
|
69
134
|
}
|
|
70
|
-
function Q(
|
|
71
|
-
|
|
135
|
+
function Q(s) {
|
|
136
|
+
i.behindModeStore.css3DRenderer.setWrapper(s);
|
|
72
137
|
}
|
|
73
138
|
class y {
|
|
74
139
|
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
75
140
|
constructor(e) {
|
|
76
|
-
|
|
77
|
-
|
|
141
|
+
n(this, "hooks", new A());
|
|
142
|
+
n(this, "state", {
|
|
78
143
|
enabled: !0,
|
|
79
144
|
visible: !0,
|
|
80
145
|
disposed: !1
|
|
81
146
|
});
|
|
82
|
-
|
|
83
|
-
|
|
147
|
+
n(this, "_scene");
|
|
148
|
+
n(this, "store", {
|
|
84
149
|
frontModeGroup: new U()
|
|
85
150
|
});
|
|
86
151
|
/**
|
|
@@ -117,11 +182,11 @@ class y {
|
|
|
117
182
|
* } | void
|
|
118
183
|
* ```
|
|
119
184
|
*/
|
|
120
|
-
|
|
185
|
+
n(this, "create3DElement", (e, t, r) => {
|
|
121
186
|
if (this.state.disposed)
|
|
122
|
-
return
|
|
123
|
-
const
|
|
124
|
-
const
|
|
187
|
+
return S();
|
|
188
|
+
const o = (() => {
|
|
189
|
+
const p = {
|
|
125
190
|
ratio: 216e-5,
|
|
126
191
|
devicePixelRatio: 1,
|
|
127
192
|
mode: "front",
|
|
@@ -130,51 +195,51 @@ class y {
|
|
|
130
195
|
pointerEvents: "none",
|
|
131
196
|
wrapperStyle: {}
|
|
132
197
|
};
|
|
133
|
-
return Object.assign(
|
|
198
|
+
return Object.assign(p, r);
|
|
134
199
|
})(), d = t.map(q);
|
|
135
200
|
if ((d == null ? void 0 : d.length) < 4)
|
|
136
|
-
return console.error(`${
|
|
137
|
-
const { ratio:
|
|
138
|
-
let
|
|
139
|
-
const
|
|
140
|
-
|
|
201
|
+
return console.error(`${l}: requires 4 point but params may have fewer`);
|
|
202
|
+
const { ratio: m, devicePixelRatio: u, mode: c, autoRender: a, container: O, pointerEvents: F, wrapperStyle: I } = o;
|
|
203
|
+
let b = !1;
|
|
204
|
+
const h = this.createObject(d, { ratio: m, dpr: u, container: O, mode: c, pointerEvents: F, wrapperStyle: I });
|
|
205
|
+
i.css3DObjects.push(h), o.scene && this.setScene(o.scene);
|
|
141
206
|
const N = () => {
|
|
142
|
-
if (
|
|
207
|
+
if (b)
|
|
143
208
|
return;
|
|
144
|
-
const
|
|
145
|
-
|
|
209
|
+
const p = h.mode === "front" ? this.getFrontCSS3DObjectGroup() : this.getBehindCSS3DObjectGroup();
|
|
210
|
+
p && p.add(h);
|
|
146
211
|
}, E = () => {
|
|
147
|
-
|
|
148
|
-
},
|
|
149
|
-
return
|
|
150
|
-
id:
|
|
212
|
+
b || (N(), this.render(e), this.hooks.emit("render"));
|
|
213
|
+
}, D = (p) => this.setVisibleById(h.id, p), M = (p) => this.setEnabledById(h.id, p), x = () => (b = !0, h.removeFromParent(), !0), V = c === "front" ? i.frontModeStore.css3DRenderer : i.behindModeStore.css3DRenderer;
|
|
214
|
+
return a && E(), {
|
|
215
|
+
id: h.uuid,
|
|
151
216
|
container: O,
|
|
152
|
-
css3DObject:
|
|
153
|
-
render:
|
|
154
|
-
show: () =>
|
|
155
|
-
hide: () =>
|
|
156
|
-
setVisible:
|
|
217
|
+
css3DObject: h,
|
|
218
|
+
render: a ? void 0 : E,
|
|
219
|
+
show: () => D(!0),
|
|
220
|
+
hide: () => D(!1),
|
|
221
|
+
setVisible: D,
|
|
157
222
|
enable: () => M(!0),
|
|
158
223
|
disable: () => M(!1),
|
|
159
224
|
setEnabled: M,
|
|
160
225
|
dispose: x,
|
|
161
|
-
appendToElement: (
|
|
226
|
+
appendToElement: (p) => V.setWrapper(p)
|
|
162
227
|
};
|
|
163
228
|
});
|
|
164
|
-
|
|
165
|
-
var
|
|
166
|
-
(
|
|
229
|
+
n(this, "setVisibleById", (e, t) => {
|
|
230
|
+
var r;
|
|
231
|
+
(r = w(e)) == null || r.setVisible(t);
|
|
167
232
|
});
|
|
168
|
-
|
|
169
|
-
const
|
|
170
|
-
if (!
|
|
233
|
+
n(this, "setEnabledById", (e, t) => {
|
|
234
|
+
const r = w(e);
|
|
235
|
+
if (!r)
|
|
171
236
|
return;
|
|
172
|
-
const
|
|
173
|
-
|
|
237
|
+
const o = r.mode === "front" ? this.getFrontCSS3DObjectGroup({ addGroupIfNotExists: !1 }) : this.getBehindCSS3DObjectGroup({ addGroupIfNotExists: !1 });
|
|
238
|
+
o && (t ? o.add(r) : o.remove(r));
|
|
174
239
|
});
|
|
175
|
-
|
|
176
|
-
const
|
|
177
|
-
return
|
|
240
|
+
n(this, "createObject", (e, t) => {
|
|
241
|
+
const r = new W(v(g({ cornerPoints: e }, t), { style: t.wrapperStyle }));
|
|
242
|
+
return r.element.classList.add(`${G}__container`), r.element.id = `${G}__container--${r.uuid}`, r;
|
|
178
243
|
});
|
|
179
244
|
e && this.setScene(e);
|
|
180
245
|
}
|
|
@@ -182,16 +247,16 @@ class y {
|
|
|
182
247
|
return this._scene || console.error("scene doesn't exist!, please call setScene(scene) first"), this._scene;
|
|
183
248
|
}
|
|
184
249
|
static get frontModeCSS3DRenderer() {
|
|
185
|
-
return
|
|
250
|
+
return i.frontModeStore.css3DRenderer;
|
|
186
251
|
}
|
|
187
252
|
static get behindModeCSS3DRenderer() {
|
|
188
|
-
return
|
|
253
|
+
return i.behindModeStore.css3DRenderer;
|
|
189
254
|
}
|
|
190
255
|
get frontModeCSS3DRenderer() {
|
|
191
|
-
return
|
|
256
|
+
return i.frontModeStore.css3DRenderer;
|
|
192
257
|
}
|
|
193
258
|
get behindModeCSS3DRenderer() {
|
|
194
|
-
return
|
|
259
|
+
return i.behindModeStore.css3DRenderer;
|
|
195
260
|
}
|
|
196
261
|
setScene(e) {
|
|
197
262
|
this._scene = e;
|
|
@@ -201,100 +266,100 @@ class y {
|
|
|
201
266
|
}
|
|
202
267
|
setState(e, t = { userAction: !0 }) {
|
|
203
268
|
if (this.state.disposed)
|
|
204
|
-
return
|
|
205
|
-
const
|
|
206
|
-
this.state = Object.assign(this.state, e),
|
|
269
|
+
return S();
|
|
270
|
+
const r = g({}, this.state);
|
|
271
|
+
this.state = Object.assign(this.state, e), r.visible !== this.state.visible && (e.visible ? this.handleShow() : this.handleHide()), r.enabled !== this.state.enabled && (e.enabled ? this.handleEnable() : this.handleDisable()), r.disposed !== this.state.disposed && this.handleDispose(), this.hooks.emit("stateChange", { state: this.state, prevState: r, userAction: t.userAction });
|
|
207
272
|
}
|
|
208
273
|
dispose() {
|
|
209
274
|
this.setState({ disposed: !0 }), this.hooks.emit("dispose");
|
|
210
275
|
}
|
|
211
276
|
show() {
|
|
212
|
-
return
|
|
277
|
+
return f(this, arguments, function* ({ userAction: e } = { userAction: !0 }) {
|
|
213
278
|
if (this.state.disposed)
|
|
214
|
-
return
|
|
279
|
+
return S();
|
|
215
280
|
this.setState({ visible: !0 }, { userAction: e }), this.hooks.emit("show", { userAction: e });
|
|
216
281
|
});
|
|
217
282
|
}
|
|
218
283
|
hide() {
|
|
219
|
-
return
|
|
284
|
+
return f(this, arguments, function* ({ userAction: e } = { userAction: !0 }) {
|
|
220
285
|
if (this.state.disposed)
|
|
221
|
-
return
|
|
286
|
+
return S();
|
|
222
287
|
this.setState({ visible: !1 }, { userAction: e }), this.hooks.emit("hide", { userAction: e });
|
|
223
288
|
});
|
|
224
289
|
}
|
|
225
290
|
enable({ userAction: e } = { userAction: !0 }) {
|
|
226
291
|
if (this.state.disposed)
|
|
227
|
-
return
|
|
292
|
+
return S();
|
|
228
293
|
this.setState({ enabled: !0 }, { userAction: e }), this.hooks.emit("enable", { userAction: e });
|
|
229
294
|
}
|
|
230
295
|
disable({ userAction: e } = { userAction: !0 }) {
|
|
231
296
|
if (this.state.disposed)
|
|
232
|
-
return
|
|
297
|
+
return S();
|
|
233
298
|
this.setState({ enabled: !1 }, { userAction: e }), this.hooks.emit("disable", { userAction: e });
|
|
234
299
|
}
|
|
235
300
|
getFrontCSS3DScene({ createSceneIfNotExists: e = !1 } = {}) {
|
|
236
|
-
var
|
|
237
|
-
const t = (
|
|
301
|
+
var r;
|
|
302
|
+
const t = (r = i.frontModeStore) == null ? void 0 : r.css3DScene;
|
|
238
303
|
if (t)
|
|
239
304
|
return t;
|
|
240
305
|
if (e) {
|
|
241
|
-
const
|
|
242
|
-
|
|
306
|
+
const o = new H();
|
|
307
|
+
i.frontModeStore.css3DScene = o;
|
|
243
308
|
}
|
|
244
|
-
return
|
|
309
|
+
return i.frontModeStore.css3DScene;
|
|
245
310
|
}
|
|
246
311
|
getBehindCSS3DScene({ createSceneIfNotExists: e = !1 } = {}) {
|
|
247
|
-
var
|
|
248
|
-
const t = (
|
|
312
|
+
var r, o;
|
|
313
|
+
const t = (r = i.behindModeStore) == null ? void 0 : r.css3DScene;
|
|
249
314
|
if (t)
|
|
250
315
|
return t;
|
|
251
316
|
if (e) {
|
|
252
|
-
const d = (
|
|
317
|
+
const d = (o = i.behindModeStore.scene) != null ? o : this.scene;
|
|
253
318
|
if (!d) {
|
|
254
|
-
console.error(`${
|
|
319
|
+
console.error(`${l}: scene is required when mode is behind`);
|
|
255
320
|
return;
|
|
256
321
|
}
|
|
257
|
-
const
|
|
258
|
-
|
|
322
|
+
const m = new T(d);
|
|
323
|
+
i.behindModeStore.css3DScene = m, i.behindModeStore.scene = d;
|
|
259
324
|
}
|
|
260
|
-
return
|
|
325
|
+
return i.behindModeStore.css3DScene;
|
|
261
326
|
}
|
|
262
327
|
getFrontCSS3DObjectGroup({ addGroupIfNotExists: e = !0 } = {}) {
|
|
263
328
|
const t = this.getFrontCSS3DScene({ createSceneIfNotExists: e });
|
|
264
329
|
return e && t && (t.getObjectById(this.store.frontModeGroup.id) || t.add(this.store.frontModeGroup)), this.store.frontModeGroup;
|
|
265
330
|
}
|
|
266
331
|
getBehindCSS3DObjectGroup({ addGroupIfNotExists: e = !0 } = {}) {
|
|
267
|
-
var
|
|
332
|
+
var r;
|
|
268
333
|
const t = this.getBehindCSS3DScene({ createSceneIfNotExists: e });
|
|
269
334
|
if (e && t && this.scene) {
|
|
270
|
-
const
|
|
271
|
-
this.store.behindModeGroup =
|
|
335
|
+
const o = (r = this.store.behindModeGroup) != null ? r : new z(this.scene);
|
|
336
|
+
this.store.behindModeGroup = o, t.getObjectById(o.id) || t.add(o);
|
|
272
337
|
}
|
|
273
338
|
return this.store.behindModeGroup;
|
|
274
339
|
}
|
|
275
340
|
render(e) {
|
|
276
|
-
var t,
|
|
341
|
+
var t, r;
|
|
277
342
|
if (this.getFrontCSS3DObjectGroup({ addGroupIfNotExists: !1 }).CSS3DObjectLength > 0) {
|
|
278
|
-
const
|
|
279
|
-
if (!
|
|
280
|
-
return console.error(`${
|
|
281
|
-
|
|
343
|
+
const o = this.getFrontCSS3DScene({ createSceneIfNotExists: !0 });
|
|
344
|
+
if (!o)
|
|
345
|
+
return console.error(`${l}: css3DScene is required when mode is front`);
|
|
346
|
+
i.frontModeStore.css3DRenderer.renderEveryFrame(o, e);
|
|
282
347
|
}
|
|
283
|
-
if (((
|
|
284
|
-
const
|
|
285
|
-
if (!
|
|
286
|
-
return console.error(`${
|
|
287
|
-
|
|
348
|
+
if (((r = (t = this.getBehindCSS3DObjectGroup({ addGroupIfNotExists: !1 })) == null ? void 0 : t.CSS3DObjectLength) != null ? r : 0) > 0) {
|
|
349
|
+
const o = this.getBehindCSS3DScene({ createSceneIfNotExists: !0 });
|
|
350
|
+
if (!o)
|
|
351
|
+
return console.error(`${l}: css3DScene is required when mode is behind`);
|
|
352
|
+
i.behindModeStore.css3DRenderer.renderEveryFrame(o, e);
|
|
288
353
|
}
|
|
289
354
|
}
|
|
290
355
|
handleShow() {
|
|
291
|
-
return
|
|
356
|
+
return f(this, null, function* () {
|
|
292
357
|
var e;
|
|
293
358
|
this.store.frontModeGroup.setVisible(!0), (e = this.store.behindModeGroup) == null || e.setVisible(!0);
|
|
294
359
|
});
|
|
295
360
|
}
|
|
296
361
|
handleHide() {
|
|
297
|
-
return
|
|
362
|
+
return f(this, null, function* () {
|
|
298
363
|
var e;
|
|
299
364
|
this.store.frontModeGroup.setVisible(!1), (e = this.store.behindModeGroup) == null || e.setVisible(!1);
|
|
300
365
|
});
|
|
@@ -304,21 +369,21 @@ class y {
|
|
|
304
369
|
(e = this.getFrontCSS3DScene()) == null || e.add(this.store.frontModeGroup), this.store.behindModeGroup && ((t = this.getBehindCSS3DScene()) == null || t.add(this.store.behindModeGroup));
|
|
305
370
|
}
|
|
306
371
|
handleDisable() {
|
|
307
|
-
var e, t,
|
|
308
|
-
this.store.frontModeGroup.children.forEach((
|
|
309
|
-
|
|
310
|
-
}), (e = this.store.behindModeGroup) == null || e.children.forEach((
|
|
311
|
-
|
|
312
|
-
}), (t = this.getFrontCSS3DScene()) == null || t.remove(this.store.frontModeGroup), this.store.behindModeGroup && ((
|
|
372
|
+
var e, t, r;
|
|
373
|
+
this.store.frontModeGroup.children.forEach((o) => {
|
|
374
|
+
o instanceof j && o.element instanceof Element && o.element.parentNode !== null && o.element.remove();
|
|
375
|
+
}), (e = this.store.behindModeGroup) == null || e.children.forEach((o) => {
|
|
376
|
+
o instanceof j && o.element instanceof Element && o.element.parentNode !== null && o.element.remove();
|
|
377
|
+
}), (t = this.getFrontCSS3DScene()) == null || t.remove(this.store.frontModeGroup), this.store.behindModeGroup && ((r = this.getBehindCSS3DScene()) == null || r.remove(this.store.behindModeGroup));
|
|
313
378
|
}
|
|
314
379
|
handleDispose() {
|
|
315
380
|
this.handleDisable();
|
|
316
381
|
}
|
|
317
382
|
}
|
|
318
|
-
|
|
383
|
+
n(y, "setFrontModeContainer", K), n(y, "setBehindModeContainer", Q);
|
|
319
384
|
export {
|
|
320
385
|
y as CSS3DRender,
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
386
|
+
Nt as MinRatio,
|
|
387
|
+
l as PLUGIN,
|
|
388
|
+
i as globalStore
|
|
324
389
|
};
|