@realsee/dnalogel 2.16.0-alpha.0 → 2.16.0-alpha.1

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 (272) hide show
  1. package/dist/PanoTagPlugin/utils/model/mediaPlane.d.ts +3 -1
  2. package/dist/index.cjs.js +33 -33
  3. package/dist/index.js +832 -815
  4. package/dist/index.umd.js +26 -26
  5. package/dist/shared-utils/three/loadVideoTexture.d.ts +1 -1
  6. package/docs/classes/CSS3DRender.html +31 -31
  7. package/docs/classes/CruisePluginController.html +25 -25
  8. package/docs/classes/Magnifier.html +20 -20
  9. package/docs/classes/ModelRoomLabelController.html +11 -11
  10. package/docs/classes/Object3DHelperController.html +24 -24
  11. package/docs/classes/PaintBrush.html +15 -15
  12. package/docs/classes/PanoMeasurePluginLine.html +23 -23
  13. package/docs/classes/PanoMeasurePluginModel.html +22 -22
  14. package/docs/classes/PanoMeasurePluginPoint.html +14 -14
  15. package/docs/classes/PanoMeasurePluginPolyline.html +26 -26
  16. package/docs/classes/PanoTagPluginController.html +46 -46
  17. package/docs/classes/Util.BetterTween.html +8 -8
  18. package/docs/classes/Util.FivePointSelector.html +12 -12
  19. package/docs/classes/Util.Interval.html +12 -12
  20. package/docs/classes/Util.Magnifier.html +17 -17
  21. package/docs/classes/Util.PointDomHelper.html +11 -11
  22. package/docs/classes/Util.PointHelper.html +11 -11
  23. package/docs/classes/Util.Rectangle.html +13 -13
  24. package/docs/enums/CameraMovementEffect.html +7 -7
  25. package/docs/enums/ContentType.html +19 -19
  26. package/docs/enums/DIRECTION.html +9 -9
  27. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +9 -9
  28. package/docs/enums/DimensionType.html +7 -7
  29. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +8 -8
  30. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +9 -9
  31. package/docs/enums/PaintBrushTypeEnum.html +8 -8
  32. package/docs/enums/Rotation.html +8 -8
  33. package/docs/functions/CSS3DRenderPlugin.html +4 -4
  34. package/docs/functions/CameraMovementPlugin.html +4 -4
  35. package/docs/functions/CruisePlugin.html +4 -4
  36. package/docs/functions/GuideLinePlugin.html +5 -5
  37. package/docs/functions/ItemLabelPlugin.html +4 -4
  38. package/docs/functions/MapviewFloorplanPlugin.html +4 -4
  39. package/docs/functions/ModelChassisCompassPlugin.html +4 -4
  40. package/docs/functions/ModelEntryDoorGuidePlugin.html +4 -4
  41. package/docs/functions/ModelFloorplanPlugin.html +4 -4
  42. package/docs/functions/ModelItemLabelPlugin.html +4 -4
  43. package/docs/functions/ModelRoomLabelPlugin.html +4 -4
  44. package/docs/functions/ModelTVVideoPlugin.html +4 -4
  45. package/docs/functions/ModelViewPlugin.html +4 -4
  46. package/docs/functions/Object3DHelperPlugin.html +4 -4
  47. package/docs/functions/PanoCompassPlugin.html +4 -4
  48. package/docs/functions/PanoCursorRaycasterPlugin.html +4 -4
  49. package/docs/functions/PanoDoorLabelPlugin.html +4 -4
  50. package/docs/functions/PanoFloorplanRadarPlugin.html +4 -4
  51. package/docs/functions/PanoMeasurePlugin.html +4 -4
  52. package/docs/functions/PanoRulerPlugin.html +4 -4
  53. package/docs/functions/PanoRulerProPlugin.html +4 -4
  54. package/docs/functions/PanoSpatialTagPlugin.html +4 -4
  55. package/docs/functions/PanoTagPlugin.html +4 -4
  56. package/docs/functions/PanoVideoPlugin.html +4 -4
  57. package/docs/functions/TopviewFloorplanPlugin.html +4 -4
  58. package/docs/functions/Util.getCoordsFromClient.html +5 -5
  59. package/docs/functions/Util.getCoordsFromElement.html +5 -5
  60. package/docs/functions/Util.getFrameTime.html +5 -5
  61. package/docs/functions/Util.getIntersectFromRelativePosition.html +5 -5
  62. package/docs/functions/Util.getRaycasterFromFivePointer.html +5 -5
  63. package/docs/functions/Util.isNil.html +5 -5
  64. package/docs/functions/Util.nextFrame.html +5 -5
  65. package/docs/functions/Util.notNil.html +5 -5
  66. package/docs/functions/Util.requestAnimationFrameInterval.html +5 -5
  67. package/docs/functions/Util.tweenProgress.html +5 -5
  68. package/docs/functions/pluginFlag.html +5 -5
  69. package/docs/index.html +4 -4
  70. package/docs/interfaces/AddTagConfig.html +6 -6
  71. package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
  72. package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
  73. package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
  74. package/docs/interfaces/EventMap.html +15 -15
  75. package/docs/interfaces/FloorplanBounding.html +8 -8
  76. package/docs/interfaces/FloorplanData.html +10 -10
  77. package/docs/interfaces/FloorplanEntrance.html +11 -11
  78. package/docs/interfaces/FloorplanExtraObject.html +10 -10
  79. package/docs/interfaces/FloorplanExtraObject3D.html +8 -8
  80. package/docs/interfaces/FloorplanFloorData.html +9 -9
  81. package/docs/interfaces/FloorplanImagePosition.html +7 -7
  82. package/docs/interfaces/FloorplanObserver.html +9 -9
  83. package/docs/interfaces/FloorplanOutlineItem.html +9 -9
  84. package/docs/interfaces/FloorplanPosition.html +7 -7
  85. package/docs/interfaces/FloorplanRoomItem.html +13 -13
  86. package/docs/interfaces/FloorplanRoomLabelItem.html +7 -7
  87. package/docs/interfaces/FloorplanServerBounding.html +8 -8
  88. package/docs/interfaces/FloorplanServerComputedData.html +10 -10
  89. package/docs/interfaces/FloorplanServerData.html +7 -7
  90. package/docs/interfaces/FloorplanServerDoorItem.html +10 -10
  91. package/docs/interfaces/FloorplanServerDoorPosition.html +8 -8
  92. package/docs/interfaces/FloorplanServerEntrance.html +11 -11
  93. package/docs/interfaces/FloorplanServerFloorData.html +9 -9
  94. package/docs/interfaces/FloorplanServerImagePosition.html +7 -7
  95. package/docs/interfaces/FloorplanServerObserver.html +9 -9
  96. package/docs/interfaces/FloorplanServerOutlineItem.html +9 -9
  97. package/docs/interfaces/FloorplanServerPosition.html +7 -7
  98. package/docs/interfaces/FloorplanServerRoomItem.html +14 -14
  99. package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -7
  100. package/docs/interfaces/HelperOffset.html +8 -8
  101. package/docs/interfaces/ImagePlaneGroup.html +6 -6
  102. package/docs/interfaces/ItemLabelPluginData.html +6 -6
  103. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
  104. package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
  105. package/docs/interfaces/MinMax.html +7 -7
  106. package/docs/interfaces/ModelChassisCompassPluginData.html +7 -7
  107. package/docs/interfaces/ModelChassisCompassPluginExportType.html +8 -8
  108. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +7 -7
  109. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +8 -8
  110. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +8 -8
  111. package/docs/interfaces/ModelItemLabelPluginData.html +6 -6
  112. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +11 -11
  113. package/docs/interfaces/ModelItemLabelPluginParametersType.html +7 -7
  114. package/docs/interfaces/ModelRoomLabelPluginData.html +6 -6
  115. package/docs/interfaces/ModelTVVideoPluginData.html +9 -9
  116. package/docs/interfaces/ModelTVVideoPluginExportType.html +8 -8
  117. package/docs/interfaces/ModelTVVideoPluginParameterType.html +6 -6
  118. package/docs/interfaces/ModelViewPluginExportType.html +11 -11
  119. package/docs/interfaces/Object3DHelperState.html +8 -8
  120. package/docs/interfaces/ObjectHelperControllers.html +9 -9
  121. package/docs/interfaces/PaintBrushAction.html +12 -12
  122. package/docs/interfaces/PaintBrushConfigs.html +12 -12
  123. package/docs/interfaces/PaintBrushState.html +10 -10
  124. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +10 -10
  125. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +5 -5
  126. package/docs/interfaces/PanoMeasureParameterType.html +14 -14
  127. package/docs/interfaces/PanoMeasurePluginLineJson.html +8 -8
  128. package/docs/interfaces/PanoMeasurePluginOpenParameter.html +7 -7
  129. package/docs/interfaces/PanoMeasurePluginPointJson.html +7 -7
  130. package/docs/interfaces/PanoMeasurePluginPolylineJson.html +8 -8
  131. package/docs/interfaces/PanoRulerPluginExportType.html +10 -10
  132. package/docs/interfaces/PanoRulerPluginOptions.html +7 -7
  133. package/docs/interfaces/PanoRulerPluginParameterType.html +8 -8
  134. package/docs/interfaces/PanoRulerProPluginExportType.html +9 -9
  135. package/docs/interfaces/PanoRulerProPluginOptions.html +7 -7
  136. package/docs/interfaces/PanoRulerProPluginParameterType.html +7 -7
  137. package/docs/interfaces/PanoRulerProPluginState.html +8 -8
  138. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +5 -5
  139. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +5 -5
  140. package/docs/interfaces/PanoSpatialTagPluginData.html +11 -11
  141. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +10 -10
  142. package/docs/interfaces/PanoSpatialTagPluginExportType.html +13 -13
  143. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +10 -10
  144. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +13 -13
  145. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +11 -11
  146. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +10 -10
  147. package/docs/interfaces/PanoVideoPluginType.LoadParams.html +6 -6
  148. package/docs/interfaces/PanoVideoPluginType.PanoVideoItem.html +8 -8
  149. package/docs/interfaces/PanoVideoPluginType.PluginData.html +6 -6
  150. package/docs/interfaces/PanoVideoPluginType.PluginEventMap.html +9 -9
  151. package/docs/interfaces/PanoVideoPluginType.PluginState.html +6 -6
  152. package/docs/interfaces/PanoVideoPluginType.VideoItem.html +8 -8
  153. package/docs/interfaces/PanoVideoPluginType.VideoMeshParams.html +10 -10
  154. package/docs/interfaces/Point.html +8 -8
  155. package/docs/interfaces/Room.html +9 -9
  156. package/docs/interfaces/RoomInfo.html +7 -7
  157. package/docs/interfaces/RoomLabel.html +14 -14
  158. package/docs/interfaces/RoomRules.html +5 -5
  159. package/docs/interfaces/Rooms.html +5 -5
  160. package/docs/interfaces/Scissor.html +9 -9
  161. package/docs/interfaces/State.html +8 -8
  162. package/docs/interfaces/TagCacheInterface.html +12 -12
  163. package/docs/interfaces/TagConfig.html +11 -11
  164. package/docs/interfaces/TagGLTFObjectGroup.html +6 -6
  165. package/docs/interfaces/TagIconUrl.html +11 -11
  166. package/docs/interfaces/TagObjectGroup.html +6 -6
  167. package/docs/interfaces/TagStyle.html +6 -6
  168. package/docs/interfaces/Tags.html +9 -9
  169. package/docs/interfaces/TemporaryState.html +6 -6
  170. package/docs/interfaces/Util.MagnifierParameter.html +11 -11
  171. package/docs/interfaces/Util.MouseGroupParameter.html +8 -8
  172. package/docs/modules/PanoVideoPluginType.html +5 -5
  173. package/docs/modules/Util.html +5 -5
  174. package/docs/modules.html +4 -4
  175. package/docs/types/ArrayPosition.html +5 -5
  176. package/docs/types/AudioAppearance.html +5 -5
  177. package/docs/types/AudioTagTypeConfigKey.html +5 -5
  178. package/docs/types/CSS3DRenderExportType.html +5 -5
  179. package/docs/types/CSS3DRenderPluginExportType.html +5 -5
  180. package/docs/types/CSS3DRenderPluginParameterType.html +5 -5
  181. package/docs/types/ClassFunctionParameters.html +5 -5
  182. package/docs/types/Color.html +5 -5
  183. package/docs/types/ContentTypeConfigKey.html +5 -5
  184. package/docs/types/ContentTypeConfigKeySplit.html +5 -5
  185. package/docs/types/ContentTypeMap.html +5 -5
  186. package/docs/types/Create3DDomContainerReturnType.html +5 -5
  187. package/docs/types/Create3DElementReturnType.html +5 -5
  188. package/docs/types/CruisePluginExportType.html +5 -5
  189. package/docs/types/Direction-1.html +5 -5
  190. package/docs/types/Direction4.html +5 -5
  191. package/docs/types/ElementRenderer.html +5 -5
  192. package/docs/types/FloorplanRuleLabels.html +5 -5
  193. package/docs/types/FloorplanServerRuleLabels.html +5 -5
  194. package/docs/types/GuideLinePluginExportType.html +5 -5
  195. package/docs/types/HelperEventMap.html +5 -5
  196. package/docs/types/LoadTagConfig.html +5 -5
  197. package/docs/types/MapviewFloorplanPluginParameterType.html +5 -5
  198. package/docs/types/MapviewFloorplanPluginReturnType.html +5 -5
  199. package/docs/types/MediaData.html +5 -5
  200. package/docs/types/MediaStore.html +5 -5
  201. package/docs/types/ModelElement.html +5 -5
  202. package/docs/types/ModelEntryDoorGuidePluginParameterType.html +5 -5
  203. package/docs/types/ModelFloorplanPluginParameterType.html +5 -5
  204. package/docs/types/ModelFloorplanPluginReturnType.html +5 -5
  205. package/docs/types/ModelRoomLabelPluginParameters.html +5 -5
  206. package/docs/types/ModelRoomLabelPluginReturnType.html +5 -5
  207. package/docs/types/MoveArgs.html +5 -5
  208. package/docs/types/MoveOpts.html +5 -5
  209. package/docs/types/Object3DHelperEventMap.html +5 -5
  210. package/docs/types/ObjectFit.html +5 -5
  211. package/docs/types/PaintBrushEventMap.html +5 -5
  212. package/docs/types/PanoCompassPluginData.html +5 -5
  213. package/docs/types/PanoCompassPluginExportType.html +5 -5
  214. package/docs/types/PanoCompassPluginParameterType.html +5 -5
  215. package/docs/types/PanoFloorplanRadarPluginParameterType.html +5 -5
  216. package/docs/types/PanoFloorplanRadarPluginReturnType.html +5 -5
  217. package/docs/types/PanoIndex.html +5 -5
  218. package/docs/types/PanoMeasurePluginEvent.html +5 -5
  219. package/docs/types/PanoMeasureReturnType.html +5 -5
  220. package/docs/types/PanoSpatialTagPluginId.html +5 -5
  221. package/docs/types/PanoTagPluginExportInterface.html +5 -5
  222. package/docs/types/PanoTagPluginParamsInterface.html +5 -5
  223. package/docs/types/PanoVideoPluginParameterType.html +5 -5
  224. package/docs/types/PanoVideoPluginReturnType.html +5 -5
  225. package/docs/types/PlaneTag.html +5 -5
  226. package/docs/types/PlaneTagElement.html +5 -5
  227. package/docs/types/Point2DElement.html +5 -5
  228. package/docs/types/Point2DTag.html +5 -5
  229. package/docs/types/Point3DElement.html +5 -5
  230. package/docs/types/Point3DTag.html +5 -5
  231. package/docs/types/PointTag.html +5 -5
  232. package/docs/types/PointTagElement.html +5 -5
  233. package/docs/types/Position.html +5 -5
  234. package/docs/types/RotateArgs.html +5 -5
  235. package/docs/types/RotateOpts.html +5 -5
  236. package/docs/types/RuleLabelsKey.html +5 -5
  237. package/docs/types/RuleLabelsValue.html +5 -5
  238. package/docs/types/StickType.html +5 -5
  239. package/docs/types/Tag.html +5 -5
  240. package/docs/types/Tag2D.html +5 -5
  241. package/docs/types/Tag3D.html +5 -5
  242. package/docs/types/TagContentType.html +5 -5
  243. package/docs/types/TagDimensionType.html +5 -5
  244. package/docs/types/TagElement.html +5 -5
  245. package/docs/types/TagEvents.html +5 -5
  246. package/docs/types/TagGLTFObject.html +5 -5
  247. package/docs/types/TagHooks.html +5 -5
  248. package/docs/types/TagIconSize.html +5 -5
  249. package/docs/types/TagId.html +5 -5
  250. package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
  251. package/docs/types/TopviewFloorplanPluginReturnType.html +5 -5
  252. package/docs/types/WorkCode.html +5 -5
  253. package/docs/variables/FLOOR_TYPE_MAP.html +5 -5
  254. package/docs/variables/PLUGIN.html +5 -5
  255. package/docs/variables/ROOM_FETILE_TYPE_MAP.html +5 -5
  256. package/docs/variables/ROOM_TYPE_MAP.html +5 -5
  257. package/docs/variables/itemLabelPluginServerParams.html +5 -5
  258. package/docs/variables/modelItemLabelPluginServerParams.html +5 -5
  259. package/docs/variables/modelRoomLabelPluginServerParams.html +5 -5
  260. package/libs/PanoTagPlugin/controller/TagComputer.js +9 -2
  261. package/libs/PanoTagPlugin/controller/TagRender.js +41 -33
  262. package/libs/PanoTagPlugin/controller/TagUtil.js +60 -50
  263. package/libs/PanoTagPlugin/controller/index.js +7 -7
  264. package/libs/PanoTagPlugin/index.js +7 -7
  265. package/libs/PanoTagPlugin/utils/model/mediaPlane.d.ts +3 -1
  266. package/libs/PanoTagPlugin/utils/model/mediaPlane.js +62 -56
  267. package/libs/base/BasePlugin.js +1 -1
  268. package/libs/index.js +7 -7
  269. package/libs/shared-utils/logger.js +1 -1
  270. package/libs/shared-utils/three/loadVideoTexture.d.ts +1 -1
  271. package/libs/shared-utils/three/loadVideoTexture.js +9 -9
  272. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  var S = Object.defineProperty;
