@realsee/dnalogel 3.50.16 → 3.50.18-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/CHANGELOG.md +3 -0
- package/README.md +116 -0
- package/dist/ModelMakerPlugin/Controller.d.ts +2 -0
- package/dist/Sculpt/utils/export.d.ts +18 -0
- package/dist/index.cjs.js +207 -207
- package/dist/index.js +34867 -34776
- package/dist/index.umd.js +211 -211
- package/dist/shared-utils/five/fiveEveryReadyListener.d.ts +2 -0
- package/dist/shared-utils/index.d.ts +1 -0
- package/dist/shared-utils/tag.d.ts +41 -2
- package/dist/shared-utils/three/temp.d.ts +2 -2
- package/libs/AreaMakerPlugin/Controller.js +100 -46
- package/libs/AreaMakerPlugin/index.js +64 -10
- package/libs/AreaMakerPlugin/utils/Item.js +156 -100
- package/libs/CSS3DRenderPlugin/Controller.js +93 -44
- package/libs/CSS3DRenderPlugin/index.js +62 -13
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DObject.js +105 -49
- package/libs/CSS3DRenderPlugin/utils/three/CSS3DRender.js +130 -77
- package/libs/CruisePlugin/BaseController.js +143 -89
- package/libs/CruisePlugin/Move.js +83 -39
- package/libs/CruisePlugin/Work.js +95 -51
- package/libs/CruisePlugin/index.js +66 -22
- package/libs/CurrentPanoImagePlugin/Controller.js +139 -85
- package/libs/CurrentPanoImagePlugin/index.js +63 -9
- package/libs/GuideLinePlugin/Controller.js +57 -13
- package/libs/GuideLinePlugin/GuideLineItem.js +63 -19
- package/libs/GuideLinePlugin/GuideLineModeItem/index.js +6 -2
- package/libs/GuideLinePlugin/GuideLineModeItem.js +58 -14
- package/libs/GuideLinePlugin/index.js +66 -22
- package/libs/ModelMakerPlugin/Controller.d.ts +2 -0
- package/libs/ModelMakerPlugin/Controller.js +190 -129
- package/libs/ModelMakerPlugin/index.js +63 -21
- package/libs/ModelMakerPlugin/item/baseItem.js +4 -2
- package/libs/ModelMakerPlugin/item/boxItem.js +5 -3
- package/libs/ModelMakerPlugin/item/polygonItem.js +9 -7
- package/libs/ModelMakerPlugin/item/prismItem.js +5 -3
- package/libs/ModelTVVideoPlugin/Plugin.js +96 -47
- package/libs/ModelTVVideoPlugin/index.js +55 -6
- package/libs/Object3DHelperPlugin/Controller.js +42 -25
- package/libs/Object3DHelperPlugin/index.js +28 -12
- package/libs/PanoCompassPlugin/Controller.js +92 -44
- package/libs/PanoCompassPlugin/index.js +63 -15
- package/libs/PanoDoorLabelPlugin/BaseController.js +79 -25
- package/libs/PanoDoorLabelPlugin/Controller.js +132 -78
- package/libs/PanoDoorLabelPlugin/index.js +63 -9
- package/libs/PanoMeasurePlugin/Components/Controller0.js +126 -77
- package/libs/PanoMeasurePlugin/Components/Controller1.js +139 -90
- package/libs/PanoMeasurePlugin/Controller/EditController.js +120 -71
- package/libs/PanoMeasurePlugin/Controller/WatchController.js +120 -70
- package/libs/PanoMeasurePlugin/Controller/index.js +132 -86
- package/libs/PanoMeasurePlugin/Model/area.js +72 -22
- package/libs/PanoMeasurePlugin/Modules/Magnifier.js +56 -0
- package/libs/PanoMeasurePlugin/Modules/UIController/index.js +64 -15
- package/libs/PanoMeasurePlugin/index.js +62 -16
- package/libs/PanoMeasurePlugin/utils/dom/areaDom.js +57 -2
- package/libs/PanoRulerProPlugin/Controller.js +88 -33
- package/libs/PanoRulerProPlugin/RulerItems.js +146 -91
- package/libs/PanoRulerProPlugin/index.js +64 -9
- package/libs/PanoSpatialTagPlugin/Plugin.js +177 -128
- package/libs/PanoSpatialTagPlugin/index.js +53 -4
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +116 -60
- package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +192 -136
- package/libs/PanoTagPlugin/Components/Tag/index.js +194 -139
- package/libs/PanoTagPlugin/Components/TagContainer.js +112 -57
- package/libs/PanoTagPlugin/Components/TagItem.js +204 -149
- package/libs/PanoTagPlugin/controller/Tag/BaseTag.js +157 -101
- package/libs/PanoTagPlugin/controller/Tag/ModelTag.js +75 -20
- package/libs/PanoTagPlugin/controller/Tag/PlaneTag.js +86 -31
- package/libs/PanoTagPlugin/controller/Tag/PointTag.js +93 -37
- package/libs/PanoTagPlugin/controller/TagRender.js +62 -18
- package/libs/PanoTagPlugin/controller/TagUtil.js +123 -79
- package/libs/PanoTagPlugin/controller/index.js +110 -72
- package/libs/PanoTagPlugin/index.js +72 -28
- package/libs/PanoTagPlugin/utils/tag/calculateTagConfig.js +77 -21
- package/libs/PanoVideoPlugin/Controller.js +95 -41
- package/libs/PanoVideoPlugin/VideoMeshController.js +119 -63
- package/libs/PanoVideoPlugin/index.js +66 -12
- package/libs/PipelinePlugin/Controller.js +173 -119
- package/libs/PipelinePlugin/index.js +63 -9
- package/libs/PipelinePlugin/utils/Objects/FlowPipe.js +70 -14
- package/libs/PipelinePlugin/utils/Objects/HighlightPipe.js +58 -2
- package/libs/PipelinePlugin/utils/Objects/Pipe.js +98 -42
- package/libs/Sculpt/Meshes/Box.js +3 -2
- package/libs/Sculpt/Meshes/Cylinder.js +10 -6
- package/libs/Sculpt/Meshes/Line.js +43 -38
- package/libs/Sculpt/Meshes/LineWithDots.js +14 -10
- package/libs/Sculpt/Meshes/Point.js +24 -20
- package/libs/Sculpt/Meshes/Polygon.js +5 -2
- package/libs/Sculpt/Meshes/Prism.js +19 -16
- package/libs/Sculpt/Objects/Line/Editor.js +6 -5
- package/libs/Sculpt/index.js +15 -14
- package/libs/Sculpt/utils/export.d.ts +18 -0
- package/libs/Sculpt/utils/export.js +21 -0
- package/libs/Sculpt/utils/three/ColoredMesh.js +26 -22
- package/libs/base/BasePlugin.js +14 -10
- package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +146 -94
- package/libs/floorplan/MapviewFloorplanPlugin/index.js +62 -10
- package/libs/floorplan/ModelFloorplanPlugin/Controller.js +109 -56
- package/libs/floorplan/ModelFloorplanPlugin/index.js +62 -9
- package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +116 -63
- package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +62 -9
- package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +105 -52
- package/libs/floorplan/TopviewFloorplanPlugin/index.js +62 -9
- package/libs/floorplan/index.js +4 -0
- package/libs/index.js +208 -206
- package/libs/shared-utils/five/fiveEveryReadyListener.d.ts +2 -0
- package/libs/shared-utils/five/fiveEveryReadyListener.js +15 -0
- package/libs/shared-utils/five/index.js +6 -2
- package/libs/shared-utils/five/lookObject.js +31 -27
- package/libs/shared-utils/index.d.ts +1 -0
- package/libs/shared-utils/index.js +19 -17
- package/libs/shared-utils/logger.js +1 -1
- package/libs/shared-utils/tag.d.ts +41 -2
- package/libs/shared-utils/tag.js +139 -86
- package/libs/shared-utils/three/index.js +4 -0
- package/libs/shared-utils/three/temp.d.ts +2 -2
- package/libs/shared-utils/three/temp.js +4 -4
- package/package.json +1 -1
|
@@ -2,15 +2,15 @@ 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 d = (o, i,
|
|
6
|
-
for (var
|
|
7
|
-
O.call(i,
|
|
5
|
+
var d = (o, i, t) => i in o ? R(o, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[i] = t, a = (o, i) => {
|
|
6
|
+
for (var t in i || (i = {}))
|
|
7
|
+
O.call(i, t) && d(o, t, i[t]);
|
|
8
8
|
if (f)
|
|
9
|
-
for (var
|
|
10
|
-
S.call(i,
|
|
9
|
+
for (var t of f(i))
|
|
10
|
+
S.call(i, t) && d(o, t, i[t]);
|
|
11
11
|
return o;
|
|
12
12
|
}, l = (o, i) => F(o, C(i));
|
|
13
|
-
var
|
|
13
|
+
var m = (o, i, t) => (d(o, typeof i != "symbol" ? i + "" : i, t), t);
|
|
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";
|
|
@@ -25,6 +25,10 @@ import "animejs";
|
|
|
25
25
|
import { waitFiveModelLoaded as P } from "../shared-utils/five/fiveModelLoad.js";
|
|
26
26
|
import { absoluteUrl as w } from "../shared-utils/url/absoluteUrl.js";
|
|
27
27
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
28
|
+
import "../Sculpt/Meshes/Polygon.js";
|
|
29
|
+
import "../Sculpt/utils/Modules/Global.js";
|
|
30
|
+
import "../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
31
|
+
import "../Sculpt/utils/three/rayOnLine.js";
|
|
28
32
|
import "../shared-utils/positionToVector3.js";
|
|
29
33
|
import "./utils/three/CSS3DRenderer.js";
|
|
30
34
|
import "./utils/three/THREEJS_CSS3DRenderer.js";
|
|
@@ -47,7 +51,10 @@ import "../shared-utils/Utils/BaseUtil.js";
|
|
|
47
51
|
import "../shared-utils/Utils/WorkUtil.js";
|
|
48
52
|
import "../shared-utils/five/transformPosition.js";
|
|
49
53
|
import "../shared-utils/three/temp.js";
|
|
54
|
+
import "../shared-utils/three/core/Raycaster.js";
|
|
50
55
|
import "../shared-utils/dom/resizeObserver.js";
|
|
56
|
+
import "../shared-utils/five/fiveEveryReadyListener.js";
|
|
57
|
+
import "../shared-utils/throttle.js";
|
|
51
58
|
import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
52
59
|
import "../shared-utils/three/Magnifier.js";
|
|
53
60
|
import "../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
@@ -69,16 +76,58 @@ import "../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
|
69
76
|
import "../shared-utils/three/PointSelector/utils/contents.js";
|
|
70
77
|
import "../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
|
|
71
78
|
import "../vendor/three/build/three.module.js";
|
|
79
|
+
import "../shared-utils/three/generatePolygonGeometry.js";
|
|
80
|
+
import "../shared-utils/three/earcut3D.js";
|
|
81
|
+
import "earcut";
|
|
82
|
+
import "../shared-utils/three/getNormal.js";
|
|
83
|
+
import "../PanoMeasurePlugin/utils/isIntersecting.js";
|
|
84
|
+
import "../Sculpt/utils/three/ColoredMesh.js";
|
|
85
|
+
import "../shared-utils/three/geometryUtil.js";
|
|
86
|
+
import "../Sculpt/utils/Modules/Cursor.js";
|
|
87
|
+
import "../Object3DHelperPlugin/Controller.js";
|
|
88
|
+
import "../base/BasePlugin.js";
|
|
89
|
+
import "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
90
|
+
import "../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
91
|
+
import "../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
92
|
+
import "../shared-utils/three/boundingBox.js";
|
|
93
|
+
import "../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
94
|
+
import "../shared-utils/Object3DHelper/utils/direction.js";
|
|
95
|
+
import "../shared-utils/Object3DHelper/Constants/color.js";
|
|
96
|
+
import "../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
97
|
+
import "../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
98
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
99
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
100
|
+
import "../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
101
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
102
|
+
import "../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
103
|
+
import "../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
104
|
+
import "../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
105
|
+
import "../shared-utils/threex/domevents/index.js";
|
|
106
|
+
import "../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
107
|
+
import "../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
108
|
+
import "../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
109
|
+
import "../shared-utils/Object3DHelper/index.js";
|
|
110
|
+
import "../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
111
|
+
import "../shared-utils/math/rad2Deg.js";
|
|
112
|
+
import "../shared-utils/math/deg2Rad.js";
|
|
113
|
+
import "../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
114
|
+
import "../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
115
|
+
import "../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
116
|
+
import "../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
117
|
+
import "../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
118
|
+
import "../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
119
|
+
import "../shared-utils/five/FiveDomEvents.js";
|
|
120
|
+
import "../shared-utils/five/calculateThreeMouse.js";
|
|
72
121
|
const b = "v2.0.1", E = `CSS3DRenderPlugin@${b}`;
|
|
73
|
-
class
|
|
74
|
-
constructor(
|
|
122
|
+
class Te extends j {
|
|
123
|
+
constructor(t) {
|
|
75
124
|
super();
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
125
|
+
m(this, "five");
|
|
126
|
+
m(this, "behindFiveContainer");
|
|
127
|
+
m(this, "frontFiveContainer");
|
|
128
|
+
m(this, "VERSION", b);
|
|
129
|
+
m(this, "staticPrefix", "//vr-image-4.realsee-cdn.cn");
|
|
130
|
+
m(this, "created3DElementResults", []);
|
|
82
131
|
/**
|
|
83
132
|
* @description 根据传入的四个点位创建一个 3d dom容器,可以通过ReactDom.render()的方式将react组件放到容器中
|
|
84
133
|
* @param { Vector3Position[] } points 矩形四个点坐标
|
|
@@ -114,56 +163,56 @@ class Ue extends j {
|
|
|
114
163
|
* } | void
|
|
115
164
|
* ```
|
|
116
165
|
*/
|
|
117
|
-
|
|
166
|
+
m(this, "create3DDomContainer", (t, e) => {
|
|
118
167
|
if (this.state.disposed)
|
|
119
168
|
return;
|
|
120
|
-
const
|
|
121
|
-
var
|
|
122
|
-
(
|
|
123
|
-
const
|
|
169
|
+
const p = (() => {
|
|
170
|
+
var n;
|
|
171
|
+
(e == null ? void 0 : e.dpr) !== void 0 && console.warn(`${E}: please use "config.devicePixelRatio" replace "config.dpr"`);
|
|
172
|
+
const s = {
|
|
124
173
|
ratio: 216e-5,
|
|
125
|
-
devicePixelRatio: (
|
|
174
|
+
devicePixelRatio: (n = e == null ? void 0 : e.dpr) != null ? n : 1,
|
|
126
175
|
mode: "front",
|
|
127
176
|
autoRender: !0,
|
|
128
177
|
wrapperStyle: {}
|
|
129
178
|
};
|
|
130
|
-
return Object.assign(
|
|
131
|
-
})(), { autoRender: h } =
|
|
132
|
-
|
|
133
|
-
const r = this.create3DElement(this.five.camera,
|
|
179
|
+
return Object.assign(s, e, (e == null ? void 0 : e.mode) === "behind" ? { scene: this.five.scene } : void 0);
|
|
180
|
+
})(), { autoRender: h } = p;
|
|
181
|
+
p.mode === "behind" && p.behindFiveContainer && (this.behindFiveContainer = p.behindFiveContainer);
|
|
182
|
+
const r = this.create3DElement(this.five.camera, t, l(a({}, p), { autoRender: !1 }));
|
|
134
183
|
if (!r)
|
|
135
184
|
return;
|
|
136
185
|
const D = r.dispose;
|
|
137
186
|
r.dispose = () => (this.created3DElementResults.includes(r) && this.created3DElementResults.splice(this.created3DElementResults.indexOf(r), 1), D());
|
|
138
187
|
const c = () => {
|
|
139
|
-
var
|
|
140
|
-
const
|
|
141
|
-
if (!
|
|
142
|
-
return console.error(`${E}: wrapper is ${
|
|
143
|
-
r.appendToElement(
|
|
188
|
+
var n, v;
|
|
189
|
+
const s = r.css3DObject.mode === "front" ? (v = this.frontFiveContainer) != null ? v : (n = this.five.getElement()) == null ? void 0 : n.parentElement : this.getBehindFiveElement();
|
|
190
|
+
if (!s)
|
|
191
|
+
return console.error(`${E}: wrapper is ${s}; mode is ${r.css3DObject.mode}`);
|
|
192
|
+
r.appendToElement(s), r.render(), this.created3DElementResults.push(r);
|
|
144
193
|
}, u = () => {
|
|
145
194
|
r.css3DObject.mode === "front" && c(), r.css3DObject.mode === "behind" && P(this.five).then(() => c());
|
|
146
195
|
};
|
|
147
196
|
return h && u(), l(a({}, r), { render: h ? void 0 : u });
|
|
148
197
|
});
|
|
149
|
-
this.five =
|
|
198
|
+
this.five = t;
|
|
150
199
|
}
|
|
151
200
|
/** @deprecated disposeAll() renamed as dispose() */
|
|
152
201
|
disposeAll() {
|
|
153
202
|
return this.dispose();
|
|
154
203
|
}
|
|
155
|
-
setState(...
|
|
156
|
-
const
|
|
157
|
-
return this.five.needsRender = !0,
|
|
204
|
+
setState(...t) {
|
|
205
|
+
const e = super.setState(...t);
|
|
206
|
+
return this.five.needsRender = !0, e;
|
|
158
207
|
}
|
|
159
|
-
appendToFrontFiveContainer(
|
|
160
|
-
this.frontFiveContainer =
|
|
161
|
-
|
|
208
|
+
appendToFrontFiveContainer(t) {
|
|
209
|
+
this.frontFiveContainer = t, this.created3DElementResults.forEach((e) => {
|
|
210
|
+
e.css3DObject.mode === "front" && e.appendToElement(t);
|
|
162
211
|
});
|
|
163
212
|
}
|
|
164
|
-
appendToBehindFiveContainer(
|
|
165
|
-
this.behindFiveContainer =
|
|
166
|
-
|
|
213
|
+
appendToBehindFiveContainer(t) {
|
|
214
|
+
this.behindFiveContainer = t, this.created3DElementResults.forEach((e) => {
|
|
215
|
+
e.css3DObject.mode === "behind" && e.appendToElement(t);
|
|
167
216
|
});
|
|
168
217
|
}
|
|
169
218
|
getBehindFiveElement() {
|
|
@@ -172,16 +221,16 @@ class Ue extends j {
|
|
|
172
221
|
/**
|
|
173
222
|
* @description: 获取静态资源的url
|
|
174
223
|
*/
|
|
175
|
-
absoluteUrl(
|
|
176
|
-
return w(this.staticPrefix,
|
|
224
|
+
absoluteUrl(t) {
|
|
225
|
+
return w(this.staticPrefix, t);
|
|
177
226
|
}
|
|
178
227
|
clear() {
|
|
179
|
-
this.created3DElementResults.forEach((
|
|
180
|
-
|
|
228
|
+
this.created3DElementResults.forEach((t) => {
|
|
229
|
+
t.dispose();
|
|
181
230
|
}), this.created3DElementResults = [];
|
|
182
231
|
}
|
|
183
232
|
}
|
|
184
233
|
export {
|
|
185
234
|
E as PLUGIN_NAME,
|
|
186
|
-
|
|
235
|
+
Te as default
|
|
187
236
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import o from "./Controller.js";
|
|
2
|
-
import { CSS3DRender as
|
|
2
|
+
import { CSS3DRender as po } 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";
|
|
@@ -12,7 +12,10 @@ import "../shared-utils/Subscribe.js";
|
|
|
12
12
|
import "../shared-utils/Utils/WorkUtil.js";
|
|
13
13
|
import "../shared-utils/five/transformPosition.js";
|
|
14
14
|
import "../shared-utils/three/temp.js";
|
|
15
|
+
import "../shared-utils/three/core/Raycaster.js";
|
|
15
16
|
import "../shared-utils/dom/resizeObserver.js";
|
|
17
|
+
import "../shared-utils/five/fiveEveryReadyListener.js";
|
|
18
|
+
import "../shared-utils/throttle.js";
|
|
16
19
|
import "hammerjs";
|
|
17
20
|
import "../shared-utils/three/PointSelector/index.js";
|
|
18
21
|
import "../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
@@ -33,6 +36,60 @@ import "../shared-utils/three/core/Sphere.js";
|
|
|
33
36
|
import "animejs";
|
|
34
37
|
import "../shared-utils/isNil.js";
|
|
35
38
|
import "../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
39
|
+
import "../Sculpt/Meshes/Polygon.js";
|
|
40
|
+
import "../shared-utils/three/generatePolygonGeometry.js";
|
|
41
|
+
import "../shared-utils/three/earcut3D.js";
|
|
42
|
+
import "earcut";
|
|
43
|
+
import "../shared-utils/three/getNormal.js";
|
|
44
|
+
import "../PanoMeasurePlugin/utils/isIntersecting.js";
|
|
45
|
+
import "../Sculpt/typings/style.js";
|
|
46
|
+
import "../Sculpt/utils/three/ColoredMesh.js";
|
|
47
|
+
import "../shared-utils/three/IObject3D.js";
|
|
48
|
+
import "../Sculpt/utils/Modules/Global.js";
|
|
49
|
+
import "../Sculpt/utils/Modules/Cursor.js";
|
|
50
|
+
import "../Object3DHelperPlugin/Controller.js";
|
|
51
|
+
import "../base/BasePlugin.js";
|
|
52
|
+
import "../shared-utils/url/absoluteUrl.js";
|
|
53
|
+
import "../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
54
|
+
import "../Sculpt/utils/three/rayOnLine.js";
|
|
55
|
+
import "../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
56
|
+
import "../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
57
|
+
import "../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
58
|
+
import "../shared-utils/three/boundingBox.js";
|
|
59
|
+
import "../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
60
|
+
import "../shared-utils/Object3DHelper/utils/direction.js";
|
|
61
|
+
import "../shared-utils/Object3DHelper/Constants/color.js";
|
|
62
|
+
import "../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
63
|
+
import "../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
64
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
65
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
66
|
+
import "../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
67
|
+
import "../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
68
|
+
import "../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
69
|
+
import "../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
70
|
+
import "../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
71
|
+
import "../shared-utils/threex/domevents/index.js";
|
|
72
|
+
import "../shared-utils/util.js";
|
|
73
|
+
import "../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
74
|
+
import "../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
75
|
+
import "../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
76
|
+
import "../shared-utils/Object3DHelper/index.js";
|
|
77
|
+
import "../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
78
|
+
import "../shared-utils/math/rad2Deg.js";
|
|
79
|
+
import "../shared-utils/math/deg2Rad.js";
|
|
80
|
+
import "../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
81
|
+
import "../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
82
|
+
import "../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
83
|
+
import "../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
84
|
+
import "../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
85
|
+
import "../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
86
|
+
import "../shared-utils/five/fiveModelLoad.js";
|
|
87
|
+
import "../shared-utils/five/FiveDomEvents.js";
|
|
88
|
+
import "../shared-utils/five/calculateThreeMouse.js";
|
|
89
|
+
import "../shared-utils/isTouchDevice.js";
|
|
90
|
+
import "../shared-utils/three/geometryUtil.js";
|
|
91
|
+
import "../Sculpt/utils/Meshes/getLengthHTML.js";
|
|
92
|
+
import "../shared-utils/three/applyObjectMatrixWorld.js";
|
|
36
93
|
import "../shared-utils/three/PointSelector/utils/html.js";
|
|
37
94
|
import "../shared-utils/five/initialCSS3DRender.js";
|
|
38
95
|
import "./utils/three/CSS3DRenderer.js";
|
|
@@ -40,26 +97,18 @@ import "./utils/three/THREEJS_CSS3DRenderer.js";
|
|
|
40
97
|
import "./utils/createResizeObserver.js";
|
|
41
98
|
import "../shared-utils/three/PointSelector/utils/PointHelper2.js";
|
|
42
99
|
import "../Sculpt/Meshes/Line.js";
|
|
43
|
-
import "../Sculpt/typings/style.js";
|
|
44
100
|
import "../shared-utils/five/FiveLine.js";
|
|
45
|
-
import "../shared-utils/three/IObject3D.js";
|
|
46
101
|
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
102
|
import "./utils/three/CSS3DSprite.js";
|
|
51
|
-
import "../shared-utils/isTouchDevice.js";
|
|
52
103
|
import "../shared-utils/five/getPosition.js";
|
|
53
104
|
import "../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
54
105
|
import "../shared-utils/three/PointSelector/utils/contents.js";
|
|
55
|
-
import "../shared-utils/five/fiveModelLoad.js";
|
|
56
|
-
import "../shared-utils/url/absoluteUrl.js";
|
|
57
106
|
import "./utils/three/CSS3DScene.js";
|
|
58
107
|
import "./utils/getAllCSS3DObject.js";
|
|
59
108
|
import "./utils/three/CSS3DGroup.js";
|
|
60
|
-
const
|
|
109
|
+
const oo = (r) => new o(r);
|
|
61
110
|
export {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
111
|
+
po as CSS3DRender,
|
|
112
|
+
oo as CSS3DRenderPlugin,
|
|
113
|
+
oo as default
|
|
65
114
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var A = Object.defineProperty;
|
|
2
|
-
var D = (
|
|
3
|
-
var
|
|
2
|
+
var D = (h, m, t) => m in h ? A(h, m, { enumerable: !0, configurable: !0, writable: !0, value: t }) : h[m] = t;
|
|
3
|
+
var e = (h, m, t) => (D(h, typeof m != "symbol" ? m + "" : m, t), t);
|
|
4
4
|
import { CSS3DObject as N } from "three/examples/jsm/renderers/CSS3DRenderer";
|
|
5
|
-
import { Vector3 as
|
|
5
|
+
import { Vector3 as p } from "three";
|
|
6
6
|
import { even as E } from "../even.js";
|
|
7
7
|
import { Subscribe as Q } from "../../../shared-utils/Subscribe.js";
|
|
8
8
|
import R from "./OpacityMesh.js";
|
|
@@ -17,6 +17,10 @@ import "../../../shared-utils/three/core/Sphere.js";
|
|
|
17
17
|
import "animejs";
|
|
18
18
|
import { isNil as O } from "../../../shared-utils/isNil.js";
|
|
19
19
|
import "../../../vendor/@tweenjs/tween/dist/tween.esm.js.js";
|
|
20
|
+
import "../../../Sculpt/Meshes/Polygon.js";
|
|
21
|
+
import "../../../Sculpt/utils/Modules/Global.js";
|
|
22
|
+
import "../../../vendor/hotkeys-js/dist/hotkeys.esm.js";
|
|
23
|
+
import "../../../Sculpt/utils/three/rayOnLine.js";
|
|
20
24
|
import "../../../shared-utils/positionToVector3.js";
|
|
21
25
|
import "../../../shared-utils/five/vector3ToScreen.js";
|
|
22
26
|
import "../../../shared-utils/five/getFiveModel.js";
|
|
@@ -25,7 +29,10 @@ import "../../../shared-utils/Utils/BaseUtil.js";
|
|
|
25
29
|
import "../../../shared-utils/Utils/WorkUtil.js";
|
|
26
30
|
import "../../../shared-utils/five/transformPosition.js";
|
|
27
31
|
import "../../../shared-utils/three/temp.js";
|
|
32
|
+
import "../../../shared-utils/three/core/Raycaster.js";
|
|
28
33
|
import "../../../shared-utils/dom/resizeObserver.js";
|
|
34
|
+
import "../../../shared-utils/five/fiveEveryReadyListener.js";
|
|
35
|
+
import "../../../shared-utils/throttle.js";
|
|
29
36
|
import "../../../shared-utils/three/PointSelector/utils/PointSelectorHelper.js";
|
|
30
37
|
import "../../../shared-utils/three/Magnifier.js";
|
|
31
38
|
import "../../../shared-utils/three/PointSelector/utils/PointHelper.js";
|
|
@@ -52,76 +59,125 @@ import "../../../shared-utils/five/getRaycasterByNdcPosition.js";
|
|
|
52
59
|
import "../../../shared-utils/three/PointSelector/utils/contents.js";
|
|
53
60
|
import "../../../vendor/three/examples/jsm/lines/LineSegmentsGeometry.js";
|
|
54
61
|
import "../../../vendor/three/build/three.module.js";
|
|
62
|
+
import "../../../shared-utils/three/generatePolygonGeometry.js";
|
|
63
|
+
import "../../../shared-utils/three/earcut3D.js";
|
|
64
|
+
import "earcut";
|
|
65
|
+
import "../../../shared-utils/three/getNormal.js";
|
|
66
|
+
import "../../../PanoMeasurePlugin/utils/isIntersecting.js";
|
|
67
|
+
import "../../../Sculpt/utils/three/ColoredMesh.js";
|
|
68
|
+
import "../../../shared-utils/three/geometryUtil.js";
|
|
69
|
+
import "../../../Sculpt/utils/Modules/Cursor.js";
|
|
70
|
+
import "../../../Object3DHelperPlugin/Controller.js";
|
|
71
|
+
import "../../../base/BasePlugin.js";
|
|
72
|
+
import "../../../shared-utils/url/absoluteUrl.js";
|
|
73
|
+
import "../../../shared-utils/Object3DHelper/Helper/MoveHelper.js";
|
|
74
|
+
import "../../../shared-utils/Object3DHelper/Base/BaseHelper.js";
|
|
75
|
+
import "../../../shared-utils/Object3DHelper/utils/setObjectQuaternion.js";
|
|
76
|
+
import "../../../shared-utils/three/boundingBox.js";
|
|
77
|
+
import "../../../shared-utils/Object3DHelper/Helper/Objects/ArrowGroup.js";
|
|
78
|
+
import "../../../shared-utils/Object3DHelper/utils/direction.js";
|
|
79
|
+
import "../../../shared-utils/Object3DHelper/Constants/color.js";
|
|
80
|
+
import "../../../shared-utils/Object3DHelper/utils/calculateScaleByCamera.js";
|
|
81
|
+
import "./CSS3DRender.js";
|
|
82
|
+
import "./CSS3DScene.js";
|
|
83
|
+
import "../getAllCSS3DObject.js";
|
|
84
|
+
import "./CSS3DGroup.js";
|
|
85
|
+
import "../../../shared-utils/Object3DHelper/Helper/RotateHelper.js";
|
|
86
|
+
import "../../../shared-utils/Object3DHelper/Helper/HTML/tipsDom.js";
|
|
87
|
+
import "../../../shared-utils/Object3DHelper/Helper/HTML/utils/createElement.js";
|
|
88
|
+
import "../../../shared-utils/Object3DHelper/Helper/CSS3DScaleHelper.js";
|
|
89
|
+
import "../../../shared-utils/Object3DHelper/Helper/HTML/rectangleScaleDom.js";
|
|
90
|
+
import "../../../shared-utils/Object3DHelper/Helper/BoundingBoxHelper.js";
|
|
91
|
+
import "../../../shared-utils/Object3DHelper/Controller/MoveController.js";
|
|
92
|
+
import "../../../shared-utils/Object3DHelper/Base/BaseController.js";
|
|
93
|
+
import "../../../shared-utils/threex/domevents/index.js";
|
|
94
|
+
import "../../../shared-utils/Object3DHelper/utils/getMouseRaycaster.js";
|
|
95
|
+
import "../../../shared-utils/Object3DHelper/utils/calculateThreeMouse.js";
|
|
96
|
+
import "../../../Object3DHelperPlugin/FiveControllerWrapper.js";
|
|
97
|
+
import "../../../shared-utils/Object3DHelper/index.js";
|
|
98
|
+
import "../../../shared-utils/Object3DHelper/Controller/RotateController.js";
|
|
99
|
+
import "../../../shared-utils/math/rad2Deg.js";
|
|
100
|
+
import "../../../shared-utils/math/deg2Rad.js";
|
|
101
|
+
import "../../../shared-utils/Object3DHelper/Controller/CSS3DScaleController.js";
|
|
102
|
+
import "../../../shared-utils/Object3DHelper/Controller/RectangleScaleController.js";
|
|
103
|
+
import "../../../shared-utils/Object3DHelper/utils/vectorIsEqual.js";
|
|
104
|
+
import "../generateBehindFiveElement.js";
|
|
105
|
+
import "../../../shared-utils/Object3DHelper/Controller/BoundingBoxController.js";
|
|
106
|
+
import "../../../shared-utils/Object3DHelper/Helper/ScaleHelper.js";
|
|
107
|
+
import "../../../shared-utils/Object3DHelper/Controller/ScaleController.js";
|
|
108
|
+
import "../../../shared-utils/five/fiveModelLoad.js";
|
|
109
|
+
import "../../../shared-utils/five/FiveDomEvents.js";
|
|
110
|
+
import "../../../shared-utils/five/calculateThreeMouse.js";
|
|
55
111
|
const $ = 1, W = `CSS3DObjectPlus@${$}`, k = 216e-5, z = 3e-3;
|
|
56
|
-
class
|
|
112
|
+
class _i extends N {
|
|
57
113
|
constructor(t) {
|
|
58
114
|
var x, b, w, g, V;
|
|
59
115
|
if (O(t.cornerPoints) && O(t.width))
|
|
60
116
|
throw new Error("cornerPoints and width cannot be both empty");
|
|
61
|
-
const i = (x = t.container) != null ? x : document.createElement("div"),
|
|
62
|
-
const
|
|
117
|
+
const i = (x = t.container) != null ? x : document.createElement("div"), r = (b = t.cornerPoints) != null ? b : (() => {
|
|
118
|
+
const o = t.width / 2;
|
|
63
119
|
return [
|
|
64
|
-
new
|
|
65
|
-
new
|
|
66
|
-
new
|
|
67
|
-
new
|
|
120
|
+
new p(-o, o, 0),
|
|
121
|
+
new p(-o, -o, 0),
|
|
122
|
+
new p(o, -o, 0),
|
|
123
|
+
new p(o, o, 0)
|
|
68
124
|
];
|
|
69
|
-
})(),
|
|
125
|
+
})(), s = (w = t.ratio) != null ? w : z, P = (g = t.dpr) != null ? g : 1, F = (V = t.pointerEvents) != null ? V : "auto", n = Math.max(k, s), l = r[0].distanceTo(r[1]), d = r[1].distanceTo(r[2]), c = E(l / s * P), a = E(d / s * P), y = L(...r);
|
|
70
126
|
let u;
|
|
71
|
-
if (
|
|
72
|
-
i.style.width = `${
|
|
127
|
+
if (n === s)
|
|
128
|
+
i.style.width = `${c}px`, i.style.height = `${a}px`, u = i;
|
|
73
129
|
else {
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
const S =
|
|
77
|
-
i.style.position = "absolute", i.style.left = "0", i.style.top = "0", i.style.width = `${S *
|
|
130
|
+
const o = document.createElement("div");
|
|
131
|
+
o.style.width = `${c}px`, o.style.height = `${a}px`, o.style.pointerEvents = "none";
|
|
132
|
+
const S = s / n;
|
|
133
|
+
i.style.position = "absolute", i.style.left = "0", i.style.top = "0", i.style.width = `${S * c}px`, i.style.height = `${S * a}px`, o.appendChild(i), u = o;
|
|
78
134
|
}
|
|
79
135
|
super(u);
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
136
|
+
e(this, "version", $);
|
|
137
|
+
e(this, "isCSS3DObjectPlus", !0);
|
|
138
|
+
e(this, "isCSS3DObject", !0);
|
|
139
|
+
e(this, "name", W);
|
|
140
|
+
e(this, "container");
|
|
141
|
+
e(this, "width");
|
|
142
|
+
e(this, "height");
|
|
143
|
+
e(this, "domWidthPx");
|
|
144
|
+
e(this, "domHeightPx");
|
|
145
|
+
e(this, "cornerPoints");
|
|
146
|
+
e(this, "centerPosition");
|
|
147
|
+
e(this, "ratio");
|
|
148
|
+
e(this, "mode", "front");
|
|
149
|
+
e(this, "hooks", new Q());
|
|
150
|
+
e(this, "opacityMesh");
|
|
151
|
+
e(this, "selfVisible", !0);
|
|
152
|
+
e(this, "setVisible", (t) => {
|
|
97
153
|
this.selfVisible = t, this.visible = T(this.parent) && this.selfVisible, this.opacityMesh && (this.opacityMesh.visible = this.visible);
|
|
98
154
|
});
|
|
99
|
-
|
|
155
|
+
e(this, "updateVisible", () => {
|
|
100
156
|
this.setVisible(this.selfVisible);
|
|
101
157
|
});
|
|
102
158
|
/**
|
|
103
159
|
* @description: 生成透明Mesh
|
|
104
160
|
*/
|
|
105
|
-
|
|
106
|
-
const { domWidthPx: i, domHeightPx:
|
|
107
|
-
return
|
|
161
|
+
e(this, "createOpacityMesh", (t) => {
|
|
162
|
+
const { domWidthPx: i, domHeightPx: r } = t, s = new R(i, r);
|
|
163
|
+
return s.position.copy(t.position), s.rotation.copy(t.rotation), s.scale.copy(t.scale), s;
|
|
108
164
|
});
|
|
109
|
-
if (i.style.pointerEvents = F, Object.assign(i.style, t.style), this.scale.set(
|
|
110
|
-
this.width = l, this.height = d, this.domWidthPx =
|
|
165
|
+
if (i.style.pointerEvents = F, Object.assign(i.style, t.style), this.scale.set(n, n, n), this.cornerPoints = r, this.ratio = s, this.container = i, t.mode && (this.mode = t.mode), n === s)
|
|
166
|
+
this.width = l, this.height = d, this.domWidthPx = c, this.domHeightPx = a, this.centerPosition = y;
|
|
111
167
|
else {
|
|
112
|
-
const
|
|
113
|
-
this.width =
|
|
168
|
+
const o = s / n;
|
|
169
|
+
this.width = o * l, this.height = o * d, this.domWidthPx = o * c, this.domHeightPx = o * a, this.centerPosition = new p().subVectors(y, r[0]).multiplyScalar(o).add(r[0]);
|
|
114
170
|
}
|
|
115
171
|
i.classList.add(`${W}__container`);
|
|
116
|
-
const C = new
|
|
172
|
+
const C = new p().subVectors(r[1], r[0]), M = new p().subVectors(r[3], r[0]), H = new p().crossVectors(C, M).normalize();
|
|
117
173
|
this.lookAt(H);
|
|
118
|
-
const f = this.up.clone().applyQuaternion(this.quaternion), v = M.clone(), j = new
|
|
174
|
+
const f = this.up.clone().applyQuaternion(this.quaternion), v = M.clone(), j = new p().crossVectors(f, v).normalize();
|
|
119
175
|
this.rotateOnWorldAxis(j, f.angleTo(v)), this.position.copy(y), this.addEventListener("added", () => {
|
|
120
|
-
var
|
|
121
|
-
this.mode === "front" && ((
|
|
176
|
+
var o;
|
|
177
|
+
this.mode === "front" && ((o = this.opacityMesh) == null || o.removeFromParent());
|
|
122
178
|
}), this.addEventListener("removed", () => {
|
|
123
|
-
var
|
|
124
|
-
(
|
|
179
|
+
var o;
|
|
180
|
+
(o = this.opacityMesh) == null || o.removeFromParent();
|
|
125
181
|
});
|
|
126
182
|
}
|
|
127
183
|
removeFromParent() {
|
|
@@ -159,7 +215,7 @@ class kt extends N {
|
|
|
159
215
|
}
|
|
160
216
|
}
|
|
161
217
|
export {
|
|
162
|
-
|
|
218
|
+
_i as CSS3DObjectPlus,
|
|
163
219
|
z as DefaultRatio,
|
|
164
220
|
k as MinRatio
|
|
165
221
|
};
|