@realsee/dnalogel 2.0.0-alpha.10 → 2.0.0-alpha.13

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.
Files changed (123) hide show
  1. package/dist/CSS3DRenderPlugin/index.js +17 -14
  2. package/dist/CameraMovementPlugin/index.js +40 -15
  3. package/dist/ModelChassisCompassPlugin/index.js +32 -6
  4. package/dist/ModelEntryDoorGuidePlugin/index.js +48 -18
  5. package/dist/ModelItemLabelPlugin/events.type.d.ts +9 -0
  6. package/dist/ModelItemLabelPlugin/index.d.ts +4 -0
  7. package/dist/ModelItemLabelPlugin/index.js +679 -0
  8. package/dist/ModelItemLabelPlugin/typings.d.ts +55 -0
  9. package/dist/ModelItemLabelPlugin/utils/parseData.d.ts +3 -0
  10. package/dist/ModelRoomLabelPlugin/index.js +71 -28
  11. package/dist/PanoCompassPlugin/index.js +311 -164
  12. package/dist/PanoCursorRaycasterPlugin/index.js +5 -3
  13. package/dist/PanoMeasurePlugin/index.js +1337 -583
  14. package/dist/PanoRulerPlugin/index.js +32 -5
  15. package/dist/PanoSpatialTagPlugin/index.js +73 -38
  16. package/dist/floorplan/ModelFloorplanPlugin/Controller.d.ts +1 -0
  17. package/dist/floorplan/ModelFloorplanPlugin/index.js +678 -439
  18. package/dist/floorplan/PanoFloorplanRadarPlugin/index.js +164 -72
  19. package/dist/floorplan/TopviewFloorplanPlugin/Controller.d.ts +1 -0
  20. package/dist/floorplan/TopviewFloorplanPlugin/index.js +403 -230
  21. package/dist/index.d.ts +1 -0
  22. package/dist/index.es.js +3596 -1612
  23. package/dist/index.js +3602 -1616
  24. package/dist/index.umd.js +3605 -1620
  25. package/docs/assets/main.js +1 -1
  26. package/docs/assets/search.js +1 -1
  27. package/docs/classes/ModelRoomLabelController.html +6 -6
  28. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
  29. package/docs/enums/ModelFloorplanErrorType.html +1 -1
  30. package/docs/index.html +1 -1
  31. package/docs/interfaces/LineJson.html +1 -1
  32. package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
  33. package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
  34. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
  35. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
  36. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
  37. package/docs/interfaces/ModelFloorplanParameterType.html +1 -1
  38. package/docs/interfaces/ModelFloorplanViewEvent.html +2 -2
  39. package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
  40. package/docs/interfaces/PanoCompassPluginData.html +1 -1
  41. package/docs/interfaces/PanoCompassPluginParameterType.html +1 -1
  42. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
  43. package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
  44. package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
  45. package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
  46. package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
  47. package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
  48. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
  49. package/docs/interfaces/PointJson.html +1 -1
  50. package/docs/interfaces/RoomLabel.html +7 -7
  51. package/docs/interfaces/TopviewFloorplanPluginParameterType.html +1 -1
  52. package/docs/modules.html +12 -12
  53. package/libs/CSS3DRenderPlugin/index.js +16 -13
  54. package/libs/CameraMovementPlugin/index.js +24 -15
  55. package/libs/ModelChassisCompassPlugin/index.js +14 -5
  56. package/libs/ModelEntryDoorGuidePlugin/index.js +24 -12
  57. package/libs/ModelItemLabelPlugin/ItemLabelComponent.js +422 -0
  58. package/libs/ModelItemLabelPlugin/ItemLabelItem.js +133 -0
  59. package/libs/ModelItemLabelPlugin/events.type.d.ts +9 -0
  60. package/libs/ModelItemLabelPlugin/events.type.js +1 -0
  61. package/libs/ModelItemLabelPlugin/index.d.ts +4 -0
  62. package/libs/ModelItemLabelPlugin/index.js +172 -0
  63. package/libs/ModelItemLabelPlugin/typings.d.ts +55 -0
  64. package/libs/ModelItemLabelPlugin/typings.js +6 -0
  65. package/libs/ModelItemLabelPlugin/utils/parseData.d.ts +3 -0
  66. package/libs/ModelItemLabelPlugin/utils/parseData.js +4 -0
  67. package/libs/ModelRoomLabelPlugin/Controller.js +64 -23
  68. package/libs/ModelRoomLabelPlugin/RoomLabelItems.js +7 -5
  69. package/libs/PanoCompassPlugin/index.js +225 -128
  70. package/libs/PanoCursorRaycasterPlugin/index.js +5 -3
  71. package/libs/PanoMeasurePlugin/Controller/BaseController.js +68 -13
  72. package/libs/PanoMeasurePlugin/Controller/EditController.js +267 -154
  73. package/libs/PanoMeasurePlugin/Controller/ShortcutKeyController.js +40 -20
  74. package/libs/PanoMeasurePlugin/Controller/WatchController.js +234 -152
  75. package/libs/PanoMeasurePlugin/Controller/index.js +131 -47
  76. package/libs/PanoMeasurePlugin/Model/index.js +30 -5
  77. package/libs/PanoMeasurePlugin/Model/line.js +60 -10
  78. package/libs/PanoMeasurePlugin/Model/point.js +24 -4
  79. package/libs/PanoMeasurePlugin/Model/polyline.js +20 -3
  80. package/libs/PanoMeasurePlugin/Modules/DeleteDom/index.js +59 -14
  81. package/libs/PanoMeasurePlugin/Modules/FiveHelper.js +23 -8
  82. package/libs/PanoMeasurePlugin/Modules/GuideController.js +61 -26
  83. package/libs/PanoMeasurePlugin/Modules/Magnifier.js +60 -10
  84. package/libs/PanoMeasurePlugin/Modules/UIController/MainBtnController.js +83 -37
  85. package/libs/PanoMeasurePlugin/Modules/UIController/Revoke/index.js +52 -17
  86. package/libs/PanoMeasurePlugin/Modules/UIController/index.js +61 -30
  87. package/libs/PanoMeasurePlugin/utils/distanceDom.js +3 -2
  88. package/libs/PanoMeasurePlugin/utils/line.js +8 -7
  89. package/libs/PanoRulerPlugin/index.js +16 -5
  90. package/libs/PanoSpatialTagPlugin/Components/tag.js +9 -9
  91. package/libs/PanoSpatialTagPlugin/index.js +11 -9
  92. package/libs/floorplan/Components/BaseImage.js +10 -5
  93. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.js +3 -1
  94. package/libs/floorplan/Components/RoomMaterials/RoomMaterial.js +5 -6
  95. package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.js +24 -11
  96. package/libs/floorplan/ModelFloorplanPlugin/Components/Main.js +77 -69
  97. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.js +3 -1
  98. package/libs/floorplan/ModelFloorplanPlugin/Controller.d.ts +1 -0
  99. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +457 -273
  100. package/libs/floorplan/ModelFloorplanPlugin/utils/correctFiveState.js +33 -22
  101. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.js +3 -1
  102. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +97 -36
  103. package/libs/floorplan/TopviewFloorplanPlugin/Controller.d.ts +1 -0
  104. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +232 -108
  105. package/libs/floorplan/utils/formatData.js +43 -28
  106. package/libs/floorplan/utils/formatPosition.js +1 -1
  107. package/libs/index.d.ts +1 -0
  108. package/libs/index.js +2 -0
  109. package/libs/shared-utils/Subscribe.js +8 -1
  110. package/libs/shared-utils/animationFrame/BetterTween.js +47 -18
  111. package/libs/shared-utils/createCanvasTextTexture.js +6 -5
  112. package/libs/shared-utils/five/changeMode.js +23 -12
  113. package/libs/shared-utils/getPxmm.js +1 -1
  114. package/libs/shared-utils/math/evenNumber.js +1 -1
  115. package/libs/shared-utils/three/loadFbxObj.js +20 -9
  116. package/libs/shared-utils/three/loadTexture.js +17 -6
  117. package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +2 -1
  118. package/libs/shared-utils/tinyEJSrender.js +36 -6
  119. package/libs/shared-utils/to.js +21 -10
  120. package/libs/shared-utils/useDebounce.js +1 -1
  121. package/libs/shared-utils/useThrottle.js +2 -1
  122. package/package.json +2 -2
  123. package/CHANGELOG.md +0 -34
