@realsee/dnalogel 2.1.0-alpha.18 → 2.1.0-alpha.19

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 (203) hide show
  1. package/dist/index.cjs.js +58 -58
  2. package/dist/index.es.js +5814 -8139
  3. package/dist/index.js +20871 -0
  4. package/dist/index.umd.js +50 -50
  5. package/docs/assets/search.js +1 -1
  6. package/docs/classes/CruisePluginController.html +15 -15
  7. package/docs/classes/Magnifier.html +4 -4
  8. package/docs/classes/ModelRoomLabelController.html +4 -4
  9. package/docs/classes/Object3DHelperController.html +22 -0
  10. package/docs/classes/PaintBrush.html +8 -0
  11. package/docs/classes/PanoTagPluginController.html +160 -0
  12. package/docs/enums/CameraMovementEffect.html +2 -2
  13. package/docs/enums/ContentType.html +15 -0
  14. package/docs/enums/DIRECTION.html +1 -1
  15. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -1
  16. package/docs/enums/DimensionType.html +1 -0
  17. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
  18. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -1
  19. package/docs/enums/LinkType.html +1 -0
  20. package/docs/enums/PaintBrushTypeEnum.html +1 -0
  21. package/docs/enums/PointType.html +1 -0
  22. package/docs/enums/Rotation.html +2 -2
  23. package/docs/index.html +2 -2
  24. package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -0
  25. package/docs/interfaces/CSS3DRenderPluginState.html +3 -0
  26. package/docs/interfaces/CameraMovementPluginExportType.html +2 -2
  27. package/docs/interfaces/FloorplanBounding.html +4 -4
  28. package/docs/interfaces/FloorplanData.html +2 -2
  29. package/docs/interfaces/FloorplanEntrance.html +7 -7
  30. package/docs/interfaces/FloorplanExtraObject.html +3 -3
  31. package/docs/interfaces/FloorplanExtraObject3D.html +2 -2
  32. package/docs/interfaces/FloorplanFloorData.html +2 -2
  33. package/docs/interfaces/FloorplanImagePosition.html +2 -2
  34. package/docs/interfaces/FloorplanObserver.html +2 -2
  35. package/docs/interfaces/FloorplanOutlineItem.html +2 -2
  36. package/docs/interfaces/FloorplanPosition.html +2 -2
  37. package/docs/interfaces/FloorplanRoomItem.html +6 -6
  38. package/docs/interfaces/FloorplanRoomLabelItem.html +3 -3
  39. package/docs/interfaces/FloorplanServerBounding.html +4 -4
  40. package/docs/interfaces/FloorplanServerComputedData.html +1 -1
  41. package/docs/interfaces/FloorplanServerData.html +2 -2
  42. package/docs/interfaces/FloorplanServerDoorItem.html +1 -1
  43. package/docs/interfaces/FloorplanServerDoorPosition.html +1 -1
  44. package/docs/interfaces/FloorplanServerEntrance.html +7 -7
  45. package/docs/interfaces/FloorplanServerFloorData.html +2 -2
  46. package/docs/interfaces/FloorplanServerImagePosition.html +2 -2
  47. package/docs/interfaces/FloorplanServerObserver.html +2 -2
  48. package/docs/interfaces/FloorplanServerOutlineItem.html +2 -2
  49. package/docs/interfaces/FloorplanServerPosition.html +2 -2
  50. package/docs/interfaces/FloorplanServerRoomItem.html +7 -7
  51. package/docs/interfaces/FloorplanServerRoomLabelItem.html +3 -3
  52. package/docs/interfaces/ItemLabelPluginData.html +1 -1
  53. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -1
  54. package/docs/interfaces/ItemLabelPluginParametersType.html +1 -1
  55. package/docs/interfaces/LineJson.html +1 -1
  56. package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
  57. package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
  58. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
  59. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
  60. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
  61. package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
  62. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
  63. package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
  64. package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
  65. package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
  66. package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
  67. package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
  68. package/docs/interfaces/ModelViewPluginExportType.html +1 -1
  69. package/docs/interfaces/Object3DHelperState.html +1 -0
  70. package/docs/interfaces/OpenParameter.html +2 -2
  71. package/docs/interfaces/PaintBrushAction.html +13 -0
  72. package/docs/interfaces/PaintBrushConfigs.html +1 -0
  73. package/docs/interfaces/PaintBrushState.html +1 -0
  74. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
  75. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
  76. package/docs/interfaces/PanoMeasureParameterType.html +2 -2
  77. package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
  78. package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
  79. package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
  80. package/docs/interfaces/PanoRulerProPluginExportType.html +1 -1
  81. package/docs/interfaces/PanoRulerProPluginOptions.html +1 -1
  82. package/docs/interfaces/PanoRulerProPluginParameterType.html +1 -1
  83. package/docs/interfaces/PanoRulerProPluginState.html +1 -1
  84. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -1
  85. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -1
  86. package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
  87. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -1
  88. package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
  89. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -1
  90. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
  91. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -1
  92. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -1
  93. package/docs/interfaces/Point.html +1 -1
  94. package/docs/interfaces/PointJson.html +1 -1
  95. package/docs/interfaces/Room.html +1 -1
  96. package/docs/interfaces/RoomInfo.html +1 -1
  97. package/docs/interfaces/RoomLabel.html +7 -7
  98. package/docs/interfaces/RoomRules.html +1 -1
  99. package/docs/interfaces/Rooms.html +1 -1
  100. package/docs/interfaces/Scissor.html +14 -0
  101. package/docs/interfaces/TagConfig.html +11 -0
  102. package/docs/interfaces/Tags.html +5 -0
  103. package/docs/modules.html +25 -20
  104. package/libs/CSS3DRenderPlugin/CSS3DRender.js +5 -3
  105. package/libs/CSS3DRenderPlugin/Controller.d.ts +3 -2
  106. package/libs/CSS3DRenderPlugin/Controller.js +23 -21
  107. package/libs/CSS3DRenderPlugin/index.js +3 -4
  108. package/libs/CSS3DRenderPlugin/utils/CSS3DObjectPlus.js +29 -30
  109. package/libs/CSS3DRenderPlugin/utils/centerPoint.d.ts +1 -1
  110. package/libs/CSS3DRenderPlugin/utils/centerPoint.js +7 -4
  111. package/libs/CruisePlugin/Controller.d.ts +3 -1
  112. package/libs/CruisePlugin/Controller.js +158 -150
  113. package/libs/CruisePlugin/index.js +1 -1
  114. package/libs/CruisePlugin/typing.d.ts +5 -0
  115. package/libs/GuideLinePlugin/Controller.d.ts +6 -1
  116. package/libs/GuideLinePlugin/Controller.js +53 -37
  117. package/libs/GuideLinePlugin/index.d.ts +2 -2
  118. package/libs/GuideLinePlugin/index.js +5 -5
  119. package/libs/GuideLinePlugin/typing.d.ts +3 -0
  120. package/libs/GuideLinePlugin/utils/getArrowMaterial.d.ts +2 -2
  121. package/libs/GuideLinePlugin/utils/getArrowMaterial.js +6 -7
  122. package/libs/GuideLinePlugin/utils/getLineGeometries.d.ts +8 -6
  123. package/libs/GuideLinePlugin/utils/getLineGeometries.js +72 -72
  124. package/libs/ItemLabelPlugin/utils/getLabelTransform.d.ts +1 -0
  125. package/libs/ItemLabelPlugin/utils/getStrokeLength.d.ts +5 -0
  126. package/libs/ItemLabelPlugin/utils/isImpacted.d.ts +8 -0
  127. package/libs/ItemLabelPlugin/utils/transform2RenderData.d.ts +3 -0
  128. package/libs/ModelRoomLabelPlugin/Assets/roomLabelBg.d.ts +1 -0
  129. package/libs/ModelTVVideoPlugin/Plugin.d.ts +1 -1
  130. package/libs/ModelTVVideoPlugin/Plugin.js +129 -139
  131. package/libs/ModelTVVideoPlugin/index.js +14 -5
  132. package/libs/ModelTVVideoPlugin/typings.js +0 -1
  133. package/libs/ModelTVVideoPlugin/utils/parseData.d.ts +1 -1
  134. package/libs/ModelTVVideoPlugin/utils/parseData.js +12 -8
  135. package/libs/Object3DHelperPlugin/Controller.js +10 -11
  136. package/libs/Object3DHelperPlugin/index.js +8 -9
  137. package/libs/Object3DHelperPlugin/mocks/addObject3D.d.ts +2 -0
  138. package/libs/Object3DHelperPlugin/mocks/objects.d.ts +7 -0
  139. package/libs/PanoCompassPlugin/Controller.js +13 -14
  140. package/libs/PanoCompassPlugin/index.js +4 -5
  141. package/libs/PanoDoorLabelPlugin/BaseController.js +24 -23
  142. package/libs/PanoDoorLabelPlugin/Controller.js +3 -2
  143. package/libs/PanoDoorLabelPlugin/index.js +4 -3
  144. package/libs/PanoMeasurePlugin/typings/utils.type.d.ts +1 -0
  145. package/libs/PanoMeasurePlugin/utils/clearGroup.d.ts +2 -0
  146. package/libs/PanoSpatialTagPlugin/Plugin.js +3 -4
  147. package/libs/PanoSpatialTagPlugin/index.js +3 -4
  148. package/libs/PanoSpatialTagPlugin/store.d.ts +1 -0
  149. package/libs/PanoTagPlugin/Assets/Icon.d.ts +2 -0
  150. package/libs/PanoTagPlugin/Components/Common/Media.js +1024 -3363
  151. package/libs/PanoTagPlugin/controller/TagCacheController.js +1 -1
  152. package/libs/PanoTagPlugin/controller/TagComputer.js +2 -2
  153. package/libs/PanoTagPlugin/controller/index.js +7 -8
  154. package/libs/PanoTagPlugin/index.js +13 -14
  155. package/libs/PanoTagPlugin/mocks/mock1.d.ts +168 -0
  156. package/libs/PanoTagPlugin/mocks/mock2.d.ts +233 -0
  157. package/libs/PanoTagPlugin/mocks/mock3.d.ts +22 -0
  158. package/libs/PanoTagPlugin/mocks/mock4.d.ts +56 -0
  159. package/libs/PanoTagPlugin/mocks/mock5.d.ts +13 -0
  160. package/libs/PanoTagPlugin/mocks/mock6.d.ts +16 -0
  161. package/libs/PanoTagPlugin/mocks/mock7.d.ts +22 -0
  162. package/libs/PanoTagPlugin/utils/constants.d.ts +3 -0
  163. package/libs/PanoTagPlugin/utils/nullishCoalescing.d.ts +2 -0
  164. package/libs/{TagComputer.8a257a9e.js → TagComputer.5bd7014b.js} +0 -0
  165. package/libs/base/BasePlugin.d.ts +8 -2
  166. package/libs/base/BasePlugin.js +11 -10
  167. package/libs/base/BasePluginWithData.js +1 -1
  168. package/libs/floorplan/Assets/compass.d.ts +1 -0
  169. package/libs/floorplan/MapviewFloorplanPlugin/Controller.js +1 -1
  170. package/libs/floorplan/MapviewFloorplanPlugin/index.js +1 -1
  171. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +1 -1
  172. package/libs/floorplan/ModelFloorplanPlugin/index.js +1 -1
  173. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +1 -1
  174. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +1 -1
  175. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +1 -1
  176. package/libs/floorplan/TopviewFloorplanPlugin/index.js +1 -1
  177. package/libs/floorplan/TopviewFloorplanPlugin/style.d.ts +1 -0
  178. package/libs/floorplan/index.js +1 -1
  179. package/libs/index.d.ts +0 -1
  180. package/libs/index.js +89 -92
  181. package/libs/shared-utils/Object3DHelper/Base/BaseController.js +1 -1
  182. package/libs/shared-utils/Object3DHelper/index.js +1 -1
  183. package/libs/shared-utils/Object3DHelper/utils/finiteNumber.d.ts +1 -0
  184. package/libs/shared-utils/Object3DHelper/utils/negateScale.d.ts +2 -0
  185. package/libs/shared-utils/Preloader.d.ts +6 -0
  186. package/libs/shared-utils/Subscribe.d.ts +0 -1
  187. package/libs/shared-utils/Subscribe.js +5 -6
  188. package/libs/shared-utils/debounce.d.ts +6 -0
  189. package/libs/shared-utils/formatRad.d.ts +7 -0
  190. package/libs/shared-utils/getRandomColor.d.ts +1 -0
  191. package/libs/shared-utils/logger.d.ts +16 -0
  192. package/libs/shared-utils/math/evenNumber.d.ts +3 -0
  193. package/libs/shared-utils/math/rad2Deg.d.ts +1 -0
  194. package/libs/shared-utils/px2rem.d.ts +1 -0
  195. package/libs/shared-utils/three/getExtraModelLoader.d.ts +6 -0
  196. package/libs/shared-utils/three/getNormal.d.ts +2 -0
  197. package/libs/shared-utils/three/getTextureLoader.d.ts +6 -0
  198. package/libs/shared-utils/three/loadFbxObj.d.ts +2 -0
  199. package/libs/shared-utils/vectorTocoordinates.d.ts +7 -0
  200. package/libs/typings/utils.type.d.ts +2 -0
  201. package/package.json +6 -4
  202. package/docs/interfaces/CSS3DRenderPluginExportType.html +0 -4
  203. package/libs/shared-utils/three/centerPoint.js +0 -7
