@realsee/dnalogel 2.9.0-0 → 2.9.0-alpha.0

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 (276) hide show
  1. package/dist/PanoTagPlugin/controller/TagComputer.d.ts +1 -1
  2. package/dist/PanoTagPlugin/typings/tag/TagData.d.ts +6 -6
  3. package/dist/PanoTagPlugin/utils/px2rem.d.ts +1 -1
  4. package/dist/base/BasePlugin.d.ts +6 -6
  5. package/dist/index.cjs.js +43 -43
  6. package/dist/index.js +4365 -4339
  7. package/dist/index.umd.js +37 -37
  8. package/docs/classes/CSS3DRender.html +31 -31
  9. package/docs/classes/CruisePluginController.html +24 -24
  10. package/docs/classes/Magnifier.html +20 -20
  11. package/docs/classes/ModelRoomLabelController.html +11 -11
  12. package/docs/classes/Object3DHelperController.html +24 -24
  13. package/docs/classes/PaintBrush.html +15 -15
  14. package/docs/classes/PanoMeasurePluginLine.html +23 -23
  15. package/docs/classes/PanoMeasurePluginModel.html +22 -22
  16. package/docs/classes/PanoMeasurePluginPoint.html +14 -14
  17. package/docs/classes/PanoMeasurePluginPolyline.html +26 -26
  18. package/docs/classes/PanoTagPluginController.html +51 -51
  19. package/docs/classes/Util.BetterTween.html +8 -8
  20. package/docs/classes/Util.FivePointSelector.html +12 -12
  21. package/docs/classes/Util.Interval.html +12 -12
  22. package/docs/classes/Util.Magnifier.html +17 -17
  23. package/docs/classes/Util.PointDomHelper.html +11 -11
  24. package/docs/classes/Util.PointHelper.html +11 -11
  25. package/docs/classes/Util.Rectangle.html +13 -13
  26. package/docs/enums/CameraMovementEffect.html +7 -7
  27. package/docs/enums/ContentType.html +19 -19
  28. package/docs/enums/DIRECTION.html +9 -9
  29. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +9 -9
  30. package/docs/enums/DimensionType.html +7 -7
  31. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +8 -8
  32. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +9 -9
  33. package/docs/enums/PaintBrushTypeEnum.html +8 -8
  34. package/docs/enums/PointType.html +7 -7
  35. package/docs/enums/Rotation.html +8 -8
  36. package/docs/functions/CSS3DRenderPlugin.html +5 -5
  37. package/docs/functions/CameraMovementPlugin.html +5 -5
  38. package/docs/functions/CruisePlugin.html +5 -5
  39. package/docs/functions/GuideLinePlugin.html +5 -5
  40. package/docs/functions/ItemLabelPlugin.html +5 -5
  41. package/docs/functions/MapviewFloorplanPlugin.html +5 -5
  42. package/docs/functions/ModelChassisCompassPlugin.html +5 -5
  43. package/docs/functions/ModelEntryDoorGuidePlugin.html +5 -5
  44. package/docs/functions/ModelFloorplanPlugin.html +5 -5
  45. package/docs/functions/ModelItemLabelPlugin.html +5 -5
  46. package/docs/functions/ModelRoomLabelPlugin.html +5 -5
  47. package/docs/functions/ModelTVVideoPlugin.html +5 -5
  48. package/docs/functions/ModelViewPlugin.html +5 -5
  49. package/docs/functions/Object3DHelperPlugin.html +5 -5
  50. package/docs/functions/PanoCompassPlugin.html +5 -5
  51. package/docs/functions/PanoCursorRaycasterPlugin.html +5 -5
  52. package/docs/functions/PanoDoorLabelPlugin.html +5 -5
  53. package/docs/functions/PanoFloorplanRadarPlugin.html +5 -5
  54. package/docs/functions/PanoMeasurePlugin.html +5 -5
  55. package/docs/functions/PanoRulerPlugin.html +5 -5
  56. package/docs/functions/PanoRulerProPlugin.html +5 -5
  57. package/docs/functions/PanoSpatialTagPlugin.html +5 -5
  58. package/docs/functions/PanoTagPlugin.html +5 -5
  59. package/docs/functions/TopviewFloorplanPlugin.html +5 -5
  60. package/docs/functions/Util.getCoordsFromClient.html +5 -5
  61. package/docs/functions/Util.getCoordsFromElement.html +5 -5
  62. package/docs/functions/Util.getFrameTime.html +5 -5
  63. package/docs/functions/Util.getIntersectFromRelativePosition.html +5 -5
  64. package/docs/functions/Util.getRaycasterFromFivePointer.html +5 -5
  65. package/docs/functions/Util.isNil.html +5 -5
  66. package/docs/functions/Util.nextFrame.html +5 -5
  67. package/docs/functions/Util.notNil.html +5 -5
  68. package/docs/functions/Util.requestAnimationFrameInterval.html +5 -5
  69. package/docs/functions/Util.tweenProgress.html +5 -5
  70. package/docs/functions/pluginFlag.html +5 -5
  71. package/docs/index.html +4 -4
  72. package/docs/interfaces/AddTagConfig.html +6 -6
  73. package/docs/interfaces/CSS3DRenderPluginEventMap.html +11 -11
  74. package/docs/interfaces/CSS3DRenderPluginState.html +8 -8
  75. package/docs/interfaces/CameraMovementPluginExportType.html +7 -7
  76. package/docs/interfaces/EventMap.html +15 -15
  77. package/docs/interfaces/FloorplanBounding.html +8 -8
  78. package/docs/interfaces/FloorplanData.html +10 -10
  79. package/docs/interfaces/FloorplanEntrance.html +11 -11
  80. package/docs/interfaces/FloorplanExtraObject.html +10 -10
  81. package/docs/interfaces/FloorplanExtraObject3D.html +8 -8
  82. package/docs/interfaces/FloorplanFloorData.html +9 -9
  83. package/docs/interfaces/FloorplanImagePosition.html +7 -7
  84. package/docs/interfaces/FloorplanObserver.html +9 -9
  85. package/docs/interfaces/FloorplanOutlineItem.html +9 -9
  86. package/docs/interfaces/FloorplanPosition.html +7 -7
  87. package/docs/interfaces/FloorplanRoomItem.html +13 -13
  88. package/docs/interfaces/FloorplanRoomLabelItem.html +7 -7
  89. package/docs/interfaces/FloorplanServerBounding.html +8 -8
  90. package/docs/interfaces/FloorplanServerComputedData.html +10 -10
  91. package/docs/interfaces/FloorplanServerData.html +7 -7
  92. package/docs/interfaces/FloorplanServerDoorItem.html +10 -10
  93. package/docs/interfaces/FloorplanServerDoorPosition.html +8 -8
  94. package/docs/interfaces/FloorplanServerEntrance.html +11 -11
  95. package/docs/interfaces/FloorplanServerFloorData.html +9 -9
  96. package/docs/interfaces/FloorplanServerImagePosition.html +7 -7
  97. package/docs/interfaces/FloorplanServerObserver.html +9 -9
  98. package/docs/interfaces/FloorplanServerOutlineItem.html +9 -9
  99. package/docs/interfaces/FloorplanServerPosition.html +7 -7
  100. package/docs/interfaces/FloorplanServerRoomItem.html +14 -14
  101. package/docs/interfaces/FloorplanServerRoomLabelItem.html +7 -7
  102. package/docs/interfaces/HelperOffset.html +8 -8
  103. package/docs/interfaces/ItemLabelPluginData.html +6 -6
  104. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +11 -11
  105. package/docs/interfaces/ItemLabelPluginParametersType.html +9 -9
  106. package/docs/interfaces/MinMax.html +7 -7
  107. package/docs/interfaces/ModelChassisCompassPluginData.html +7 -7
  108. package/docs/interfaces/ModelChassisCompassPluginExportType.html +8 -8
  109. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +7 -7
  110. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +8 -8
  111. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +8 -8
  112. package/docs/interfaces/ModelItemLabelPluginData.html +6 -6
  113. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +11 -11
  114. package/docs/interfaces/ModelItemLabelPluginParametersType.html +7 -7
  115. package/docs/interfaces/ModelRoomLabelPluginData.html +6 -6
  116. package/docs/interfaces/ModelTVVideoPluginData.html +9 -9
  117. package/docs/interfaces/ModelTVVideoPluginExportType.html +8 -8
  118. package/docs/interfaces/ModelTVVideoPluginParameterType.html +6 -6
  119. package/docs/interfaces/ModelViewPluginExportType.html +11 -11
  120. package/docs/interfaces/Object3DHelperState.html +8 -8
  121. package/docs/interfaces/ObjectHelperControllers.html +9 -9
  122. package/docs/interfaces/PaintBrushAction.html +12 -12
  123. package/docs/interfaces/PaintBrushConfigs.html +12 -12
  124. package/docs/interfaces/PaintBrushState.html +10 -10
  125. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +10 -10
  126. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +5 -5
  127. package/docs/interfaces/PanoMeasureParameterType.html +12 -12
  128. package/docs/interfaces/PanoMeasurePluginLineJson.html +8 -8
  129. package/docs/interfaces/PanoMeasurePluginOpenParameter.html +7 -7
  130. package/docs/interfaces/PanoMeasurePluginPointJson.html +7 -7
  131. package/docs/interfaces/PanoMeasurePluginPolylineJson.html +8 -8
  132. package/docs/interfaces/PanoRulerPluginExportType.html +10 -10
  133. package/docs/interfaces/PanoRulerPluginOptions.html +7 -7
  134. package/docs/interfaces/PanoRulerPluginParameterType.html +8 -8
  135. package/docs/interfaces/PanoRulerProPluginExportType.html +9 -9
  136. package/docs/interfaces/PanoRulerProPluginOptions.html +7 -7
  137. package/docs/interfaces/PanoRulerProPluginParameterType.html +7 -7
  138. package/docs/interfaces/PanoRulerProPluginState.html +8 -8
  139. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +5 -5
  140. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +5 -5
  141. package/docs/interfaces/PanoSpatialTagPluginData.html +11 -11
  142. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +10 -10
  143. package/docs/interfaces/PanoSpatialTagPluginExportType.html +13 -13
  144. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +10 -10
  145. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +13 -13
  146. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +11 -11
  147. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +10 -10
  148. package/docs/interfaces/Point.html +8 -8
  149. package/docs/interfaces/Room.html +9 -9
  150. package/docs/interfaces/RoomInfo.html +7 -7
  151. package/docs/interfaces/RoomLabel.html +14 -14
  152. package/docs/interfaces/RoomRules.html +5 -5
  153. package/docs/interfaces/Rooms.html +5 -5
  154. package/docs/interfaces/Scissor.html +9 -9
  155. package/docs/interfaces/State.html +8 -8
  156. package/docs/interfaces/TagCache.html +12 -12
  157. package/docs/interfaces/TagConfig.html +10 -10
  158. package/docs/interfaces/TagIconUrl.html +9 -9
  159. package/docs/interfaces/Tags.html +9 -9
  160. package/docs/interfaces/TemporaryState.html +6 -6
  161. package/docs/interfaces/Util.MagnifierParameter.html +11 -11
  162. package/docs/interfaces/Util.MouseGroupParameter.html +8 -8
  163. package/docs/modules/Util.html +5 -5
  164. package/docs/modules.html +4 -4
  165. package/docs/types/ArrayPosition.html +5 -5
  166. package/docs/types/AudioAppearance.html +5 -5
  167. package/docs/types/AudioTagTypeConfigKey.html +5 -5
  168. package/docs/types/CSS3DRenderExportType.html +5 -5
  169. package/docs/types/CSS3DRenderPluginExportType.html +5 -5
  170. package/docs/types/CSS3DRenderPluginParameterType.html +5 -5
  171. package/docs/types/ClassFunctionParameters.html +5 -5
  172. package/docs/types/Color.html +5 -5
  173. package/docs/types/ContentTypeConfigKey.html +5 -5
  174. package/docs/types/ContentTypeConfigKeySplit.html +5 -5
  175. package/docs/types/ContentTypeMap.html +5 -5
  176. package/docs/types/Create3DDomContainerReturnType.html +5 -5
  177. package/docs/types/Create3DElementReturnType.html +5 -5
  178. package/docs/types/CruisePluginExportType.html +5 -5
  179. package/docs/types/Direction-1.html +5 -5
  180. package/docs/types/Direction4.html +5 -5
  181. package/docs/types/FloorplanRuleLabels.html +5 -5
  182. package/docs/types/FloorplanServerRuleLabels.html +5 -5
  183. package/docs/types/GuideLinePluginExportType.html +5 -5
  184. package/docs/types/HelperEventMap.html +5 -5
  185. package/docs/types/LoadTagConfig.html +5 -5
  186. package/docs/types/MapviewFloorplanPluginParameterType.html +5 -5
  187. package/docs/types/MapviewFloorplanPluginReturnType.html +5 -5
  188. package/docs/types/MediaData.html +5 -5
  189. package/docs/types/MediaStore.html +5 -5
  190. package/docs/types/ModelElement.html +5 -5
  191. package/docs/types/ModelEntryDoorGuidePluginParameterType.html +5 -5
  192. package/docs/types/ModelFloorplanPluginParameterType.html +5 -5
  193. package/docs/types/ModelFloorplanPluginReturnType.html +5 -5
  194. package/docs/types/ModelRoomLabelPluginParameters.html +5 -5
  195. package/docs/types/ModelRoomLabelPluginReturnType.html +5 -5
  196. package/docs/types/MoveArgs.html +5 -5
  197. package/docs/types/MoveOpts.html +5 -5
  198. package/docs/types/Object3DHelperEventMap.html +5 -5
  199. package/docs/types/ObjectFit.html +5 -5
  200. package/docs/types/PaintBrushEventMap.html +5 -5
  201. package/docs/types/PanoCompassPluginData.html +5 -5
  202. package/docs/types/PanoCompassPluginExportType.html +5 -5
  203. package/docs/types/PanoCompassPluginParameterType.html +5 -5
  204. package/docs/types/PanoFloorplanRadarPluginParameterType.html +5 -5
  205. package/docs/types/PanoFloorplanRadarPluginReturnType.html +5 -5
  206. package/docs/types/PanoIndex.html +5 -5
  207. package/docs/types/PanoMeasurePluginEvent.html +5 -5
  208. package/docs/types/PanoMeasureReturnType.html +5 -5
  209. package/docs/types/PanoSpatialTagPluginId.html +5 -5
  210. package/docs/types/PanoTagPluginExportInterface.html +5 -5
  211. package/docs/types/PanoTagPluginParamsInterface.html +5 -5
  212. package/docs/types/PlaneTag.html +5 -5
  213. package/docs/types/PlaneTagElement.html +5 -5
  214. package/docs/types/Point2DElement.html +5 -5
  215. package/docs/types/Point2DTag.html +5 -5
  216. package/docs/types/Point3DElement.html +5 -5
  217. package/docs/types/Point3DTag.html +5 -5
  218. package/docs/types/PointTag.html +5 -5
  219. package/docs/types/PointTagElement.html +5 -5
  220. package/docs/types/Position.html +5 -5
  221. package/docs/types/RotateArgs.html +5 -5
  222. package/docs/types/RotateOpts.html +5 -5
  223. package/docs/types/RuleLabelsKey.html +5 -5
  224. package/docs/types/RuleLabelsValue.html +5 -5
  225. package/docs/types/StickType.html +5 -5
  226. package/docs/types/Tag.html +5 -5
  227. package/docs/types/Tag2D.html +5 -5
  228. package/docs/types/Tag3D.html +5 -5
  229. package/docs/types/TagContentType.html +5 -5
  230. package/docs/types/TagDimensionType.html +5 -5
  231. package/docs/types/TagElement.html +5 -5
  232. package/docs/types/TagEvents.html +5 -5
  233. package/docs/types/TagGLTFObject.html +5 -5
  234. package/docs/types/TagHooks.html +5 -5
  235. package/docs/types/TagIconSize.html +5 -5
  236. package/docs/types/TagId.html +5 -5
  237. package/docs/types/TagPointType.html +5 -5
  238. package/docs/types/TopviewFloorplanPluginParameterType.html +5 -5
  239. package/docs/types/TopviewFloorplanPluginReturnType.html +5 -5
  240. package/docs/types/WorkCode.html +5 -5
  241. package/docs/variables/FLOOR_TYPE_MAP.html +5 -5
  242. package/docs/variables/PLUGIN.html +5 -5
  243. package/docs/variables/ROOM_FETILE_TYPE_MAP.html +5 -5
  244. package/docs/variables/ROOM_TYPE_MAP.html +5 -5
  245. package/docs/variables/VERSION.html +5 -5
  246. package/docs/variables/itemLabelPluginServerParams.html +5 -5
  247. package/docs/variables/modelItemLabelPluginServerParams.html +5 -5
  248. package/docs/variables/modelRoomLabelPluginServerParams.html +5 -5
  249. package/libs/PanoTagPlugin/Components/Tag/AudioTag/AudioPlaneTag.js +90 -90
  250. package/libs/PanoTagPlugin/Components/Tag/AudioTag/index.js +11 -12
  251. package/libs/PanoTagPlugin/Components/Tag/MarketingTag.js +184 -146
  252. package/libs/PanoTagPlugin/Components/Tag/index.js +111 -112
  253. package/libs/PanoTagPlugin/Components/TagContainer.js +2 -3
  254. package/libs/PanoTagPlugin/Components/TagItem.js +2 -3
  255. package/libs/PanoTagPlugin/controller/TagComputer.d.ts +1 -1
  256. package/libs/PanoTagPlugin/controller/index.js +5 -6
  257. package/libs/PanoTagPlugin/index.js +11 -12
  258. package/libs/PanoTagPlugin/typings/tag/TagData.d.ts +6 -6
  259. package/libs/PanoTagPlugin/utils/px2rem.d.ts +1 -1
  260. package/libs/PanoTagPlugin/utils/px2rem.js +3 -3
  261. package/libs/base/BasePlugin.d.ts +6 -6
  262. package/libs/index.js +100 -101
  263. package/package.json +1 -1
  264. package/dist/PanoTagPlugin/utils/color.d.ts +0 -7
  265. package/dist/PanoTagPlugin/utils/timeToString.d.ts +0 -1
  266. package/libs/PanoVideoPlugin/Controller.d.ts +0 -31
  267. package/libs/PanoVideoPlugin/Controller.js +0 -127
  268. package/libs/PanoVideoPlugin/VideoMeshController.d.ts +0 -85
  269. package/libs/PanoVideoPlugin/VideoMeshController.js +0 -152
  270. package/libs/PanoVideoPlugin/index.d.ts +0 -16
  271. package/libs/PanoVideoPlugin/index.js +0 -31
  272. package/libs/PanoVideoPlugin/typings/index.js +0 -6
  273. package/libs/PanoVideoPlugin/typings.d.ts +0 -64
  274. package/libs/PanoVideoPlugin/typings.js +0 -1
  275. package/libs/PanoVideoPlugin/utils/shader.d.ts +0 -2
  276. package/libs/PanoVideoPlugin/utils/shader.js +0 -25
