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

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 +44 -44
  3. package/dist/index.js +1434 -1417
  4. package/dist/index.umd.js +36 -36
  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 +113 -105
  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,13 +1,13 @@
1
1
  var T = Object.defineProperty;
2
2
  var y = (c, u, e) => u in c ? T(c, u, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[u] = e;
3
- var a = (c, u, e) => (y(c, typeof u != "symbol" ? u + "" : u, e), e);
3
+ var l = (c, u, e) => (y(c, typeof u != "symbol" ? u + "" : u, e), e);
4
4
  import D from "object-assign-deep";
5
5
  import * as C from "three";
6
- import { DefaultConfig as w } from "../tag.config.js";
7
- import { anyPositionToVector3 as E, arrayPositionToVector3 as p } from "../../CSS3DRenderPlugin/utils/positionToVector3.js";
6
+ import { DefaultConfig as P } from "../tag.config.js";
7
+ import { anyPositionToVector3 as w, arrayPositionToVector3 as p } from "../../CSS3DRenderPlugin/utils/positionToVector3.js";
8
8
  import { planeNormal as g } from "../utils/planeNormal.js";
9
- import { tagPosition as P, getTagPosition as M } from "../utils/tagPosition.js";
10
- import { normalPositionToPositions as k } from "../utils/normalPositionToPositions.js";
9
+ import { tagPosition as E, getTagPosition as k } from "../utils/tagPosition.js";
10
+ import { normalPositionToPositions as M } from "../utils/normalPositionToPositions.js";
11
11
  import { TagCache as b } from "./TagCache.js";
12
12
  import { writable as I } from "../../vendor/svelte/store/index.js";
13
13
  import { isIOSWX as A } from "../utils/device.js";
@@ -16,6 +16,7 @@ import "../../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
16
16
  import "@realsee/five";
17
17
  import { isMediaPlaneTag as x, isMediaModelTag as v, isPlaneTag as V } from "../utils/tag/tagCheck.js";
18
18
  import { DomEvents as L } from "../../shared-utils/threex/domevents/index.js";
19
+ import { VideoPlane as S } from "../utils/model/mediaPlane.js";
19
20
  import "@realsee/five/gltf-loader";
20
21
  import "../../shared-utils/three/loadTexture.js";
21
22
  import "../../shared-utils/three/centerPoint.js";
@@ -31,30 +32,40 @@ import "../../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
31
32
  import "../../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
32
33
  import "../../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
33
34
  import "../../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
34
- class le extends b {
35
+ import "../../shared-utils/three/Quadrangle.js";
36
+ import "../../shared-utils/math/pointIsRectangle.js";
37
+ import "../../shared-utils/three/loadVideoTexture.js";
38
+ import "../Assets/Icon.js";
39
+ import "../../shared-utils/three/getPositionsByObjectFit.js";
40
+ import "../../shared-utils/five/FiveDomEvents.js";
41
+ class ve extends b {
35
42
  constructor(e) {
36
43
  super(e);
37
- a(this, "tags", []);
38
- a(this, "config", w);
39
- a(this, "mediaStore", I({
44
+ l(this, "tags", []);
45
+ l(this, "config", P);
46
+ l(this, "mediaStore", I({
40
47
  currentMediaElement: null
41
48
  }));
42
- a(this, "css3DRenderPlugin");
43
- a(this, "store", {
49
+ l(this, "css3DRenderPlugin");
50
+ l(this, "store", {
44
51
  disposers: [],
45
52
  disposed: !1,
46
53
  resizeObserverDisposerAdding: !1,
47
54
  css3DRenderDisposer: /* @__PURE__ */ new Map()
48
55
  });
49
- a(this, "domEvents");
50
- a(this, "mouseInfo");
51
- a(this, "preventWhenMouseDown", () => {
56
+ l(this, "domEvents");
57
+ l(this, "mouseInfo");
58
+ l(this, "preventWhenMouseDown", () => {
52
59
  var e;
53
60
  if ((e = this.mouseInfo) != null && e.isDown)
54
61
  return !1;
55
62
  });
56
63
  const i = this.five.getElement();
57
- i && (this.domEvents = new L(this.five.camera, i)), this.five.on("wantsMoveToPano", this.preventWhenMouseDown), this.five.on("wantsTapGesture", this.preventWhenMouseDown), this.store.disposers.push(() => {
64
+ i && (this.domEvents = new L(this.five.camera, i)), this.five.on("wantsMoveToPano", this.preventWhenMouseDown), this.five.on("wantsTapGesture", this.preventWhenMouseDown), this.mediaStore.subscribe(({ currentMediaElement: o }) => {
65
+ this.tags.forEach((t) => {
66
+ t.mediaPlane instanceof S && o !== t.mediaPlane.videoInstance && t.mediaPlane.pause();
67
+ });
68
+ }), this.store.disposers.push(() => {
58
69
  this.five.off("wantsMoveToPano", this.preventWhenMouseDown), this.five.off("wantsTapGesture", this.preventWhenMouseDown);
59
70
  });
60
71
  }
@@ -77,8 +88,8 @@ class le extends b {
77
88
  if (!e)
78
89
  return (t = this.config.globalConfig) != null ? t : {};
79
90
  const i = {};
80
- this.config.contentTypeConfig && Object.keys(this.config.contentTypeConfig).forEach((l) => {
81
- const r = l;
91
+ this.config.contentTypeConfig && Object.keys(this.config.contentTypeConfig).forEach((a) => {
92
+ const r = a;
82
93
  if (i[r])
83
94
  return;
84
95
  const f = r.split("-");
@@ -91,10 +102,10 @@ class le extends b {
91
102
  (e.stickType === s || s === "Any") && (e.contentType === n || n === "Any") && (i[r] = this.config.contentTypeConfig[r]);
92
103
  }
93
104
  if (f.length === 3) {
94
- const [s = "Any", n, m] = f;
105
+ const [s = "Any", n, h] = f;
95
106
  if (n === "Audio" && e.contentType === "Audio") {
96
- const h = e;
97
- (h.stickType === s || s === "Any") && h.data.appearance === m && (i[r] = this.config.contentTypeConfig[r]);
107
+ const m = e;
108
+ (m.stickType === s || s === "Any") && m.data.appearance === h && (i[r] = this.config.contentTypeConfig[r]);
98
109
  }
99
110
  }
100
111
  });
@@ -129,26 +140,25 @@ class le extends b {
129
140
  return !0;
130
141
  }
131
142
  getRenderType(e) {
132
- const i = this.getTagConfig(e);
133
- if (!i || typeof i != "object" || !i.renderType)
134
- return "Dom";
135
- const o = e.data.mediaData;
136
- if (!o || o.length === 0)
137
- return "Dom";
138
- if (i.renderType === "Mesh") {
139
- if (x(e))
140
- if (o.length === 1) {
141
- if (o[0].type === "Image" || o[0].type === "Video")
143
+ const i = (() => {
144
+ if (e.stickType === "3DPoint")
145
+ return "Dom";
146
+ const o = this.getTagConfig(e);
147
+ if (!o || typeof o != "object" || !o.renderType)
148
+ return;
149
+ const t = e.data.mediaData;
150
+ if (!(!t || t.length === 0) && o.renderType === "Mesh") {
151
+ if (x(e)) {
152
+ if (t.length === 1 && (t[0].type === "Image" || t[0].type === "Video"))
142
153
  return "Mesh";
143
- } else
144
- return "Dom";
145
- else if (v(e))
146
- return o.length === 1 && o[0].type === "Image" ? "Mesh" : "BehindDom";
147
- } else
148
- return "Dom";
154
+ } else if (v(e))
155
+ return t.length === 1 && t[0].type === "Image" ? "Mesh" : "BehindDom";
156
+ }
157
+ })();
158
+ return i != null ? i : "Dom";
149
159
  }
150
160
  getAngle(e, i) {
151
- var d, l, r;
161
+ var d, a, r;
152
162
  const o = (d = this.five.panoIndex) != null ? d : i;
153
163
  if (o === void 0)
154
164
  throw new Error(`getDistance(): fivePanoIndex is ${o}`);
@@ -156,21 +166,21 @@ class le extends b {
156
166
  if (t.angle !== void 0)
157
167
  return t.angle;
158
168
  {
159
- const f = (r = (l = this.five.work) == null ? void 0 : l.observers[o]) == null ? void 0 : r.position;
169
+ const f = (r = (a = this.five.work) == null ? void 0 : a.observers[o]) == null ? void 0 : r.position;
160
170
  if (f === void 0)
161
171
  throw new Error(`getAngleRange(): observerPosition is ${f}`);
162
- const s = (() => e.stickType === "3DPoint" ? E(e.normal) : g(e.position))();
172
+ const s = (() => e.stickType === "3DPoint" ? w(e.normal) : g(e.position))();
163
173
  if (!s)
164
174
  return;
165
- const n = P(e.position);
175
+ const n = E(e.position);
166
176
  if (!n)
167
177
  return;
168
- const m = new C.Vector3().copy(f).sub(n), h = s.angleTo(m) * 180 / Math.PI;
169
- return t.angle = h, t.angle;
178
+ const h = new C.Vector3().copy(f).sub(n), m = s.angleTo(h) * 180 / Math.PI;
179
+ return t.angle = m, t.angle;
170
180
  }
171
181
  }
172
182
  getDistance(e, i) {
173
- var d, l, r;
183
+ var d, a, r;
174
184
  const o = (d = this.five.panoIndex) != null ? d : i;
175
185
  if (o === void 0)
176
186
  throw new Error(`getDistance(): fivePanoIndex is ${o}`);
@@ -178,10 +188,10 @@ class le extends b {
178
188
  if (t.distance !== void 0)
179
189
  return t.distance;
180
190
  {
181
- const f = (r = (l = this.five.work) == null ? void 0 : l.observers[o]) == null ? void 0 : r.position;
191
+ const f = (r = (a = this.five.work) == null ? void 0 : a.observers[o]) == null ? void 0 : r.position;
182
192
  if (f === void 0)
183
193
  throw new Error(`getDistance(): observerPosition is ${f}`);
184
- const s = M(e);
194
+ const s = k(e);
185
195
  if (!s)
186
196
  return -1;
187
197
  const n = f.distanceTo(s);
@@ -194,7 +204,7 @@ class le extends b {
194
204
  if (v(e))
195
205
  return e.data.mediaPosition;
196
206
  const i = e;
197
- return k(
207
+ return M(
198
208
  this.five.camera.position,
199
209
  p(i.position),
200
210
  p(i.normal)
@@ -216,7 +226,7 @@ class le extends b {
216
226
  isDown: !0,
217
227
  mouseDownTimestamp: Date.now()
218
228
  };
219
- }, l = (s) => {
229
+ }, a = (s) => {
220
230
  if (!t()) {
221
231
  this.mouseInfo = void 0;
222
232
  return;
@@ -243,8 +253,8 @@ class le extends b {
243
253
  const n = s.origDomEvent;
244
254
  !this.mouseInfo || (this.mouseInfo.isDown && this.mouseInfo.x === Math.floor(n.changedTouches[n.changedTouches.length - 1].clientX) && this.mouseInfo.y === Math.floor(n.changedTouches[n.changedTouches.length - 1].clientY) && Date.now() - this.mouseInfo.mouseDownTimestamp < 400 && o(n), this.mouseInfo = void 0);
245
255
  };
246
- return this.domEvents.addEventListener(i, "mousedown", d, !1), this.domEvents.addEventListener(i, "mouseup", l, !1), this.domEvents.addEventListener(i, "touchstart", r, !1), this.domEvents.addEventListener(i, "touchend", f, !1), () => {
247
- !this.domEvents || (this.mouseInfo = void 0, this.domEvents.removeEventListener(i, "mousedown", d), this.domEvents.removeEventListener(i, "mouseup", l), this.domEvents.removeEventListener(i, "touchstart", r), this.domEvents.removeEventListener(i, "touchend", f));
256
+ return this.domEvents.addEventListener(i, "mousedown", d, !1), this.domEvents.addEventListener(i, "mouseup", a, !1), this.domEvents.addEventListener(i, "touchstart", r, !1), this.domEvents.addEventListener(i, "touchend", f, !1), () => {
257
+ !this.domEvents || (this.mouseInfo = void 0, this.domEvents.removeEventListener(i, "mousedown", d), this.domEvents.removeEventListener(i, "mouseup", a), this.domEvents.removeEventListener(i, "touchstart", r), this.domEvents.removeEventListener(i, "touchend", f));
248
258
  };
249
259
  }
250
260
  getTagNormal(e) {
@@ -286,5 +296,5 @@ class le extends b {
286
296
  }
287
297
  }
288
298
  export {
289
- le as TagUtil
299
+ ve as TagUtil
290
300
  };
@@ -73,6 +73,13 @@ import "../../base/BasePlugin.js";
73
73
  import "../../vendor/svelte/store/index.js";
74
74
  import "../../vendor/svelte/internal/index.js";
75
75
  import "../utils/device.js";
76
+ import "../utils/model/mediaPlane.js";
77
+ import "../../shared-utils/three/Quadrangle.js";
78
+ import "../../shared-utils/math/pointIsRectangle.js";
79
+ import "../../shared-utils/three/loadVideoTexture.js";
80
+ import "../Assets/Icon.js";
81
+ import "../../shared-utils/three/getPositionsByObjectFit.js";
82
+ import "../../shared-utils/five/FiveDomEvents.js";
76
83
  import "../Components/TagContainer.js";
77
84
  import "../Components/TagItem.js";
78
85
  import "../Components/Tag/index.js";
@@ -89,7 +96,6 @@ import "animejs";
89
96
  import "../utils/search.js";
90
97
  import "../utils/constants.js";
91
98
  import "../Components/Common/Arrow.js";
92
- import "../Assets/Icon.js";
93
99
  import "../utils/doUtil.js";
94
100
  import "../../shared-utils/svelte/resizeObserver.js";
95
101
  import "../../vendor/resize-observer-polyfill/dist/ResizeObserver.es.js";
@@ -144,12 +150,6 @@ import "../utils/getImageInfo.js";
144
150
  import "../Components/Tag/CustomTag.js";
145
151
  import "classnames";
146
152
  import "../Components/Common/TagPoint.js";
147
- import "../utils/model/mediaPlane.js";
148
- import "../../shared-utils/three/Quadrangle.js";
149
- import "../../shared-utils/math/pointIsRectangle.js";
150
- import "../../shared-utils/three/loadVideoTexture.js";
151
- import "../../shared-utils/three/getPositionsByObjectFit.js";
152
- import "../../shared-utils/five/FiveDomEvents.js";
153
153
  import "../../CSS3DRenderPlugin/index.js";
154
154
  import "../../CSS3DRenderPlugin/Controller.js";
155
155
  import "../../CSS3DRenderPlugin/utils/waitFiveModelLoaded.js";
@@ -48,6 +48,13 @@ import "../base/BasePlugin.js";
48
48
  import "../vendor/svelte/store/index.js";
49
49
  import "../vendor/svelte/internal/index.js";
50
50
  import "./utils/device.js";
51
+ import "./utils/model/mediaPlane.js";
52
+ import "../shared-utils/three/Quadrangle.js";
53
+ import "../shared-utils/math/pointIsRectangle.js";
54
+ import "../shared-utils/three/loadVideoTexture.js";
55
+ import "./Assets/Icon.js";
56
+ import "../shared-utils/three/getPositionsByObjectFit.js";
57
+ import "../shared-utils/five/FiveDomEvents.js";
51
58
  import "./Components/TagContainer.js";
52
59
  import "./Components/TagItem.js";
53
60
  import "./Components/Tag/index.js";
@@ -64,7 +71,6 @@ import "animejs";
64
71
  import "./utils/search.js";
65
72
  import "./utils/constants.js";
66
73
  import "./Components/Common/Arrow.js";
67
- import "./Assets/Icon.js";
68
74
  import "./utils/doUtil.js";
69
75
  import "../shared-utils/svelte/resizeObserver.js";
70
76
  import "../vendor/resize-observer-polyfill/dist/ResizeObserver.es.js";
@@ -119,12 +125,6 @@ import "./utils/getImageInfo.js";
119
125
  import "./Components/Tag/CustomTag.js";
120
126
  import "classnames";
121
127
  import "./Components/Common/TagPoint.js";
122
- import "./utils/model/mediaPlane.js";
123
- import "../shared-utils/three/Quadrangle.js";
124
- import "../shared-utils/math/pointIsRectangle.js";
125
- import "../shared-utils/three/loadVideoTexture.js";
126
- import "../shared-utils/three/getPositionsByObjectFit.js";
127
- import "../shared-utils/five/FiveDomEvents.js";
128
128
  import "../CSS3DRenderPlugin/index.js";
129
129
  import "../CSS3DRenderPlugin/Controller.js";
130
130
  import "../CSS3DRenderPlugin/utils/waitFiveModelLoaded.js";
@@ -20,20 +20,22 @@ declare class ImagePlane extends MediaPlane {
20
20
  declare class VideoPlane extends MediaPlane {
21
21
  readonly isVideoPlane = true;
22
22
  name: string;
23
+ videoInstance: HTMLVideoElement;
23
24
  private objectFit;
24
25
  private buttonSrc;
26
+ private paused;
25
27
  private videoCoverSrc?;
26
28
  private domEvents?;
27
29
  private disposers;
28
30
  private domEventsListenerTemporaryList;
29
31
  private cornerPoints;
30
- private videoInstance?;
31
32
  private videoMesh?;
32
33
  private coverMesh?;
33
34
  private buttonMesh?;
34
35
  private videoTextureMap;
35
36
  private ImageTextureMap;
36
37
  constructor(videoSrc: string, cornerPoints: Vector3[], params?: {
38
+ videoInstance?: HTMLVideoElement;
37
39
  playButton?: 'withText' | 'withoutText' | string;
38
40
  videoCoverSrc?: string;
39
41
  objectFit?: 'contain' | 'fill';
@@ -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.2");
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.2",
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.2",
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*",