@realsee/dnalogel 2.28.1 → 2.28.2
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/dist/AreaMakerPlugin/index.d.ts +1 -1
- package/dist/AreaMakerPlugin/utils/Item.d.ts +2 -0
- package/dist/index.cjs.js +3 -3
- package/dist/index.js +11 -7
- package/dist/index.umd.js +3 -3
- package/libs/AreaMakerPlugin/Controller.js +2 -2
- package/libs/AreaMakerPlugin/index.d.ts +1 -1
- package/libs/AreaMakerPlugin/index.js +3 -3
- package/libs/AreaMakerPlugin/utils/Item.d.ts +2 -0
- package/libs/AreaMakerPlugin/utils/Item.js +10 -6
- package/libs/base/BasePlugin.js +1 -1
- package/libs/shared-utils/logger.js +1 -1
- package/package.json +1 -1
|
@@ -315,10 +315,10 @@ class ot extends k {
|
|
|
315
315
|
this.state = d(d({}, this.state), t), this.hooks.emit("stateChange", { state: this.state, prevState: e, userAction: i });
|
|
316
316
|
}
|
|
317
317
|
_enable(t) {
|
|
318
|
-
this.hooks.emit("enable", { userAction: t.userAction }), this.five.scene.add(this.modelGroup), this.five.needsRender = !0, this.five.on("wantsTapGesture", this.onWantsFiveTapGesture), this.five.on("initAnimationWillStart", this.onFiveInitAnimationWillStart), this.five.on("initAnimationEnded", this.onFiveInitAnimationEnded), this.five.on("modeChange", this.onFiveModeChange), this.five.on("cameraUpdate", this.onFiveCameraUpdate);
|
|
318
|
+
this.hooks.emit("enable", { userAction: t.userAction }), this.five.scene.add(this.modelGroup), this.updateChildrenMountedState(), this.five.needsRender = !0, this.five.on("wantsTapGesture", this.onWantsFiveTapGesture), this.five.on("initAnimationWillStart", this.onFiveInitAnimationWillStart), this.five.on("initAnimationEnded", this.onFiveInitAnimationEnded), this.five.on("modeChange", this.onFiveModeChange), this.five.on("cameraUpdate", this.onFiveCameraUpdate);
|
|
319
319
|
}
|
|
320
320
|
_disable(t) {
|
|
321
|
-
this.hooks.emit("disable", { userAction: t.userAction }), this.five.scene.remove(this.modelGroup), this.five.needsRender = !0, this.five.off("wantsTapGesture", this.onWantsFiveTapGesture), this.five.off("initAnimationWillStart", this.onFiveInitAnimationWillStart), this.five.off("initAnimationEnded", this.onFiveInitAnimationEnded), this.five.off("modeChange", this.onFiveModeChange), this.five.off("cameraUpdate", this.onFiveCameraUpdate);
|
|
321
|
+
this.hooks.emit("disable", { userAction: t.userAction }), this.five.scene.remove(this.modelGroup), this.updateChildrenMountedState(), this.five.needsRender = !0, this.five.off("wantsTapGesture", this.onWantsFiveTapGesture), this.five.off("initAnimationWillStart", this.onFiveInitAnimationWillStart), this.five.off("initAnimationEnded", this.onFiveInitAnimationEnded), this.five.off("modeChange", this.onFiveModeChange), this.five.off("cameraUpdate", this.onFiveCameraUpdate);
|
|
322
322
|
}
|
|
323
323
|
_show(t) {
|
|
324
324
|
return u(this, null, function* () {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Five } from '@realsee/five';
|
|
2
2
|
import type * as AreaMakerPluginType from './typing';
|
|
3
|
-
export declare const AreaMakerPlugin: (five: Five) => AreaMakerPluginType.AreaMakerController;
|
|
3
|
+
export declare const AreaMakerPlugin: (five: Five, params?: AreaMakerPluginType.Params) => AreaMakerPluginType.AreaMakerController;
|
|
4
4
|
export type { AreaMakerPluginType };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Controller as
|
|
1
|
+
import { Controller as t } from "./Controller.js";
|
|
2
2
|
import "three";
|
|
3
3
|
import "../base/BasePluginWithData.js";
|
|
4
4
|
import "../base/BasePlugin.js";
|
|
@@ -31,7 +31,7 @@ import "../components/AreaLabel/LabelItem.js";
|
|
|
31
31
|
import "../vendor/svelte/internal/index.js";
|
|
32
32
|
import "../components/AreaLabel/Assets/roomLabelBg.js";
|
|
33
33
|
import "../shared-utils/math/planimetry.js";
|
|
34
|
-
const
|
|
34
|
+
const I = (r, o) => new t(r, o);
|
|
35
35
|
export {
|
|
36
|
-
|
|
36
|
+
I as AreaMakerPlugin
|
|
37
37
|
};
|
|
@@ -94,6 +94,8 @@ export declare class AreaMakerItem {
|
|
|
94
94
|
private doOpacityAnime;
|
|
95
95
|
/** 插件 Config 变化时更新自身 depthTest */
|
|
96
96
|
private onPluginConfigChange;
|
|
97
|
+
/** 插件整体可见性变化时,需要更新自身可见性 */
|
|
98
|
+
private onPluginStateChange;
|
|
97
99
|
/** 更新标注可见性 */
|
|
98
100
|
private updateVisible;
|
|
99
101
|
/** 检测标注是否可见 */
|
|
@@ -10,8 +10,8 @@ import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
|
|
|
10
10
|
import { Object3D as b } from "../../shared-utils/three/core/Object3D.js";
|
|
11
11
|
import { LineSegments as k } from "../../shared-utils/three/objects/LineSegments.js";
|
|
12
12
|
import { BetterTween as y } from "../../shared-utils/animationFrame/BetterTween.js";
|
|
13
|
-
import { LabelItem as
|
|
14
|
-
import { getCenterPointOfPoints as
|
|
13
|
+
import { LabelItem as T } from "../../components/AreaLabel/LabelItem.js";
|
|
14
|
+
import { getCenterPointOfPoints as O } from "../../shared-utils/math/planimetry.js";
|
|
15
15
|
import { Subscribe as C } from "../../shared-utils/Subscribe.js";
|
|
16
16
|
import "../../shared-utils/positionToVector3.js";
|
|
17
17
|
import "../../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
|
|
@@ -129,6 +129,10 @@ class q {
|
|
|
129
129
|
i(this, "onPluginConfigChange", (t) => {
|
|
130
130
|
this.makerObject.material.depthTest = t.config.modelDepthTest, this.outline.material.depthTest = t.config.modelDepthTest, this.plugin.five.needsRender = !0;
|
|
131
131
|
});
|
|
132
|
+
/** 插件整体可见性变化时,需要更新自身可见性 */
|
|
133
|
+
i(this, "onPluginStateChange", () => {
|
|
134
|
+
this.updateVisible(), this.updateTagVisible();
|
|
135
|
+
});
|
|
132
136
|
/** 更新标注可见性 */
|
|
133
137
|
i(this, "updateVisible", () => {
|
|
134
138
|
const { result: t, msg: e } = this.checkVisible();
|
|
@@ -194,14 +198,14 @@ class q {
|
|
|
194
198
|
transform: `translate(${this.tagTransform.left}px, ${this.tagTransform.top}px)`,
|
|
195
199
|
onClick: (o) => this.hooks.emit("tagClick", { target: this, nativeEvent: o })
|
|
196
200
|
};
|
|
197
|
-
this.tagApp = new
|
|
201
|
+
this.tagApp = new T({ target: e, props: s }), this.updateTag();
|
|
198
202
|
}
|
|
199
|
-
this.plugin.five.needsRender = !0, this.plugin.hooks.on("
|
|
203
|
+
this.plugin.five.needsRender = !0, this.plugin.hooks.on("stateChange", this.onPluginStateChange), this.plugin.hooks.on("configChange", this.onPluginConfigChange), this.plugin.five.on("modeChange", this.updateVisible), this.plugin.five.on("modelShownFloorChange", this.updateVisible), this.plugin.five.on("cameraUpdate", this.onFiveCameraUpdate);
|
|
200
204
|
}
|
|
201
205
|
/** 卸载标注 */
|
|
202
206
|
unmount() {
|
|
203
207
|
var t;
|
|
204
|
-
this.mounted = !1, this.modelGroup.remove(...this.modelGroup.children), (t = this.tagApp) == null || t.$destroy(), this.tagApp = null, this.plugin.hooks.off("
|
|
208
|
+
this.mounted = !1, this.modelGroup.remove(...this.modelGroup.children), (t = this.tagApp) == null || t.$destroy(), this.tagApp = null, this.plugin.hooks.off("stateChange", this.onPluginStateChange), this.plugin.hooks.off("configChange", this.onPluginConfigChange), this.plugin.five.off("modeChange", this.updateVisible), this.plugin.five.off("modelShownFloorChange", this.updateVisible), this.plugin.five.off("cameraUpdate", this.onFiveCameraUpdate);
|
|
205
209
|
}
|
|
206
210
|
/** 更改标注透明度
|
|
207
211
|
* @param opacity 标注透明度,范围:0-1
|
|
@@ -225,7 +229,7 @@ class q {
|
|
|
225
229
|
if (t <= 0)
|
|
226
230
|
throw new Error("高度必须大于 0");
|
|
227
231
|
this.height = t, this.makerObject.geometry = u(this.shape, t), this.outline.geometry = new a.EdgesGeometry(this.makerObject.geometry);
|
|
228
|
-
const e = this.shape.extractPoints(10).shape.slice(0, -1), s =
|
|
232
|
+
const e = this.shape.extractPoints(10).shape.slice(0, -1), s = O(e), o = new a.Vector3(s.x, s.y, t);
|
|
229
233
|
g(o, this.bottomY), this.tagPosition.copy(o), this.updateTag(), this.plugin.five.needsRender = !0;
|
|
230
234
|
}
|
|
231
235
|
/** 更改标注标签的显示层级
|
package/libs/base/BasePlugin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
function A() {
|
|
2
2
|
console.debug(
|
|
3
|
-
"%c %c@realsee/dnalogel %cv2.28.
|
|
3
|
+
"%c %c@realsee/dnalogel %cv2.28.2",
|
|
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",
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"repository": "https://github.com/realsee-developer/dnalogel.git",
|
|
8
8
|
"description": "如视 VR 看房插件合集",
|
|
9
9
|
"private": false,
|
|
10
|
-
"version": "2.28.
|
|
10
|
+
"version": "2.28.2",
|
|
11
11
|
"license": "SEE LICENSE IN TERMS.txt",
|
|
12
12
|
"scripts": {
|
|
13
13
|
"clean": "rm -rf components dist docs libs types ./vite.config.js.timestamp*",
|