@@ -1,152 +0,0 @@
1
- var l = Object.defineProperty;
2
- var f = (o, e, t) => e in o ? l(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
- var i = (o, e, t) => (f(o, typeof e != "symbol" ? e + "" : e, t), t);
4
- import { vertexShader as p, fragmentShader as m } from "./utils/shader.js";
5
- import "hammerjs";
6
- import { VideoTexture as g, LinearFilter as v, ShaderMaterial as F, Vector4 as c, SphereBufferGeometry as E, Mesh as A, Quaternion as D, Vector3 as I } from "three";
7
- import "@realsee/five";
8
- import "@tweenjs/tween.js";
9
- import "../CSS3DRenderPlugin/CSS3DRender.js";
10
- import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
11
- import { requestAnimationFrameInterval as M } from "../shared-utils/animationFrame/index.js";
12
- import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
13
- import "three/examples/jsm/renderers/CSS3DRenderer";
14
- import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
15
- import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
16
- import "../CSS3DRenderPlugin/utils/even.js";
17
- import "../shared-utils/Subscribe.js";
18
- import "../CSS3DRenderPlugin/utils/positionToVector3.js";
19
- import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
20
- import "../CSS3DRenderPlugin/utils/centerPoint.js";
21
- import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
22
- import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
23
- import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
24
- import "../shared-utils/animationFrame/BetterTween.js";
25
- class j {
26
- constructor(e, t) {
27
- i(this, "_id");
28
- i(this, "url");
29
- i(this, "five");
30
- i(this, "panoIndex");
31
- i(this, "origin");
32
- i(this, "video");
33
- i(this, "videoMesh");
34
- i(this, "_enabled", !0);
35
- i(this, "_disposed", !1);
36
- i(this, "hasVideoEverPlayed", !1);
37
- i(this, "renderFiveDisposer");
38
- i(this, "onFiveDataLoaded", () => {
39
- var d;
40
- const e = (d = this.five.work) == null ? void 0 : d.observers[this.panoIndex];
41
- if (!e)
42
- return this.logWarning(`\u70B9\u4F4D ${this.panoIndex} \u4E0D\u5B58\u5728\uFF0C\u8BF7\u68C0\u67E5 Five \u6570\u636E\u662F\u5426\u6B63\u5E38\u3002`);
43
- const { x: t, y: n, z: r, w: h } = e.quaternion, a = new D(t, n, r, h), s = e.position;
44
- this.videoMesh.position.fromArray([s.x, s.y, s.z]), this.videoMesh.quaternion.set(0, 0, 0, 1), this.videoMesh.rotateOnAxis(new I(0, 1, 0), Math.PI / 2), this.videoMesh.applyQuaternion(a);
45
- });
46
- i(this, "onFiveWantsMoveToPano", (e) => {
47
- e === this.panoIndex && (this.hasVideoEverPlayed || this.video.play().catch((t) => {
48
- console.log("\u{1F436} ==> error:", t);
49
- }));
50
- });
51
- i(this, "onFivePanoArrived", (e) => {
52
- if (this.disposed)
53
- return this.logWarning("\u5B9E\u4F8B\u5DF2\u88AB\u9500\u6BC1");
54
- !this.enabled || this.panoIndex === e && this.mount();
55
- });
56
- i(this, "onFivePanoWillArrive", (e) => {
57
- if (e !== this.panoIndex)
58
- return this.unmount();
59
- this.panoIndex !== e && this.unmount();
60
- });
61
- i(this, "onFiveModeChange", (e) => {
62
- e !== "Panorama" && this.hide();
63
- });
64
- i(this, "onFiveInitAnimationEnded", () => {
65
- const e = this.five.getCurrentState();
66
- e.mode === "Panorama" && e.panoIndex === this.panoIndex && this.mount();
67
- });
68
- i(this, "onVideoPlaying", () => {
69
- this.hasVideoEverPlayed = !0, this.video.src !== "" && (this.renderFiveDisposer = M(() => {
70
- this.five.needsRender = !0;
71
- }), this.five.scene.add(this.videoMesh));
72
- });
73
- i(this, "onVideoPaused", () => {
74
- var e;
75
- (e = this.renderFiveDisposer) == null || e.call(this);
76
- });
77
- var d, u;
78
- this.five = e, this.panoIndex = t.panoIndex, this._id = t.renderID, this.url = t.url, this.origin = t.origin.slice(), this._enabled = (u = (d = t.initialState) == null ? void 0 : d.enabled) != null ? u : !0;
79
- const n = document.createElement("video");
80
- n.crossOrigin = "anonymous", n.autoplay = !1, n.muted = !0, n.loop = !1, n.playsInline = !0, this.video = n;
81
- const r = new g(this.video);
82
- r.minFilter = v, r.magFilter = v;
83
- const h = new F({
84
- vertexShader: p,
85
- fragmentShader: m,
86
- uniforms: {
87
- map: { value: r },
88
- size: {
89
- value: new c(this.origin[0], 1 - this.origin[1] - this.origin[3], this.origin[2], this.origin[3])
90
- }
91
- },
92
- depthTest: !0,
93
- transparent: !0
94
- }), a = new E(1, 64, 64);
95
- a.scale(-1, 1, 1);
96
- const s = new A(a, h);
97
- s.name = "pano-video", this.videoMesh = s, this.five.work && this.onFiveDataLoaded(), this.enabled && this.addEventListeners(), this.mountIfNeeded();
98
- }
99
- get renderID() {
100
- return this._id;
101
- }
102
- get disposed() {
103
- return this._disposed;
104
- }
105
- get enabled() {
106
- return this._enabled;
107
- }
108
- dispose() {
109
- this.disposed || (this.disable(), this._disposed = !0);
110
- }
111
- enable() {
112
- this.disposed || this.enabled || (this._enabled = !0, this.addEventListeners(), this.mountIfNeeded());
113
- }
114
- disable() {
115
- this.disposed || !this.enabled || (this._enabled = !1, this.removeEventListeners(), this.unmount());
116
- }
117
- addEventListeners() {
118
- this.five.on("loaded", this.onFiveDataLoaded), this.five.on("modeChange", this.onFiveModeChange), this.five.on("panoArrived", this.onFivePanoArrived), this.five.on("panoWillArrive", this.onFivePanoWillArrive), this.five.on("wantsMoveToPano", this.onFiveWantsMoveToPano), this.five.on("initAnimationEnded", this.onFiveInitAnimationEnded), this.video.addEventListener("playing", this.onVideoPlaying);
119
- }
120
- removeEventListeners() {
121
- this.five.off("loaded", this.onFiveDataLoaded), this.five.off("modeChange", this.onFiveModeChange), this.five.off("panoArrived", this.onFivePanoArrived), this.five.off("panoWillArrive", this.onFivePanoWillArrive), this.five.off("wantsMoveToPano", this.onFiveWantsMoveToPano), this.five.off("initAnimationEnded", this.onFiveInitAnimationEnded), this.video.removeEventListener("playing", this.onVideoPlaying);
122
- }
123
- mountIfNeeded() {
124
- const e = this.five.getCurrentState();
125
- e.mode === "Panorama" && e.panoIndex === this.panoIndex && this.enabled && this.mount();
126
- }
127
- mount() {
128
- if (this.disposed)
129
- return this.logWarning("\u63D2\u4EF6\u5DF2\u7ECF\u9500\u6BC1\uFF0C\u65E0\u6CD5\u6302\u8F7D\u3002");
130
- if (this.url === "")
131
- return this.logWarning("\u89C6\u9891\u8D44\u6E90\u4E0D\u5B58\u5728\u3002");
132
- this.video.src !== this.url && (this.video.src = this.url), this.video.paused && this.video.play().catch((e) => {
133
- this.logWarning(e instanceof Error ? e.message : "\u89C6\u9891\u64AD\u653E\u5931\u8D25\u3002"), this.five.once("gesture", () => {
134
- this.video.play().catch((t) => {
135
- this.logWarning(t instanceof Error ? t.message : "\u81EA\u52A8\u64AD\u653E\u89C6\u9891\u5931\u8D25\u3002");
136
- });
137
- });
138
- });
139
- }
140
- unmount() {
141
- this.video.pause(), this.video.src !== "" && (this.video.src = ""), this.five.scene.remove(this.videoMesh);
142
- }
143
- hide() {
144
- this.video.pause(), this.five.scene.remove(this.videoMesh);
145
- }
146
- logWarning(e) {
147
- console.warn("\u26D4 ==> [VideoMeshController]:", e);
148
- }
149
- }
150
- export {
151
- j as VideoMeshController
152
- };
@@ -1,16 +0,0 @@
1
- import type { FivePlugin } from '@realsee/five';
2
- import { PanoVideoPluginController } from './Controller';
3
- import * as _PanoVideoPluginType from './typings';
4
- /** 点位视频播放插件
5
- * - 支持一次性加载多组数据。
6
- * - 走到点位上时播放视频(可能是多个)。
7
- * - 走出点位时销毁视频。
8
- * - 允许动态开启和禁用功能。
9
- * - 视频只能在全景模式且点位一致时才会播放。不满足条件会自动销毁。
10
- * - 不做多媒体缓存,缓解内存占用。
11
- */
12
- export declare const PanoVideoPlugin: FivePlugin<undefined, PanoVideoPluginController>;
13
- export { _PanoVideoPluginType as PanoVideoPluginType };
14
- export declare type PanoVideoPluginParameterType = undefined;
15
- export declare type PanoVideoPluginReturnType = InstanceType<typeof PanoVideoPluginController>;
16
- export default PanoVideoPlugin;
@@ -1,31 +0,0 @@
1
- import { PanoVideoPluginController as r } from "./Controller.js";
2
- import { typings as z } from "./typings/index.js";
3
- import "./VideoMeshController.js";
4
- import "./utils/shader.js";
5
- import "hammerjs";
6
- import "three";
7
- import "@realsee/five";
8
- import "@tweenjs/tween.js";
9
- import "../CSS3DRenderPlugin/CSS3DRender.js";
10
- import "../CSS3DRenderPlugin/utils/three/CSS3DRenderer.js";
11
- import "three/examples/jsm/renderers/CSS3DRenderer";
12
- import "../CSS3DRenderPlugin/utils/getAllCSS3DObject.js";
13
- import "../CSS3DRenderPlugin/utils/createResizeObserver.js";
14
- import "../CSS3DRenderPlugin/utils/even.js";
15
- import "../shared-utils/Subscribe.js";
16
- import "../CSS3DRenderPlugin/utils/positionToVector3.js";
17
- import "../CSS3DRenderPlugin/utils/three/CSS3DObject.js";
18
- import "../CSS3DRenderPlugin/utils/centerPoint.js";
19
- import "../CSS3DRenderPlugin/utils/three/OpacityMesh.js";
20
- import "../CSS3DRenderPlugin/utils/three/CSS3DScene.js";
21
- import "../CSS3DRenderPlugin/utils/three/CSS3DGroup.js";
22
- import "../CSS3DRenderPlugin/utils/generateBehindFiveElement.js";
23
- import "../shared-utils/animationFrame/index.js";
24
- import "../shared-utils/animationFrame/BetterTween.js";
25
- import "../base/BasePlugin.js";
26
- const k = (o) => new r(o);
27
- export {
28
- k as PanoVideoPlugin,
29
- z as PanoVideoPluginType,
30
- k as default
31
- };
@@ -1,6 +0,0 @@
1
- const e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2
- __proto__: null
3
- }, Symbol.toStringTag, { value: "Module" }));
4
- export {
5
- e as typings
6
- };
@@ -1,64 +0,0 @@
1
- import type * as BasePlugin from '../base/BasePlugin';
2
- /** 单个视频元素 */
3
- export interface VideoItem {
4
- /** client render ID
5
- * @remarks 为什么不用 id 作为唯一标识?
6
- * - id 是后端生成的,而 render_id 是前端生成的,在编辑时为了保证在请求后端数据之前也能进行渲染,使用额外的 id 进行渲染。
7
- * - 为了保证两端的数据一致性,插件里使用 render_id 作为唯一 ID。
8
- */
9
- render_id: string;
10
- /** 文件地址 */
11
- url: string;
12
- /** 算法处理的视频 uv 信息
13
- * @description [left, top, width, height]
14
- */
15
- origin: number[];
16
- }
17
- /** 点位视频元素 */
18
- export interface PanoVideoItem {
19
- /** client render ID */
20
- render_id: string;
21
- /** 视频播放点位 */
22
- pano_index: number;
23
- /** 视频列表 */
24
- video_list: VideoItem[];
25
- }
26
- /** 点位视频模型参数 */
27
- export interface VideoMeshParams {
28
- /** client render ID */
29
- renderID: string;
30
- /** video 文件地址 */
31
- url: string;
32
- /** 算法处理的视频 uv 信息
33
- * @description [left, top, width, height]
34
- */
35
- origin: number[];
36
- /** 视频播放点位 */
37
- panoIndex: number;
38
- /** 初始状态 */
39
- initialState?: {
40
- enabled?: boolean;
41
- };
42
- }
43
- /** 加载数据时的额外参数 */
44
- export interface LoadParams {
45
- initialState?: {
46
- enabled?: boolean;
47
- };
48
- }
49
- export interface PluginState {
50
- enabled: boolean;
51
- }
52
- export interface PluginData {
53
- list: PanoVideoItem[];
54
- }
55
- export interface PluginEventMap extends BasePlugin.EventMap<PluginState> {
56
- /** 点位视频模型开启 */
57
- enable: (params: {
58
- userAction: boolean;
59
- }) => void;
60
- /** 点位视频模型关闭 */
61
- disable: (params: {
62
- userAction: boolean;
63
- }) => void;
64
- }
@@ -1 +0,0 @@
1
-
@@ -1,2 +0,0 @@
1
- export declare const vertexShader = "\nvarying vec2 vUv;\nvoid main() {\n vUv = uv;\n vec4 mvPosition = modelViewMatrix * vec4(position, 1);\n gl_Position = projectionMatrix * mvPosition;\n}\n";
2
- export declare const fragmentShader = "\nuniform sampler2D map;\nuniform vec4 size;\nvarying vec2 vUv;\n\nvoid main() {\n vec2 uv = vec2((vUv.x - size[0]) / size[2], (vUv.y - size[1]) / size[3]);\n float a = 0.1;\n float transX = uv.x < a ? 1.0 / a * uv.x : (uv.x > (1.0 - a) ? 1.0 / a * (1.0 - uv.x) : 1.0);\n float transY = uv.y < a ? 1.0 / a * uv.y : (uv.y > (1.0 - a) ? 1.0 / a * (1.0 - uv.y) : 1.0);\n\tfloat match = (1.0 - step(0.5, abs(uv.x - 0.5))) * (1.0 - step(0.5, abs(uv.y - 0.5))) * (transX < transY ? transX : transY);\n gl_FragColor = vec4(texture2D(map, uv).xyz, match);\n}\n";
@@ -1,25 +0,0 @@
1
- const v = `
2
- varying vec2 vUv;
3
- void main() {
4
- vUv = uv;
5
- vec4 mvPosition = modelViewMatrix * vec4(position, 1);
6
- gl_Position = projectionMatrix * mvPosition;
7
- }
8
- `, a = `
9
- uniform sampler2D map;
10
- uniform vec4 size;
11
- varying vec2 vUv;
12
-
13
- void main() {
14
- vec2 uv = vec2((vUv.x - size[0]) / size[2], (vUv.y - size[1]) / size[3]);
15
- float a = 0.1;
16
- float transX = uv.x < a ? 1.0 / a * uv.x : (uv.x > (1.0 - a) ? 1.0 / a * (1.0 - uv.x) : 1.0);
17
- float transY = uv.y < a ? 1.0 / a * uv.y : (uv.y > (1.0 - a) ? 1.0 / a * (1.0 - uv.y) : 1.0);
18
- float match = (1.0 - step(0.5, abs(uv.x - 0.5))) * (1.0 - step(0.5, abs(uv.y - 0.5))) * (transX < transY ? transX : transY);
19
- gl_FragColor = vec4(texture2D(map, uv).xyz, match);
20
- }
21
- `;
22
- export {
23
- a as fragmentShader,
24
- v as vertexShader
25
- };