@realsee/dnalogel 2.0.0-alpha.32 → 2.0.0-alpha.34

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/components/index.js +1450 -0
  2. package/dist/ModelChassisCompassPlugin/index.js +5 -3
  3. package/dist/PanoSpatialTagPlugin/index.js +13 -11
  4. package/dist/components/PaintBrush/Controller.d.ts +43 -0
  5. package/dist/components/PaintBrush/Subscribe.d.ts +76 -0
  6. package/dist/components/PaintBrush/index.d.ts +27 -0
  7. package/dist/components/PaintBrush/style.d.ts +2 -0
  8. package/dist/components/PaintBrush/tween.d.ts +62 -0
  9. package/dist/components/PaintBrush/typings.d.ts +58 -0
  10. package/dist/components/PaintBrush/utils.d.ts +26 -0
  11. package/dist/components/index.d.ts +2 -0
  12. package/dist/floorplan/ModelFloorplanPlugin/index.js +7 -6
  13. package/dist/floorplan/TopviewFloorplanPlugin/index.js +7 -6
  14. package/dist/index.es.js +25 -20
  15. package/dist/index.js +25 -20
  16. package/dist/index.umd.js +25 -20
  17. package/dist/shared-utils/uuid.d.ts +1 -0
  18. package/docs/classes/Magnifier.html +4 -4
  19. package/docs/classes/ModelRoomLabelController.html +4 -4
  20. package/docs/classes/PanoFloorplanRadarPluginController.html +2 -2
  21. package/docs/enums/CameraMovementEffect.html +2 -2
  22. package/docs/enums/DIRECTION.html +1 -1
  23. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -1
  24. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
  25. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -1
  26. package/docs/enums/ModelFloorplanErrorType.html +1 -1
  27. package/docs/enums/Rotation.html +2 -2
  28. package/docs/index.html +1 -1
  29. package/docs/interfaces/CSS3DRenderPluginExportType.html +2 -2
  30. package/docs/interfaces/CameraMovementPluginExportType.html +2 -2
  31. package/docs/interfaces/FloorplanBounding.html +4 -4
  32. package/docs/interfaces/FloorplanData.html +2 -2
  33. package/docs/interfaces/FloorplanEntrance.html +7 -7
  34. package/docs/interfaces/FloorplanExtraObject.html +3 -3
  35. package/docs/interfaces/FloorplanExtraObject3D.html +2 -2
  36. package/docs/interfaces/FloorplanFloorData.html +2 -2
  37. package/docs/interfaces/FloorplanImagePosition.html +2 -2
  38. package/docs/interfaces/FloorplanObserver.html +2 -2
  39. package/docs/interfaces/FloorplanOutlineItem.html +2 -2
  40. package/docs/interfaces/FloorplanPosition.html +2 -2
  41. package/docs/interfaces/FloorplanRoomItem.html +6 -6
  42. package/docs/interfaces/FloorplanRoomLabelItem.html +3 -3
  43. package/docs/interfaces/FloorplanServerBounding.html +4 -4
  44. package/docs/interfaces/FloorplanServerComputedData.html +1 -1
  45. package/docs/interfaces/FloorplanServerData.html +2 -2
  46. package/docs/interfaces/FloorplanServerEntrance.html +7 -7
  47. package/docs/interfaces/FloorplanServerFloorData.html +2 -2
  48. package/docs/interfaces/FloorplanServerImagePosition.html +2 -2
  49. package/docs/interfaces/FloorplanServerObserver.html +2 -2
  50. package/docs/interfaces/FloorplanServerOutlineItem.html +2 -2
  51. package/docs/interfaces/FloorplanServerPosition.html +2 -2
  52. package/docs/interfaces/FloorplanServerRoomItem.html +7 -7
  53. package/docs/interfaces/FloorplanServerRoomLabelItem.html +3 -3
  54. package/docs/interfaces/ItemLabelPluginData.html +1 -1
  55. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -1
  56. package/docs/interfaces/ItemLabelPluginParametersType.html +1 -1
  57. package/docs/interfaces/LineJson.html +1 -1
  58. package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
  59. package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
  60. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
  61. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
  62. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
  63. package/docs/interfaces/ModelFloorplanParameterType.html +1 -1
  64. package/docs/interfaces/ModelFloorplanViewEvent.html +2 -2
  65. package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
  66. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
  67. package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
  68. package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
  69. package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
  70. package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
  71. package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
  72. package/docs/interfaces/ModelViewPluginExportType.html +1 -1
  73. package/docs/interfaces/OpenParameter.html +2 -2
  74. package/docs/interfaces/PanoCompassPluginData.html +1 -1
  75. package/docs/interfaces/PanoCompassPluginParameterType.html +1 -1
  76. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
  77. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
  78. package/docs/interfaces/PanoFloorplanRadarPluginControllerParameter.html +1 -1
  79. package/docs/interfaces/PanoMeasureParameterType.html +1 -1
  80. package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
  81. package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
  82. package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
  83. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -1
  84. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -1
  85. package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
  86. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -1
  87. package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
  88. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -1
  89. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
  90. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -1
  91. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -1
  92. package/docs/interfaces/Point.html +1 -1
  93. package/docs/interfaces/PointJson.html +1 -1
  94. package/docs/interfaces/Room.html +1 -1
  95. package/docs/interfaces/RoomInfo.html +1 -1
  96. package/docs/interfaces/RoomLabel.html +7 -7
  97. package/docs/interfaces/RoomRules.html +1 -1
  98. package/docs/interfaces/Rooms.html +1 -1
  99. package/docs/interfaces/TopviewFloorplanPluginParameterType.html +9 -9
  100. package/docs/modules.html +20 -20
  101. package/libs/ModelChassisCompassPlugin/Plugin.js +5 -3
  102. package/libs/PanoSpatialTagPlugin/Components/tag.js +9 -9
  103. package/libs/PanoSpatialTagPlugin/Plugin.js +4 -2
  104. package/libs/components/PaintBrush/Controller.d.ts +43 -0
  105. package/libs/components/PaintBrush/Controller.js +575 -0
  106. package/libs/components/PaintBrush/Subscribe.d.ts +76 -0
  107. package/libs/components/PaintBrush/Subscribe.js +121 -0
  108. package/libs/components/PaintBrush/index.d.ts +27 -0
  109. package/libs/components/PaintBrush/index.js +57 -0
  110. package/libs/components/PaintBrush/style.d.ts +2 -0
  111. package/libs/components/PaintBrush/style.js +102 -0
  112. package/libs/components/PaintBrush/tween.d.ts +62 -0
  113. package/libs/components/PaintBrush/tween.js +15 -0
  114. package/libs/components/PaintBrush/typings.d.ts +58 -0
  115. package/libs/components/PaintBrush/typings.js +6 -0
  116. package/libs/components/PaintBrush/utils.d.ts +26 -0
  117. package/libs/components/PaintBrush/utils.js +51 -0
  118. package/libs/components/index.d.ts +2 -0
  119. package/libs/components/index.js +3 -0
  120. package/libs/floorplan/Components/Compass.js +7 -6
  121. package/libs/shared-utils/uuid.d.ts +1 -0
  122. package/libs/shared-utils/uuid.js +1 -0
  123. package/package.json +4 -2
