@realsee/dnalogel 2.3.5-dev.2 → 2.3.5-dev.4
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/PanoTagPlugin/controller/TagComputer.d.ts +1 -0
- package/dist/PanoTagPlugin/controller/index.d.ts +1 -0
- package/dist/index.cjs.js +16 -16
- package/dist/index.js +1340 -1328
- package/dist/index.umd.js +14 -14
- package/docs/assets/search.js +1 -1
- package/docs/classes/CSS3DRender.html +31 -31
- package/docs/classes/CruisePluginController.html +24 -24
- package/docs/classes/Magnifier.html +16 -16
- package/docs/classes/ModelRoomLabelController.html +11 -11
- package/docs/classes/Object3DHelperController.html +24 -24
- package/docs/classes/PaintBrush.html +15 -15
- package/docs/classes/PanoTagPluginController.html +57 -40
- package/docs/classes/Util.BetterTween.html +8 -8
- package/docs/classes/Util.FivePointSelector.html +12 -12
- package/docs/classes/Util.Interval.html +12 -12
- package/docs/classes/Util.Magnifier.html +17 -17
- package/docs/classes/Util.PointDomHelper.html +11 -11
- package/docs/classes/Util.PointHelper.html +11 -11
- package/docs/classes/Util.Rectangle.html +13 -13
- package/docs/enums/CameraMovementEffect.html +7 -7
- package/docs/enums/ContentType.html +16 -16
- package/docs/enums/DIRECTION.html +9 -9
- package/docs/enums/DISPLAY_STRATEGY_TYPE.html +9 -9
- package/docs/enums/DimensionType.html +7 -7
- package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +8 -8
- package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +9 -9
- package/docs/enums/PaintBrushTypeEnum.html +8 -8
- package/docs/enums/PointType.html +7 -7
- package/docs/enums/Rotation.html +8 -8
- package/docs/functions/CSS3DRenderPlugin.html +4 -4
- package/docs/functions/CameraMovementPlugin.html +4 -4
- package/docs/functions/CruisePlugin.html +4 -4
- package/docs/functions/GuideLinePlugin.html +5 -5
- package/docs/functions/ItemLabelPlugin.html +4 -4
- package/docs/functions/MapviewFloorplanPlugin.html +4 -4
- package/docs/functions/ModelChassisCompassPlugin.html +4 -4
- package/docs/functions/ModelEntryDoorGuidePlugin.html +4 -4
- package/docs/functions/ModelFloorplanPlugin.html +4 -4
- package/docs/functions/ModelItemLabelPlugin.html +4 -4
- package/docs/functions/ModelRoomLabelPlugin.html +4 -4
- package/docs/functions/ModelTVVideoPlugin.html +4 -4
- package/docs/functions/ModelViewPlugin.html +4 -4
- package/docs/functions/Object3DHelperPlugin.html +4 -4
- package/docs/functions/PanoCompassPlugin.html +4 -4
- package/docs/functions/PanoCursorRaycasterPlugin.html +4 -4
- package/docs/functions/PanoDoorLabelPlugin.html +4 -4
- package/docs/functions/PanoFloorplanRadarPlugin.html +4 -4
- package/docs/functions/PanoMeasurePlugin.html +4 -4
- package/docs/functions/PanoRulerPlugin.html +4 -4
- package/docs/functions/PanoRulerProPlugin.html +4 -4
- package/docs/functions/PanoSpatialTagPlugin.html +4 -4
- package/docs/functions/PanoTagPlugin.html +4 -4
- package/docs/functions/TopviewFloorplanPlugin.html +4 -4
- package/docs/functions/Util.getCoordsFromClient.html +5 -5
- package/docs/functions/Util.getCoordsFromElement.html +5 -5
- package/docs/functions/Util.getFrameTime.html +5 -5
- package/docs/functions/Util.getIntersectFromRelativePosition.html +5 -5
- package/docs/functions/Util.getRaycasterFromFivePointer.html +5 -5
- package/docs/functions/Util.isNil.html +5 -5
- package/docs/functions/Util.nextFrame.html +5 -5
- package/docs/functions/Util.notNil.html +5 -5
- package/docs/functions/Util.requestAnimationFrameInterval.html +5 -5
- package/docs/functions/Util.tweenProgress.html +5 -5
- package/docs/functions/pluginFlag.html +5 -5
- package/docs/index.html +4 -4
- package/docs/interfaces/AddTagConfig.html +6 -6
- package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
- package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
- package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
- package/docs/interfaces/EventMap.html +15 -15
- package/docs/interfaces/FloorplanBounding.html +8 -8
- package/docs/interfaces/FloorplanData.html +10 -10
- package/docs/interfaces/FloorplanEntrance.html +11 -11
- package/docs/interfaces/FloorplanExtraObject.html +10 -10
- package/docs/interfaces/FloorplanExtraObject3D.html +8 -8
- package/docs/interfaces/FloorplanFloorData.html +9 -9
- package/docs/interfaces/FloorplanImagePosition.html +7 -7
- package/docs/interfaces/FloorplanObserver.html +9 -9
- package/docs/interfaces/FloorplanOutlineItem.html +9 -9
- package/docs/interfaces/FloorplanPosition.html +7 -7
- package/docs/interfaces/FloorplanRoomItem.html +13 -13
- package/docs/interfaces/FloorplanRoomLabelItem.html +7 -7
- package/docs/interfaces/FloorplanServerBounding.html +8 -8
- package/docs/interfaces/FloorplanServerComputedData.html +10 -10
- package/docs/interfaces/FloorplanServerData.html +7 -7
- package/docs/interfaces/FloorplanServerDoorItem.html +10 -10
- package/docs/interfaces/FloorplanServerDoorPosition.html +8 -8
- package/docs/interfaces/FloorplanServerEntrance.html +11 -11
- package/docs/interfaces/FloorplanServerFloorData.html +9 -9
- package/docs/interfaces/FloorplanServerImagePosition.html +7 -7
- package/docs/interfaces/FloorplanServerObserver.html +9 -9
- package/docs/interfaces/FloorplanServerOutlineItem.html +9 -9
- package/docs/interfaces/FloorplanServerPosition.html +7 -7
- package/docs/interfaces/FloorplanServerRoomItem.html +14 -14
- package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -7
- package/docs/interfaces/ItemLabelPluginData.html +6 -6
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
- package/docs/interfaces/LineJson.html +7 -7
- package/docs/interfaces/MinMax.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginData.html +7 -7
- package/docs/interfaces/ModelChassisCompassPluginExportType.html +8 -8
- package/docs/interfaces/ModelChassisCompassPluginParameterType.html +7 -7
- package/docs/interfaces/ModelEntryDoorGuidePluginData.html +8 -8
- package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +8 -8
- package/docs/interfaces/ModelItemLabelPluginData.html +6 -6
- package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ModelItemLabelPluginParametersType.html +7 -7
- package/docs/interfaces/ModelRoomLabelPluginData.html +6 -6
- package/docs/interfaces/ModelTVVideoPluginData.html +9 -9
- package/docs/interfaces/ModelTVVideoPluginExportType.html +8 -8
- package/docs/interfaces/ModelTVVideoPluginParameterType.html +6 -6
- package/docs/interfaces/ModelViewPluginExportType.html +11 -11
- package/docs/interfaces/Object3DHelperState.html +8 -8
- package/docs/interfaces/OpenParameter.html +7 -7
- package/docs/interfaces/PaintBrushAction.html +12 -12
- package/docs/interfaces/PaintBrushConfigs.html +12 -12
- package/docs/interfaces/PaintBrushState.html +10 -10
- package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +10 -10
- package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +5 -5
- package/docs/interfaces/PanoMeasureParameterType.html +11 -11
- package/docs/interfaces/PanoRulerPluginExportType.html +10 -10
- package/docs/interfaces/PanoRulerPluginOptions.html +7 -7
- package/docs/interfaces/PanoRulerPluginParameterType.html +8 -8
- package/docs/interfaces/PanoRulerProPluginExportType.html +9 -9
- package/docs/interfaces/PanoRulerProPluginOptions.html +7 -7
- package/docs/interfaces/PanoRulerProPluginParameterType.html +7 -7
- package/docs/interfaces/PanoRulerProPluginState.html +8 -8
- package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +5 -5
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +5 -5
- package/docs/interfaces/PanoSpatialTagPluginData.html +11 -11
- package/docs/interfaces/PanoSpatialTagPluginDataElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginExportType.html +13 -13
- package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +10 -10
- package/docs/interfaces/PanoSpatialTagPluginParameterType.html +13 -13
- package/docs/interfaces/PanoSpatialTagPluginPointElement.html +11 -11
- package/docs/interfaces/PanoSpatialTagPluginTagElement.html +10 -10
- package/docs/interfaces/Point.html +8 -8
- package/docs/interfaces/PointJson.html +8 -8
- package/docs/interfaces/Room.html +9 -9
- package/docs/interfaces/RoomInfo.html +7 -7
- package/docs/interfaces/RoomLabel.html +14 -14
- package/docs/interfaces/RoomRules.html +5 -5
- package/docs/interfaces/Rooms.html +5 -5
- package/docs/interfaces/Scissor.html +9 -9
- package/docs/interfaces/State.html +8 -8
- package/docs/interfaces/TagCache.html +10 -10
- package/docs/interfaces/TagConfig.html +10 -10
- package/docs/interfaces/TagIconUrl.html +9 -9
- package/docs/interfaces/Tags.html +9 -9
- package/docs/interfaces/TemporaryState.html +6 -6
- package/docs/interfaces/Util.MagnifierParameter.html +11 -11
- package/docs/interfaces/Util.MouseGroupParameter.html +8 -8
- package/docs/modules/Util.html +5 -5
- package/docs/modules.html +4 -4
- package/docs/types/ArrayPosition.html +5 -5
- package/docs/types/CSS3DRenderExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginExportType.html +5 -5
- package/docs/types/CSS3DRenderPluginParameterType.html +5 -5
- package/docs/types/Color.html +5 -5
- package/docs/types/ContentTypeConfigKey.html +5 -5
- package/docs/types/ContentTypeMap.html +5 -5
- package/docs/types/Create3DDomContainerReturnType.html +5 -5
- package/docs/types/Create3DElementReturnType.html +5 -5
- package/docs/types/CruisePluginExportType.html +5 -5
- package/docs/types/Direction-1.html +5 -5
- package/docs/types/Direction4.html +5 -5
- package/docs/types/FloorplanRuleLabels.html +5 -5
- package/docs/types/FloorplanServerRuleLabels.html +5 -5
- package/docs/types/GuideLinePluginExportType.html +5 -5
- package/docs/types/HelperEventMap.html +5 -5
- package/docs/types/MapviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/MapviewFloorplanPluginReturnType.html +5 -5
- package/docs/types/MediaData.html +5 -5
- package/docs/types/MediaStore.html +5 -5
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +5 -5
- package/docs/types/ModelFloorplanPluginParameterType.html +5 -5
- package/docs/types/ModelFloorplanPluginReturnType.html +5 -5
- package/docs/types/ModelRoomLabelPluginParameters.html +5 -5
- package/docs/types/ModelRoomLabelPluginReturnType.html +5 -5
- package/docs/types/MoveArgs.html +5 -5
- package/docs/types/MoveOpts.html +5 -5
- package/docs/types/Object3DHelperEventMap.html +5 -5
- package/docs/types/ObjectFit.html +5 -5
- package/docs/types/PaintBrushEventMap.html +5 -5
- package/docs/types/PanoCompassPluginData.html +5 -5
- package/docs/types/PanoCompassPluginExportType.html +5 -5
- package/docs/types/PanoCompassPluginParameterType.html +5 -5
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +5 -5
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +5 -5
- package/docs/types/PanoIndex.html +5 -5
- package/docs/types/PanoMeasurePluginEvent.html +5 -5
- package/docs/types/PanoMeasureReturnType.html +5 -5
- package/docs/types/PanoSpatialTagPluginId.html +5 -5
- package/docs/types/PanoTagPluginExportInterface.html +5 -5
- package/docs/types/PanoTagPluginParamsInterface.html +5 -5
- package/docs/types/PlaneTag.html +5 -5
- package/docs/types/PlaneTagElement.html +5 -5
- package/docs/types/Point2DElement.html +5 -5
- package/docs/types/Point2DTag.html +5 -5
- package/docs/types/Point3DElement.html +5 -5
- package/docs/types/Point3DTag.html +5 -5
- package/docs/types/PointTag.html +5 -5
- package/docs/types/PointTagElement.html +5 -5
- package/docs/types/Position.html +5 -5
- package/docs/types/RotateArgs.html +5 -5
- package/docs/types/RotateOpts.html +5 -5
- package/docs/types/RuleLabelsKey.html +5 -5
- package/docs/types/RuleLabelsValue.html +5 -5
- package/docs/types/StickType.html +5 -5
- package/docs/types/Tag.html +5 -5
- package/docs/types/Tag2D.html +5 -5
- package/docs/types/Tag3D.html +5 -5
- package/docs/types/TagContentType.html +5 -5
- package/docs/types/TagDimensionType.html +5 -5
- package/docs/types/TagElement.html +5 -5
- package/docs/types/TagEvents.html +5 -5
- package/docs/types/TagHooks.html +5 -5
- package/docs/types/TagIconSize.html +5 -5
- package/docs/types/TagId.html +5 -5
- package/docs/types/TagPointType.html +5 -5
- package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/TopviewFloorplanPluginReturnType.html +5 -5
- package/docs/types/WorkCode.html +5 -5
- package/docs/variables/FLOOR_TYPE_MAP.html +5 -5
- package/docs/variables/PLUGIN.html +5 -5
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +5 -5
- package/docs/variables/ROOM_TYPE_MAP.html +5 -5
- package/docs/variables/VERSION.html +5 -5
- package/docs/variables/itemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelItemLabelPluginServerParams.html +5 -5
- package/docs/variables/modelRoomLabelPluginServerParams.html +5 -5
- package/libs/PanoTagPlugin/Components/Common/TagPoint.js +39 -39
- package/libs/PanoTagPlugin/Components/TagItem.js +44 -43
- package/libs/PanoTagPlugin/controller/TagComputer.d.ts +1 -0
- package/libs/PanoTagPlugin/controller/TagComputer.js +32 -29
- package/libs/PanoTagPlugin/controller/index.d.ts +1 -0
- package/libs/PanoTagPlugin/controller/index.js +58 -50
- package/libs/PanoTagPlugin/utils/tag/format.js +4 -4
- package/package.json +1 -1
|
@@ -2,38 +2,38 @@ var S = Object.defineProperty, y = Object.defineProperties;
|
|
|
2
2
|
var P = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var T = Object.getOwnPropertySymbols;
|
|
4
4
|
var w = Object.prototype.hasOwnProperty, E = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var
|
|
5
|
+
var u = (h, a, e) => a in h ? S(h, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : h[a] = e, f = (h, a) => {
|
|
6
6
|
for (var e in a || (a = {}))
|
|
7
|
-
w.call(a, e) &&
|
|
7
|
+
w.call(a, e) && u(h, e, a[e]);
|
|
8
8
|
if (T)
|
|
9
9
|
for (var e of T(a))
|
|
10
|
-
E.call(a, e) &&
|
|
10
|
+
E.call(a, e) && u(h, e, a[e]);
|
|
11
11
|
return h;
|
|
12
12
|
}, c = (h, a) => y(h, P(a));
|
|
13
|
-
var
|
|
13
|
+
var d = (h, a, e) => (u(h, typeof a != "symbol" ? a + "" : a, e), e);
|
|
14
14
|
var p = (h, a, e) => new Promise((t, i) => {
|
|
15
15
|
var s = (n) => {
|
|
16
16
|
try {
|
|
17
17
|
r(e.next(n));
|
|
18
|
-
} catch (
|
|
19
|
-
i(
|
|
18
|
+
} catch (l) {
|
|
19
|
+
i(l);
|
|
20
20
|
}
|
|
21
21
|
}, o = (n) => {
|
|
22
22
|
try {
|
|
23
23
|
r(e.throw(n));
|
|
24
|
-
} catch (
|
|
25
|
-
i(
|
|
24
|
+
} catch (l) {
|
|
25
|
+
i(l);
|
|
26
26
|
}
|
|
27
27
|
}, r = (n) => n.done ? t(n.value) : Promise.resolve(n.value).then(s, o);
|
|
28
28
|
r((e = e.apply(h, a)).next());
|
|
29
29
|
});
|
|
30
|
-
import { Subscribe as
|
|
31
|
-
import { Quaternion as
|
|
30
|
+
import { Subscribe as F } from "@realsee/five";
|
|
31
|
+
import { Quaternion as k } from "three";
|
|
32
32
|
import v from "object-assign-deep";
|
|
33
33
|
import { writable as R } from "../../vendor/svelte/store/index.js";
|
|
34
|
-
import { TagContainer as
|
|
35
|
-
import { Tag as
|
|
36
|
-
import { arrayPositionToVector3 as
|
|
34
|
+
import { TagContainer as U } from "../Components/TagContainer.js";
|
|
35
|
+
import { Tag as L } from "../Components/Tag/index.js";
|
|
36
|
+
import { arrayPositionToVector3 as g } from "../../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
37
37
|
import { addDebugPoints as O } from "../utils/addDebugPoints.js";
|
|
38
38
|
import { planeNormal as I } from "../utils/planeNormal.js";
|
|
39
39
|
import { actionAfterFiveModelLoad as B } from "../utils/actionAfterFiveModelLoad.js";
|
|
@@ -44,28 +44,28 @@ import { resizeObserver as D } from "../utils/resizeObserver.js";
|
|
|
44
44
|
import { TagComputer as z } from "./TagComputer.js";
|
|
45
45
|
import { CSS3DRenderPlugin as N } from "../../CSS3DRenderPlugin/index.js";
|
|
46
46
|
import { formatTag as W } from "../utils/tag/format.js";
|
|
47
|
-
const A = "2.0.0-dev.
|
|
48
|
-
class
|
|
47
|
+
const A = "2.0.0-dev.9", m = `DnalogelPlugin-PanoTagPlugin@${A}`, $ = !1, ae = (h) => `${m}--${h}`;
|
|
48
|
+
class he extends z {
|
|
49
49
|
constructor(e, t) {
|
|
50
50
|
super(e);
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
d(this, "version", A);
|
|
52
|
+
d(this, "state", { enabled: !0, visible: !0 });
|
|
53
|
+
d(this, "params");
|
|
54
|
+
d(this, "debug");
|
|
55
|
+
d(this, "css3DRenderPlugin");
|
|
56
|
+
d(this, "TagContainerSvelte");
|
|
57
|
+
d(this, "temporaryState", { visible: !0 });
|
|
58
|
+
d(this, "mediaStore", R({
|
|
59
59
|
currentMediaElement: null
|
|
60
60
|
}));
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
d(this, "isIOSWX", navigator.userAgent.toLowerCase().indexOf("micromessenger") !== -1 && navigator.userAgent.toLowerCase().indexOf("iphone") !== -1);
|
|
62
|
+
d(this, "store", {
|
|
63
63
|
disposers: [],
|
|
64
64
|
disposed: !1,
|
|
65
65
|
resizeObserverDisposerAdding: !1,
|
|
66
66
|
css3DRenderDisposer: /* @__PURE__ */ new Map()
|
|
67
67
|
});
|
|
68
|
-
|
|
68
|
+
d(this, "disposedErrorLog", () => {
|
|
69
69
|
console.error(`${m} is disposed`);
|
|
70
70
|
});
|
|
71
71
|
this.params = f({
|
|
@@ -85,15 +85,13 @@ class ae extends z {
|
|
|
85
85
|
const r = this.getTagConfig(o);
|
|
86
86
|
return c(f({}, o), {
|
|
87
87
|
state: f({ visible: void 0, unfolded: $ }, r.initialState),
|
|
88
|
-
hooks: new
|
|
88
|
+
hooks: new F(),
|
|
89
89
|
clickable: r.clickable
|
|
90
90
|
});
|
|
91
91
|
}).filter((o) => o.position);
|
|
92
92
|
s.forEach(W), this.tags.push(...s), B(this.five, () => {
|
|
93
|
-
var r, n
|
|
94
|
-
this.store.eventListenerDisposer && ((
|
|
95
|
-
const o = this.five.getCurrentState().mode;
|
|
96
|
-
o && o !== "Panorama" && this.temporaryHide(), this.addResizeListener(), this.checkPanelTag(), this.setVisibleAndUnfolded({ withAnimation: (d = t == null ? void 0 : t.withAnimation) != null ? d : !0 }).then(() => this.updateRenderAllTags()), this.updateRenderAllTags();
|
|
93
|
+
var o, r, n;
|
|
94
|
+
this.store.eventListenerDisposer && ((r = (o = this.store).eventListenerDisposer) == null || r.call(o)), this.state.enabled && (this.store.eventListenerDisposer = this.addEventListener()), this.addResizeListener(), this.checkPanelTag(), this.setVisibleAndUnfolded({ withAnimation: (n = t == null ? void 0 : t.withAnimation) != null ? n : !0 }).then(() => this.updateRenderAllTags()), this.updateRenderAllTags();
|
|
97
95
|
});
|
|
98
96
|
}
|
|
99
97
|
clearTags() {
|
|
@@ -130,8 +128,8 @@ class ae extends z {
|
|
|
130
128
|
dispose() {
|
|
131
129
|
var e, t, i, s, o, r;
|
|
132
130
|
this.pauseCurrentMedia(), this.disposeAllCSS3DContainer(), (e = this.TagContainerSvelte) == null || e.$destroy(), this.filter3DTag().forEach((n) => {
|
|
133
|
-
var
|
|
134
|
-
return (
|
|
131
|
+
var l;
|
|
132
|
+
return (l = n.tag3DContentSvelte) == null ? void 0 : l.svelteApp.$destroy();
|
|
135
133
|
}), this.tags = [], (t = this.store.disposers) == null || t.forEach((n) => n == null ? void 0 : n()), this.store.disposers = [], this.store.disposed = !0, (s = (i = this.store).eventListenerDisposer) == null || s.call(i), this.store.eventListenerDisposer = void 0, (r = (o = this.store).resizeObserverDisposer) == null || r.call(o), this.store.resizeObserverDisposer = void 0, this.store.resizeObserverDisposerAdding = !1, this.clearCache(), this.hooks.emit("dispose");
|
|
136
134
|
}
|
|
137
135
|
setState(e, t) {
|
|
@@ -140,9 +138,18 @@ class ae extends z {
|
|
|
140
138
|
const { userAction: i = !0, visibleWithAnimation: s = !1 } = t, o = f({}, this.state);
|
|
141
139
|
this.state = Object.assign(this.state, e), this.store.visibleWithAnimation = s, o.visible !== this.state.visible && (e.visible ? this.handleShow() : this.handleHide()), o.enabled !== this.state.enabled && (e.enabled ? this.handleEnable() : this.handleDisable()), this.hooks.emit("stateChange", { state: this.state, prevState: o, userAction: i });
|
|
142
140
|
}
|
|
141
|
+
changeUnfoldedById(e, t) {
|
|
142
|
+
var o;
|
|
143
|
+
const i = this.getTagById(e);
|
|
144
|
+
if (!i)
|
|
145
|
+
return;
|
|
146
|
+
i.state.unfolded = t;
|
|
147
|
+
const s = this.filterPointTag();
|
|
148
|
+
(o = this.TagContainerSvelte) == null || o.$set({ tags: s });
|
|
149
|
+
}
|
|
143
150
|
changeTagNormalById(e, t) {
|
|
144
151
|
const i = this.getTagById(e);
|
|
145
|
-
!i || !i.tag3DContentSvelte || (i.tag3DContentSvelte.currentNormal =
|
|
152
|
+
!i || !i.tag3DContentSvelte || (i.tag3DContentSvelte.currentNormal = g(t), this.updateRenderPlaneTag());
|
|
146
153
|
}
|
|
147
154
|
changeDataById(e, t, i = !0) {
|
|
148
155
|
const s = this.getTagById(e);
|
|
@@ -153,7 +160,7 @@ class ae extends z {
|
|
|
153
160
|
}
|
|
154
161
|
changeTagById(e, t, i = !0) {
|
|
155
162
|
const s = this.getTagById(e);
|
|
156
|
-
!t || (i ? v(s, t) : Object.assign(s, t), (s == null ? void 0 : s.tag3DContentSvelte) && (t == null ? void 0 : t.normal) && (s.tag3DContentSvelte.currentNormal =
|
|
163
|
+
!t || (i ? v(s, t) : Object.assign(s, t), (s == null ? void 0 : s.tag3DContentSvelte) && (t == null ? void 0 : t.normal) && (s.tag3DContentSvelte.currentNormal = g(t.normal)), this.updateRenderAllTags(), this.checkPanelTag());
|
|
157
164
|
}
|
|
158
165
|
destroyTagById(e) {
|
|
159
166
|
(Array.isArray(e) ? e : [e]).forEach((i) => {
|
|
@@ -166,11 +173,12 @@ class ae extends z {
|
|
|
166
173
|
}
|
|
167
174
|
setVisibleAndUnfolded() {
|
|
168
175
|
return p(this, arguments, function* ({ withAnimation: e } = { withAnimation: !1 }) {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
176
|
+
if (!!this.isPanorama)
|
|
177
|
+
return this.setVisibleByPanoIndex(), e ? new Promise((t, i) => {
|
|
178
|
+
setTimeout(() => {
|
|
179
|
+
this.setUnfoldedByPanoIndex(), t();
|
|
180
|
+
}, 10);
|
|
181
|
+
}) : (this.setUnfoldedByPanoIndex(), Promise.resolve());
|
|
174
182
|
});
|
|
175
183
|
}
|
|
176
184
|
handleShow() {
|
|
@@ -190,9 +198,9 @@ class ae extends z {
|
|
|
190
198
|
});
|
|
191
199
|
}
|
|
192
200
|
addEventListener() {
|
|
193
|
-
const { five: e, hooks: t } = this, i = this.handleFiveWantsMoveToPano.bind(this), s = this.handleFiveModeChange.bind(this), o = this.handleFiveCameraUpdate.bind(this), r = this.handleFiveCameraUpdateDebounce(), n = this.handleFivePanoArrived.bind(this),
|
|
194
|
-
return e.on("wantsMoveToPano", i), e.on("modeChange", s), e.on("cameraUpdate", o), e.on("cameraUpdate", r), e.on("panoArrived", n), e.on("panoArrived",
|
|
195
|
-
e.off("wantsMoveToPano", i), e.off("modeChange", s), e.off("cameraUpdate", o), e.off("cameraUpdate", r), e.off("panoArrived", n), e.off("panoArrived",
|
|
201
|
+
const { five: e, hooks: t } = this, i = this.handleFiveWantsMoveToPano.bind(this), s = this.handleFiveModeChange.bind(this), o = this.handleFiveCameraUpdate.bind(this), r = this.handleFiveCameraUpdateDebounce(), n = this.handleFivePanoArrived.bind(this), l = this.loadVideoFirstFrame.bind(this), b = this.clickhandler.bind(this);
|
|
202
|
+
return this.five.currentMode && (this.isPanorama ? (this.handleFivePanoArrived(), this.temporaryShow({ withAnimation: !0 })) : this.temporaryHide()), e.on("wantsMoveToPano", i), e.on("modeChange", s), e.on("cameraUpdate", o), e.on("cameraUpdate", r), e.on("panoArrived", n), e.on("panoArrived", l), t.on("click", b), () => {
|
|
203
|
+
e.off("wantsMoveToPano", i), e.off("modeChange", s), e.off("cameraUpdate", o), e.off("cameraUpdate", r), e.off("panoArrived", n), e.off("panoArrived", l), t.off("click", b), this.store.eventListenerDisposer = void 0;
|
|
196
204
|
};
|
|
197
205
|
}
|
|
198
206
|
loadVideoFirstFrame() {
|
|
@@ -303,7 +311,7 @@ class ae extends z {
|
|
|
303
311
|
const i = (t = this.five.getElement()) == null ? void 0 : t.parentElement;
|
|
304
312
|
if (!i)
|
|
305
313
|
return console.error("updateRenderPlaneTag: tag2DContainer not found");
|
|
306
|
-
this.TagContainerSvelte = new
|
|
314
|
+
this.TagContainerSvelte = new U({
|
|
307
315
|
target: i,
|
|
308
316
|
props: { hooks: this.hooks, tags: e, state: this.state, temporaryState: this.temporaryState, mediaStore: this.mediaStore }
|
|
309
317
|
});
|
|
@@ -320,19 +328,19 @@ class ae extends z {
|
|
|
320
328
|
state: this.state,
|
|
321
329
|
temporaryState: this.temporaryState
|
|
322
330
|
}), !r.equals(n)) {
|
|
323
|
-
const
|
|
324
|
-
o.css3DObject.setRotationFromQuaternion(
|
|
331
|
+
const l = new k().setFromUnitVectors(r, n);
|
|
332
|
+
o.css3DObject.setRotationFromQuaternion(l);
|
|
325
333
|
}
|
|
326
334
|
} else {
|
|
327
335
|
if (((i = t.state) == null ? void 0 : i.visible) === !1)
|
|
328
336
|
return;
|
|
329
337
|
if (this.css3DRenderPlugin || (this.css3DRenderPlugin = N(this.five)), t.stickType === "3DPoint" && !t.normal)
|
|
330
338
|
return console.error("updateRenderPlaneTag: \u4E09\u7EF4\u70B9\u6807\u7B7E\u7F3A\u5C11\u6CD5\u5411\u91CF\uFF01");
|
|
331
|
-
const s = t.stickType === "Plane" ? t.position : M(this.five.camera.position,
|
|
339
|
+
const s = t.stickType === "Plane" ? t.position : M(this.five.camera.position, g(t.position), g(t.normal)), o = t.stickType === "Plane" ? I(t.position) : g(t.normal), r = this.getTagConfig(t).tag3DConfig, n = this.css3DRenderPlugin.create3DDomContainer(s, r);
|
|
332
340
|
if (!n)
|
|
333
341
|
return;
|
|
334
342
|
this.store.css3DRenderDisposer.set(t.id, n.dispose), t.tag3DContentSvelte = {
|
|
335
|
-
svelteApp: new
|
|
343
|
+
svelteApp: new L({
|
|
336
344
|
target: n.container,
|
|
337
345
|
props: {
|
|
338
346
|
tag: t,
|
|
@@ -366,6 +374,6 @@ class ae extends z {
|
|
|
366
374
|
}
|
|
367
375
|
}
|
|
368
376
|
export {
|
|
369
|
-
|
|
370
|
-
|
|
377
|
+
he as PanoTagPluginController,
|
|
378
|
+
ae as pluginFlag
|
|
371
379
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
function
|
|
2
|
-
var i, t;
|
|
1
|
+
function r(n) {
|
|
2
|
+
var i, t, o, p;
|
|
3
3
|
if (!n.stickType) {
|
|
4
4
|
const e = (() => n.pointType === "PointTag" && n.dimensionType === "3D" ? "3DPoint" : n.pointType === "PlaneTag" ? "Plane" : "2DPoint")();
|
|
5
5
|
n.stickType = e;
|
|
6
6
|
}
|
|
7
7
|
if (n.contentType === "VRLink" || n.contentType === "PanoLink" || n.contentType === "Link") {
|
|
8
8
|
const e = n;
|
|
9
|
-
!((i = e.data)
|
|
9
|
+
!((t = (i = e.data) == null ? void 0 : i.icon) != null && t.url) && !((p = (o = e.style) == null ? void 0 : o.point) != null && p.url) && (e.data.icon = {
|
|
10
10
|
url: "//vrlab-static.ljcdn.com/release/web/test.09dee741.png",
|
|
11
11
|
steps: 28
|
|
12
12
|
});
|
|
@@ -14,5 +14,5 @@ function o(n) {
|
|
|
14
14
|
return n;
|
|
15
15
|
}
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
r as formatTag
|
|
18
18
|
};
|
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.3.5-dev.
|
|
10
|
+
"version": "2.3.5-dev.4",
|
|
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*",
|