@realsee/dnalogel 2.12.0-alpha.2 → 2.12.0-alpha.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/TagRender.d.ts +2 -1
- package/dist/PanoTagPlugin/typings/tag/Utils.d.ts +4 -0
- package/dist/index.cjs.js +3 -3
- package/dist/index.js +188 -187
- package/dist/index.umd.js +17 -17
- package/docs/assets/search.js +1 -1
- package/docs/classes/CSS3DRender.html +31 -31
- package/docs/classes/CruisePluginController.html +25 -25
- package/docs/classes/Magnifier.html +20 -20
- package/docs/classes/ModelRoomLabelController.html +11 -11
- package/docs/classes/Object3DHelperController.html +25 -25
- package/docs/classes/PaintBrush.html +15 -15
- package/docs/classes/PanoMeasurePluginLine.html +23 -23
- package/docs/classes/PanoMeasurePluginModel.html +22 -22
- package/docs/classes/PanoMeasurePluginPoint.html +14 -14
- package/docs/classes/PanoMeasurePluginPolyline.html +26 -26
- package/docs/classes/PanoTagPluginController.html +45 -45
- 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 +19 -19
- 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 +5 -4
- package/docs/functions/CameraMovementPlugin.html +5 -4
- package/docs/functions/CruisePlugin.html +5 -4
- package/docs/functions/GuideLinePlugin.html +6 -5
- package/docs/functions/ItemLabelPlugin.html +5 -4
- package/docs/functions/MapviewFloorplanPlugin.html +5 -4
- package/docs/functions/ModelChassisCompassPlugin.html +5 -4
- package/docs/functions/ModelEntryDoorGuidePlugin.html +5 -4
- package/docs/functions/ModelFloorplanPlugin.html +5 -4
- package/docs/functions/ModelItemLabelPlugin.html +5 -4
- package/docs/functions/ModelRoomLabelPlugin.html +5 -4
- package/docs/functions/ModelTVVideoPlugin.html +5 -4
- package/docs/functions/ModelViewPlugin.html +5 -4
- package/docs/functions/Object3DHelperPlugin.html +5 -4
- package/docs/functions/PanoCompassPlugin.html +5 -4
- package/docs/functions/PanoCursorRaycasterPlugin.html +5 -4
- package/docs/functions/PanoDoorLabelPlugin.html +5 -4
- package/docs/functions/PanoFloorplanRadarPlugin.html +5 -4
- package/docs/functions/PanoMeasurePlugin.html +5 -4
- package/docs/functions/PanoRulerPlugin.html +5 -4
- package/docs/functions/PanoRulerProPlugin.html +5 -4
- package/docs/functions/PanoSpatialTagPlugin.html +5 -4
- package/docs/functions/PanoTagPlugin.html +5 -4
- package/docs/functions/PanoVideoPlugin.html +5 -4
- package/docs/functions/TopviewFloorplanPlugin.html +5 -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 +6 -5
- package/docs/index.html +5 -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/HelperOffset.html +8 -8
- package/docs/interfaces/ImagePlaneGroup.html +68 -0
- package/docs/interfaces/ItemLabelPluginData.html +6 -6
- package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
- package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
- 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/ObjectHelperControllers.html +9 -9
- 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 +6 -5
- package/docs/interfaces/PanoMeasureParameterType.html +12 -12
- package/docs/interfaces/PanoMeasurePluginLineJson.html +8 -8
- package/docs/interfaces/PanoMeasurePluginOpenParameter.html +7 -7
- package/docs/interfaces/PanoMeasurePluginPointJson.html +7 -7
- package/docs/interfaces/PanoMeasurePluginPolylineJson.html +8 -8
- 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 +6 -5
- package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +6 -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/PanoVideoPluginType.LoadParams.html +6 -6
- package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +8 -8
- package/docs/interfaces/PanoVideoPluginType.PluginData.html +6 -6
- package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +9 -9
- package/docs/interfaces/PanoVideoPluginType.PluginState.html +6 -6
- package/docs/interfaces/PanoVideoPluginType.VideoItem.html +8 -8
- package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +10 -10
- package/docs/interfaces/Point.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 +6 -5
- package/docs/interfaces/Rooms.html +6 -5
- package/docs/interfaces/Scissor.html +9 -9
- package/docs/interfaces/State.html +8 -8
- package/docs/interfaces/TagCacheInterface.html +12 -12
- package/docs/interfaces/TagConfig.html +11 -11
- package/docs/interfaces/TagGLTFObjectGroup.html +6 -6
- package/docs/interfaces/TagIconUrl.html +11 -11
- package/docs/interfaces/TagObjectGroup.html +6 -6
- package/docs/interfaces/TagStyle.html +6 -6
- 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/PanoVideoPluginType.html +5 -5
- package/docs/modules/Util.html +5 -5
- package/docs/modules.html +6 -4
- package/docs/types/ArrayPosition.html +6 -5
- package/docs/types/AudioAppearance.html +6 -5
- package/docs/types/AudioTagTypeConfigKey.html +6 -5
- package/docs/types/CSS3DRenderExportType.html +6 -5
- package/docs/types/CSS3DRenderPluginExportType.html +6 -5
- package/docs/types/CSS3DRenderPluginParameterType.html +6 -5
- package/docs/types/ClassFunctionParameters.html +6 -5
- package/docs/types/Color.html +6 -5
- package/docs/types/ContentTypeConfigKey.html +6 -5
- package/docs/types/ContentTypeConfigKeySplit.html +6 -5
- package/docs/types/ContentTypeMap.html +6 -5
- package/docs/types/Create3DDomContainerReturnType.html +6 -5
- package/docs/types/Create3DElementReturnType.html +6 -5
- package/docs/types/CruisePluginExportType.html +6 -5
- package/docs/types/Direction-1.html +6 -5
- package/docs/types/Direction4.html +6 -5
- package/docs/types/FloorplanRuleLabels.html +6 -5
- package/docs/types/FloorplanServerRuleLabels.html +6 -5
- package/docs/types/GuideLinePluginExportType.html +6 -5
- package/docs/types/HelperEventMap.html +6 -5
- package/docs/types/LoadTagConfig.html +6 -5
- package/docs/types/MapviewFloorplanPluginParameterType.html +6 -5
- package/docs/types/MapviewFloorplanPluginReturnType.html +6 -5
- package/docs/types/MediaData.html +6 -5
- package/docs/types/MediaStore.html +6 -5
- package/docs/types/ModelElement.html +6 -5
- package/docs/types/ModelEntryDoorGuidePluginParameterType.html +6 -5
- package/docs/types/ModelFloorplanPluginParameterType.html +6 -5
- package/docs/types/ModelFloorplanPluginReturnType.html +6 -5
- package/docs/types/ModelRoomLabelPluginParameters.html +6 -5
- package/docs/types/ModelRoomLabelPluginReturnType.html +6 -5
- package/docs/types/MoveArgs.html +6 -5
- package/docs/types/MoveOpts.html +6 -5
- package/docs/types/Object3DHelperEventMap.html +6 -5
- package/docs/types/ObjectFit.html +6 -5
- package/docs/types/PaintBrushEventMap.html +6 -5
- package/docs/types/PanoCompassPluginData.html +6 -5
- package/docs/types/PanoCompassPluginExportType.html +6 -5
- package/docs/types/PanoCompassPluginParameterType.html +6 -5
- package/docs/types/PanoFloorplanRadarPluginParameterType.html +6 -5
- package/docs/types/PanoFloorplanRadarPluginReturnType.html +6 -5
- package/docs/types/PanoIndex.html +6 -5
- package/docs/types/PanoMeasurePluginEvent.html +6 -5
- package/docs/types/PanoMeasureReturnType.html +6 -5
- package/docs/types/PanoSpatialTagPluginId.html +6 -5
- package/docs/types/PanoTagPluginExportInterface.html +6 -5
- package/docs/types/PanoTagPluginParamsInterface.html +6 -5
- package/docs/types/PanoVideoPluginParameterType.html +6 -5
- package/docs/types/PanoVideoPluginReturnType.html +6 -5
- package/docs/types/PlaneTag.html +6 -5
- package/docs/types/PlaneTagElement.html +6 -5
- package/docs/types/Point2DElement.html +6 -5
- package/docs/types/Point2DTag.html +6 -5
- package/docs/types/Point3DElement.html +6 -5
- package/docs/types/Point3DTag.html +6 -5
- package/docs/types/PointTag.html +6 -5
- package/docs/types/PointTagElement.html +6 -5
- package/docs/types/Position.html +6 -5
- package/docs/types/RotateArgs.html +6 -5
- package/docs/types/RotateOpts.html +6 -5
- package/docs/types/RuleLabelsKey.html +6 -5
- package/docs/types/RuleLabelsValue.html +6 -5
- package/docs/types/StickType.html +6 -5
- package/docs/types/Tag.html +6 -5
- package/docs/types/Tag2D.html +6 -5
- package/docs/types/Tag3D.html +6 -5
- package/docs/types/TagContentType.html +6 -5
- package/docs/types/TagDimensionType.html +6 -5
- package/docs/types/TagElement.html +6 -5
- package/docs/types/TagEvents.html +6 -5
- package/docs/types/TagGLTFObject.html +6 -5
- package/docs/types/TagHooks.html +6 -5
- package/docs/types/TagIconSize.html +6 -5
- package/docs/types/TagId.html +6 -5
- package/docs/types/TagPointType.html +6 -5
- package/docs/types/TopviewFloorplanPluginParameterType.html +6 -5
- package/docs/types/TopviewFloorplanPluginReturnType.html +6 -5
- package/docs/types/WorkCode.html +6 -5
- package/docs/variables/FLOOR_TYPE_MAP.html +6 -5
- package/docs/variables/PLUGIN.html +6 -5
- package/docs/variables/ROOM_FETILE_TYPE_MAP.html +6 -5
- package/docs/variables/ROOM_TYPE_MAP.html +6 -5
- package/docs/variables/VERSION.html +6 -5
- package/docs/variables/itemLabelPluginServerParams.html +6 -5
- package/docs/variables/modelItemLabelPluginServerParams.html +6 -5
- package/docs/variables/modelRoomLabelPluginServerParams.html +6 -5
- package/libs/PanoTagPlugin/controller/TagRender.d.ts +2 -1
- package/libs/PanoTagPlugin/controller/TagRender.js +45 -44
- package/libs/PanoTagPlugin/controller/index.js +3 -3
- package/libs/PanoTagPlugin/typings/tag/Utils.d.ts +4 -0
- package/libs/base/BasePlugin.js +1 -1
- package/libs/shared-utils/three/loadTexture.js +19 -19
- package/package.json +1 -1
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
var R = Object.defineProperty;
|
|
2
2
|
var O = (p, m, e) => m in p ? R(p, m, { enumerable: !0, configurable: !0, writable: !0, value: e }) : p[m] = e;
|
|
3
|
-
var
|
|
3
|
+
var l = (p, m, e) => (O(p, typeof m != "symbol" ? m + "" : m, e), e);
|
|
4
4
|
var C = (p, m, e) => new Promise((t, i) => {
|
|
5
|
-
var o = (
|
|
5
|
+
var o = (a) => {
|
|
6
6
|
try {
|
|
7
|
-
r(e.next(
|
|
8
|
-
} catch (
|
|
9
|
-
i(
|
|
7
|
+
r(e.next(a));
|
|
8
|
+
} catch (n) {
|
|
9
|
+
i(n);
|
|
10
10
|
}
|
|
11
|
-
}, s = (
|
|
11
|
+
}, s = (a) => {
|
|
12
12
|
try {
|
|
13
|
-
r(e.throw(
|
|
14
|
-
} catch (
|
|
15
|
-
i(
|
|
13
|
+
r(e.throw(a));
|
|
14
|
+
} catch (n) {
|
|
15
|
+
i(n);
|
|
16
16
|
}
|
|
17
|
-
}, r = (
|
|
17
|
+
}, r = (a) => a.done ? t(a.value) : Promise.resolve(a.value).then(o, s);
|
|
18
18
|
r((e = e.apply(p, m)).next());
|
|
19
19
|
});
|
|
20
20
|
import { TagComputer as w } from "./TagComputer.js";
|
|
21
|
-
import { Group as
|
|
22
|
-
import
|
|
23
|
-
import
|
|
21
|
+
import { Group as S, Quaternion as G, Vector3 as T, Matrix4 as b } from "three";
|
|
22
|
+
import x from "../Components/TagContainer.js";
|
|
23
|
+
import A from "../Components/Tag/index.js";
|
|
24
24
|
import { arrayPositionToVector3 as D } from "../../CSS3DRenderPlugin/utils/positionToVector3.js";
|
|
25
25
|
import { planeNormal as j } from "../utils/planeNormal.js";
|
|
26
26
|
import { isMediaModelTag as f } from "../utils/tag/tagCheck.js";
|
|
27
27
|
import { normalPositionToPositions as V } from "../utils/normalPositionToPositions.js";
|
|
28
28
|
import { CSS3DRenderPlugin as k } from "../../CSS3DRenderPlugin/index.js";
|
|
29
29
|
import { loadGLTF as E } from "../../shared-utils/three/GLTFLoader.js";
|
|
30
|
-
import
|
|
30
|
+
import I from "../utils/model/imageModel.js";
|
|
31
31
|
import "../utils/tagPosition.js";
|
|
32
32
|
import "../../shared-utils/three/centerPoint.js";
|
|
33
33
|
import "../utils/checkRange.js";
|
|
@@ -131,26 +131,27 @@ import "../../shared-utils/three/loadTexture.js";
|
|
|
131
131
|
class We extends w {
|
|
132
132
|
constructor(e) {
|
|
133
133
|
super(e);
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
134
|
+
l(this, "group", new S());
|
|
135
|
+
l(this, "imagePlaneGroup", new S());
|
|
136
|
+
l(this, "gltfObjectGroup", new S());
|
|
137
|
+
l(this, "enabledModelTagSet", /* @__PURE__ */ new Set());
|
|
138
|
+
l(this, "temporaryState", { visible: !0 });
|
|
139
|
+
l(this, "TagContainerSvelte");
|
|
140
|
+
l(this, "loadModel", (e) => C(this, null, function* () {
|
|
141
|
+
var a;
|
|
141
142
|
const t = e.data.modelUrl;
|
|
142
143
|
if (!t)
|
|
143
144
|
return;
|
|
144
|
-
const i = E(t).then((
|
|
145
|
+
const i = E(t).then((n) => Object.assign(n.scene, { customID: e.id, isTagModel: !0 }));
|
|
145
146
|
e.model = { promise: i };
|
|
146
147
|
const o = yield i;
|
|
147
|
-
if (((
|
|
148
|
+
if (((a = e.model) == null ? void 0 : a.promise) !== i || (e.model.object = o, !this.tags.includes(e)))
|
|
148
149
|
return;
|
|
149
150
|
o.visible = e.state.visible, new b().fromArray(e.matrix).decompose(o.position, o.quaternion, o.scale), o.updateWorldMatrix(!0, !0), this.getVisibleByFloorIndex(e) || (o.visible = !1);
|
|
150
|
-
const r = this.gltfObjectGroup.children.find((
|
|
151
|
+
const r = this.gltfObjectGroup.children.find((n) => n.customID === e.id);
|
|
151
152
|
return r && this.gltfObjectGroup.remove(r), this.gltfObjectGroup.add(o), this.updateTagCss3DObjectMatrix(e, o), o;
|
|
152
153
|
}));
|
|
153
|
-
this.group.name = "PanoTagPluginModelGroup", this.gltfObjectGroup.name = "PanoTagPluginGLTFObjectGroup", this.group.add(this.gltfObjectGroup);
|
|
154
|
+
this.group.name = "PanoTagPluginModelGroup", this.gltfObjectGroup.name = "PanoTagPluginGLTFObjectGroup", this.imagePlaneGroup.name = "ImagePlaneGroup", this.group.add(this.gltfObjectGroup), this.group.add(this.imagePlaneGroup);
|
|
154
155
|
}
|
|
155
156
|
clearTags() {
|
|
156
157
|
this.tags = [], this.enabledModelTagSet.clear(), this.clearCache(), this.disposeAllCSS3DContainer(), this.updateRenderAllTags();
|
|
@@ -160,23 +161,23 @@ class We extends w {
|
|
|
160
161
|
}
|
|
161
162
|
updateRenderImageModel() {
|
|
162
163
|
this.sort([...this.filterImageModel]).forEach((t) => {
|
|
163
|
-
var o, s, r,
|
|
164
|
+
var o, s, r, a;
|
|
164
165
|
const i = (o = t.data.mediaData[0]) == null ? void 0 : o.url;
|
|
165
|
-
!i || (t.imageModel && (t.imageModel.visible = (r = (s = t.state) == null ? void 0 : s.visible) != null ? r : !0), ((
|
|
166
|
+
!i || (t.imageModel && (t.imageModel.visible = (r = (s = t.state) == null ? void 0 : s.visible) != null ? r : !0), ((a = t.imageModel) == null ? void 0 : a.imageSrc) !== i && (t.imageModel = new I(i, t.position.map(D)), t.imageModel.name = "PanoTagPluginImageModel", this.imagePlaneGroup.add(t.imageModel)));
|
|
166
167
|
});
|
|
167
168
|
}
|
|
168
169
|
updateRenderPlaneTag() {
|
|
169
170
|
this.sort([...this.filter3DTag]).forEach((t) => {
|
|
170
|
-
var
|
|
171
|
-
if (f(t) && ((
|
|
172
|
-
const { svelteApp:
|
|
173
|
-
if (this.updateTagCss3DObjectVisible(t),
|
|
174
|
-
const g = new
|
|
171
|
+
var a, n, u;
|
|
172
|
+
if (f(t) && ((a = t.model) == null ? void 0 : a.object) && this.updateTagCss3DObjectMatrix(t, (n = t.model) == null ? void 0 : n.object), t.tag3DContentSvelte) {
|
|
173
|
+
const { svelteApp: d, domContainer: M, initialNormal: h, currentNormal: c } = t.tag3DContentSvelte;
|
|
174
|
+
if (this.updateTagCss3DObjectVisible(t), d.$set({ tag: t, hooks: this.hooks, state: this.state, temporaryState: this.temporaryState }), !h.equals(c)) {
|
|
175
|
+
const g = new G().setFromUnitVectors(h, c);
|
|
175
176
|
M.css3DObject.setRotationFromQuaternion(g);
|
|
176
177
|
}
|
|
177
178
|
return;
|
|
178
179
|
}
|
|
179
|
-
if (((
|
|
180
|
+
if (((u = t.state) == null ? void 0 : u.visible) === !1)
|
|
180
181
|
return;
|
|
181
182
|
if (this.css3DRenderPlugin || (this.css3DRenderPlugin = k(this.five)), t.stickType === "3DPoint" && !t.normal)
|
|
182
183
|
return console.error("updateRenderPlaneTag: \u4E09\u7EF4\u70B9\u6807\u7B7E\u7F3A\u5C11\u6CD5\u5411\u91CF\uFF01");
|
|
@@ -185,11 +186,11 @@ class We extends w {
|
|
|
185
186
|
return t.position;
|
|
186
187
|
if (f(t))
|
|
187
188
|
return t.data.mediaPosition;
|
|
188
|
-
const
|
|
189
|
+
const d = t;
|
|
189
190
|
return V(
|
|
190
191
|
this.five.camera.position,
|
|
191
|
-
D(
|
|
192
|
-
D(
|
|
192
|
+
D(d.position),
|
|
193
|
+
D(d.normal)
|
|
193
194
|
);
|
|
194
195
|
})();
|
|
195
196
|
if (!i)
|
|
@@ -206,7 +207,7 @@ class We extends w {
|
|
|
206
207
|
return;
|
|
207
208
|
const s = this.getTagConfig(t).tag3DConfig, r = this.css3DRenderPlugin.create3DDomContainer(i, s);
|
|
208
209
|
!r || (this.updateTagCss3DObjectVisible(t), this.store.css3DRenderDisposer.set(t.id, r.dispose), t.tag3DContentSvelte = {
|
|
209
|
-
svelteApp: new
|
|
210
|
+
svelteApp: new A({
|
|
210
211
|
target: r.container,
|
|
211
212
|
props: {
|
|
212
213
|
tag: t,
|
|
@@ -238,16 +239,16 @@ class We extends w {
|
|
|
238
239
|
});
|
|
239
240
|
}
|
|
240
241
|
updateTagCss3DObjectMatrix(e, t) {
|
|
241
|
-
var g,
|
|
242
|
-
const i = (
|
|
242
|
+
var g, v, P, y;
|
|
243
|
+
const i = (P = (v = (g = e.mergedConfig) == null ? void 0 : g.tag3DConfig) == null ? void 0 : v.ratio) != null ? P : 216e-5, o = (y = e.tag3DContentSvelte) == null ? void 0 : y.domContainer.css3DObject;
|
|
243
244
|
if (!o)
|
|
244
245
|
return;
|
|
245
246
|
const s = f(e) ? e.data.mediaPosition : e.position;
|
|
246
247
|
t.updateWorldMatrix(!1, !1);
|
|
247
|
-
const r = t.matrixWorld,
|
|
248
|
-
|
|
249
|
-
const
|
|
250
|
-
!
|
|
248
|
+
const r = t.matrixWorld, a = new T().fromArray(s[0]), n = new T().fromArray(s[2]), u = new T().lerpVectors(a, n, 0.5).add(new T(0, 0, 5e-4)), d = new b().setPosition(u), M = new b().makeScale(i, i, i), h = new b().multiply(r).multiply(d).multiply(M);
|
|
249
|
+
h.decompose(o.position, o.quaternion, o.scale);
|
|
250
|
+
const c = o.opacityMesh;
|
|
251
|
+
!c || h.decompose(c.position, c.quaternion, c.scale);
|
|
251
252
|
}
|
|
252
253
|
addMediaModelTag(e) {
|
|
253
254
|
return C(this, null, function* () {
|
|
@@ -264,7 +265,7 @@ class We extends w {
|
|
|
264
265
|
const i = (t = this.five.getElement()) == null ? void 0 : t.parentElement;
|
|
265
266
|
if (!i)
|
|
266
267
|
return console.error("updateRenderPlaneTag: tag2DContainer not found");
|
|
267
|
-
this.TagContainerSvelte = new
|
|
268
|
+
this.TagContainerSvelte = new x({
|
|
268
269
|
target: i,
|
|
269
270
|
props: { hooks: this.hooks, tags: e, state: this.state, temporaryState: this.temporaryState, mediaStore: this.mediaStore }
|
|
270
271
|
});
|
|
@@ -39,7 +39,7 @@ import { throttle as R } from "../utils/throttle.js";
|
|
|
39
39
|
import { resizeObserver as y } from "../utils/resizeObserver.js";
|
|
40
40
|
import B from "../utils/tag/format.js";
|
|
41
41
|
import { generateBlankAudio as O, AudioNamespace as _ } from "../../shared-utils/audio.js";
|
|
42
|
-
import { TagRender as
|
|
42
|
+
import { TagRender as k } from "./TagRender.js";
|
|
43
43
|
import "./TagComputer.js";
|
|
44
44
|
import "../utils/tagPosition.js";
|
|
45
45
|
import "../../shared-utils/three/centerPoint.js";
|
|
@@ -146,7 +146,7 @@ import "@realsee/five/gltf-loader";
|
|
|
146
146
|
import "../utils/model/imageModel.js";
|
|
147
147
|
import "../../shared-utils/three/loadTexture.js";
|
|
148
148
|
const D = "Dnalogel-PanoTagPlugin", qt = (d) => `${D}--${d}`;
|
|
149
|
-
class Kt extends
|
|
149
|
+
class Kt extends k {
|
|
150
150
|
constructor(e, t) {
|
|
151
151
|
super(e);
|
|
152
152
|
p(this, "state", { enabled: !0, visible: !0 });
|
|
@@ -206,7 +206,7 @@ class Kt extends L {
|
|
|
206
206
|
}).filter((o) => o.position);
|
|
207
207
|
return s.forEach(B), this.tags.push(...s), I(this.five).then(() => f(this, null, function* () {
|
|
208
208
|
var o, r, n;
|
|
209
|
-
this.store.eventListenerDisposer && ((r = (o = this.store).eventListenerDisposer) == null || r.call(o)), this.state.enabled &&
|
|
209
|
+
this.store.eventListenerDisposer && ((r = (o = this.store).eventListenerDisposer) == null || r.call(o)), this.state.enabled && this.handleEnable(), this.addResizeListener(), this.clearUnusedPanelTag(), this.setVisibleAndUnfolded({ withAnimation: (n = t == null ? void 0 : t.withAnimation) != null ? n : !0 }).then(() => this.updateRenderAllTags()), this.updateRenderAllTags(), yield this.addMediaModelTag(s);
|
|
210
210
|
}));
|
|
211
211
|
});
|
|
212
212
|
}
|
|
@@ -2,6 +2,7 @@ import { GLTFObject } from '@realsee/five/gltf-loader';
|
|
|
2
2
|
import { Group } from 'three';
|
|
3
3
|
import type { Tag } from './Tag';
|
|
4
4
|
import type { TagContentType } from './TagData';
|
|
5
|
+
import ImageModel from '../../utils/model/imageModel';
|
|
5
6
|
export declare type TagId = string | number;
|
|
6
7
|
export declare type ArrayPosition = number[];
|
|
7
8
|
export declare type Position = ArrayPosition;
|
|
@@ -55,6 +56,9 @@ export interface TagObjectGroup extends Group {
|
|
|
55
56
|
export interface TagGLTFObjectGroup extends Group {
|
|
56
57
|
children: TagGLTFObject[];
|
|
57
58
|
}
|
|
59
|
+
export interface ImagePlaneGroup extends Group {
|
|
60
|
+
children: ImageModel[];
|
|
61
|
+
}
|
|
58
62
|
/**
|
|
59
63
|
* @description S: 18; M: 20; L: 24; XL: 28
|
|
60
64
|
*/
|
package/libs/base/BasePlugin.js
CHANGED
|
@@ -4,7 +4,7 @@ var s = (e, r, t) => (a(e, typeof r != "symbol" ? r + "" : r, t), t);
|
|
|
4
4
|
import { Subscribe as c } from "../shared-utils/Subscribe.js";
|
|
5
5
|
class o {
|
|
6
6
|
constructor(r, t) {
|
|
7
|
-
s(this, "VERSION", "2.12.0-alpha.
|
|
7
|
+
s(this, "VERSION", "2.12.0-alpha.4");
|
|
8
8
|
s(this, "five");
|
|
9
9
|
s(this, "hooks", new c());
|
|
10
10
|
s(this, "staticPrefix", "//vrlab-static.ljcdn.com");
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var c = (o, e, r) => new Promise((s, d) => {
|
|
2
|
+
var l = (n) => {
|
|
3
3
|
try {
|
|
4
|
-
|
|
5
|
-
} catch (
|
|
6
|
-
|
|
4
|
+
i(r.next(n));
|
|
5
|
+
} catch (t) {
|
|
6
|
+
d(t);
|
|
7
7
|
}
|
|
8
|
-
}, m = (
|
|
8
|
+
}, m = (n) => {
|
|
9
9
|
try {
|
|
10
|
-
|
|
11
|
-
} catch (
|
|
12
|
-
|
|
10
|
+
i(r.throw(n));
|
|
11
|
+
} catch (t) {
|
|
12
|
+
d(t);
|
|
13
13
|
}
|
|
14
|
-
},
|
|
15
|
-
|
|
14
|
+
}, i = (n) => n.done ? s(n.value) : Promise.resolve(n.value).then(l, m);
|
|
15
|
+
i((r = r.apply(o, e)).next());
|
|
16
16
|
});
|
|
17
|
-
import * as
|
|
18
|
-
const
|
|
19
|
-
function
|
|
20
|
-
return
|
|
21
|
-
return new Promise((
|
|
22
|
-
|
|
23
|
-
}).then((
|
|
17
|
+
import * as a from "three";
|
|
18
|
+
const u = new a.TextureLoader();
|
|
19
|
+
function L(o) {
|
|
20
|
+
return c(this, null, function* () {
|
|
21
|
+
return new Promise((e, r) => {
|
|
22
|
+
u.load(o, e, void 0, r);
|
|
23
|
+
}).then((e) => (e.encoding = a.sRGBEncoding, e.minFilter = a.LinearFilter, e));
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
export {
|
|
27
|
-
|
|
27
|
+
L as loadTexture
|
|
28
28
|
};
|
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.12.0-alpha.
|
|
10
|
+
"version": "2.12.0-alpha.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*",
|