@@ -3,12 +3,63 @@ import { uiWrapperStyle, operatingSpaceStyle, controllerBackgroundStyle, buttonG
3
3
  import { MainBtnController } from './MainBtnController';
4
4
  import Revoke from './Revoke';
5
5
  export class UIController {
6
- revoke;
7
- container;
8
- mainController;
9
- disposers = [];
10
- measureController;
11
6
  constructor(measureController, params) {
7
+ Object.defineProperty(this, "revoke", {
8
+ enumerable: true,
9
+ configurable: true,
10
+ writable: true,
11
+ value: void 0
12
+ });
13
+ Object.defineProperty(this, "container", {
14
+ enumerable: true,
15
+ configurable: true,
16
+ writable: true,
17
+ value: void 0
18
+ });
19
+ Object.defineProperty(this, "mainController", {
20
+ enumerable: true,
21
+ configurable: true,
22
+ writable: true,
23
+ value: void 0
24
+ });
25
+ Object.defineProperty(this, "disposers", {
26
+ enumerable: true,
27
+ configurable: true,
28
+ writable: true,
29
+ value: []
30
+ });
31
+ Object.defineProperty(this, "measureController", {
32
+ enumerable: true,
33
+ configurable: true,
34
+ writable: true,
35
+ value: void 0
36
+ });
37
+ Object.defineProperty(this, "handleExit", {
38
+ enumerable: true,
39
+ configurable: true,
40
+ writable: true,
41
+ value: () => {
42
+ const exitIcon = this.container.querySelector('.fpm__exit-icon');
43
+ const exitItem = this.container.querySelector('.fpm__exit');
44
+ if (!exitItem || !exitIcon)
45
+ throw new Error('cannot find dom');
46
+ Object.assign(exitItem.style, exitItemStyle);
47
+ Object.assign(exitIcon === null || exitIcon === void 0 ? void 0 : exitIcon.style, exitIconStyle);
48
+ const onMouseEnter = () => (exitItem.style.opacity = '1');
49
+ const onMouseLeave = () => (exitItem.style.opacity = '0.7');
50
+ const handleClick = () => {
51
+ this.measureController.disable();
52
+ };
53
+ exitIcon.addEventListener('click', handleClick);
54
+ exitIcon.addEventListener('mouseenter', onMouseEnter);
55
+ exitIcon.addEventListener('mouseleave', onMouseLeave);
56
+ return () => {
57
+ exitIcon.removeEventListener('click', handleClick);
58
+ exitIcon.removeEventListener('mouseenter', onMouseEnter);
59
+ exitIcon.removeEventListener('mouseleave', onMouseLeave);
60
+ };
61
+ }
62
+ });
12
63
  this.measureController = measureController;
13
64
  this.container = document.createElement('div');
14
65
  this.container.innerHTML = htmlString;
@@ -18,8 +69,8 @@ export class UIController {
18
69
  const UIItems = this.container.querySelectorAll('.fpm__ui-item');
19
70
  const bgDom = this.container.querySelector('.fpm_ui-bg');
20
71
  const operatingSpaceDom = this.container.querySelector('.fpm_operating-space');
21
- Object.assign(bgDom?.style, controllerBackgroundStyle);
22
- Object.assign(operatingSpaceDom?.style, operatingSpaceStyle);
72
+ Object.assign(bgDom === null || bgDom === void 0 ? void 0 : bgDom.style, controllerBackgroundStyle);
73
+ Object.assign(operatingSpaceDom === null || operatingSpaceDom === void 0 ? void 0 : operatingSpaceDom.style, operatingSpaceStyle);
23
74
  Object.assign(this.container.style, uiWrapperStyle);
24
75
  UIItems.forEach((item) => Object.assign(item.style, buttonGroupStyle));
25
76
  textDoms.forEach((item) => Object.assign(item.style, textStyle));
@@ -37,33 +88,13 @@ export class UIController {
37
88
  return this;
38
89
  }
39
90
  hide() {
91
+ var _a, _b;
40
92
  this.container.style.opacity = '0';
41
93
  this.container.style.transform = 'translate(0, 10px)';
42
- this.revoke?.dispose();
43
- this.mainController?.dispose();
94
+ (_a = this.revoke) === null || _a === void 0 ? void 0 : _a.dispose();
95
+ (_b = this.mainController) === null || _b === void 0 ? void 0 : _b.dispose();
44
96
  this.disposers.forEach((disposer) => disposer());
45
97
  this.disposers = [];
46
98
  return this;
47
99
  }
48
- handleExit = () => {
49
- const exitIcon = this.container.querySelector('.fpm__exit-icon');
50
- const exitItem = this.container.querySelector('.fpm__exit');
51
- if (!exitItem || !exitIcon)
52
- throw new Error('cannot find dom');
53
- Object.assign(exitItem.style, exitItemStyle);
54
- Object.assign(exitIcon?.style, exitIconStyle);
55
- const onMouseEnter = () => (exitItem.style.opacity = '1');
56
- const onMouseLeave = () => (exitItem.style.opacity = '0.7');
57
- const handleClick = () => {
58
- this.measureController.disable();
59
- };
60
- exitIcon.addEventListener('click', handleClick);
61
- exitIcon.addEventListener('mouseenter', onMouseEnter);
62
- exitIcon.addEventListener('mouseleave', onMouseLeave);
63
- return () => {
64
- exitIcon.removeEventListener('click', handleClick);
65
- exitIcon.removeEventListener('mouseenter', onMouseEnter);
66
- exitIcon.removeEventListener('mouseleave', onMouseLeave);
67
- };
68
- };
69
100
  }
@@ -28,8 +28,9 @@ function createContainerDom(line) {
28
28
  }
29
29
  export function creatDistanceItem(props) {
30
30
  function handleClick() {
31
+ var _a;
31
32
  highlight();
32
- props.clickCallback?.(distanceItem);
33
+ (_a = props.clickCallback) === null || _a === void 0 ? void 0 : _a.call(props, distanceItem);
33
34
  }
34
35
  function highlight() {
35
36
  if (userDistanceItem)
@@ -109,6 +110,6 @@ export function creatDistanceItem(props) {
109
110
  highlight: highlight,
110
111
  unHighlight: unHighlight,
111
112
  };
112
- userDistanceItem?.element ? containerDom.appendChild(userDistanceItem.element) : containerDom.appendChild(contentDom);
113
+ (userDistanceItem === null || userDistanceItem === void 0 ? void 0 : userDistanceItem.element) ? containerDom.appendChild(userDistanceItem.element) : containerDom.appendChild(contentDom);
113
114
  return distanceItem;
114
115
  }
@@ -2,11 +2,12 @@ import { Line as FiveLine } from '@realsee/five/line';
2
2
  import { lightLineOpts, normalLineOpts } from './constants';
3
3
  import { Color } from 'three';
4
4
  export function creatLine(start, end, opts) {
5
- const lineWidth = opts?.lineWidth ?? 2;
6
- const lineColor = opts?.lineColor ?? new Color(0xffffff);
7
- const pointSize = opts?.pointSize ?? 5;
8
- const lineRenderOrder = opts?.lineRenderOrder ?? 10;
9
- const pointsRenderOrder = opts?.lineRenderOrder ?? 20;
5
+ var _a, _b, _c, _d, _e;
6
+ const lineWidth = (_a = opts === null || opts === void 0 ? void 0 : opts.lineWidth) !== null && _a !== void 0 ? _a : 2;
7
+ const lineColor = (_b = opts === null || opts === void 0 ? void 0 : opts.lineColor) !== null && _b !== void 0 ? _b : new Color(0xffffff);
8
+ const pointSize = (_c = opts === null || opts === void 0 ? void 0 : opts.pointSize) !== null && _c !== void 0 ? _c : 5;
9
+ const lineRenderOrder = (_d = opts === null || opts === void 0 ? void 0 : opts.lineRenderOrder) !== null && _d !== void 0 ? _d : 10;
10
+ const pointsRenderOrder = (_e = opts === null || opts === void 0 ? void 0 : opts.lineRenderOrder) !== null && _e !== void 0 ? _e : 20;
10
11
  const line = new FiveLine(start, end);
11
12
  // set line
12
13
  line.setMaterial({ linewidth: lineWidth, color: lineColor });
@@ -18,8 +19,8 @@ export function creatLine(start, end, opts) {
18
19
  const pointMaterial = line.points.material;
19
20
  pointMaterial.depthTest = false;
20
21
  pointMaterial.size = pointSize;
21
- opts?.pointColor && pointMaterial.color.set(opts.pointColor).convertSRGBToLinear();
22
- if (opts?.pointTexture)
22
+ (opts === null || opts === void 0 ? void 0 : opts.pointColor) && pointMaterial.color.set(opts.pointColor).convertSRGBToLinear();
23
+ if (opts === null || opts === void 0 ? void 0 : opts.pointTexture)
23
24
  pointMaterial.map = opts.pointTexture;
24
25
  return line;
25
26
  }
@@ -1,3 +1,12 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
1
10
  import { Five } from '@realsee/five';
2
11
  import { Raycaster, Vector3 } from 'three';
3
12
  import { intersectionOfLine } from '../shared-utils/math/planimetry';
@@ -161,7 +170,7 @@ export const PanoRulerPlugin = (five, params) => {
161
170
  state.loaded = true;
162
171
  return true;
163
172
  };
164
- const load = async (_roomInfo, _roomRules, options) => {
173
+ const load = (_roomInfo, _roomRules, options) => __awaiter(void 0, void 0, void 0, function* () {
165
174
  const roomInfo = _roomInfo || params.roomInfo;
166
175
  const roomRules = _roomRules || params.roomRules;
167
176
  if (!roomInfo || !roomRules) {
@@ -172,9 +181,9 @@ export const PanoRulerPlugin = (five, params) => {
172
181
  return _load(roomInfo, roomRules);
173
182
  }
174
183
  else {
175
- return await new Promise((resolve) => five.once('modelLoaded', () => resolve(_load(roomInfo, roomRules))));
184
+ return yield new Promise((resolve) => five.once('modelLoaded', () => resolve(_load(roomInfo, roomRules))));
176
185
  }
177
- };
186
+ });
178
187
  if (params.roomInfo && params.roomRules) {
179
188
  load(params.roomInfo, params.roomRules);
180
189
  }
@@ -210,7 +219,8 @@ export const PanoRulerPlugin = (five, params) => {
210
219
  }
211
220
  };
212
221
  const freshRule = () => {
213
- const element = five.getElement()?.parentElement;
222
+ var _a;
223
+ const element = (_a = five.getElement()) === null || _a === void 0 ? void 0 : _a.parentElement;
214
224
  if (!element)
215
225
  return;
216
226
  if (!state.loaded)
@@ -353,12 +363,13 @@ export const PanoRulerPlugin = (five, params) => {
353
363
  const nextFrameFreshRule = () => nextFrame(freshRule);
354
364
  const throttleFreshRule = throttle(freshRule, 80);
355
365
  const enable = () => {
366
+ var _a, _b;
356
367
  if (!state.loaded)
357
368
  return false;
358
369
  if (state.enable)
359
370
  return true;
360
371
  $rule.setAttribute('class', 'PanoRulerPlugin' + (state.options.className ? ' ' + state.options.className : ''));
361
- five.getElement()?.parentElement?.append($rule);
372
+ (_b = (_a = five.getElement()) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.append($rule);
362
373
  freshRule();
363
374
  five.on('panoArrived', freshRule);
364
375
  five.on('modeChange', freshRule);
@@ -22,7 +22,7 @@ import '../typings';
22
22
  import { currentTarget } from '../store';
23
23
 
24
24
  function add_css(target) {
25
- append_styles(target, "svelte-1xmyxaa", ".PanoSpatialTagPlugin__tag-x.svelte-1xmyxaa.svelte-1xmyxaa{position:relative;display:block;white-space:nowrap;box-sizing:border-box;width:25rem;height:14rem;color:#FFF;transform:translate(0, -100%);transition:height .5s linear}.PanoSpatialTagPlugin__tag-shadow.svelte-1xmyxaa.svelte-1xmyxaa{content:'';position:absolute;width:30rem;height:30rem;top:-15rem;left:-15rem;z-index:-1;opacity:0;transition:opacity .8s .6s;background:url('https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png');background-size:30rem 30rem}.PanoSpatialTagPlugin__tag-line.svelte-1xmyxaa.svelte-1xmyxaa{position:absolute;left:-1rem;width:2rem;height:100%;overflow:hidden}.PanoSpatialTagPlugin__tag-flagpole.svelte-1xmyxaa.svelte-1xmyxaa{position:absolute;top:0;left:1rem;height:calc(100% - 1.5rem);width:.15rem;background:linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, .1));box-shadow:0 .1rem .5rem rgba(0, 0, 0, .2);opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform .4s cubic-bezier(.44,.44,.74,.98) , opacity .4s cubic-bezier(.44,.44,.74,.98), width .5s linear, height .5s linear ;transform-origin:center bottom}.PanoSpatialTagPlugin__tag-line1.svelte-1xmyxaa.svelte-1xmyxaa{position:absolute;top:0;left:0.3rem;height:1.8rem;width:.1rem;background:#fff;opacity:0;transform:translate(-50%, 200%) scaleY(0);transform-origin:center top}.PanoSpatialTagPlugin__tag-line2.svelte-1xmyxaa.svelte-1xmyxaa{position:absolute;top:0;left:0.5rem;height:1.8rem;width:.1rem;background:#fff;opacity:0;transform:translate(-50%, 200%) scaleY(0);transform-origin:center top}.PanoSpatialTagPlugin__tag-show.svelte-1xmyxaa .PanoSpatialTagPlugin__tag-line1.svelte-1xmyxaa{animation:svelte-1xmyxaa-PanoSpatialTagPlugin__tag-line1 linear .5s forwards .45s}.PanoSpatialTagPlugin__tag-show.svelte-1xmyxaa .PanoSpatialTagPlugin__tag-line2.svelte-1xmyxaa{animation:svelte-1xmyxaa-PanoSpatialTagPlugin__tag-line2 linear .5s forwards .65s}.PanoSpatialTagPlugin__tag-x.PanoSpatialTagPlugin__tag-upside-down.svelte-1xmyxaa.svelte-1xmyxaa{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-upside-down.svelte-1xmyxaa .PanoSpatialTagPlugin__tag-line.svelte-1xmyxaa{transform:scaleY(-1)}.PanoSpatialTagPlugin__tag-animate.svelte-1xmyxaa.svelte-1xmyxaa{position:relative;height:100%;overflow:hidden;transform-origin:left top;transition:transform .5s linear}.PanoSpatialTagPlugin__tag-upside-down.svelte-1xmyxaa .PanoSpatialTagPlugin__tag-animate.svelte-1xmyxaa{transform-origin:left bottom}.PanoSpatialTagPlugin__tag-content.svelte-1xmyxaa.svelte-1xmyxaa{position:absolute;display:inline-block;transform:translate(-100%, 0);transition:transform .9s cubic-bezier(0,.65,.16,1.08) .6s;padding-left:.5rem;font-size:1rem}.PanoSpatialTagPlugin__tag-upside-down.svelte-1xmyxaa .PanoSpatialTagPlugin__tag-content.svelte-1xmyxaa{bottom:0}.PanoSpatialTagPlugin__tag-show.svelte-1xmyxaa .PanoSpatialTagPlugin__tag-flagpole.svelte-1xmyxaa{opacity:1;transform:translate(-50%, 0) scaleY(1)}.PanoSpatialTagPlugin__tag-upside-down.svelte-1xmyxaa .PanoSpatialTagPlugin__tag-shadow.svelte-1xmyxaa{top:unset;bottom:-15rem}.PanoSpatialTagPlugin__tag-show.svelte-1xmyxaa .PanoSpatialTagPlugin__tag-shadow.svelte-1xmyxaa{opacity:.32}.PanoSpatialTagPlugin__tag-show.svelte-1xmyxaa .PanoSpatialTagPlugin__tag-content.svelte-1xmyxaa{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-hide.svelte-1xmyxaa .PanoSpatialTagPlugin__tag-flagpole.svelte-1xmyxaa{opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform .5s .55s, opacity .4s .55s}.PanoSpatialTagPlugin__tag-hide.svelte-1xmyxaa .PanoSpatialTagPlugin__tag-shadow.svelte-1xmyxaa{opacity:0;transition:opacity .8s}.PanoSpatialTagPlugin__tag-hide.svelte-1xmyxaa .PanoSpatialTagPlugin__tag-content.svelte-1xmyxaa{transform:translate(-100%, 0);transition:transform .6s cubic-bezier(.53,.06,.88,.59)}.PanoSpatialTagPlugin__tag-hide.svelte-1xmyxaa .PanoSpatialTagPlugin__tag-content .svelte-1xmyxaa{pointer-events:none}.PanoSpatialTagPlugin__tag-hide.svelte-1xmyxaa .PanoSpatialTagPlugin__tag-line1.svelte-1xmyxaa{opacity:0.5;transform:translate(-50%, 10%) scaleY(0);animation:svelte-1xmyxaa-PanoSpatialTagPlugin__tag-line1-hide linear .28s forwards .3s}.PanoSpatialTagPlugin__tag-hide.svelte-1xmyxaa .PanoSpatialTagPlugin__tag-line2.svelte-1xmyxaa{opacity:0.5;transform:translate(-50%, 0) scaleY(0);animation:svelte-1xmyxaa-PanoSpatialTagPlugin__tag-line2-hide linear .28s forwards .45s}@keyframes svelte-1xmyxaa-PanoSpatialTagPlugin__tag-line1{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 135%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 20%) scaleY(0)}}@keyframes svelte-1xmyxaa-PanoSpatialTagPlugin__tag-line2{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 125%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}}@keyframes svelte-1xmyxaa-PanoSpatialTagPlugin__tag-line1-hide{0%{opacity:0.5;transform:translate(-50%, 10%) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 105%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}@keyframes svelte-1xmyxaa-PanoSpatialTagPlugin__tag-line2-hide{0%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 100%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}");
25
+ append_styles(target, "svelte-1c0xhg0", ".PanoSpatialTagPlugin__tag-x.svelte-1c0xhg0.svelte-1c0xhg0{position:relative;display:block;white-space:nowrap;box-sizing:border-box;width:25rem;height:14rem;color:#FFF;transform:translate(0, -100%);transition:height .5s linear}.PanoSpatialTagPlugin__tag-shadow.svelte-1c0xhg0.svelte-1c0xhg0{content:'';position:absolute;width:30rem;height:30rem;top:-15rem;left:-15rem;z-index:-1;opacity:0;transition:opacity .8s .6s;background:url('https://vrlab-image4.ljcdn.com/release/web/PanoSpatialTagPlugin__blur.png');background-size:30rem 30rem}.PanoSpatialTagPlugin__tag-line.svelte-1c0xhg0.svelte-1c0xhg0{position:absolute;left:-1rem;width:2rem;height:100%;overflow:hidden}.PanoSpatialTagPlugin__tag-flagpole.svelte-1c0xhg0.svelte-1c0xhg0{position:absolute;top:0;left:1rem;height:calc(100% - 1.5rem);width:.15rem;background:linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, .1));box-shadow:0 .1rem .5rem rgba(0, 0, 0, .2);opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform .4s cubic-bezier(.44,.44,.74,.98) , opacity .4s cubic-bezier(.44,.44,.74,.98), width .5s linear, height .5s linear ;transform-origin:center bottom}.PanoSpatialTagPlugin__tag-line1.svelte-1c0xhg0.svelte-1c0xhg0{position:absolute;top:0;left:0.3rem;height:1.8rem;width:.1rem;background:#fff;opacity:0;transform:translate(-50%, 200%) scaleY(0);transform-origin:center top}.PanoSpatialTagPlugin__tag-line2.svelte-1c0xhg0.svelte-1c0xhg0{position:absolute;top:0;left:0.5rem;height:1.8rem;width:.1rem;background:#fff;opacity:0;transform:translate(-50%, 200%) scaleY(0);transform-origin:center top}.PanoSpatialTagPlugin__tag-show.svelte-1c0xhg0 .PanoSpatialTagPlugin__tag-line1.svelte-1c0xhg0{animation:svelte-1c0xhg0-PanoSpatialTagPlugin__tag-line1 linear .5s forwards .45s}.PanoSpatialTagPlugin__tag-show.svelte-1c0xhg0 .PanoSpatialTagPlugin__tag-line2.svelte-1c0xhg0{animation:svelte-1c0xhg0-PanoSpatialTagPlugin__tag-line2 linear .5s forwards .65s}.PanoSpatialTagPlugin__tag-x.PanoSpatialTagPlugin__tag-upside-down.svelte-1c0xhg0.svelte-1c0xhg0{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-upside-down.svelte-1c0xhg0 .PanoSpatialTagPlugin__tag-line.svelte-1c0xhg0{transform:scaleY(-1)}.PanoSpatialTagPlugin__tag-animate.svelte-1c0xhg0.svelte-1c0xhg0{position:relative;height:100%;overflow:hidden;transform-origin:left top;transition:transform .5s linear}.PanoSpatialTagPlugin__tag-upside-down.svelte-1c0xhg0 .PanoSpatialTagPlugin__tag-animate.svelte-1c0xhg0{transform-origin:left bottom}.PanoSpatialTagPlugin__tag-content.svelte-1c0xhg0.svelte-1c0xhg0{position:absolute;display:inline-block;transform:translate(-100%, 0);transition:transform .9s cubic-bezier(0,.65,.16,1.08) .6s;padding-left:.5rem;font-size:1rem}.PanoSpatialTagPlugin__tag-upside-down.svelte-1c0xhg0 .PanoSpatialTagPlugin__tag-content.svelte-1c0xhg0{bottom:0}.PanoSpatialTagPlugin__tag-show.svelte-1c0xhg0 .PanoSpatialTagPlugin__tag-flagpole.svelte-1c0xhg0{opacity:1;transform:translate(-50%, 0) scaleY(1)}.PanoSpatialTagPlugin__tag-upside-down.svelte-1c0xhg0 .PanoSpatialTagPlugin__tag-shadow.svelte-1c0xhg0{top:unset;bottom:-15rem}.PanoSpatialTagPlugin__tag-show.svelte-1c0xhg0 .PanoSpatialTagPlugin__tag-shadow.svelte-1c0xhg0{opacity:.32}.PanoSpatialTagPlugin__tag-show.svelte-1c0xhg0 .PanoSpatialTagPlugin__tag-content.svelte-1c0xhg0{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-hide.svelte-1c0xhg0 .PanoSpatialTagPlugin__tag-flagpole.svelte-1c0xhg0{opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform .5s .55s, opacity .4s .55s}.PanoSpatialTagPlugin__tag-hide.svelte-1c0xhg0 .PanoSpatialTagPlugin__tag-shadow.svelte-1c0xhg0{opacity:0;transition:opacity .8s}.PanoSpatialTagPlugin__tag-hide.svelte-1c0xhg0 .PanoSpatialTagPlugin__tag-content.svelte-1c0xhg0{transform:translate(-100%, 0);transition:transform .6s cubic-bezier(.53,.06,.88,.59)}.PanoSpatialTagPlugin__tag-hide.svelte-1c0xhg0 .PanoSpatialTagPlugin__tag-content .svelte-1c0xhg0{pointer-events:none}.PanoSpatialTagPlugin__tag-hide.svelte-1c0xhg0 .PanoSpatialTagPlugin__tag-line1.svelte-1c0xhg0{opacity:0.5;transform:translate(-50%, 10%) scaleY(0);animation:svelte-1c0xhg0-PanoSpatialTagPlugin__tag-line1-hide linear .28s forwards .3s}.PanoSpatialTagPlugin__tag-hide.svelte-1c0xhg0 .PanoSpatialTagPlugin__tag-line2.svelte-1c0xhg0{opacity:0.5;transform:translate(-50%, 0) scaleY(0);animation:svelte-1c0xhg0-PanoSpatialTagPlugin__tag-line2-hide linear .28s forwards .45s}@keyframes svelte-1c0xhg0-PanoSpatialTagPlugin__tag-line1{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 135%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 20%) scaleY(0)}}@keyframes svelte-1c0xhg0-PanoSpatialTagPlugin__tag-line2{0%{opacity:0;transform:translate(-50%, 250%) scaleY(1)}50%{opacity:0.5;transform:translate(-50%, 125%) scaleY(1)}100%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}}@keyframes svelte-1c0xhg0-PanoSpatialTagPlugin__tag-line1-hide{0%{opacity:0.5;transform:translate(-50%, 10%) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 105%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}@keyframes svelte-1c0xhg0-PanoSpatialTagPlugin__tag-line2-hide{0%{opacity:0.5;transform:translate(-50%, 0) scaleY(0)}50%{opacity:0.2;transform:translate(-50%, 100%) scaleY(1)}100%{opacity:0;transform:translate(-50%, 200%) scaleY(0)}}");
26
26
  }
27
27
 
28
28
  function create_fragment(ctx) {
@@ -56,19 +56,19 @@ function create_fragment(ctx) {
56
56
  t3 = space();
57
57
  div3 = element("div");
58
58
  div2 = element("div");
59
- attr(div0, "class", "PanoSpatialTagPlugin__tag-shadow svelte-1xmyxaa");
59
+ attr(div0, "class", "PanoSpatialTagPlugin__tag-shadow svelte-1c0xhg0");
60
60
  set_style(div0, "transform", "translate(" + /*contentWidth*/ ctx[7] / 2 * /*contentZoom*/ ctx[3] * 3 + "px, " + /*contentHeight*/ ctx[8] / 2 * (/*upsideDown*/ ctx[1] ? -1 : 1) * /*contentZoom*/ ctx[3] * 3 + "px)");
61
- attr(i0, "class", "PanoSpatialTagPlugin__tag-flagpole svelte-1xmyxaa");
61
+ attr(i0, "class", "PanoSpatialTagPlugin__tag-flagpole svelte-1c0xhg0");
62
62
  set_style(i0, "width", /*lineWidthZoom*/ ctx[4] + "rem");
63
- attr(i1, "class", "PanoSpatialTagPlugin__tag-line1 svelte-1xmyxaa");
64
- attr(i2, "class", "PanoSpatialTagPlugin__tag-line2 svelte-1xmyxaa");
65
- attr(div1, "class", "PanoSpatialTagPlugin__tag-line svelte-1xmyxaa");
66
- attr(div2, "class", "PanoSpatialTagPlugin__tag-content svelte-1xmyxaa");
67
- attr(div3, "class", "PanoSpatialTagPlugin__tag-animate svelte-1xmyxaa");
63
+ attr(i1, "class", "PanoSpatialTagPlugin__tag-line1 svelte-1c0xhg0");
64
+ attr(i2, "class", "PanoSpatialTagPlugin__tag-line2 svelte-1c0xhg0");
65
+ attr(div1, "class", "PanoSpatialTagPlugin__tag-line svelte-1c0xhg0");
66
+ attr(div2, "class", "PanoSpatialTagPlugin__tag-content svelte-1c0xhg0");
67
+ attr(div3, "class", "PanoSpatialTagPlugin__tag-animate svelte-1c0xhg0");
68
68
  set_style(div3, "transform", "scale(" + /*contentZoom*/ ctx[3] * 3 + ")");
69
69
  attr(div4, "id", div4_id_value = 'PanoSpatialTagPlugin__' + /*id*/ ctx[0]);
70
70
  set_style(div4, "height", 20 * /*lineHeightZoom*/ ctx[5] + "rem");
71
- attr(div4, "class", "svelte-1xmyxaa");
71
+ attr(div4, "class", "svelte-1c0xhg0");
72
72
  toggle_class(div4, "PanoSpatialTagPlugin__tag-x", true);
73
73
  toggle_class(div4, "PanoSpatialTagPlugin__tag-upside-down", /*upsideDown*/ ctx[1]);
74
74
  toggle_class(div4, "PanoSpatialTagPlugin__tag-show", /*show*/ ctx[10]);
@@ -15,12 +15,13 @@ const MAX_DISTANCE = 3.5;
15
15
  * 空间游走标签插件
16
16
  */
17
17
  export const PanoSpatialTagPlugin = (five, params) => {
18
- let wrapper = params?.container;
19
- const wait = params?.wait ?? 200;
20
- const maxNumberOnScreen = params?.maxNumberOnScreen ?? 3;
21
- const minRad = params?.minRad ?? Math.PI / 4;
22
- const nearTolerance = params?.nearTolerance ?? 100;
23
- const upsideHeight = params?.upsideHeight ?? 1.6;
18
+ var _a, _b, _c, _d, _e, _f;
19
+ let wrapper = params === null || params === void 0 ? void 0 : params.container;
20
+ const wait = (_a = params === null || params === void 0 ? void 0 : params.wait) !== null && _a !== void 0 ? _a : 200;
21
+ const maxNumberOnScreen = (_b = params === null || params === void 0 ? void 0 : params.maxNumberOnScreen) !== null && _b !== void 0 ? _b : 3;
22
+ const minRad = (_c = params === null || params === void 0 ? void 0 : params.minRad) !== null && _c !== void 0 ? _c : Math.PI / 4;
23
+ const nearTolerance = (_d = params === null || params === void 0 ? void 0 : params.nearTolerance) !== null && _d !== void 0 ? _d : 100;
24
+ const upsideHeight = (_e = params === null || params === void 0 ? void 0 : params.upsideHeight) !== null && _e !== void 0 ? _e : 1.6;
24
25
  // const foldPercent = params?.foldPercent ?? 20
25
26
  const css3DRender = CSS3DRenderPlugin(five);
26
27
  const container = document.createElement('div');
@@ -278,12 +279,13 @@ export const PanoSpatialTagPlugin = (five, params) => {
278
279
  */
279
280
  const load = (data) => {
280
281
  state.points = data.points.map(point => {
282
+ var _a, _b;
281
283
  return {
282
284
  id: point.id,
283
285
  position: new THREE.Vector3().fromArray(point.position),
284
286
  normal: new THREE.Vector3().fromArray(point.normal),
285
- replacement: point.replacement ?? {},
286
- weight: point.weight ?? -1,
287
+ replacement: (_a = point.replacement) !== null && _a !== void 0 ? _a : {},
288
+ weight: (_b = point.weight) !== null && _b !== void 0 ? _b : -1,
287
289
  };
288
290
  });
289
291
  if (data.render)
@@ -371,7 +373,7 @@ export const PanoSpatialTagPlugin = (five, params) => {
371
373
  five.off('modeChange', onModeChange);
372
374
  five.off('cameraUpdate', onCameraUpdate);
373
375
  };
374
- if (five?.model?.loaded) {
376
+ if ((_f = five === null || five === void 0 ? void 0 : five.model) === null || _f === void 0 ? void 0 : _f.loaded) {
375
377
  if (!wrapper)
376
378
  wrapper = five.getElement().parentElement;
377
379
  wrapper.appendChild(container);
@@ -24,7 +24,7 @@ function add_css(target) {
24
24
  append_styles(target, "svelte-126ja8e", ".floorplan-plugin__base-image.svelte-126ja8e{position:absolute;z-index:10;width:100%;height:100%;pointer-events:none}");
25
25
  }
26
26
 
27
- // (12:22)
27
+ // (13:22)
28
28
  function create_if_block_1(ctx) {
29
29
  let normalimage;
30
30
  let current;
@@ -58,7 +58,7 @@ function create_if_block_1(ctx) {
58
58
  };
59
59
  }
60
60
 
61
- // (10:2) {#if svgContent}
61
+ // (11:2) {#if svgContent}
62
62
  function create_if_block(ctx) {
63
63
  let svgimage;
64
64
  let current;
@@ -186,6 +186,7 @@ function create_fragment(ctx) {
186
186
  function instance($$self, $$props, $$invalidate) {
187
187
  let imageData;
188
188
  let svgContent;
189
+ var _a, _b;
189
190
  let { floorIndex } = $$props;
190
191
  let { floorplanData } = $$props;
191
192
 
@@ -199,12 +200,16 @@ function instance($$self, $$props, $$invalidate) {
199
200
  $: $$invalidate(1, imageData = floorplanData.outlines[floorIndex]);
200
201
  }
201
202
 
202
- if ($$self.$$.dirty & /*floorplanData, floorIndex*/ 12) {
203
- $: $$invalidate(0, svgContent = floorplanData.outlines?.[floorIndex]?.svgContent);
203
+ if ($$self.$$.dirty & /*floorplanData, _a, floorIndex, _b*/ 60) {
204
+ $: $$invalidate(0, svgContent = $$invalidate(5, _b = $$invalidate(4, _a = floorplanData.outlines) === null || _a === void 0
205
+ ? void 0
206
+ : _a[floorIndex]) === null || _b === void 0
207
+ ? void 0
208
+ : _b.svgContent);
204
209
  }
205
210
  };
206
211
 
207
- return [svgContent, imageData, floorIndex, floorplanData];
212
+ return [svgContent, imageData, floorIndex, floorplanData, _a, _b];
208
213
  }
209
214
 
210
215
  class Component extends SvelteComponent {
@@ -206,7 +206,9 @@ function instance($$self, $$props, $$invalidate) {
206
206
  const { observers: floorplan_observers } = floorplanData;
207
207
 
208
208
  const handleClick = function (e) {
209
- if (onRoomHeightClick?.(e) === false) return;
209
+ if ((onRoomHeightClick === null || onRoomHeightClick === void 0
210
+ ? void 0
211
+ : onRoomHeightClick(e)) === false) return;
210
212
 
211
213
  // 因为 mouse.offsetX 的兼容性问题,手动计算 mouse offsetX offsetY
212
214
  const boundingClientRect = highlightContainerDom.getBoundingClientRect();
@@ -34,7 +34,7 @@ function get_each_context(ctx, list, i) {
34
34
  return child_ctx;
35
35
  }
36
36
 
37
- // (21:6) {:else}
37
+ // (18:6) {:else}
38
38
  function create_else_block(ctx) {
39
39
  let roommaterial_1;
40
40
  let current;
@@ -68,7 +68,7 @@ function create_else_block(ctx) {
68
68
  };
69
69
  }
70
70
 
71
- // (19:37)
71
+ // (16:37)
72
72
  function create_if_block_1(ctx) {
73
73
  let roommaterial_2;
74
74
  let current;
@@ -102,7 +102,7 @@ function create_if_block_1(ctx) {
102
102
  };
103
103
  }
104
104
 
105
- // (17:6) {#if room.floorType === 1}
105
+ // (14:6) {#if room.floorType === 1}
106
106
  function create_if_block(ctx) {
107
107
  let roommaterial_0;
108
108
  let current;
@@ -136,7 +136,7 @@ function create_if_block(ctx) {
136
136
  };
137
137
  }
138
138
 
139
- // (15:2) {#each rooms as room}
139
+ // (12:2) {#each rooms as room}
140
140
  function create_each_block(ctx) {
141
141
  let svg;
142
142
  let current_block_type_index;
@@ -308,8 +308,7 @@ function instance($$self, $$props, $$invalidate) {
308
308
 
309
309
  $$self.$$.update = () => {
310
310
  if ($$self.$$.dirty & /*floorplanData, floorIndex, pxmm*/ 14) {
311
- $: $$invalidate(0, rooms = floorplanData.floorDatas[floorIndex].rooms.map(room => ({
312
- ...room,
311
+ $: $$invalidate(0, rooms = floorplanData.floorDatas[floorIndex].rooms.map(room => Object.assign(Object.assign({}, room), {
313
312
  path: room.path.map(p => formatFloorplanPoint(p, pxmm, floorplanData.bounding))
314
313
  })));
315
314
  }
@@ -11,8 +11,10 @@ import {
11
11
  insert,
12
12
  noop,
13
13
  safe_not_equal,
14
+ set_data,
14
15
  set_style,
15
- space
16
+ space,
17
+ text
16
18
  } from "svelte/internal";
17
19
 
18
20
  import { COMPASS_IMAGE } from '../Assets/compass';
@@ -21,12 +23,13 @@ function add_css(target) {
21
23
  append_styles(target, "svelte-5l80pv", ".floorplan-plugin__compass.svelte-5l80pv{position:absolute;left:50%;top:-46px;width:231px;height:41px;will-change:opacity;transform-origin:center 184px}.floorplan-plugin__compass-image.svelte-5l80pv{width:100%;height:100%;position:absolute;left:0;top:0;opacity:0.1;background-repeat:no-repeat;background-size:100% 100%}.floorplan-plugin__compass-text.svelte-5l80pv{position:absolute;left:50%;top:15px;transform:translateX(-50%);opacity:0.2;font-weight:bold;font-size:10px;color:#fff}");
22
24
  }
23
25
 
24
- // (11:0) {#if northRad}
26
+ // (13:0) {#if northRad}
25
27
  function create_if_block(ctx) {
26
28
  let div1;
27
29
  let div0;
28
30
  let t0;
29
31
  let span;
32
+ let t1;
30
33
 
31
34
  return {
32
35
  c() {
@@ -34,20 +37,23 @@ function create_if_block(ctx) {
34
37
  div0 = element("div");
35
38
  t0 = space();
36
39
  span = element("span");
37
- span.textContent = "北";
40
+ t1 = text(/*northDesc*/ ctx[0]);
38
41
  attr(div0, "class", "floorplan-plugin__compass-image svelte-5l80pv");
39
42
  set_style(div0, "background-image", `url(${COMPASS_IMAGE})`);
40
43
  attr(span, "class", "floorplan-plugin__compass-text svelte-5l80pv");
41
44
  attr(div1, "class", "floorplan-plugin__compass svelte-5l80pv");
42
- set_style(div1, "transform", /*compassTransformStyle*/ ctx[1], false);
45
+ set_style(div1, "transform", /*compassTransformStyle*/ ctx[2], false);
43
46
  },
44
47
  m(target, anchor) {
45
48
  insert(target, div1, anchor);
46
49
  append(div1, div0);
47
50
  append(div1, t0);
48
51
  append(div1, span);
52
+ append(span, t1);
53
+ },
54
+ p(ctx, dirty) {
55
+ if (dirty & /*northDesc*/ 1) set_data(t1, /*northDesc*/ ctx[0]);
49
56
  },
50
- p: noop,
51
57
  d(detaching) {
52
58
  if (detaching) detach(div1);
53
59
  }
@@ -56,7 +62,7 @@ function create_if_block(ctx) {
56
62
 
57
63
  function create_fragment(ctx) {
58
64
  let if_block_anchor;
59
- let if_block = /*northRad*/ ctx[0] && create_if_block(ctx);
65
+ let if_block = /*northRad*/ ctx[1] && create_if_block(ctx);
60
66
 
61
67
  return {
62
68
  c() {
@@ -68,7 +74,7 @@ function create_fragment(ctx) {
68
74
  insert(target, if_block_anchor, anchor);
69
75
  },
70
76
  p(ctx, [dirty]) {
71
- if (/*northRad*/ ctx[0]) if_block.p(ctx, dirty);
77
+ if (/*northRad*/ ctx[1]) if_block.p(ctx, dirty);
72
78
  },
73
79
  i: noop,
74
80
  o: noop,
@@ -84,22 +90,29 @@ function rad2Deg(rad) {
84
90
  }
85
91
 
86
92
  function instance($$self, $$props, $$invalidate) {
93
+ var _a;
87
94
  let { floorplanData } = $$props;
88
- const northRad = floorplanData.entrance?.northRad;
95
+ let { northDesc } = $$props;
96
+
97
+ const northRad = (_a = floorplanData.entrance) === null || _a === void 0
98
+ ? void 0
99
+ : _a.northRad;
100
+
89
101
  const rotate = !northRad ? 0 : rad2Deg(northRad);
90
102
  const compassTransformStyle = `translateX(-50%) translateZ(10px) rotate(${-rotate + 90}deg)`;
91
103
 
92
104
  $$self.$$set = $$props => {
93
- if ('floorplanData' in $$props) $$invalidate(2, floorplanData = $$props.floorplanData);
105
+ if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
106
+ if ('northDesc' in $$props) $$invalidate(0, northDesc = $$props.northDesc);
94
107
  };
95
108
 
96
- return [northRad, compassTransformStyle, floorplanData];
109
+ return [northDesc, northRad, compassTransformStyle, floorplanData];
97
110
  }
98
111
 
99
112
  class Component extends SvelteComponent {
100
113
  constructor(options) {
101
114
  super();
102
- init(this, options, instance, create_fragment, safe_not_equal, { floorplanData: 2 }, add_css);
115
+ init(this, options, instance, create_fragment, safe_not_equal, { floorplanData: 3, northDesc: 0 }, add_css);
103
116
  }
104
117
  }
105
118