2
- var H = (p, d, e) => d in p ? S(p, d, { enumerable: !0, configurable: !0, writable: !0, value: e }) : p[d] = e;
3
- var a = (p, d, e) => (H(p, typeof d != "symbol" ? d + "" : d, e), e);
4
- var u = (p, d, e) => new Promise((t, s) => {
5
- var h = (i) => {
2
+ var H = (v, c, e) => c in v ? S(v, c, { enumerable: !0, configurable: !0, writable: !0, value: e }) : v[c] = e;
3
+ var h = (v, c, e) => (H(v, typeof c != "symbol" ? c + "" : c, e), e);
4
+ var u = (v, c, e) => new Promise((t, s) => {
5
+ var a = (i) => {
6
6
  try {
7
7
  n(e.next(i));
8
8
  } catch (o) {
@@ -14,12 +14,12 @@ var u = (p, d, e) => new Promise((t, s) => {
14
14
  } catch (o) {
15
15
  s(o);
16
16
  }
17
- }, n = (i) => i.done ? t(i.value) : Promise.resolve(i.value).then(h, r);
18
- n((e = e.apply(p, d)).next());
17
+ }, n = (i) => i.done ? t(i.value) : Promise.resolve(i.value).then(a, r);
18
+ n((e = e.apply(v, c)).next());
19
19
  });
20
20
  import * as m from "three";
21
21
  import { Vector3 as f } from "three";
22
- import { centerPoint as l } from "../../../shared-utils/three/centerPoint.js";
22
+ import { centerPoint as g } from "../../../shared-utils/three/centerPoint.js";
23
23
  import { loadTexture as w } from "../../../shared-utils/three/loadTexture.js";
24
24
  import { QuadrangleGeometry as y } from "../../../shared-utils/three/Quadrangle.js";
25
25
  import { loadVideoTexture as F } from "../../../shared-utils/three/loadVideoTexture.js";
@@ -32,31 +32,31 @@ import "../../../shared-utils/threex/domevents/index.js";
32
32
  class V extends m.Mesh {
33
33
  constructor() {
34
34
  super(...arguments);
35
- a(this, "name", "MediaPlane");
36
- a(this, "src");
35
+ h(this, "name", "MediaPlane");
36
+ h(this, "src");
37
37
  }
38
38
  removeFromParent() {
39
39
  const e = this.parent;
40
40
  return e !== null && e.remove(this), this;
41
41
  }
42
42
  setMatrixByCornerPoints(e) {
43
- const t = new f().subVectors(e[1], e[0]), s = new f().subVectors(e[3], e[0]), h = l(...e), r = new f().crossVectors(t, s).normalize();
43
+ const t = new f().subVectors(e[1], e[0]), s = new f().subVectors(e[3], e[0]), a = g(...e), r = new f().crossVectors(t, s).normalize();
44
44
  this.lookAt(r);
45
45
  const n = this.up.clone().applyQuaternion(this.quaternion), i = s.clone(), o = new f().crossVectors(n, i).normalize();
46
- this.rotateOnWorldAxis(o, n.angleTo(i)), this.position.copy(h);
46
+ this.rotateOnWorldAxis(o, n.angleTo(i)), this.position.copy(a);
47
47
  }
48
48
  }
49
49
  class J extends V {
50
50
  constructor(e, t) {
51
51
  super();
52
- a(this, "name", "PanoTagPluginImagePlane");
52
+ h(this, "name", "PanoTagPluginImagePlane");
53
53
  this.src = e, w(e).then((s) => {
54
- const h = s.image.width, r = s.image.height, n = new m.MeshBasicMaterial({ map: s, transparent: !0 }), i = new m.PlaneGeometry(h, r);
54
+ const a = s.image.width, r = s.image.height, n = new m.MeshBasicMaterial({ map: s, transparent: !0 }), i = new m.PlaneGeometry(a, r);
55
55
  this.geometry = i, this.material = n;
56
- const o = t[0].distanceTo(t[1]), c = t[1].distanceTo(t[2]);
57
- this.scale.set(o / h, c / r, 1);
58
- const M = h / r, g = o / c;
59
- M > g ? this.scale.set(o / h, o / h, 1) : M < g ? this.scale.set(c / r, c / r, 1) : this.scale.set(o / h, c / r, 1);
56
+ const o = t[0].distanceTo(t[1]), d = t[1].distanceTo(t[2]);
57
+ this.scale.set(o / a, d / r, 1);
58
+ const l = a / r, M = o / d;
59
+ l > M ? this.scale.set(o / a, o / a, 1) : l < M ? this.scale.set(d / r, d / r, 1) : this.scale.set(o / a, d / r, 1);
60
60
  }).catch((s) => {
61
61
  console.error({ e: s });
62
62
  }), this.setMatrixByCornerPoints(t);
@@ -64,49 +64,55 @@ class J extends V {
64
64
  }
65
65
  class K extends V {
66
66
  constructor(e, t, s) {
67
- const { videoCoverSrc: h, objectFit: r = "contain", playButton: n = "withText", videoTextureMap: i, ImageTextureMap: o } = s != null ? s : {};
67
+ const {
68
+ videoCoverSrc: a,
69
+ objectFit: r = "contain",
70
+ playButton: n = "withText",
71
+ videoTextureMap: i,
72
+ ImageTextureMap: o,
73
+ videoInstance: d = document.createElement("video")
74
+ } = s != null ? s : {};
68
75
  super();
69
- a(this, "isVideoPlane", !0);
70
- a(this, "name", "PanoTagPluginImagePlane");
71
- a(this, "objectFit");
72
- a(this, "buttonSrc");
73
- a(this, "videoCoverSrc");
74
- a(this, "domEvents");
75
- a(this, "disposers", []);
76
- a(this, "domEventsListenerTemporaryList", []);
77
- a(this, "cornerPoints");
78
- a(this, "videoInstance");
79
- a(this, "videoMesh");
80
- a(this, "coverMesh");
81
- a(this, "buttonMesh");
82
- a(this, "videoTextureMap");
83
- a(this, "ImageTextureMap");
84
- this.cornerPoints = t, this.src = e, this.buttonSrc = (() => n === "withText" ? R : n === "withoutText" ? P : typeof n == "string" ? n : P)(), this.videoCoverSrc = h, this.objectFit = r, this.videoTextureMap = i, this.ImageTextureMap = o, this.position.copy(l(...t)), this.videoCoverSrc ? this.addCoverMesh().then(() => this.addButtonMesh()) : this.addVideoMesh().then(() => this.addButtonMesh()), this.addEventListener("dispose", () => {
85
- var c;
86
- this.domEventsListenerTemporaryList = [], (c = this.disposers) == null || c.forEach((M) => M == null ? void 0 : M());
76
+ h(this, "isVideoPlane", !0);
77
+ h(this, "name", "PanoTagPluginImagePlane");
78
+ h(this, "videoInstance");
79
+ h(this, "objectFit");
80
+ h(this, "buttonSrc");
81
+ h(this, "paused", !0);
82
+ h(this, "videoCoverSrc");
83
+ h(this, "domEvents");
84
+ h(this, "disposers", []);
85
+ h(this, "domEventsListenerTemporaryList", []);
86
+ h(this, "cornerPoints");
87
+ h(this, "videoMesh");
88
+ h(this, "coverMesh");
89
+ h(this, "buttonMesh");
90
+ h(this, "videoTextureMap");
91
+ h(this, "ImageTextureMap");
92
+ this.cornerPoints = t, this.src = e, this.buttonSrc = (() => n === "withText" ? R : n === "withoutText" ? P : typeof n == "string" ? n : P)(), this.videoInstance = d, this.videoCoverSrc = a, this.objectFit = r, this.videoTextureMap = i, this.ImageTextureMap = o, this.position.copy(g(...t)), this.videoCoverSrc ? this.addCoverMesh().then(() => this.addButtonMesh()) : this.addVideoMesh().then(() => this.addButtonMesh()), this.addEventListener("dispose", () => {
93
+ var l;
94
+ this.domEventsListenerTemporaryList = [], (l = this.disposers) == null || l.forEach((M) => M == null ? void 0 : M());
87
95
  });
88
96
  }
89
97
  play() {
90
98
  return u(this, null, function* () {
91
- var e;
92
- this.coverMesh && (this.coverMesh.visible = !1), this.remove(this.buttonMesh), yield this.addVideoMesh(), this.videoMesh && (this.videoMesh.visible = !0), (e = this.videoInstance) == null || e.play(), this.render();
99
+ !this.paused || (this.paused = !1, this.coverMesh && (this.coverMesh.visible = !1), this.remove(this.buttonMesh), this.videoMesh || (yield this.addVideoMesh()), this.videoMesh.visible = !0, this.videoInstance.play(), this.videoInstance.muted = !1, this.render());
93
100
  });
94
101
  }
95
102
  pause() {
96
- var e;
97
- this.coverMesh && (this.coverMesh.visible = !0), this.videoMesh && (this.videoMesh.visible = !1), this.addButtonMesh(), (e = this.videoInstance) == null || e.pause(), this.render();
103
+ this.paused || (this.paused = !0, this.coverMesh && (this.coverMesh.visible = !0, this.videoMesh && (this.videoMesh.visible = !1)), this.addButtonMesh(), this.videoInstance.pause(), this.render());
98
104
  }
99
105
  initialDomEvents(e) {
100
106
  this.domEvents || (this.domEvents = new D(e), this.domEventsListenerTemporaryList.forEach((t) => this.addDomEventListener(...t)), this.domEventsListenerTemporaryList = []);
101
107
  }
102
108
  initialRenderHooks(e) {
103
109
  const t = () => {
104
- this.videoMesh && this.videoInstance && (this.videoInstance.paused || (this.videoMesh.needsRender = !0));
110
+ this.videoMesh && (this.videoInstance.paused || (this.videoMesh.needsRender = !0));
105
111
  };
106
112
  e.on("renderFrame", t), this.disposers.push(() => e.off("renderFrame", t));
107
113
  }
108
114
  render() {
109
- this.videoMesh && (this.videoMesh.needsRender = !0), this.coverMesh && (this.coverMesh.needsRender = !0), this.buttonMesh && (this.buttonMesh.needsRender = !0), this.videoInstance && this.videoMesh && (this.videoInstance.paused || (this.videoMesh.needsRender = !0));
115
+ this.videoMesh && (this.videoMesh.needsRender = !0), this.coverMesh && (this.coverMesh.needsRender = !0), this.buttonMesh && (this.buttonMesh.needsRender = !0), this.videoMesh && (this.videoInstance.paused || (this.videoMesh.needsRender = !0));
110
116
  }
111
117
  addDomEventListener(...e) {
112
118
  this.domEvents ? (this.domEvents.addEventListener(...e), this.disposers.push(() => {
@@ -145,17 +151,17 @@ class K extends V {
145
151
  return u(this, null, function* () {
146
152
  if (this.coverMesh)
147
153
  return this.coverMesh;
148
- const e = yield this.getCoverTexture(), t = new m.MeshBasicMaterial({ transparent: !0, map: e }), s = T(this.objectFit, this.cornerPoints, e.image.width / e.image.height), h = l(...s), r = s.map((o) => o.clone().sub(h)), n = new y(r, 1), i = new m.Mesh(n, t);
149
- return i.name = "videoCoverMesh", i.position.copy(h.clone().sub(this.position)), this.coverMesh = i, i;
154
+ const e = yield this.getCoverTexture(), t = new m.MeshBasicMaterial({ transparent: !0, map: e }), s = T(this.objectFit, this.cornerPoints, e.image.width / e.image.height), a = g(...s), r = s.map((o) => o.clone().sub(a)), n = new y(r, 1), i = new m.Mesh(n, t);
155
+ return i.name = "videoCoverMesh", i.position.copy(a.clone().sub(this.position)), this.coverMesh = i, i;
150
156
  });
151
157
  }
152
158
  getVideoMesh() {
153
159
  return u(this, null, function* () {
154
160
  if (this.videoMesh)
155
161
  return this.videoMesh;
156
- const e = yield this.getVideoTexture(), t = new m.MeshBasicMaterial({ transparent: !0, map: e }), s = T(this.objectFit, this.cornerPoints, e.image.videoWidth / e.image.videoHeight), h = l(...s), r = s.map((c) => c.clone().sub(h)), n = new y(r, 1), i = new m.Mesh(n, t);
157
- i.name = "videoMesh", i.position.copy(h.clone().sub(this.position)), this.addDomEventListener(i, "click", (c) => {
158
- console.log("pause"), this.pause();
162
+ const e = yield this.getVideoTexture(), t = new m.MeshBasicMaterial({ transparent: !0, map: e }), s = T(this.objectFit, this.cornerPoints, e.image.videoWidth / e.image.videoHeight), a = g(...s), r = s.map((d) => d.clone().sub(a)), n = new y(r, 1), i = new m.Mesh(n, t);
163
+ i.name = "videoMesh", i.position.copy(a.clone().sub(this.position)), this.addDomEventListener(i, "click", (d) => {
164
+ this.pause();
159
165
  });
160
166
  const o = e.image;
161
167
  return this.videoMesh = i, this.videoInstance = o, i;
@@ -166,18 +172,18 @@ class K extends V {
166
172
  var b, E, I, L;
167
173
  if (this.buttonMesh)
168
174
  return this.buttonMesh;
169
- const e = (E = (b = this.videoMesh) == null ? void 0 : b.geometry.points[0].distanceTo(this.videoMesh.geometry.points[3])) != null ? E : 1 / 0, t = (L = (I = this.coverMesh) == null ? void 0 : I.geometry.points[0].distanceTo(this.coverMesh.geometry.points[3])) != null ? L : 1 / 0, s = this.cornerPoints[0].distanceTo(this.cornerPoints[3]), r = Math.min(e, t, s) / s * 0.3, n = yield this.getButtonTexture(), i = new m.MeshBasicMaterial({ transparent: !0, map: n }), o = T("contain", this.cornerPoints, n.image.width / n.image.height), c = l(...o), M = o.map((B) => B.clone().sub(c)), g = new y(M), v = new m.Mesh(g, i);
170
- v.name = "buttonMesh", v.scale.set(r, r, r);
175
+ const e = (E = (b = this.videoMesh) == null ? void 0 : b.geometry.points[0].distanceTo(this.videoMesh.geometry.points[3])) != null ? E : 1 / 0, t = (L = (I = this.coverMesh) == null ? void 0 : I.geometry.points[0].distanceTo(this.coverMesh.geometry.points[3])) != null ? L : 1 / 0, s = this.cornerPoints[0].distanceTo(this.cornerPoints[3]), r = Math.min(e, t, s) / s * 0.3, n = yield this.getButtonTexture(), i = new m.MeshBasicMaterial({ transparent: !0, map: n }), o = T("contain", this.cornerPoints, n.image.width / n.image.height), d = g(...o), l = o.map((B) => B.clone().sub(d)), M = new y(l), p = new m.Mesh(M, i);
176
+ p.name = "buttonMesh", p.scale.set(r, r, r);
171
177
  const x = () => {
172
- console.log("play", v.visible, v.parent), this.play();
178
+ this.play();
173
179
  };
174
- v.addEventListener("added", () => {
175
- this.addDomEventListener(v, "click", x);
176
- }), v.addEventListener("removed", () => {
177
- this.removeDomEventListener(v, "click", x);
180
+ p.addEventListener("added", () => {
181
+ this.addDomEventListener(p, "click", x);
182
+ }), p.addEventListener("removed", () => {
183
+ this.removeDomEventListener(p, "click", x);
178
184
  });
179
185
  const C = new m.Vector3().crossVectors(new m.Vector3().subVectors(o[0], o[1]), new m.Vector3().subVectors(o[0], o[3])).normalize().multiplyScalar(1e-4);
180
- return v.position.copy(C), this.buttonMesh = v, v;
186
+ return p.position.copy(C), this.buttonMesh = p, p;
181
187
  });
182
188
  }
183
189
  getButtonTexture() {
@@ -203,7 +209,7 @@ class K extends V {
203
209
  var t, s;
204
210
  if ((t = this.videoTextureMap) != null && t.has(this.src))
205
211
  return this.videoTextureMap.get(this.src);
206
- const e = yield F(this.src);
212
+ const e = yield F(this.src, this.videoInstance);
207
213
  return (s = this.videoTextureMap) == null || s.set(this.src, e), e;
208
214
  });
209
215
  }
@@ -4,7 +4,7 @@ var s = (e, r, t) => (a(e, typeof r != "symbol" ? r + "" : r, t), t);
4
4
  import { Subscribe as c } from "../shared-utils/Subscribe.js";
5
5
  class o {
6
6
  constructor(r, t) {
7
- s(this, "VERSION", "2.16.0-alpha.0");
7
+ s(this, "VERSION", "2.16.0-alpha.1");
8
8
  s(this, "five");
9
9
  s(this, "hooks", new c());
10
10
  s(this, "staticPrefix", "//vrlab-static.ljcdn.com");
package/libs/index.js CHANGED
@@ -243,6 +243,13 @@ import "./PanoTagPlugin/utils/planeNormal.js";
243
243
  import "./PanoTagPlugin/utils/normalPositionToPositions.js";
244
244
  import "./PanoTagPlugin/controller/TagCache.js";
245
245
  import "./PanoTagPlugin/utils/device.js";
246
+ import "./PanoTagPlugin/utils/model/mediaPlane.js";
247
+ import "./shared-utils/three/Quadrangle.js";
248
+ import "./shared-utils/math/pointIsRectangle.js";
249
+ import "./shared-utils/three/loadVideoTexture.js";
250
+ import "./PanoTagPlugin/Assets/Icon.js";
251
+ import "./shared-utils/three/getPositionsByObjectFit.js";
252
+ import "./shared-utils/five/FiveDomEvents.js";
246
253
  import "./PanoTagPlugin/Components/TagContainer.js";
247
254
  import "./PanoTagPlugin/Components/TagItem.js";
248
255
  import "./PanoTagPlugin/Components/Tag/index.js";
@@ -256,7 +263,6 @@ import "animejs";
256
263
  import "./PanoTagPlugin/utils/search.js";
257
264
  import "./PanoTagPlugin/utils/constants.js";
258
265
  import "./PanoTagPlugin/Components/Common/Arrow.js";
259
- import "./PanoTagPlugin/Assets/Icon.js";
260
266
  import "./PanoTagPlugin/utils/doUtil.js";
261
267
  import "./PanoTagPlugin/Components/Tag/TextTag/TextPlaneTag.js";
262
268
  import "./PanoTagPlugin/Components/Common/Text/MText.js";
@@ -308,12 +314,6 @@ import "./PanoTagPlugin/Components/Common/Icon/Icon.js";
308
314
  import "./PanoTagPlugin/utils/getImageInfo.js";
309
315
  import "./PanoTagPlugin/Components/Tag/CustomTag.js";
310
316
  import "./PanoTagPlugin/Components/Common/TagPoint.js";
311
- import "./PanoTagPlugin/utils/model/mediaPlane.js";
312
- import "./shared-utils/three/Quadrangle.js";
313
- import "./shared-utils/math/pointIsRectangle.js";
314
- import "./shared-utils/three/loadVideoTexture.js";
315
- import "./shared-utils/three/getPositionsByObjectFit.js";
316
- import "./shared-utils/five/FiveDomEvents.js";
317
317
  import "./shared-utils/three/GLTFLoader.js";
318
318
  import "./shared-utils/Object3DHelper/Helper/MoveHelper.js";
319
319
  import "./shared-utils/Object3DHelper/Base/BaseHelper.js";
@@ -1,6 +1,6 @@
1
1
  function A() {
2
2
  console.info(
3
- "%c %c@realsee/dnalogel %cv2.16.0-alpha.0",
3
+ "%c %c@realsee/dnalogel %cv2.16.0-alpha.1",
4
4
  [
5
5
  "background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAMCAMAAACHgmeRAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABLFBMVEUAAAAapPoap/oaqvkbrfkbr/gZnfwZoPsaqfnD4v/E4/8Ylv0clPm93/+/4P/B4f8Yj/683/8Wif+33P8Uhv+x2f8ShP+s1v8Pgf+n0/8Nf/+h0f8Lff8Lff8Nf/9dl/+czv8KfP8KfP+Lxf+Uyv+Xy/+Hwv+Jw/+Mxf+Oxv+RyP8aovsapfoap/oZmfwZm/wZnvsYnPsYkf4YlP0NePsDYfgYcfi43f+63v8Xiv8Xjf4EWfwCV/sWZ/qz2v+02/8Vh/8WiP8EUf8CTf4WXv2u1/+v2P8Thf8Thv8ETf8CR/8VV/+o1f+q1f8Qgv8Rg/8DSv8BRf8UVP+j0v+k0v8OgP8Pgf8DR/8DQv9Nhf+dzv+fz/+Kv/+Vyv+Xy/+azf+Oxv+Qx/+SyP////8MUhLdAAAAK3RSTlMACEWQ2bd98uQECPXxqO7c+Pb49vj2+Pb49vj23Oul8fMHA+TwerXXjEIG2P+bHgAAAAFiS0dEY1y+LaoAAAB+SURBVAjXY2BgZGJmYWVgYGBgY9fW0eVg4ORi4NbTNzDk4eXjZxAwMjYxNTO3EGQQsrSytrG1sxdmEHFwdHJ2cXUTZRBz9/D08vbxFWeQ8PMPCAwKDpFkkAoNC4+IjIqWZpCRlZOPiY2LV2BQVGJQTkhMUlEFWaOmrqGpxQAAyg0S9Dq+VPYAAAAASUVORK5CYII=')",
6
6
  "background-repeat: no-repeat",
@@ -1,4 +1,4 @@
1
1
  import * as THREE from 'three';
2
- export default function loadVideoTexture(src: string): Promise<Omit<THREE.VideoTexture, 'image'> & {
2
+ export default function loadVideoTexture(src: string, videoElement?: HTMLVideoElement): Promise<Omit<THREE.VideoTexture, 'image'> & {
3
3
  image: HTMLVideoElement;
4
4
  }>;
@@ -1,14 +1,14 @@
1
- import * as r from "three";
2
- function i(o) {
3
- return new Promise((a, n) => {
4
- const e = document.createElement("video");
5
- e.preload = "metadata", e.crossOrigin = "anonymous", e.muted = !0, e.loop = !0, e.playsInline = !0, e.autoplay = !0, e.src = o;
6
- const t = new r.VideoTexture(e);
7
- t.minFilter = r.LinearFilter, t.magFilter = r.LinearFilter, t.format = r.RGBFormat, e.onloadedmetadata = () => {
8
- a(t);
1
+ import * as t from "three";
2
+ function u(a, o) {
3
+ return new Promise((n, i) => {
4
+ const e = o != null ? o : document.createElement("video");
5
+ e.preload = "metadata", e.crossOrigin = "anonymous", e.muted = !0, e.loop = !0, e.playsInline = !0, e.autoplay = !0, e.src = a;
6
+ const r = new t.VideoTexture(e);
7
+ r.minFilter = t.LinearFilter, r.magFilter = t.LinearFilter, r.encoding = t.sRGBEncoding, e.onloadedmetadata = () => {
8
+ n(r);
9
9
  };
10
10
  });
11
11
  }
12
12
  export {
13
- i as loadVideoTexture
13
+ u as loadVideoTexture
14
14
  };
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "repository": "https://github.com/realsee-developer/dnalogel.git",
8
8
  "description": "如视 VR 看房插件合集",
9
9
  "private": false,
10
- "version": "2.16.0-alpha.0",
10
+ "version": "2.16.0-alpha.1",
11
11
  "license": "SEE LICENSE IN TERMS.txt",
12
12
  "scripts": {
13
13
  "clean": "rm -rf components dist docs libs types ./vite.config.js.timestamp*",