@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
@@ -6,14 +6,16 @@ import transfromToMeshBasicMaterial from '../shared-utils/three/transfromToMeshB
6
6
  * 模型底盘指南针插件
7
7
  */
8
8
  export const ModelChassisCompassPlugin = (five, params) => {
9
+ var _a;
9
10
  const defaultFbxUrl = params.fbx_url || '//vrlab-static.ljcdn.com/release/web/v3/dipan3/dipan.FBX';
10
- const defaultNorthRad = params.north_rad || undefined;
11
+ const defaultNorthRad = (_a = params.north_rad) !== null && _a !== void 0 ? _a : undefined;
11
12
  // 局部状态
12
13
  const state = {};
13
14
  const load = async (data) => {
15
+ var _a;
14
16
  const fbxUrl = (data === null || data === void 0 ? void 0 : data.fbx_url) || defaultFbxUrl;
15
- const northRad = (data === null || data === void 0 ? void 0 : data.north_rad) || defaultNorthRad;
16
- if (!northRad) {
17
+ const northRad = (_a = data === null || data === void 0 ? void 0 : data.north_rad) !== null && _a !== void 0 ? _a : defaultNorthRad;
18
+ if (typeof northRad !== 'number') {
17
19
  throw new Error('"northRad"配置参数缺失:未配置指南针指向!');
18
20
  }
19
21
  const bounding = five.model.bounding;
@@ -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-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)}}");
25
+ append_styles(target, "svelte-8ki8yx", ".PanoSpatialTagPlugin__tag-x.svelte-8ki8yx.svelte-8ki8yx{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-8ki8yx.svelte-8ki8yx{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-8ki8yx.svelte-8ki8yx{position:absolute;left:-1rem;width:2rem;height:100%;overflow:hidden}.PanoSpatialTagPlugin__tag-flagpole.svelte-8ki8yx.svelte-8ki8yx{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-8ki8yx.svelte-8ki8yx{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-8ki8yx.svelte-8ki8yx{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-8ki8yx .PanoSpatialTagPlugin__tag-line1.svelte-8ki8yx{animation:svelte-8ki8yx-PanoSpatialTagPlugin__tag-line1 linear .5s forwards .45s}.PanoSpatialTagPlugin__tag-show.svelte-8ki8yx .PanoSpatialTagPlugin__tag-line2.svelte-8ki8yx{animation:svelte-8ki8yx-PanoSpatialTagPlugin__tag-line2 linear .5s forwards .65s}.PanoSpatialTagPlugin__tag-x.PanoSpatialTagPlugin__tag-upside-down.svelte-8ki8yx.svelte-8ki8yx{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-upside-down.svelte-8ki8yx .PanoSpatialTagPlugin__tag-line.svelte-8ki8yx{transform:scaleY(-1)}.PanoSpatialTagPlugin__tag-animate.svelte-8ki8yx.svelte-8ki8yx{position:relative;height:100%;overflow:hidden;transform-origin:left top;transition:transform .5s linear}.PanoSpatialTagPlugin__tag-upside-down.svelte-8ki8yx .PanoSpatialTagPlugin__tag-animate.svelte-8ki8yx{transform-origin:left bottom}.PanoSpatialTagPlugin__tag-content.svelte-8ki8yx.svelte-8ki8yx{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-8ki8yx .PanoSpatialTagPlugin__tag-content.svelte-8ki8yx{bottom:0}.PanoSpatialTagPlugin__tag-show.svelte-8ki8yx .PanoSpatialTagPlugin__tag-flagpole.svelte-8ki8yx{opacity:1;transform:translate(-50%, 0) scaleY(1)}.PanoSpatialTagPlugin__tag-upside-down.svelte-8ki8yx .PanoSpatialTagPlugin__tag-shadow.svelte-8ki8yx{top:unset;bottom:-15rem}.PanoSpatialTagPlugin__tag-show.svelte-8ki8yx .PanoSpatialTagPlugin__tag-shadow.svelte-8ki8yx{opacity:.32}.PanoSpatialTagPlugin__tag-show.svelte-8ki8yx .PanoSpatialTagPlugin__tag-content.svelte-8ki8yx{transform:translate(0, 0)}.PanoSpatialTagPlugin__tag-hide.svelte-8ki8yx .PanoSpatialTagPlugin__tag-flagpole.svelte-8ki8yx{opacity:0;transform:translate(-50%, 60%) scaleY(0);transition:transform .5s .55s, opacity .4s .55s}.PanoSpatialTagPlugin__tag-hide.svelte-8ki8yx .PanoSpatialTagPlugin__tag-shadow.svelte-8ki8yx{opacity:0;transition:opacity .8s}.PanoSpatialTagPlugin__tag-hide.svelte-8ki8yx .PanoSpatialTagPlugin__tag-content.svelte-8ki8yx{transform:translate(-100%, 0);transition:transform .6s cubic-bezier(.53,.06,.88,.59)}.PanoSpatialTagPlugin__tag-hide.svelte-8ki8yx .PanoSpatialTagPlugin__tag-content .svelte-8ki8yx{pointer-events:none}.PanoSpatialTagPlugin__tag-hide.svelte-8ki8yx .PanoSpatialTagPlugin__tag-line1.svelte-8ki8yx{opacity:0.5;transform:translate(-50%, 10%) scaleY(0);animation:svelte-8ki8yx-PanoSpatialTagPlugin__tag-line1-hide linear .28s forwards .3s}.PanoSpatialTagPlugin__tag-hide.svelte-8ki8yx .PanoSpatialTagPlugin__tag-line2.svelte-8ki8yx{opacity:0.5;transform:translate(-50%, 0) scaleY(0);animation:svelte-8ki8yx-PanoSpatialTagPlugin__tag-line2-hide linear .28s forwards .45s}@keyframes svelte-8ki8yx-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-8ki8yx-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-8ki8yx-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-8ki8yx-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-1c0xhg0");
59
+ attr(div0, "class", "PanoSpatialTagPlugin__tag-shadow svelte-8ki8yx");
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-1c0xhg0");
61
+ attr(i0, "class", "PanoSpatialTagPlugin__tag-flagpole svelte-8ki8yx");
62
62
  set_style(i0, "width", /*lineWidthZoom*/ ctx[4] + "rem");
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");
63
+ attr(i1, "class", "PanoSpatialTagPlugin__tag-line1 svelte-8ki8yx");
64
+ attr(i2, "class", "PanoSpatialTagPlugin__tag-line2 svelte-8ki8yx");
65
+ attr(div1, "class", "PanoSpatialTagPlugin__tag-line svelte-8ki8yx");
66
+ attr(div2, "class", "PanoSpatialTagPlugin__tag-content svelte-8ki8yx");
67
+ attr(div3, "class", "PanoSpatialTagPlugin__tag-animate svelte-8ki8yx");
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-1c0xhg0");
71
+ attr(div4, "class", "svelte-8ki8yx");
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]);
@@ -378,7 +378,8 @@ export const PanoSpatialTagPlugin = (five, params) => {
378
378
  if ((_f = five === null || five === void 0 ? void 0 : five.model) === null || _f === void 0 ? void 0 : _f.loaded) {
379
379
  if (!wrapper)
380
380
  wrapper = five.getElement().parentElement;
381
- wrapper.appendChild(container);
381
+ if (wrapper)
382
+ wrapper.appendChild(container);
382
383
  state.forbidden = false;
383
384
  updateTags();
384
385
  five.on('panoWillArrive', onPanoWillArrive);
@@ -390,7 +391,8 @@ export const PanoSpatialTagPlugin = (five, params) => {
390
391
  five.once('modelLoaded', () => {
391
392
  if (!wrapper)
392
393
  wrapper = five.getElement().parentElement;
393
- wrapper.appendChild(container);
394
+ if (wrapper)
395
+ wrapper.appendChild(container);
394
396
  state.forbidden = false;
395
397
  updateTags();
396
398
  five.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
+ }