@realsee/dnalogel 2.2.1 → 2.2.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/index.cjs.js +11 -11
- package/dist/index.js +804 -803
- package/dist/index.umd.js +13 -13
- 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 +39 -39
- 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 +12 -12
- 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/LinkType.html +7 -7
- 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/CSS3DRenderPluginEventMap.html +11 -11
- package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
- package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
- package/docs/interfaces/ContentTypeMap.html +12 -12
- 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/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 +8 -8
- 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/TagConfig.html +10 -10
- package/docs/interfaces/Tags.html +9 -9
- 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/ContentTypeConfigKeyArray.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/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/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/PointTag.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/Tag.html +5 -5
- package/docs/types/Tag2D.html +5 -5
- package/docs/types/Tag3D.html +5 -5
- package/docs/types/TagId.html +5 -5
- package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
- package/docs/types/TopviewFloorplanPluginReturnType.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/PanoDoorLabelPlugin/Controller.js +117 -116
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>modelRoomLabelPluginServerParams | 如视看房插件合集 - v2.2.
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>modelRoomLabelPluginServerParams | 如视看房插件合集 - v2.2.2</title><meta name="description" content="Documentation for 如视看房插件合集 - v2.2.2"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
2
2
|
<div class="tsd-toolbar-contents container">
|
|
3
3
|
<div class="table-cell" id="tsd-search" data-base="..">
|
|
4
4
|
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
<div id="tsd-toolbar-links"></div></div>
|
|
7
7
|
<ul class="results">
|
|
8
8
|
<li class="state loading">Preparing search index...</li>
|
|
9
|
-
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">如视看房插件合集 - v2.2.
|
|
9
|
+
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">如视看房插件合集 - v2.2.2</a></div>
|
|
10
10
|
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
|
11
11
|
<div class="container container-main">
|
|
12
12
|
<div class="col-8 col-content">
|
|
13
13
|
<div class="tsd-page-title">
|
|
14
14
|
<ul class="tsd-breadcrumb">
|
|
15
|
-
<li><a href="../modules.html">如视看房插件合集 - v2.2.
|
|
15
|
+
<li><a href="../modules.html">如视看房插件合集 - v2.2.2</a></li>
|
|
16
16
|
<li><a href="modelRoomLabelPluginServerParams.html">modelRoomLabelPluginServerParams</a></li></ul>
|
|
17
17
|
<h1>Variable modelRoomLabelPluginServerParams<code class="tsd-tag ts-flagConst">Const</code> </h1></div>
|
|
18
18
|
<div class="tsd-signature">model<wbr/>Room<wbr/>Label<wbr/>Plugin<wbr/>Server<wbr/>Params<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span><br/><span> </span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span> </span>version<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = ...</span></div>
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<li class="tsd-parameter">
|
|
25
25
|
<h5>version<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></h5></li></ul></div><aside class="tsd-sources">
|
|
26
26
|
<ul>
|
|
27
|
-
<li>Defined in <a href="https://github.com/realsee-developer/dnalogel/blob/
|
|
27
|
+
<li>Defined in <a href="https://github.com/realsee-developer/dnalogel/blob/e4f49e5/plugins/src/ModelRoomLabelPlugin/index.ts#L12">plugins/src/ModelRoomLabelPlugin/index.ts:12</a></li></ul></aside></div>
|
|
28
28
|
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
29
29
|
<div class="tsd-navigation settings">
|
|
30
30
|
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
|
|
42
42
|
<div class="tsd-accordion-details">
|
|
43
43
|
<ul>
|
|
44
|
-
<li><a href="../modules.html">如视看房插件合集 -<wbr/> v2.2.
|
|
44
|
+
<li><a href="../modules.html">如视看房插件合集 -<wbr/> v2.2.2</a>
|
|
45
45
|
<ul>
|
|
46
46
|
<li class="tsd-kind-namespace"><a href="../modules/Util.html">Util</a></li></ul></li></ul></div></details></nav>
|
|
47
47
|
<nav class="tsd-navigation secondary menu-sticky">
|
|
@@ -1,177 +1,178 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var e in
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var e of
|
|
10
|
-
|
|
1
|
+
var R = Object.defineProperty, F = Object.defineProperties;
|
|
2
|
+
var $ = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var S = Object.getOwnPropertySymbols;
|
|
4
|
+
var B = Object.prototype.hasOwnProperty, U = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var E = (b, a, e) => a in b ? R(b, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : b[a] = e, k = (b, a) => {
|
|
6
|
+
for (var e in a || (a = {}))
|
|
7
|
+
B.call(a, e) && E(b, e, a[e]);
|
|
8
|
+
if (S)
|
|
9
|
+
for (var e of S(a))
|
|
10
|
+
U.call(a, e) && E(b, e, a[e]);
|
|
11
11
|
return b;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
import { Raycaster as
|
|
15
|
-
import { BasePanoPluginController as
|
|
16
|
-
import
|
|
17
|
-
import { getCameraToward as
|
|
18
|
-
const
|
|
19
|
-
class
|
|
12
|
+
}, C = (b, a) => F(b, $(a));
|
|
13
|
+
var r = (b, a, e) => (E(b, typeof a != "symbol" ? a + "" : a, e), e);
|
|
14
|
+
import { Raycaster as G, Vector3 as V, Quaternion as N, Euler as H } from "three";
|
|
15
|
+
import { BasePanoPluginController as Q } from "./BaseController.js";
|
|
16
|
+
import j from "./DoorLabelItem.js";
|
|
17
|
+
import { getCameraToward as q, isTwoRectOverlaped as X, getDistance as Y, getToward as Z } from "./utils.js";
|
|
18
|
+
const J = { userAction: !0 };
|
|
19
|
+
class se extends Q {
|
|
20
20
|
constructor(e) {
|
|
21
21
|
super(e);
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
r(this, "MinVisibledistance", 1.8);
|
|
23
|
+
r(this, "MaxVisibledistance", 5);
|
|
24
|
+
r(this, "OffsetHeight", -1.3);
|
|
25
|
+
r(this, "rooms");
|
|
26
|
+
r(this, "floorplanServerData");
|
|
27
|
+
r(this, "doorLabelItems");
|
|
28
|
+
r(this, "visibleLabelMap", /* @__PURE__ */ new Map());
|
|
29
|
+
r(this, "labelItems", []);
|
|
30
|
+
r(this, "doorLabels");
|
|
31
|
+
r(this, "roomObservers");
|
|
32
|
+
r(this, "loadData", (e, n) => {
|
|
33
33
|
n && (this.MaxVisibledistance = n.MaxVisibledistance, this.MinVisibledistance = n.MinVisibledistance, this.OffsetHeight = n.OffsetHeight), this.doorLabelItems && this.doorLabelItems.length > 0 && this.doorLabelItems.forEach((f) => {
|
|
34
34
|
f.$destroy();
|
|
35
35
|
}), this.labelItems = [], this.doorLabels = [], this.doorLabelItems = [], this.floorplanServerData = e, this.five.once("panoArrived", () => {
|
|
36
36
|
console.log("doorplugin", "panoArrived"), this.initData();
|
|
37
37
|
});
|
|
38
38
|
});
|
|
39
|
-
|
|
40
|
-
var
|
|
41
|
-
const e = this.floorplanServerData.computed_data.floor_datas || [], f = (((
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
const t =
|
|
39
|
+
r(this, "initRoomObservers", () => {
|
|
40
|
+
var l, h;
|
|
41
|
+
const e = this.floorplanServerData.computed_data.floor_datas || [], f = (((h = (l = this.five) == null ? void 0 : l.work) == null ? void 0 : h.observers) || []).map((o) => {
|
|
42
|
+
const i = o.panoIndex, d = o.floorIndex, s = e == null ? void 0 : e.find((t) => t.floor_index === d);
|
|
43
|
+
if (s) {
|
|
44
|
+
const t = s.rooms.find((c) => c.observer_indexs.includes(i));
|
|
45
45
|
if (t)
|
|
46
|
-
return { panoIndex:
|
|
46
|
+
return { panoIndex: i, floorIndex: d, name: t.name };
|
|
47
47
|
}
|
|
48
48
|
}).filter(Boolean);
|
|
49
49
|
this.roomObservers = f;
|
|
50
50
|
});
|
|
51
|
-
|
|
51
|
+
r(this, "hideAllLabels", () => {
|
|
52
52
|
this.labelItems.forEach((e) => {
|
|
53
53
|
e.visible = !1, e.inSight = !1;
|
|
54
54
|
}), this.render();
|
|
55
55
|
});
|
|
56
|
-
|
|
56
|
+
r(this, "fixDoorVisibleAndPosition", () => {
|
|
57
57
|
this.initRoomObservers();
|
|
58
58
|
const { panoIndex: e } = this.five;
|
|
59
|
-
if (!this.visible || this.five.model.empty || e === null || !this.roomObservers.find((
|
|
59
|
+
if (!this.visible || this.five.model.empty || e === null || !this.roomObservers.find((o) => o.panoIndex === e))
|
|
60
60
|
return;
|
|
61
|
-
const n = this.roomObservers.find((
|
|
61
|
+
const n = this.roomObservers.find((o) => o.panoIndex === e), l = this.five.work.observers.find((o) => o.panoIndex === e).position.clone(), h = (() => {
|
|
62
62
|
if (this.visibleLabelMap.has(e))
|
|
63
63
|
return this.visibleLabelMap.get(e);
|
|
64
64
|
{
|
|
65
|
-
const
|
|
66
|
-
return this.doorLabels.forEach((
|
|
67
|
-
if (
|
|
65
|
+
const o = [];
|
|
66
|
+
return this.doorLabels.forEach((i, d) => {
|
|
67
|
+
if (i.roomName === n.name)
|
|
68
68
|
return;
|
|
69
|
-
const
|
|
69
|
+
const s = i.position.clone(), t = s.distanceTo(l);
|
|
70
70
|
if (t < this.MinVisibledistance || t > this.MaxVisibledistance)
|
|
71
71
|
return;
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
const [
|
|
75
|
-
|
|
76
|
-
}), this.visibleLabelMap.set(e,
|
|
72
|
+
const c = new G(), v = s.clone().sub(l).normalize();
|
|
73
|
+
c.set(l, v);
|
|
74
|
+
const [x] = this.five.model.intersectRaycaster(c);
|
|
75
|
+
x && x.distance + 0.1 < t || o.push(d);
|
|
76
|
+
}), this.visibleLabelMap.set(e, o), o;
|
|
77
77
|
}
|
|
78
78
|
})();
|
|
79
|
-
this.labelItems.forEach((
|
|
80
|
-
|
|
79
|
+
this.labelItems.forEach((o, i) => {
|
|
80
|
+
o.visible = h.includes(i);
|
|
81
81
|
}), this.fixDoorPosition();
|
|
82
82
|
});
|
|
83
|
-
|
|
83
|
+
r(this, "fixDoorPosition", () => {
|
|
84
|
+
var s, t, c, v, x, A, P, w, L, O;
|
|
84
85
|
const { panoIndex: e, camera: n } = this.five;
|
|
85
86
|
if (e === null)
|
|
86
87
|
return;
|
|
87
88
|
if (this.five.currentMode !== "Panorama")
|
|
88
89
|
return this.hideAllLabels();
|
|
89
|
-
const f = this.five.getElement(),
|
|
90
|
-
if (d.forEach((
|
|
91
|
-
if (
|
|
92
|
-
const
|
|
93
|
-
|
|
90
|
+
const f = this.five.getElement(), l = f.clientWidth, h = f.clientHeight, o = n.getWorldDirection(new V()), i = [], d = [...this.labelItems];
|
|
91
|
+
if (d.forEach((m, g) => {
|
|
92
|
+
if (m.visible) {
|
|
93
|
+
const I = n.position.distanceTo(m.position), M = m.position.clone().add(new V(0, this.OffsetHeight, 0)), T = M.clone().sub(n.position).normalize().angleTo(o), y = M.clone().project(n), D = (y.x + 1) / 2.2 * 100, p = (-y.y + 1) / 2.2 * 100, u = D >= 0 && D <= 100 && p >= 0 && p <= 100 && I > this.MinVisibledistance && I <= this.MaxVisibledistance;
|
|
94
|
+
m.left = D, m.top = p, m.inSight = u && T < Math.PI / 2, m.cameraToward = q(this.five), u ? i.push({ disFromCameraToLabel: I, left: D, top: p, index: g }) : m.transform = "translate(-50%, -50%)";
|
|
94
95
|
} else
|
|
95
|
-
|
|
96
|
-
}),
|
|
97
|
-
let
|
|
98
|
-
|
|
99
|
-
for (let
|
|
100
|
-
const { index:
|
|
101
|
-
if (!
|
|
96
|
+
m.inSight = !1;
|
|
97
|
+
}), i.length > 1) {
|
|
98
|
+
let m = 0;
|
|
99
|
+
i.sort((g, I) => I.disFromCameraToLabel - g.disFromCameraToLabel);
|
|
100
|
+
for (let g = 1; g < i.length; g++) {
|
|
101
|
+
const { index: I, left: M, top: _ } = i[g - 1], { index: T, left: y, top: D } = i[g], p = this.container.children[I], u = this.container.children[T];
|
|
102
|
+
if (!p || !u || !((s = p == null ? void 0 : p.children) != null && s[0]) || !((t = u == null ? void 0 : u.children) != null && t[0]))
|
|
102
103
|
return;
|
|
103
|
-
const
|
|
104
|
-
left:
|
|
105
|
-
top:
|
|
106
|
-
width: v.children[0].clientWidth,
|
|
107
|
-
height:
|
|
108
|
-
},
|
|
109
|
-
left:
|
|
110
|
-
top:
|
|
111
|
-
width:
|
|
112
|
-
height:
|
|
104
|
+
const W = {
|
|
105
|
+
left: l * M / 100,
|
|
106
|
+
top: h * _ / 100,
|
|
107
|
+
width: (v = (c = p.children[0]) == null ? void 0 : c.clientWidth) != null ? v : 0,
|
|
108
|
+
height: (A = (x = p.children[0]) == null ? void 0 : x.clientHeight) != null ? A : 0
|
|
109
|
+
}, z = {
|
|
110
|
+
left: l * y / 100,
|
|
111
|
+
top: h * D / 100,
|
|
112
|
+
width: (w = (P = u.children[0]) == null ? void 0 : P.clientWidth) != null ? w : 0,
|
|
113
|
+
height: (O = (L = u.children[0]) == null ? void 0 : L.clientHeight) != null ? O : 0
|
|
113
114
|
};
|
|
114
|
-
|
|
115
|
+
X(W, z) && (m++, d[I].transform = `translate(-50%, ${(m - 1) * 100 - 50}%)`, d[T].transform = `translate(-50%, ${m * 100 - 50}%)`);
|
|
115
116
|
}
|
|
116
117
|
}
|
|
117
118
|
this.labelItems = d, this.render();
|
|
118
119
|
});
|
|
119
|
-
|
|
120
|
+
r(this, "onClick", (e, n) => {
|
|
120
121
|
if (!this.roomObservers)
|
|
121
122
|
return;
|
|
122
123
|
const { work: f } = this.five;
|
|
123
|
-
let
|
|
124
|
-
for (let
|
|
125
|
-
if (this.roomObservers[
|
|
124
|
+
let l, h, o = 1 / 0;
|
|
125
|
+
for (let i = 0; i < f.observers.length; i++) {
|
|
126
|
+
if (this.roomObservers[i].name !== e)
|
|
126
127
|
continue;
|
|
127
|
-
const
|
|
128
|
-
t <
|
|
128
|
+
const s = f.observers[i].standingPosition, t = n.distanceTo(s);
|
|
129
|
+
t < o && (l = i, h = s.clone().sub(n).normalize(), o = t);
|
|
129
130
|
}
|
|
130
|
-
if (
|
|
131
|
-
const
|
|
132
|
-
if (
|
|
133
|
-
const
|
|
134
|
-
|
|
135
|
-
const
|
|
136
|
-
|
|
131
|
+
if (h !== null && l !== null) {
|
|
132
|
+
const i = {};
|
|
133
|
+
if (o > 0) {
|
|
134
|
+
const s = new V(0, 0, -1), t = h.clone(), c = new N();
|
|
135
|
+
c.setFromUnitVectors(s, t);
|
|
136
|
+
const v = new H();
|
|
137
|
+
v.setFromQuaternion(c, "YXZ"), i.longitude = v.y;
|
|
137
138
|
}
|
|
138
|
-
this.five.emit("wantsToMoveToPano",
|
|
139
|
+
this.five.emit("wantsToMoveToPano", l, {}, !0) || this.five.moveToPano(l, { longitude: i.longitude });
|
|
139
140
|
}
|
|
140
141
|
});
|
|
141
|
-
|
|
142
|
-
var
|
|
142
|
+
r(this, "initData", () => {
|
|
143
|
+
var l;
|
|
143
144
|
this.doorLabels = [];
|
|
144
|
-
const e = this.five.panoIndex, n = this.floorplanServerData.computed_data.observers[e].floor_index, f = n !== void 0 && ((
|
|
145
|
-
this.rooms = f, this.rooms && this.rooms.length > 0 && this.rooms.forEach((
|
|
145
|
+
const e = this.five.panoIndex, n = this.floorplanServerData.computed_data.observers[e].floor_index, f = n !== void 0 && ((l = this.floorplanServerData.computed_data.floor_datas[n]) == null ? void 0 : l.rooms);
|
|
146
|
+
this.rooms = f, this.rooms && this.rooms.length > 0 && this.rooms.forEach((h) => {
|
|
146
147
|
var d;
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
const t =
|
|
150
|
-
let
|
|
151
|
-
|
|
152
|
-
const
|
|
153
|
-
x:
|
|
154
|
-
y:
|
|
155
|
-
z:
|
|
156
|
-
},
|
|
157
|
-
|
|
158
|
-
}),
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
roomName:
|
|
162
|
-
name:
|
|
163
|
-
position:
|
|
164
|
-
toward:
|
|
148
|
+
const o = (d = this.floorplanServerData.computed_data.doors) == null ? void 0 : d.filter((s) => !!(s && s.name === h.name)), i = this.five.work.observers.filter((s, t) => !!h.observer_indexs.find((c) => c === t));
|
|
149
|
+
o && o.forEach((s) => {
|
|
150
|
+
const t = s.position;
|
|
151
|
+
let c = 1 / 0, v;
|
|
152
|
+
i.forEach((A) => {
|
|
153
|
+
const P = A.standingPosition, w = {
|
|
154
|
+
x: P.x,
|
|
155
|
+
y: P.y,
|
|
156
|
+
z: P.z
|
|
157
|
+
}, L = Y(t, w);
|
|
158
|
+
L < c && (c = L, v = w);
|
|
159
|
+
}), v && (t.y = v.y + 0.01);
|
|
160
|
+
const x = new V(t.x, t.y, t.z);
|
|
161
|
+
x.add(new V(-0.2, 1.8, 0).applyEuler(new H(0, s.rad, 0))), this.doorLabels.push({
|
|
162
|
+
roomName: h.name,
|
|
163
|
+
name: s.name,
|
|
164
|
+
position: x,
|
|
165
|
+
toward: Z(s.rad)
|
|
165
166
|
});
|
|
166
167
|
});
|
|
167
|
-
}), this.labelItems = this.doorLabels.map((
|
|
168
|
+
}), this.labelItems = this.doorLabels.map((h) => C(k({}, h), {
|
|
168
169
|
left: 0,
|
|
169
170
|
top: 0,
|
|
170
171
|
visible: !1,
|
|
171
172
|
inSight: !1,
|
|
172
173
|
transform: "",
|
|
173
174
|
cameraToward: ""
|
|
174
|
-
})),
|
|
175
|
+
})), this.five.on("wantsToMoveToPano", this.hideAllLabels), this.five.on("modelLoaded", this.fixDoorVisibleAndPosition), this.five.on("panoArrived", this.fixDoorVisibleAndPosition), this.five.on("initAnimationEnded", this.fixDoorPosition), this.five.on("cameraUpdate", this.fixDoorPosition), this.five.on("mouseWheel", this.fixDoorPosition), this.five.on("pinchGesture", this.fixDoorPosition), this.fixDoorVisibleAndPosition();
|
|
175
176
|
});
|
|
176
177
|
}
|
|
177
178
|
stateChangedCallback(e, n) {
|
|
@@ -179,7 +180,7 @@ class q extends H {
|
|
|
179
180
|
const f = {
|
|
180
181
|
state: this.state,
|
|
181
182
|
prevState: e,
|
|
182
|
-
userAction: n ? n.userAction :
|
|
183
|
+
userAction: n ? n.userAction : J.userAction
|
|
183
184
|
};
|
|
184
185
|
this.hooks.emit("stateChange", f);
|
|
185
186
|
}
|
|
@@ -195,7 +196,7 @@ class q extends H {
|
|
|
195
196
|
e.$destroy();
|
|
196
197
|
}), this.doorLabelItems = [], this.labelItems.forEach((e) => {
|
|
197
198
|
this.doorLabelItems.push(
|
|
198
|
-
new
|
|
199
|
+
new j({
|
|
199
200
|
target: this.container,
|
|
200
201
|
props: {
|
|
201
202
|
props: e,
|
|
@@ -215,5 +216,5 @@ class q extends H {
|
|
|
215
216
|
}
|
|
216
217
|
}
|
|
217
218
|
export {
|
|
218
|
-
|
|
219
|
+
se as PanoDoorLabelPluginController
|
|
219
220
|
};
|
package/package.json
CHANGED