@@ -3,12 +3,12 @@ var q = (f, e, s) => e in f ? B(f, e, { enumerable: !0, configurable: !0, writab
3
3
  var l = (f, e, s) => (q(f, typeof e != "symbol" ? e + "" : e, s), s);
4
4
  import * as m from "three";
5
5
  import { CSS3DRenderer as A } from "three/examples/jsm/renderers/CSS3DRenderer";
6
- import H from "../shared-utils/Subscribe.js";
6
+ import { Subscribe as H } from "../shared-utils/Subscribe.js";
7
7
  import { evenNumber as _ } from "./utils/evenNumber.js";
8
8
  import { anyPositionToVector3 as x } from "./utils/positionToVector3.js";
9
9
  import { CSS3DObjectPlus as V } from "./utils/CSS3DObjectPlus.js";
10
10
  import "./utils/centerPoint.js";
11
- const U = "v2.0.0", T = "CSS3DRenderer", Z = "__CSS3DOBJECT_CSS3DRENDER_CONTAINER__", D = `${T}@${U}`, L = (f) => `${D}--${f}`, ee = 216e-5, o = {};
11
+ const U = "v2.0.1", T = "CSS3DRenderer", Z = "__CSS3DOBJECT_CSS3DRENDER_CONTAINER__", D = `${T}@${U}`, L = (f) => `${D}--${f}`, ee = 216e-5, o = {};
12
12
  class te {
13
13
  constructor() {
14
14
  l(this, "hooks", new H());
@@ -104,7 +104,9 @@ class te {
104
104
  l(this, "setVisibleById", (e, s) => {
105
105
  var i;
106
106
  const t = (i = this.store.frontModeCSS3DObjects[e]) != null ? i : this.store.behindModeCSS3DObjects[e];
107
- !t || (t.css3DObject.visible = s, t.visible = s, t.mode === "behind" && (t.opacityMesh.visible = s));
107
+ if (!t)
108
+ return console.error("id not found", e);
109
+ t.visible = s, this.state.visible && (t.css3DObject.visible = s, t.mode === "behind" && (t.opacityMesh.visible = s));
108
110
  });
109
111
  l(this, "setEnabledById", (e, s) => {
110
112
  var n, a, h;
@@ -1,7 +1,7 @@
1
1
  import type * as BasePlugin from '../base/BasePlugin';
2
2
  import type { Five } from '@realsee/five';
3
3
  import { CSS3DRender, CSS3DRenderEventMap, CSS3DRenderState } from './CSS3DRender';
4
- import { AnyPosition } from './utils';
4
+ import type { AnyPosition } from './utils';
5
5
  export declare const PLUGIN_NAME: string;
6
6
  export interface Create3DDomContainerParamsType {
7
7
  points: AnyPosition[];
@@ -22,6 +22,7 @@ export interface Create3DDomContainerParamsType {
22
22
  }
23
23
  export default class Controller extends CSS3DRender implements BasePlugin.Controller<CSS3DRenderState, CSS3DRenderEventMap> {
24
24
  five: Five;
25
+ readonly staticPrefix: string;
25
26
  constructor(five: Five);
26
27
  /** @deprecated disposeAll() renamed as dispose() */
27
28
  disposeAll(): void;
@@ -61,7 +62,7 @@ export default class Controller extends CSS3DRender implements BasePlugin.Contro
61
62
  * } | void
62
63
  * ```
63
64
  */
64
- create3DDomContainer: (points: Create3DDomContainerParamsType['points'], config?: Create3DDomContainerParamsType['config']) => void | {
65
+ create3DDomContainer: (points: Create3DDomContainerParamsType['points'], config?: Create3DDomContainerParamsType['config']) => {
65
66
  render: () => void;
66
67
  id: string;
67
68
  container: HTMLElement;
@@ -1,46 +1,48 @@
1
1
  var h = Object.defineProperty;
2
- var R = (o, r, t) => r in o ? h(o, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[r] = t;
3
- var m = (o, r, t) => (R(o, typeof r != "symbol" ? r + "" : r, t), t);
2
+ var R = (i, r, t) => r in i ? h(i, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[r] = t;
3
+ var n = (i, r, t) => (R(i, typeof r != "symbol" ? r + "" : r, t), t);
4
4
  import { CSS3DRender as E } from "./CSS3DRender.js";
5
5
  import "three";
6
- import { random as S } from "./utils/random.js";
7
6
  import "three/examples/jsm/renderers/CSS3DRenderer";
8
7
  import "../shared-utils/Subscribe.js";
9
8
  import "./utils/evenNumber.js";
10
9
  import "./utils/positionToVector3.js";
11
10
  import "./utils/CSS3DObjectPlus.js";
12
11
  import "./utils/centerPoint.js";
13
- const C = "v2.0.0", c = `CSS3DRenderPlugin-${S()}@${C}`;
14
- class O extends E {
12
+ const S = "v2.0.1", c = `CSS3DRenderPlugin@${S}`;
13
+ class A extends E {
15
14
  constructor(t) {
16
15
  super();
17
- m(this, "five");
18
- m(this, "create3DDomContainer", (t, e) => {
16
+ n(this, "five");
17
+ n(this, "staticPrefix", "//vrlab-static.ljcdn.com");
18
+ n(this, "create3DDomContainer", (t, e) => {
19
19
  if (this.state.disposed)
20
20
  return;
21
- const i = (() => {
21
+ const d = (() => {
22
22
  var v;
23
23
  (e == null ? void 0 : e.dpr) !== void 0 && console.warn(`${c}: please use "config.devicePixelRatio" replace "config.dpr"`);
24
- const n = {
24
+ const o = {
25
25
  ratio: 216e-5,
26
26
  devicePixelRatio: (v = e == null ? void 0 : e.dpr) != null ? v : 1,
27
27
  mode: "front",
28
28
  autoRender: !0
29
29
  };
30
- return Object.assign(n, e, (e == null ? void 0 : e.mode) === "behind" ? { scene: this.five.scene } : void 0);
31
- })(), d = this.five.getElement();
32
- if (!d)
33
- return console.error(`${c}: five.getElement() is ${d}`);
34
- const { autoRender: p, mode: s } = i, f = s === "front" ? d.parentElement : i.behindFiveContainer;
30
+ return Object.assign(o, e, (e == null ? void 0 : e.mode) === "behind" ? { scene: this.five.scene } : void 0);
31
+ })(), a = this.five.getElement();
32
+ if (!a) {
33
+ console.error(`${c}: five.getElement() is ${a}`);
34
+ return;
35
+ }
36
+ const { autoRender: p, mode: s } = d, f = s === "front" ? a.parentElement : d.behindFiveContainer;
35
37
  this.appendToElement(f || document.body, s);
36
- const a = this.create3DElement(this.five.camera, t, { ...i, autoRender: !1 });
37
- if (!a)
38
+ const l = this.create3DElement(this.five.camera, t, { ...d, autoRender: !1 });
39
+ if (!l)
38
40
  return;
39
- const l = a.render, u = () => {
40
- var n;
41
- s === "front" && l(), s === "behind" && ((n = this.five.model) != null && n.loaded ? l() : this.five.once("modelLoaded", () => l()));
41
+ const m = l.render, u = () => {
42
+ var o;
43
+ s === "front" && m(), s === "behind" && ((o = this.five.model) != null && o.loaded ? m() : this.five.once("modelLoaded", () => m()));
42
44
  };
43
- return p && u(), { ...a, render: p ? void 0 : u };
45
+ return p && u(), { ...l, render: p ? void 0 : u };
44
46
  });
45
47
  this.five = t;
46
48
  }
@@ -54,5 +56,5 @@ class O extends E {
54
56
  }
55
57
  export {
56
58
  c as PLUGIN_NAME,
57
- O as default
59
+ A as default
58
60
  };
@@ -7,9 +7,8 @@ import "./utils/evenNumber.js";
7
7
  import "./utils/positionToVector3.js";
8
8
  import "./utils/CSS3DObjectPlus.js";
9
9
  import "./utils/centerPoint.js";
10
- import "./utils/random.js";
11
- const s = (o) => new r(o);
10
+ const f = (o) => new r(o);
12
11
  export {
13
- s as CSS3DRenderPlugin,
14
- s as default
12
+ f as CSS3DRenderPlugin,
13
+ f as default
15
14
  };
@@ -1,25 +1,24 @@
1
- var v = Object.defineProperty;
2
- var H = (l, o, t) => o in l ? v(l, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : l[o] = t;
3
- var i = (l, o, t) => (H(l, typeof o != "symbol" ? o + "" : o, t), t);
4
- import { CSS3DObject as z } from "three/examples/jsm/renderers/CSS3DRenderer";
5
- import * as V from "three";
6
- import { Vector3 as a } from "three";
7
- import { evenNumber as b } from "./evenNumber.js";
8
- import { centerPoint as D } from "./centerPoint.js";
9
- const f = "1.0.0", O = `CSS3DObjectPlus@${f}`, P = 216e-5, R = 3e-3;
10
- class T extends z {
11
- constructor(t, e, h = R, x = 1) {
12
- const n = Math.max(P, h), p = e[0].distanceTo(e[1]), r = e[1].distanceTo(e[2]), c = b(p / h * x), d = b(r / h * x), m = D(e[0], e[2]);
13
- let u;
14
- if (n === h)
15
- t.style.width = `${c}px`, t.style.height = `${d}px`, u = t;
1
+ var P = Object.defineProperty;
2
+ var W = (c, o, t) => o in c ? P(c, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[o] = t;
3
+ var i = (c, o, t) => (W(c, typeof o != "symbol" ? o + "" : o, t), t);
4
+ import { CSS3DObject as D } from "three/examples/jsm/renderers/CSS3DRenderer";
5
+ import { Vector3 as m } from "three";
6
+ import { evenNumber as V } from "./evenNumber.js";
7
+ import { centerPoint as E } from "./centerPoint.js";
8
+ const f = "1.0.1", H = `CSS3DObjectPlus@${f}`, j = 216e-5, v = 3e-3;
9
+ class T extends D {
10
+ constructor(t, e, h = v, u = 1) {
11
+ const l = Math.max(j, h), p = e[0].distanceTo(e[1]), a = e[1].distanceTo(e[2]), n = V(p / h * u), d = V(a / h * u), x = E(...e);
12
+ let g;
13
+ if (l === h)
14
+ t.style.width = `${n}px`, t.style.height = `${d}px`, g = t;
16
15
  else {
17
16
  const s = document.createElement("div");
18
- s.style.width = `${c}px`, s.style.height = `${d}px`, s.style.pointerEvents = "none";
19
- const g = h / n;
20
- t.style.position = "absolute", t.style.left = "0", t.style.top = "0", t.style.width = `${g * c}px`, t.style.height = `${g * d}px`, s.appendChild(t), u = s;
17
+ s.style.width = `${n}px`, s.style.height = `${d}px`, s.style.pointerEvents = "none";
18
+ const b = h / l;
19
+ t.style.position = "absolute", t.style.left = "0", t.style.top = "0", t.style.width = `${b * n}px`, t.style.height = `${b * d}px`, s.appendChild(t), g = s;
21
20
  }
22
- super(u);
21
+ super(g);
23
22
  i(this, "version", f);
24
23
  i(this, "width");
25
24
  i(this, "height");
@@ -29,21 +28,21 @@ class T extends z {
29
28
  i(this, "ratio");
30
29
  i(this, "container");
31
30
  i(this, "centerPosition");
32
- if (this.scale.set(n, n, n), this.cornerPoints = e, this.ratio = h, this.container = t, n === h)
33
- this.width = p, this.height = r, this.domWidthPx = c, this.domHeightPx = d, this.centerPosition = m;
31
+ if (this.scale.set(l, l, l), this.cornerPoints = e, this.ratio = h, this.container = t, l === h)
32
+ this.width = p, this.height = a, this.domWidthPx = n, this.domHeightPx = d, this.centerPosition = x;
34
33
  else {
35
- const s = h / n;
36
- this.width = s * p, this.height = s * r, this.domWidthPx = s * c, this.domHeightPx = s * d, this.centerPosition = new a().subVectors(m.clone(), e[0].clone()).multiplyScalar(s).add(e[0]);
34
+ const s = h / l;
35
+ this.width = s * p, this.height = s * a, this.domWidthPx = s * n, this.domHeightPx = s * d, this.centerPosition = new m().subVectors(x, e[0]).multiplyScalar(s).add(e[0]);
37
36
  }
38
- t.classList.add(`${O}__container`);
39
- const S = new a(1, 0, 0), y = new a(0, 1, 0), $ = new a().subVectors(e[1], e[0]), E = new a().subVectors(e[2], e[1]), w = new V.Quaternion().setFromUnitVectors(S.normalize(), $.normalize());
40
- this.applyQuaternion(w), y.applyQuaternion(w);
41
- const Q = new V.Quaternion().setFromUnitVectors(y.normalize(), E.normalize());
42
- this.applyQuaternion(Q), this.position.set(m.x, m.y, m.z);
37
+ t.classList.add(`${H}__container`);
38
+ const S = new m().subVectors(e[1], e[0]), r = new m().subVectors(e[3], e[0]), $ = new m().crossVectors(S, r).normalize();
39
+ this.lookAt($);
40
+ const y = this.up.clone().applyQuaternion(this.quaternion), w = r.clone(), O = new m().crossVectors(y, w).normalize();
41
+ this.rotateOnWorldAxis(O, y.angleTo(w)), this.position.copy(x);
43
42
  }
44
43
  }
45
44
  export {
46
45
  T as CSS3DObjectPlus,
47
- R as DefaultRatio,
48
- P as MinRatio
46
+ v as DefaultRatio,
47
+ j as MinRatio
49
48
  };
@@ -1,2 +1,2 @@
1
1
  import { Vector3 } from 'three';
2
- export declare function centerPoint(point1: Vector3, point2: Vector3): Vector3;
2
+ export declare function centerPoint(...args: Vector3[]): Vector3;
@@ -1,7 +1,10 @@
1
- import { Vector3 as c } from "three";
2
- function x(r, e) {
3
- return new c((r.x + e.x) / 2, (r.y + e.y) / 2, (r.z + e.z) / 2);
1
+ import { Vector3 as r } from "three";
2
+ function c(...t) {
3
+ const e = new r();
4
+ return t.forEach((n) => {
5
+ e.add(n);
6
+ }), e.divideScalar(t.length), e;
4
7
  }
5
8
  export {
6
- x as centerPoint
9
+ c as centerPoint
7
10
  };
@@ -2,14 +2,16 @@ import type { Five } from '@realsee/five';
2
2
  import type { BaseOptions } from '../base/BasePlugin';
3
3
  import * as BasePluginWithData from '../base/BasePluginWithData';
4
4
  import type { PluginState, EventMap, PluginServerData, PluginData } from './typing';
5
+ import type { Config } from '../base/BasePlugin';
5
6
  export declare const pluginFlag: (name: string) => string;
6
7
  export default class CruisePluginController extends BasePluginWithData.Controller<PluginState, EventMap, PluginServerData, PluginData> {
7
8
  static PluginVersion: string;
8
9
  state: PluginState;
9
10
  protected data?: PluginData;
11
+ private config?;
10
12
  private privateState;
11
13
  private GuideLine?;
12
- constructor(five: Five);
14
+ constructor(five: Five, config?: Config);
13
15
  /**
14
16
  * @description Load Data and State
15
17
  */