@@ -72,14 +72,16 @@ function transfromToMeshBasicMaterial(object, options) {
72
72
  * 模型底盘指南针插件
73
73
  */
74
74
  const ModelChassisCompassPlugin = (five, params) => {
75
+ var _a;
75
76
  const defaultFbxUrl = params.fbx_url || '//vrlab-static.ljcdn.com/release/web/v3/dipan3/dipan.FBX';
76
- const defaultNorthRad = params.north_rad || undefined;
77
+ const defaultNorthRad = (_a = params.north_rad) !== null && _a !== void 0 ? _a : undefined;
77
78
  // 局部状态
78
79
  const state = {};
79
80
  const load = async (data) => {
81
+ var _a;
80
82
  const fbxUrl = (data === null || data === void 0 ? void 0 : data.fbx_url) || defaultFbxUrl;
81
- const northRad = (data === null || data === void 0 ? void 0 : data.north_rad) || defaultNorthRad;
82
- if (!northRad) {
83
+ const northRad = (_a = data === null || data === void 0 ? void 0 : data.north_rad) !== null && _a !== void 0 ? _a : defaultNorthRad;
84
+ if (typeof northRad !== 'number') {
83
85
  throw new Error('"northRad"配置参数缺失:未配置指南针指向!');
84
86
  }
85
87
  const bounding = five.model.bounding;
@@ -388,7 +388,7 @@ class Origins extends internal.SvelteComponent {
388
388
  /* src/PanoSpatialTagPlugin/Components/tag.svelte generated by Svelte v3.47.0 */
389
389
 
390
390
  function add_css(target) {
391
- internal.append_styles(target, "svelte-1wukaol", ".PanoSpatialTagPlugin__tag-x.svelte-1wukaol.svelte-1wukaol{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-1wukaol.svelte-1wukaol{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-1wukaol.svelte-1wukaol{position:absolute;left:-1rem;width:2rem;height:100%;overflow:hidden}.PanoSpatialTagPlugin__tag-flagpole.svelte-1wukaol.svelte-1wukaol{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-1wukaol.svelte-1wukaol{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-1wukaol.svelte-1wukaol{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-1wukaol .PanoSpatialTagPlugin__tag-line1.svelte-1wukaol{-webkit-animation:svelte-1wukaol-PanoSpatialTagPlugin__tag-line1 linear .5s forwards .45s;animation:svelte-1wukaol-PanoSpatialTagPlugin__tag-line1 linear .5s forwards .45s}.PanoSpatialTagPlugin__tag-show.svelte-1wukaol .PanoSpatialTagPlugin__tag-line2.svelte-1wukaol{-webkit-animation:svelte-1wukaol-PanoSpatialTagPlugin__tag-line2 linear .5s forwards .65s;animation:svelte-1wukaol-PanoSpatialTagPlugin__tag-line2 linear .5s forwards .65s}.PanoSpatialTagPlugin__tag-x.PanoSpatialTagPlugin__tag-upside-down.svelte-1wukaol.svelte-1wukaol{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-upside-down.svelte-1wukaol .PanoSpatialTagPlugin__tag-line.svelte-1wukaol{transform:scaleY(-1)}.PanoSpatialTagPlugin__tag-animate.svelte-1wukaol.svelte-1wukaol{position:relative;height:100%;overflow:hidden;transform-origin:left top;transition:transform .5s linear}.PanoSpatialTagPlugin__tag-upside-down.svelte-1wukaol .PanoSpatialTagPlugin__tag-animate.svelte-1wukaol{transform-origin:left bottom}.PanoSpatialTagPlugin__tag-content.svelte-1wukaol.svelte-1wukaol{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-1wukaol .PanoSpatialTagPlugin__tag-content.svelte-1wukaol{bottom:0}.PanoSpatialTagPlugin__tag-show.svelte-1wukaol .PanoSpatialTagPlugin__tag-flagpole.svelte-1wukaol{opacity:1;transform:translate(-50%, 0) scaleY(1)}.PanoSpatialTagPlugin__tag-upside-down.svelte-1wukaol .PanoSpatialTagPlugin__tag-shadow.svelte-1wukaol{top:unset;bottom:-15rem}.PanoSpatialTagPlugin__tag-show.svelte-1wukaol .PanoSpatialTagPlugin__tag-shadow.svelte-1wukaol{opacity:.32}.PanoSpatialTagPlugin__tag-show.svelte-1wukaol .PanoSpatialTagPlugin__tag-content.svelte-1wukaol{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-hide.svelte-1wukaol .PanoSpatialTagPlugin__tag-flagpole.svelte-1wukaol{opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform .5s .55s, opacity .4s .55s}.PanoSpatialTagPlugin__tag-hide.svelte-1wukaol .PanoSpatialTagPlugin__tag-shadow.svelte-1wukaol{opacity:0;transition:opacity .8s}.PanoSpatialTagPlugin__tag-hide.svelte-1wukaol .PanoSpatialTagPlugin__tag-content.svelte-1wukaol{transform:translate(-100%, 0);transition:transform .6s cubic-bezier(.53,.06,.88,.59)}.PanoSpatialTagPlugin__tag-hide.svelte-1wukaol .PanoSpatialTagPlugin__tag-content .svelte-1wukaol{pointer-events:none}.PanoSpatialTagPlugin__tag-hide.svelte-1wukaol .PanoSpatialTagPlugin__tag-line1.svelte-1wukaol{opacity:0.5;transform:translate(-50%, 10%) scaleY(0);-webkit-animation:svelte-1wukaol-PanoSpatialTagPlugin__tag-line1-hide linear .28s forwards .3s;animation:svelte-1wukaol-PanoSpatialTagPlugin__tag-line1-hide linear .28s forwards .3s}.PanoSpatialTagPlugin__tag-hide.svelte-1wukaol .PanoSpatialTagPlugin__tag-line2.svelte-1wukaol{opacity:0.5;transform:translate(-50%, 0) scaleY(0);-webkit-animation:svelte-1wukaol-PanoSpatialTagPlugin__tag-line2-hide linear .28s forwards .45s;animation:svelte-1wukaol-PanoSpatialTagPlugin__tag-line2-hide linear .28s forwards .45s}@-webkit-keyframes svelte-1wukaol-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-1wukaol-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)}}@-webkit-keyframes svelte-1wukaol-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-1wukaol-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)}}@-webkit-keyframes svelte-1wukaol-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-1wukaol-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)}}@-webkit-keyframes svelte-1wukaol-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)}}@keyframes svelte-1wukaol-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)}}");
391
+ internal.append_styles(target, "svelte-eb8bdm", ".PanoSpatialTagPlugin__tag-x.svelte-eb8bdm.svelte-eb8bdm{position:absolute;top:0;left:0;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-eb8bdm.svelte-eb8bdm{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-eb8bdm.svelte-eb8bdm{position:absolute;left:-1rem;width:2rem;height:100%;overflow:hidden}.PanoSpatialTagPlugin__tag-flagpole.svelte-eb8bdm.svelte-eb8bdm{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-eb8bdm.svelte-eb8bdm{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-eb8bdm.svelte-eb8bdm{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-eb8bdm .PanoSpatialTagPlugin__tag-line1.svelte-eb8bdm{-webkit-animation:svelte-eb8bdm-PanoSpatialTagPlugin__tag-line1 linear .5s forwards .45s;animation:svelte-eb8bdm-PanoSpatialTagPlugin__tag-line1 linear .5s forwards .45s}.PanoSpatialTagPlugin__tag-show.svelte-eb8bdm .PanoSpatialTagPlugin__tag-line2.svelte-eb8bdm{-webkit-animation:svelte-eb8bdm-PanoSpatialTagPlugin__tag-line2 linear .5s forwards .65s;animation:svelte-eb8bdm-PanoSpatialTagPlugin__tag-line2 linear .5s forwards .65s}.PanoSpatialTagPlugin__tag-x.PanoSpatialTagPlugin__tag-upside-down.svelte-eb8bdm.svelte-eb8bdm{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-upside-down.svelte-eb8bdm .PanoSpatialTagPlugin__tag-line.svelte-eb8bdm{transform:scaleY(-1)}.PanoSpatialTagPlugin__tag-animate.svelte-eb8bdm.svelte-eb8bdm{position:relative;height:100%;overflow:hidden;transform-origin:left top;transition:transform .5s linear}.PanoSpatialTagPlugin__tag-upside-down.svelte-eb8bdm .PanoSpatialTagPlugin__tag-animate.svelte-eb8bdm{transform-origin:left bottom}.PanoSpatialTagPlugin__tag-content.svelte-eb8bdm.svelte-eb8bdm{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-eb8bdm .PanoSpatialTagPlugin__tag-content.svelte-eb8bdm{bottom:0}.PanoSpatialTagPlugin__tag-show.svelte-eb8bdm .PanoSpatialTagPlugin__tag-flagpole.svelte-eb8bdm{opacity:1;transform:translate(-50%, 0) scaleY(1)}.PanoSpatialTagPlugin__tag-upside-down.svelte-eb8bdm .PanoSpatialTagPlugin__tag-shadow.svelte-eb8bdm{top:unset;bottom:-15rem}.PanoSpatialTagPlugin__tag-show.svelte-eb8bdm .PanoSpatialTagPlugin__tag-shadow.svelte-eb8bdm{opacity:.32}.PanoSpatialTagPlugin__tag-show.svelte-eb8bdm .PanoSpatialTagPlugin__tag-content.svelte-eb8bdm{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-hide.svelte-eb8bdm .PanoSpatialTagPlugin__tag-flagpole.svelte-eb8bdm{opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform .5s .55s, opacity .4s .55s}.PanoSpatialTagPlugin__tag-hide.svelte-eb8bdm .PanoSpatialTagPlugin__tag-shadow.svelte-eb8bdm{opacity:0;transition:opacity .8s}.PanoSpatialTagPlugin__tag-hide.svelte-eb8bdm .PanoSpatialTagPlugin__tag-content.svelte-eb8bdm{transform:translate(-100%, 0);transition:transform .6s cubic-bezier(.53,.06,.88,.59)}.PanoSpatialTagPlugin__tag-hide.svelte-eb8bdm .PanoSpatialTagPlugin__tag-content .svelte-eb8bdm{pointer-events:none}.PanoSpatialTagPlugin__tag-hide.svelte-eb8bdm .PanoSpatialTagPlugin__tag-line1.svelte-eb8bdm{opacity:0.5;transform:translate(-50%, 10%) scaleY(0);-webkit-animation:svelte-eb8bdm-PanoSpatialTagPlugin__tag-line1-hide linear .28s forwards .3s;animation:svelte-eb8bdm-PanoSpatialTagPlugin__tag-line1-hide linear .28s forwards .3s}.PanoSpatialTagPlugin__tag-hide.svelte-eb8bdm .PanoSpatialTagPlugin__tag-line2.svelte-eb8bdm{opacity:0.5;transform:translate(-50%, 0) scaleY(0);-webkit-animation:svelte-eb8bdm-PanoSpatialTagPlugin__tag-line2-hide linear .28s forwards .45s;animation:svelte-eb8bdm-PanoSpatialTagPlugin__tag-line2-hide linear .28s forwards .45s}@-webkit-keyframes svelte-eb8bdm-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-eb8bdm-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)}}@-webkit-keyframes svelte-eb8bdm-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-eb8bdm-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)}}@-webkit-keyframes svelte-eb8bdm-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-eb8bdm-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)}}@-webkit-keyframes svelte-eb8bdm-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)}}@keyframes svelte-eb8bdm-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)}}");
392
392
  }
393
393
 
394
394
  function create_fragment(ctx) {
@@ -422,19 +422,19 @@ function create_fragment(ctx) {
422
422
  t3 = internal.space();
423
423
  div3 = internal.element("div");
424
424
  div2 = internal.element("div");
425
- internal.attr(div0, "class", "PanoSpatialTagPlugin__tag-shadow svelte-1wukaol");
425
+ internal.attr(div0, "class", "PanoSpatialTagPlugin__tag-shadow svelte-eb8bdm");
426
426
  internal.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)");
427
- internal.attr(i0, "class", "PanoSpatialTagPlugin__tag-flagpole svelte-1wukaol");
427
+ internal.attr(i0, "class", "PanoSpatialTagPlugin__tag-flagpole svelte-eb8bdm");
428
428
  internal.set_style(i0, "width", /*lineWidthZoom*/ ctx[4] + "rem");
429
- internal.attr(i1, "class", "PanoSpatialTagPlugin__tag-line1 svelte-1wukaol");
430
- internal.attr(i2, "class", "PanoSpatialTagPlugin__tag-line2 svelte-1wukaol");
431
- internal.attr(div1, "class", "PanoSpatialTagPlugin__tag-line svelte-1wukaol");
432
- internal.attr(div2, "class", "PanoSpatialTagPlugin__tag-content svelte-1wukaol");
433
- internal.attr(div3, "class", "PanoSpatialTagPlugin__tag-animate svelte-1wukaol");
429
+ internal.attr(i1, "class", "PanoSpatialTagPlugin__tag-line1 svelte-eb8bdm");
430
+ internal.attr(i2, "class", "PanoSpatialTagPlugin__tag-line2 svelte-eb8bdm");
431
+ internal.attr(div1, "class", "PanoSpatialTagPlugin__tag-line svelte-eb8bdm");
432
+ internal.attr(div2, "class", "PanoSpatialTagPlugin__tag-content svelte-eb8bdm");
433
+ internal.attr(div3, "class", "PanoSpatialTagPlugin__tag-animate svelte-eb8bdm");
434
434
  internal.set_style(div3, "transform", "scale(" + /*contentZoom*/ ctx[3] * 3 + ")");
435
435
  internal.attr(div4, "id", div4_id_value = 'PanoSpatialTagPlugin__' + /*id*/ ctx[0]);
436
436
  internal.set_style(div4, "height", 20 * /*lineHeightZoom*/ ctx[5] + "rem");
437
- internal.attr(div4, "class", "svelte-1wukaol");
437
+ internal.attr(div4, "class", "svelte-eb8bdm");
438
438
  internal.toggle_class(div4, "PanoSpatialTagPlugin__tag-x", true);
439
439
  internal.toggle_class(div4, "PanoSpatialTagPlugin__tag-upside-down", /*upsideDown*/ ctx[1]);
440
440
  internal.toggle_class(div4, "PanoSpatialTagPlugin__tag-show", /*show*/ ctx[10]);
@@ -1257,7 +1257,8 @@ const PanoSpatialTagPlugin = (five$1, params) => {
1257
1257
  if ((_f = five$1 === null || five$1 === void 0 ? void 0 : five$1.model) === null || _f === void 0 ? void 0 : _f.loaded) {
1258
1258
  if (!wrapper)
1259
1259
  wrapper = five$1.getElement().parentElement;
1260
- wrapper.appendChild(container);
1260
+ if (wrapper)
1261
+ wrapper.appendChild(container);
1261
1262
  state.forbidden = false;
1262
1263
  updateTags();
1263
1264
  five$1.on('panoWillArrive', onPanoWillArrive);
@@ -1269,7 +1270,8 @@ const PanoSpatialTagPlugin = (five$1, params) => {
1269
1270
  five$1.once('modelLoaded', () => {
1270
1271
  if (!wrapper)
1271
1272
  wrapper = five$1.getElement().parentElement;
1272
- wrapper.appendChild(container);
1273
+ if (wrapper)
1274
+ wrapper.appendChild(container);
1273
1275
  state.forbidden = false;
1274
1276
  updateTags();
1275
1277
  five$1.on('panoWillArrive', onPanoWillArrive);
@@ -0,0 +1,43 @@
1
+ import { noop } from './utils';
2
+ import { PaintBrushAction, PaintBrushConfigs, PaintBrushEventMap, PaintBrushState } from './typings';
3
+ import { Subscribe } from './Subscribe';
4
+ export declare class Controller extends Subscribe<PaintBrushEventMap> {
5
+ configs: PaintBrushConfigs;
6
+ private clientWidth;
7
+ private clientHeight;
8
+ private ready;
9
+ private uuid;
10
+ private tween?;
11
+ private tweening;
12
+ private container;
13
+ private canvas;
14
+ private data;
15
+ private tempLine;
16
+ get color(): string;
17
+ get state(): Record<string, PaintBrushState[]>;
18
+ get dpr(): number;
19
+ constructor(configs: PaintBrushConfigs);
20
+ ifInsertToDOM(): HTMLDivElement;
21
+ /**
22
+ *
23
+ * @param className 初始化画板
24
+ * @returns
25
+ */
26
+ initCanvas(className: string): HTMLCanvasElement;
27
+ /**
28
+ * 初始化操作面板
29
+ * @returns
30
+ */
31
+ initCtrl(): HTMLDivElement;
32
+ openBrush(): void;
33
+ closeBrush(): void;
34
+ updateCurrentColor(color: string): void;
35
+ openBrushHandle(): void;
36
+ emitStateChange(action: PaintBrushAction, userAction?: boolean): void;
37
+ action(action: PaintBrushAction): void;
38
+ handleDrawLine(_uuid: string, data: PaintBrushState, { withUndo }: {
39
+ withUndo?: boolean;
40
+ }, callback?: typeof noop): void;
41
+ handleUndo(uuid: string): void;
42
+ destroyBrush(): void;
43
+ }
@@ -0,0 +1,76 @@
1
+ export declare type EventMap = {
2
+ [name: string]: (...args: any[]) => void | boolean;
3
+ };
4
+ /**
5
+ * 监听者模式
6
+ * @template T 预设的监听回调类型
7
+ * @example
8
+ * ```
9
+ * new Subscribe<{
10
+ * "foo": [arg1: number, arg2: string],
11
+ * "bar": [arg: boolean],
12
+ * }>()
13
+ * ```
14
+ */
15
+ declare class Subscribe<T extends EventMap> {
16
+ /**
17
+ * 判断是否注册了事件
18
+ * @param name 事件类型
19
+ */
20
+ hasListener(name: keyof T): boolean;
21
+ /**
22
+ * 注册事件
23
+ * @param name 事件类型
24
+ * @param callback 事件回调函数
25
+ * @param once 是否只执行一次
26
+ * @returns 解除事件
27
+ * @template K 预设的监听事件名称
28
+ * @template C 回调函数函数上下文
29
+ */
30
+ on<K extends keyof T>(name: K, callback: (...args: Parameters<T[K]>) => ReturnType<T[K]>, once?: boolean): () => void;
31
+ /**
32
+ * 注册事件(是否只执行一次)
33
+ * @param name 事件类型
34
+ * @param callback 事件回调函数
35
+ * @returns 解除事件
36
+ * @template K 预设的监听事件名称
37
+ * @template C 回调函数函数上下文
38
+ */
39
+ once<K extends keyof T>(name: K, callback: (...args: Parameters<T[K]>) => ReturnType<T[K]>): () => void;
40
+ /**
41
+ * 解除事件
42
+ *
43
+ * 如果 name 不传的话解除对应所有事件
44
+ * 如果 name, callback 不传的话解除所有name的所有事件
45
+ * @param name 事件类型
46
+ * @param callback 事件回调函数
47
+ * @template K 预设的监听事件名称
48
+ */
49
+ off<K extends keyof T>(name?: K, callback?: (...args: Parameters<T[K]>) => ReturnType<T[K]>): void;
50
+ /**
51
+ * 触发事件
52
+ * @param name 事件类型
53
+ * @param data 触发事件的数据
54
+ * @returns canceled 是否被触发取消
55
+ * @template K 预设的监听事件名称
56
+ */
57
+ emit<K extends keyof T>(name: K, ...data: Parameters<T[K]>): boolean;
58
+ }
59
+ export declare namespace SubscribeMixinType {
60
+ interface hasListener<T extends EventMap> {
61
+ (name: keyof T): boolean;
62
+ }
63
+ interface on<T extends EventMap> {
64
+ <K extends keyof T>(name: K, callback: (...args: Parameters<T[K]>) => ReturnType<T[K]>, once?: boolean): () => void;
65
+ }
66
+ interface once<T extends EventMap> {
67
+ <K extends keyof T>(name: K, callback: (...args: Parameters<T[K]>) => ReturnType<T[K]>): () => void;
68
+ }
69
+ interface off<T extends EventMap> {
70
+ <K extends keyof T>(names?: K | K[], callback?: (...args: any[]) => any): void;
71
+ }
72
+ interface emit<T extends EventMap> {
73
+ <K extends keyof T>(name: K, ...data: Parameters<T[K]>): boolean;
74
+ }
75
+ }
76
+ export { Subscribe };
@@ -0,0 +1,27 @@
1
+ import type { PaintBrushAction, PaintBrushConfigs, PaintBrushEventMap, PaintBrushState } from './typings';
2
+ export declare class PaintBrush {
3
+ private controller;
4
+ constructor(configs?: Partial<PaintBrushConfigs>);
5
+ on<K extends keyof PaintBrushEventMap>(name: K, callback: (...args: Parameters<PaintBrushEventMap[K]>) => ReturnType<PaintBrushEventMap[K]>): void;
6
+ off<K extends keyof PaintBrushEventMap>(name: K, callback: (...args: Parameters<PaintBrushEventMap[K]>) => ReturnType<PaintBrushEventMap[K]>): void;
7
+ once<K extends keyof PaintBrushEventMap>(name: K, callback: (...args: Parameters<PaintBrushEventMap[K]>) => ReturnType<PaintBrushEventMap[K]>): void;
8
+ /**
9
+ * 显示画笔。
10
+ */
11
+ show(): void;
12
+ action(action: PaintBrushAction): void;
13
+ /**
14
+ * 获取画笔状态。
15
+ */
16
+ get state(): Record<string, PaintBrushState[]>;
17
+ get configs(): PaintBrushConfigs;
18
+ /**
19
+ * 销毁。
20
+ *
21
+ * @deprecated
22
+ *
23
+ * @description 画笔应该维护一个 **全局单例**,重复利用。
24
+ */
25
+ dispose(): void;
26
+ setCurrentColor(color: string): void;
27
+ }
@@ -0,0 +1,2 @@
1
+ declare const PaintBrushStyle = "\n<style type=\"text/css\">\n\n#_gl_paintBrush {\nposition: fixed;\ntop: 0;\nbottom: 0;\nleft: 0;\nright: 0;\ntransform: translateZ(0);\nz-index: 1997;\npointer-events: none;\nopacity: 0;\ntransition: all 500ms;\n}\n\n#_gl_paintBrush.brushing {\n opacity: 1;\n}\n\n#_gl_paintBrush ._paintBrush-canvas {\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n}\n\n#_gl_paintBrush ._paintBrush-canvas--sync {\n pointer-events: none;\n z-index: 0;\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n}\n\n#_gl_paintBrush ._paintBrush-canvas {\n pointer-events: none;\n z-index: 1;\n}\n\n#_gl_paintBrush.brushing ._paintBrush-canvas {\n pointer-events: auto;\n}\n\n#_gl_paintBrush ._paintBrush-ctrl {\n width: 140px;\n height: 52px;\n position: absolute;\n bottom: 28px;\n right: 50%;\n transform: translateX(50%);\n font-size: 10px;\n color: white;\n z-index: 2;\n}\n\n#_gl_paintBrush.brushing ._paintBrush-ctrl {\n pointer-events: auto;\n}\n\n#_gl_paintBrush ._paintBrush-ctrl ._paintBrush-ctrlinner {\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n height: 100%;\n border-radius: 26px;\n padding: 8px 16px;\n box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.2);\n background-image: linear-gradient(180deg, hsl(0deg 0% 0% / 57%), hsl(0deg 0% 0% / 70%) 117%);\n}\n\n._paintBrush-ctrlitem {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 38px;\n height: 38px;\n cursor: pointer;\n}\n\n._paintBrush-ctrlitem--undo >.brush-icon{\n background-image: url(\"//vrlab-static.ljcdn.com/release/web/revoke.ab7694ef.svg\");\n background-size: 100%;\n width: 22px;\n height: 22px;\n}\n\n._paintBrush-ctrlitem--close >.brush-icon {\n background-image: url(\"//vrlab-static.ljcdn.com/release/web/exit_paintbrush.02bc1341.svg\");\n background-size: 100%;\n width: 22px;\n height: 22px;\n}\n\n</style>\n";
2
+ export default PaintBrushStyle;
@@ -0,0 +1,62 @@
1
+ import { Tween } from '@tweenjs/tween.js';
2
+ export declare const Easing: {
3
+ Linear: {
4
+ None: (amount: number) => number;
5
+ };
6
+ Quadratic: {
7
+ In: (amount: number) => number;
8
+ Out: (amount: number) => number;
9
+ InOut: (amount: number) => number;
10
+ };
11
+ Cubic: {
12
+ In: (amount: number) => number;
13
+ Out: (amount: number) => number;
14
+ InOut: (amount: number) => number;
15
+ };
16
+ Quartic: {
17
+ In: (amount: number) => number;
18
+ Out: (amount: number) => number;
19
+ InOut: (amount: number) => number;
20
+ };
21
+ Quintic: {
22
+ In: (amount: number) => number;
23
+ Out: (amount: number) => number;
24
+ InOut: (amount: number) => number;
25
+ };
26
+ Sinusoidal: {
27
+ In: (amount: number) => number;
28
+ Out: (amount: number) => number;
29
+ InOut: (amount: number) => number;
30
+ };
31
+ Exponential: {
32
+ In: (amount: number) => number;
33
+ Out: (amount: number) => number;
34
+ InOut: (amount: number) => number;
35
+ };
36
+ Circular: {
37
+ In: (amount: number) => number;
38
+ Out: (amount: number) => number;
39
+ InOut: (amount: number) => number;
40
+ };
41
+ Elastic: {
42
+ In: (amount: number) => number;
43
+ Out: (amount: number) => number;
44
+ InOut: (amount: number) => number;
45
+ };
46
+ Back: {
47
+ In: (amount: number) => number;
48
+ Out: (amount: number) => number;
49
+ InOut: (amount: number) => number;
50
+ };
51
+ Bounce: {
52
+ In: (amount: number) => number;
53
+ Out: (amount: number) => number;
54
+ InOut: (amount: number) => number;
55
+ };
56
+ };
57
+ export interface TweenRes extends Tween<any> {
58
+ onDestroy: (fn: () => void) => any;
59
+ destroy: () => any;
60
+ }
61
+ export default function tween(from: any, to: any, duration: number, easing?: (amount: number) => number): TweenRes;
62
+ export declare function tweenProgress(duration: number, easing: (amount: number) => number): TweenRes;
@@ -0,0 +1,58 @@
1
+ export interface PaintBrushConfigs {
2
+ container?: HTMLDivElement;
3
+ currentColor: string;
4
+ DPR?: number;
5
+ onClickClose?: () => void;
6
+ onClickUndo?: () => void;
7
+ onUndoText?: string;
8
+ onExitText?: string;
9
+ }
10
+ export declare type PaintBrushEventMap = {
11
+ readyChange: (ready: boolean) => void;
12
+ stateChange: (state: PaintBrushAction, userAction: boolean) => void;
13
+ };
14
+ export interface PaintBrushState {
15
+ move: {
16
+ x: number;
17
+ y: number;
18
+ };
19
+ line: {
20
+ x: number;
21
+ y: number;
22
+ }[];
23
+ color: string;
24
+ uuid: string;
25
+ duration: number;
26
+ }
27
+ export declare enum PaintBrushTypeEnum {
28
+ Drawline = "Drawline",
29
+ Undo = "Undo",
30
+ Exit = "Exit"
31
+ }
32
+ export interface PaintBrushAction {
33
+ uuid: string;
34
+ /**
35
+ * 类型枚举
36
+ */
37
+ type: PaintBrushTypeEnum;
38
+ /**
39
+ * 颜色色值
40
+ */
41
+ color: string;
42
+ /**
43
+ * 是否就绪
44
+ */
45
+ ready: boolean;
46
+ /**
47
+ * 状态值
48
+ */
49
+ state?: PaintBrushState;
50
+ /**
51
+ * 时间戳:当作 uuid 使用
52
+ */
53
+ timestamp?: number;
54
+ /**
55
+ * 是否是结尾数据
56
+ */
57
+ end?: boolean;
58
+ }
@@ -0,0 +1,26 @@
1
+ export declare function noop(): void;
2
+ export interface Coords {
3
+ x: number;
4
+ y: number;
5
+ }
6
+ export declare function queue(promiseCallback?: () => Promise<void>): void;
7
+ export declare function transformCoords(coords: Coords, cw: number, ch: number): {
8
+ x: number;
9
+ y: number;
10
+ };
11
+ export declare function unTransformCoords(coords: Coords, cw: number, ch: number): {
12
+ x: number;
13
+ y: number;
14
+ };
15
+ export declare function getQuadraticCurvePoint(points: Coords[]): {
16
+ control?: undefined;
17
+ end?: undefined;
18
+ } | {
19
+ control: Coords;
20
+ end: {
21
+ x: number;
22
+ y: number;
23
+ };
24
+ };
25
+ export declare function execInterval(i: number, time: number, callback?: typeof noop): void;
26
+ export declare function nextFrame(fn: FrameRequestCallback, delay?: number): void;
@@ -0,0 +1,2 @@
1
+ export * from './PaintBrush';
2
+ export * from './PaintBrush/typings';
@@ -207,7 +207,7 @@ function add_css$c(target) {
207
207
  internal.append_styles(target, "svelte-1q44ru9", ".floorplan-plugin__compass.svelte-1q44ru9{position:absolute;left:50%;top:-2.39583rem;width:12.03125rem;height:2.13542rem;will-change:opacity;transform-origin:center 9.58333rem}.floorplan-plugin__compass-image.svelte-1q44ru9{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-1q44ru9{position:absolute;left:50%;top:0.78125rem;transform:translateX(-50%);opacity:0.2;font-weight:bold;font-size:0.52083rem;color:#fff}");
208
208
  }
209
209
 
210
- // (13:0) {#if northRad}
210
+ // (14:0) {#if canShowCompass}
211
211
  function create_if_block$6(ctx) {
212
212
  let div1;
213
213
  let div0;
@@ -226,7 +226,7 @@ function create_if_block$6(ctx) {
226
226
  internal.set_style(div0, "background-image", `url(${COMPASS_IMAGE})`);
227
227
  internal.attr(span, "class", "floorplan-plugin__compass-text svelte-1q44ru9");
228
228
  internal.attr(div1, "class", "floorplan-plugin__compass svelte-1q44ru9");
229
- internal.set_style(div1, "transform", /*compassTransformStyle*/ ctx[2], false);
229
+ internal.set_style(div1, "transform", /*compassTransformStyle*/ ctx[1], false);
230
230
  },
231
231
  m(target, anchor) {
232
232
  internal.insert(target, div1, anchor);
@@ -246,7 +246,7 @@ function create_if_block$6(ctx) {
246
246
 
247
247
  function create_fragment$f(ctx) {
248
248
  let if_block_anchor;
249
- let if_block = /*northRad*/ ctx[1] && create_if_block$6(ctx);
249
+ let if_block = /*canShowCompass*/ ctx[2] && create_if_block$6(ctx);
250
250
 
251
251
  return {
252
252
  c() {
@@ -258,7 +258,7 @@ function create_fragment$f(ctx) {
258
258
  internal.insert(target, if_block_anchor, anchor);
259
259
  },
260
260
  p(ctx, [dirty]) {
261
- if (/*northRad*/ ctx[1]) if_block.p(ctx, dirty);
261
+ if (/*canShowCompass*/ ctx[2]) if_block.p(ctx, dirty);
262
262
  },
263
263
  i: internal.noop,
264
264
  o: internal.noop,
@@ -282,15 +282,16 @@ function instance$f($$self, $$props, $$invalidate) {
282
282
  ? void 0
283
283
  : _a.northRad;
284
284
 
285
- const rotate = !northRad ? 0 : rad2Deg(northRad);
285
+ const rotate = typeof northRad !== 'number' ? 0 : rad2Deg(northRad);
286
286
  const compassTransformStyle = `translateX(-50%) translateZ(10px) rotate(${-rotate + 90}deg)`;
287
+ const canShowCompass = typeof northRad === 'number';
287
288
 
288
289
  $$self.$$set = $$props => {
289
290
  if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
290
291
  if ('northDesc' in $$props) $$invalidate(0, northDesc = $$props.northDesc);
291
292
  };
292
293
 
293
- return [northDesc, northRad, compassTransformStyle, floorplanData];
294
+ return [northDesc, compassTransformStyle, canShowCompass, floorplanData];
294
295
  }
295
296
 
296
297
  class Compass extends internal.SvelteComponent {
@@ -324,7 +324,7 @@ function add_css$c(target) {
324
324
  internal.append_styles(target, "svelte-1q44ru9", ".floorplan-plugin__compass.svelte-1q44ru9{position:absolute;left:50%;top:-2.39583rem;width:12.03125rem;height:2.13542rem;will-change:opacity;transform-origin:center 9.58333rem}.floorplan-plugin__compass-image.svelte-1q44ru9{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-1q44ru9{position:absolute;left:50%;top:0.78125rem;transform:translateX(-50%);opacity:0.2;font-weight:bold;font-size:0.52083rem;color:#fff}");
325
325
  }
326
326
 
327
- // (13:0) {#if northRad}
327
+ // (14:0) {#if canShowCompass}
328
328
  function create_if_block$6(ctx) {
329
329
  let div1;
330
330
  let div0;
@@ -343,7 +343,7 @@ function create_if_block$6(ctx) {
343
343
  internal.set_style(div0, "background-image", `url(${COMPASS_IMAGE})`);
344
344
  internal.attr(span, "class", "floorplan-plugin__compass-text svelte-1q44ru9");
345
345
  internal.attr(div1, "class", "floorplan-plugin__compass svelte-1q44ru9");
346
- internal.set_style(div1, "transform", /*compassTransformStyle*/ ctx[2], false);
346
+ internal.set_style(div1, "transform", /*compassTransformStyle*/ ctx[1], false);
347
347
  },
348
348
  m(target, anchor) {
349
349
  internal.insert(target, div1, anchor);
@@ -363,7 +363,7 @@ function create_if_block$6(ctx) {
363
363
 
364
364
  function create_fragment$f(ctx) {
365
365
  let if_block_anchor;
366
- let if_block = /*northRad*/ ctx[1] && create_if_block$6(ctx);
366
+ let if_block = /*canShowCompass*/ ctx[2] && create_if_block$6(ctx);
367
367
 
368
368
  return {
369
369
  c() {
@@ -375,7 +375,7 @@ function create_fragment$f(ctx) {
375
375
  internal.insert(target, if_block_anchor, anchor);
376
376
  },
377
377
  p(ctx, [dirty]) {
378
- if (/*northRad*/ ctx[1]) if_block.p(ctx, dirty);
378
+ if (/*canShowCompass*/ ctx[2]) if_block.p(ctx, dirty);
379
379
  },
380
380
  i: internal.noop,
381
381
  o: internal.noop,
@@ -399,15 +399,16 @@ function instance$f($$self, $$props, $$invalidate) {
399
399
  ? void 0
400
400
  : _a.northRad;
401
401
 
402
- const rotate = !northRad ? 0 : rad2Deg(northRad);
402
+ const rotate = typeof northRad !== 'number' ? 0 : rad2Deg(northRad);
403
403
  const compassTransformStyle = `translateX(-50%) translateZ(10px) rotate(${-rotate + 90}deg)`;
404
+ const canShowCompass = typeof northRad === 'number';
404
405
 
405
406
  $$self.$$set = $$props => {
406
407
  if ('floorplanData' in $$props) $$invalidate(3, floorplanData = $$props.floorplanData);
407
408
  if ('northDesc' in $$props) $$invalidate(0, northDesc = $$props.northDesc);
408
409
  };
409
410
 
410
- return [northDesc, northRad, compassTransformStyle, floorplanData];
411
+ return [northDesc, compassTransformStyle, canShowCompass, floorplanData];
411
412
  }
412
413
 
413
414
  class Compass extends internal.SvelteComponent {