@realsee/dnalogel 2.1.0-alpha.11 → 2.1.0-alpha.13

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 (297) hide show
  1. package/dist/CSS3DRenderPlugin/PanoTagPlugin/controller/TagComputer.d.ts +10 -11
  2. package/dist/CSS3DRenderPlugin/PanoTagPlugin/controller/index.d.ts +9 -4
  3. package/dist/CSS3DRenderPlugin/PanoTagPlugin/mocks/mock1.d.ts +12 -4
  4. package/dist/CSS3DRenderPlugin/PanoTagPlugin/mocks/mock3.d.ts +11 -3
  5. package/dist/CSS3DRenderPlugin/PanoTagPlugin/typings/controller.d.ts +3 -0
  6. package/dist/CSS3DRenderPlugin/PanoTagPlugin/typings/tag.d.ts +10 -0
  7. package/dist/CSS3DRenderPlugin/PanoTagPlugin/utils/noTypecheck.d.ts +1 -1
  8. package/dist/CameraMovementPlugin/PanoTagPlugin/controller/TagComputer.d.ts +10 -11
  9. package/dist/CameraMovementPlugin/PanoTagPlugin/controller/index.d.ts +9 -4
  10. package/dist/CameraMovementPlugin/PanoTagPlugin/mocks/mock1.d.ts +12 -4
  11. package/dist/CameraMovementPlugin/PanoTagPlugin/mocks/mock3.d.ts +11 -3
  12. package/dist/CameraMovementPlugin/PanoTagPlugin/typings/controller.d.ts +3 -0
  13. package/dist/CameraMovementPlugin/PanoTagPlugin/typings/tag.d.ts +10 -0
  14. package/dist/CameraMovementPlugin/PanoTagPlugin/utils/noTypecheck.d.ts +1 -1
  15. package/dist/CruisePlugin/PanoTagPlugin/controller/TagComputer.d.ts +10 -11
  16. package/dist/CruisePlugin/PanoTagPlugin/controller/index.d.ts +9 -4
  17. package/dist/CruisePlugin/PanoTagPlugin/mocks/mock1.d.ts +12 -4
  18. package/dist/CruisePlugin/PanoTagPlugin/mocks/mock3.d.ts +11 -3
  19. package/dist/CruisePlugin/PanoTagPlugin/typings/controller.d.ts +3 -0
  20. package/dist/CruisePlugin/PanoTagPlugin/typings/tag.d.ts +10 -0
  21. package/dist/CruisePlugin/PanoTagPlugin/utils/noTypecheck.d.ts +1 -1
  22. package/dist/GuideLinePlugin/PanoTagPlugin/controller/TagComputer.d.ts +10 -11
  23. package/dist/GuideLinePlugin/PanoTagPlugin/controller/index.d.ts +9 -4
  24. package/dist/GuideLinePlugin/PanoTagPlugin/mocks/mock1.d.ts +12 -4
  25. package/dist/GuideLinePlugin/PanoTagPlugin/mocks/mock3.d.ts +11 -3
  26. package/dist/GuideLinePlugin/PanoTagPlugin/typings/controller.d.ts +3 -0
  27. package/dist/GuideLinePlugin/PanoTagPlugin/typings/tag.d.ts +10 -0
  28. package/dist/GuideLinePlugin/PanoTagPlugin/utils/noTypecheck.d.ts +1 -1
  29. package/dist/ItemLabelPlugin/PanoTagPlugin/controller/TagComputer.d.ts +10 -11
  30. package/dist/ItemLabelPlugin/PanoTagPlugin/controller/index.d.ts +9 -4
  31. package/dist/ItemLabelPlugin/PanoTagPlugin/mocks/mock1.d.ts +12 -4
  32. package/dist/ItemLabelPlugin/PanoTagPlugin/mocks/mock3.d.ts +11 -3
  33. package/dist/ItemLabelPlugin/PanoTagPlugin/typings/controller.d.ts +3 -0
  34. package/dist/ItemLabelPlugin/PanoTagPlugin/typings/tag.d.ts +10 -0
  35. package/dist/ItemLabelPlugin/PanoTagPlugin/utils/noTypecheck.d.ts +1 -1
  36. package/dist/ModelChassisCompassPlugin/PanoTagPlugin/controller/TagComputer.d.ts +10 -11
  37. package/dist/ModelChassisCompassPlugin/PanoTagPlugin/controller/index.d.ts +9 -4
  38. package/dist/ModelChassisCompassPlugin/PanoTagPlugin/mocks/mock1.d.ts +12 -4
  39. package/dist/ModelChassisCompassPlugin/PanoTagPlugin/mocks/mock3.d.ts +11 -3
  40. package/dist/ModelChassisCompassPlugin/PanoTagPlugin/typings/controller.d.ts +3 -0
  41. package/dist/ModelChassisCompassPlugin/PanoTagPlugin/typings/tag.d.ts +10 -0
  42. package/dist/ModelChassisCompassPlugin/PanoTagPlugin/utils/noTypecheck.d.ts +1 -1
  43. package/dist/ModelEntryDoorGuidePlugin/PanoTagPlugin/controller/TagComputer.d.ts +10 -11
  44. package/dist/ModelEntryDoorGuidePlugin/PanoTagPlugin/controller/index.d.ts +9 -4
  45. package/dist/ModelEntryDoorGuidePlugin/PanoTagPlugin/mocks/mock1.d.ts +12 -4
  46. package/dist/ModelEntryDoorGuidePlugin/PanoTagPlugin/mocks/mock3.d.ts +11 -3
  47. package/dist/ModelEntryDoorGuidePlugin/PanoTagPlugin/typings/controller.d.ts +3 -0
  48. package/dist/ModelEntryDoorGuidePlugin/PanoTagPlugin/typings/tag.d.ts +10 -0
  49. package/dist/ModelEntryDoorGuidePlugin/PanoTagPlugin/utils/noTypecheck.d.ts +1 -1
  50. package/dist/ModelItemLabelPlugin/PanoTagPlugin/controller/TagComputer.d.ts +10 -11
  51. package/dist/ModelItemLabelPlugin/PanoTagPlugin/controller/index.d.ts +9 -4
  52. package/dist/ModelItemLabelPlugin/PanoTagPlugin/mocks/mock1.d.ts +12 -4
  53. package/dist/ModelItemLabelPlugin/PanoTagPlugin/mocks/mock3.d.ts +11 -3
  54. package/dist/ModelItemLabelPlugin/PanoTagPlugin/typings/controller.d.ts +3 -0
  55. package/dist/ModelItemLabelPlugin/PanoTagPlugin/typings/tag.d.ts +10 -0
  56. package/dist/ModelItemLabelPlugin/PanoTagPlugin/utils/noTypecheck.d.ts +1 -1
  57. package/dist/ModelRoomLabelPlugin/PanoTagPlugin/controller/TagComputer.d.ts +10 -11
  58. package/dist/ModelRoomLabelPlugin/PanoTagPlugin/controller/index.d.ts +9 -4
  59. package/dist/ModelRoomLabelPlugin/PanoTagPlugin/mocks/mock1.d.ts +12 -4
  60. package/dist/ModelRoomLabelPlugin/PanoTagPlugin/mocks/mock3.d.ts +11 -3
  61. package/dist/ModelRoomLabelPlugin/PanoTagPlugin/typings/controller.d.ts +3 -0
  62. package/dist/ModelRoomLabelPlugin/PanoTagPlugin/typings/tag.d.ts +10 -0
  63. package/dist/ModelRoomLabelPlugin/PanoTagPlugin/utils/noTypecheck.d.ts +1 -1
  64. package/dist/ModelTVVideoPlugin/PanoTagPlugin/controller/TagComputer.d.ts +10 -11
  65. package/dist/ModelTVVideoPlugin/PanoTagPlugin/controller/index.d.ts +9 -4
  66. package/dist/ModelTVVideoPlugin/PanoTagPlugin/mocks/mock1.d.ts +12 -4
  67. package/dist/ModelTVVideoPlugin/PanoTagPlugin/mocks/mock3.d.ts +11 -3
  68. package/dist/ModelTVVideoPlugin/PanoTagPlugin/typings/controller.d.ts +3 -0
  69. package/dist/ModelTVVideoPlugin/PanoTagPlugin/typings/tag.d.ts +10 -0
  70. package/dist/ModelTVVideoPlugin/PanoTagPlugin/utils/noTypecheck.d.ts +1 -1
  71. package/dist/ModelViewPlugin/PanoTagPlugin/controller/TagComputer.d.ts +10 -11
  72. package/dist/ModelViewPlugin/PanoTagPlugin/controller/index.d.ts +9 -4
  73. package/dist/ModelViewPlugin/PanoTagPlugin/mocks/mock1.d.ts +12 -4
  74. package/dist/ModelViewPlugin/PanoTagPlugin/mocks/mock3.d.ts +11 -3
  75. package/dist/ModelViewPlugin/PanoTagPlugin/typings/controller.d.ts +3 -0
  76. package/dist/ModelViewPlugin/PanoTagPlugin/typings/tag.d.ts +10 -0
  77. package/dist/ModelViewPlugin/PanoTagPlugin/utils/noTypecheck.d.ts +1 -1
  78. package/dist/Object3DHelperPlugin/PanoTagPlugin/controller/TagComputer.d.ts +10 -11
  79. package/dist/Object3DHelperPlugin/PanoTagPlugin/controller/index.d.ts +9 -4
  80. package/dist/Object3DHelperPlugin/PanoTagPlugin/mocks/mock1.d.ts +12 -4
  81. package/dist/Object3DHelperPlugin/PanoTagPlugin/mocks/mock3.d.ts +11 -3
  82. package/dist/Object3DHelperPlugin/PanoTagPlugin/typings/controller.d.ts +3 -0
  83. package/dist/Object3DHelperPlugin/PanoTagPlugin/typings/tag.d.ts +10 -0
  84. package/dist/Object3DHelperPlugin/PanoTagPlugin/utils/noTypecheck.d.ts +1 -1
  85. package/dist/PanoCompassPlugin/PanoTagPlugin/controller/TagComputer.d.ts +10 -11
  86. package/dist/PanoCompassPlugin/PanoTagPlugin/controller/index.d.ts +9 -4
  87. package/dist/PanoCompassPlugin/PanoTagPlugin/mocks/mock1.d.ts +12 -4
  88. package/dist/PanoCompassPlugin/PanoTagPlugin/mocks/mock3.d.ts +11 -3
  89. package/dist/PanoCompassPlugin/PanoTagPlugin/typings/controller.d.ts +3 -0
  90. package/dist/PanoCompassPlugin/PanoTagPlugin/typings/tag.d.ts +10 -0
  91. package/dist/PanoCompassPlugin/PanoTagPlugin/utils/noTypecheck.d.ts +1 -1
  92. package/dist/PanoCursorRaycasterPlugin/PanoTagPlugin/controller/TagComputer.d.ts +10 -11
  93. package/dist/PanoCursorRaycasterPlugin/PanoTagPlugin/controller/index.d.ts +9 -4
  94. package/dist/PanoCursorRaycasterPlugin/PanoTagPlugin/mocks/mock1.d.ts +12 -4
  95. package/dist/PanoCursorRaycasterPlugin/PanoTagPlugin/mocks/mock3.d.ts +11 -3
  96. package/dist/PanoCursorRaycasterPlugin/PanoTagPlugin/typings/controller.d.ts +3 -0
  97. package/dist/PanoCursorRaycasterPlugin/PanoTagPlugin/typings/tag.d.ts +10 -0
  98. package/dist/PanoCursorRaycasterPlugin/PanoTagPlugin/utils/noTypecheck.d.ts +1 -1
  99. package/dist/PanoDoorLabelPlugin/PanoTagPlugin/controller/TagComputer.d.ts +10 -11
  100. package/dist/PanoDoorLabelPlugin/PanoTagPlugin/controller/index.d.ts +9 -4
  101. package/dist/PanoDoorLabelPlugin/PanoTagPlugin/mocks/mock1.d.ts +12 -4
  102. package/dist/PanoDoorLabelPlugin/PanoTagPlugin/mocks/mock3.d.ts +11 -3
  103. package/dist/PanoDoorLabelPlugin/PanoTagPlugin/typings/controller.d.ts +3 -0
  104. package/dist/PanoDoorLabelPlugin/PanoTagPlugin/typings/tag.d.ts +10 -0
  105. package/dist/PanoDoorLabelPlugin/PanoTagPlugin/utils/noTypecheck.d.ts +1 -1
  106. package/dist/PanoMeasurePlugin/PanoTagPlugin/controller/TagComputer.d.ts +10 -11
  107. package/dist/PanoMeasurePlugin/PanoTagPlugin/controller/index.d.ts +9 -4
  108. package/dist/PanoMeasurePlugin/PanoTagPlugin/mocks/mock1.d.ts +12 -4
  109. package/dist/PanoMeasurePlugin/PanoTagPlugin/mocks/mock3.d.ts +11 -3
  110. package/dist/PanoMeasurePlugin/PanoTagPlugin/typings/controller.d.ts +3 -0
  111. package/dist/PanoMeasurePlugin/PanoTagPlugin/typings/tag.d.ts +10 -0
  112. package/dist/PanoMeasurePlugin/PanoTagPlugin/utils/noTypecheck.d.ts +1 -1
  113. package/dist/PanoRulerPlugin/PanoTagPlugin/controller/TagComputer.d.ts +10 -11
  114. package/dist/PanoRulerPlugin/PanoTagPlugin/controller/index.d.ts +9 -4
  115. package/dist/PanoRulerPlugin/PanoTagPlugin/mocks/mock1.d.ts +12 -4
  116. package/dist/PanoRulerPlugin/PanoTagPlugin/mocks/mock3.d.ts +11 -3
  117. package/dist/PanoRulerPlugin/PanoTagPlugin/typings/controller.d.ts +3 -0
  118. package/dist/PanoRulerPlugin/PanoTagPlugin/typings/tag.d.ts +10 -0
  119. package/dist/PanoRulerPlugin/PanoTagPlugin/utils/noTypecheck.d.ts +1 -1
  120. package/dist/PanoRulerProPlugin/PanoTagPlugin/controller/TagComputer.d.ts +10 -11
  121. package/dist/PanoRulerProPlugin/PanoTagPlugin/controller/index.d.ts +9 -4
  122. package/dist/PanoRulerProPlugin/PanoTagPlugin/mocks/mock1.d.ts +12 -4
  123. package/dist/PanoRulerProPlugin/PanoTagPlugin/mocks/mock3.d.ts +11 -3
  124. package/dist/PanoRulerProPlugin/PanoTagPlugin/typings/controller.d.ts +3 -0
  125. package/dist/PanoRulerProPlugin/PanoTagPlugin/typings/tag.d.ts +10 -0
  126. package/dist/PanoRulerProPlugin/PanoTagPlugin/utils/noTypecheck.d.ts +1 -1
  127. package/dist/PanoSpatialTagPlugin/PanoTagPlugin/controller/TagComputer.d.ts +10 -11
  128. package/dist/PanoSpatialTagPlugin/PanoTagPlugin/controller/index.d.ts +9 -4
  129. package/dist/PanoSpatialTagPlugin/PanoTagPlugin/mocks/mock1.d.ts +12 -4
  130. package/dist/PanoSpatialTagPlugin/PanoTagPlugin/mocks/mock3.d.ts +11 -3
  131. package/dist/PanoSpatialTagPlugin/PanoTagPlugin/typings/controller.d.ts +3 -0
  132. package/dist/PanoSpatialTagPlugin/PanoTagPlugin/typings/tag.d.ts +10 -0
  133. package/dist/PanoSpatialTagPlugin/PanoTagPlugin/utils/noTypecheck.d.ts +1 -1
  134. package/dist/PanoTagPlugin/PanoTagPlugin/controller/TagComputer.d.ts +10 -11
  135. package/dist/PanoTagPlugin/PanoTagPlugin/controller/index.d.ts +9 -4
  136. package/dist/PanoTagPlugin/PanoTagPlugin/mocks/mock1.d.ts +12 -4
  137. package/dist/PanoTagPlugin/PanoTagPlugin/mocks/mock3.d.ts +11 -3
  138. package/dist/PanoTagPlugin/PanoTagPlugin/typings/controller.d.ts +3 -0
  139. package/dist/PanoTagPlugin/PanoTagPlugin/typings/tag.d.ts +10 -0
  140. package/dist/PanoTagPlugin/PanoTagPlugin/utils/noTypecheck.d.ts +1 -1
  141. package/dist/PanoTagPlugin/controller/TagComputer.d.ts +10 -11
  142. package/dist/PanoTagPlugin/controller/index.d.ts +9 -4
  143. package/dist/PanoTagPlugin/index.js +4869 -376
  144. package/dist/PanoTagPlugin/mocks/mock1.d.ts +12 -4
  145. package/dist/PanoTagPlugin/mocks/mock3.d.ts +11 -3
  146. package/dist/PanoTagPlugin/typings/controller.d.ts +3 -0
  147. package/dist/PanoTagPlugin/typings/tag.d.ts +10 -0
  148. package/dist/PanoTagPlugin/utils/noTypecheck.d.ts +1 -1
  149. package/dist/floorplan/MapviewFloorplanPlugin/PanoTagPlugin/controller/TagComputer.d.ts +10 -11
  150. package/dist/floorplan/MapviewFloorplanPlugin/PanoTagPlugin/controller/index.d.ts +9 -4
  151. package/dist/floorplan/MapviewFloorplanPlugin/PanoTagPlugin/mocks/mock1.d.ts +12 -4
  152. package/dist/floorplan/MapviewFloorplanPlugin/PanoTagPlugin/mocks/mock3.d.ts +11 -3
  153. package/dist/floorplan/MapviewFloorplanPlugin/PanoTagPlugin/typings/controller.d.ts +3 -0
  154. package/dist/floorplan/MapviewFloorplanPlugin/PanoTagPlugin/typings/tag.d.ts +10 -0
  155. package/dist/floorplan/MapviewFloorplanPlugin/PanoTagPlugin/utils/noTypecheck.d.ts +1 -1
  156. package/dist/floorplan/ModelFloorplanPlugin/PanoTagPlugin/controller/TagComputer.d.ts +10 -11
  157. package/dist/floorplan/ModelFloorplanPlugin/PanoTagPlugin/controller/index.d.ts +9 -4
  158. package/dist/floorplan/ModelFloorplanPlugin/PanoTagPlugin/mocks/mock1.d.ts +12 -4
  159. package/dist/floorplan/ModelFloorplanPlugin/PanoTagPlugin/mocks/mock3.d.ts +11 -3
  160. package/dist/floorplan/ModelFloorplanPlugin/PanoTagPlugin/typings/controller.d.ts +3 -0
  161. package/dist/floorplan/ModelFloorplanPlugin/PanoTagPlugin/typings/tag.d.ts +10 -0
  162. package/dist/floorplan/ModelFloorplanPlugin/PanoTagPlugin/utils/noTypecheck.d.ts +1 -1
  163. package/dist/floorplan/PanoFloorplanRadarPlugin/PanoTagPlugin/controller/TagComputer.d.ts +10 -11
  164. package/dist/floorplan/PanoFloorplanRadarPlugin/PanoTagPlugin/controller/index.d.ts +9 -4
  165. package/dist/floorplan/PanoFloorplanRadarPlugin/PanoTagPlugin/mocks/mock1.d.ts +12 -4
  166. package/dist/floorplan/PanoFloorplanRadarPlugin/PanoTagPlugin/mocks/mock3.d.ts +11 -3
  167. package/dist/floorplan/PanoFloorplanRadarPlugin/PanoTagPlugin/typings/controller.d.ts +3 -0
  168. package/dist/floorplan/PanoFloorplanRadarPlugin/PanoTagPlugin/typings/tag.d.ts +10 -0
  169. package/dist/floorplan/PanoFloorplanRadarPlugin/PanoTagPlugin/utils/noTypecheck.d.ts +1 -1
  170. package/dist/floorplan/TopviewFloorplanPlugin/PanoTagPlugin/controller/TagComputer.d.ts +10 -11
  171. package/dist/floorplan/TopviewFloorplanPlugin/PanoTagPlugin/controller/index.d.ts +9 -4
  172. package/dist/floorplan/TopviewFloorplanPlugin/PanoTagPlugin/mocks/mock1.d.ts +12 -4
  173. package/dist/floorplan/TopviewFloorplanPlugin/PanoTagPlugin/mocks/mock3.d.ts +11 -3
  174. package/dist/floorplan/TopviewFloorplanPlugin/PanoTagPlugin/typings/controller.d.ts +3 -0
  175. package/dist/floorplan/TopviewFloorplanPlugin/PanoTagPlugin/typings/tag.d.ts +10 -0
  176. package/dist/floorplan/TopviewFloorplanPlugin/PanoTagPlugin/utils/noTypecheck.d.ts +1 -1
  177. package/dist/index.es.js +5063 -570
  178. package/dist/index.js +5075 -582
  179. package/dist/index.umd.js +5072 -584
  180. package/docs/assets/search.js +1 -1
  181. package/docs/classes/CruisePluginController.html +14 -14
  182. package/docs/classes/Magnifier.html +4 -4
  183. package/docs/classes/ModelRoomLabelController.html +4 -4
  184. package/docs/classes/Object3DHelperController.html +9 -9
  185. package/docs/classes/PanoTagPluginController.html +23 -51
  186. package/docs/enums/CameraMovementEffect.html +2 -2
  187. package/docs/enums/ContentType.html +7 -7
  188. package/docs/enums/DIRECTION.html +1 -1
  189. package/docs/enums/DISPLAY_STRATEGY_TYPE.html +1 -1
  190. package/docs/enums/DimensionType.html +1 -1
  191. package/docs/enums/FLOOR_PLAN_ATTACHED_TO.html +1 -1
  192. package/docs/enums/ITEM_LABEL_PLUGIN_DISPLAY_STRATEGY_TYPE.html +1 -1
  193. package/docs/enums/LinkType.html +1 -1
  194. package/docs/enums/PointType.html +1 -1
  195. package/docs/enums/Rotation.html +2 -2
  196. package/docs/index.html +1 -1
  197. package/docs/interfaces/CSS3DRenderPluginEventMap.html +2 -2
  198. package/docs/interfaces/CSS3DRenderPluginState.html +2 -2
  199. package/docs/interfaces/CameraMovementPluginExportType.html +2 -2
  200. package/docs/interfaces/FloorplanBounding.html +4 -4
  201. package/docs/interfaces/FloorplanData.html +2 -2
  202. package/docs/interfaces/FloorplanEntrance.html +7 -7
  203. package/docs/interfaces/FloorplanExtraObject.html +3 -3
  204. package/docs/interfaces/FloorplanExtraObject3D.html +2 -2
  205. package/docs/interfaces/FloorplanFloorData.html +2 -2
  206. package/docs/interfaces/FloorplanImagePosition.html +2 -2
  207. package/docs/interfaces/FloorplanObserver.html +2 -2
  208. package/docs/interfaces/FloorplanOutlineItem.html +2 -2
  209. package/docs/interfaces/FloorplanPosition.html +2 -2
  210. package/docs/interfaces/FloorplanRoomItem.html +6 -6
  211. package/docs/interfaces/FloorplanRoomLabelItem.html +3 -3
  212. package/docs/interfaces/FloorplanServerBounding.html +4 -4
  213. package/docs/interfaces/FloorplanServerComputedData.html +1 -1
  214. package/docs/interfaces/FloorplanServerData.html +2 -2
  215. package/docs/interfaces/FloorplanServerDoorItem.html +1 -1
  216. package/docs/interfaces/FloorplanServerDoorPosition.html +1 -1
  217. package/docs/interfaces/FloorplanServerEntrance.html +7 -7
  218. package/docs/interfaces/FloorplanServerFloorData.html +2 -2
  219. package/docs/interfaces/FloorplanServerImagePosition.html +2 -2
  220. package/docs/interfaces/FloorplanServerObserver.html +2 -2
  221. package/docs/interfaces/FloorplanServerOutlineItem.html +2 -2
  222. package/docs/interfaces/FloorplanServerPosition.html +2 -2
  223. package/docs/interfaces/FloorplanServerRoomItem.html +7 -7
  224. package/docs/interfaces/FloorplanServerRoomLabelItem.html +3 -3
  225. package/docs/interfaces/ItemLabelPluginData.html +1 -1
  226. package/docs/interfaces/ItemLabelPluginExportReturnsType.html +1 -1
  227. package/docs/interfaces/ItemLabelPluginParametersType.html +1 -1
  228. package/docs/interfaces/LineJson.html +1 -1
  229. package/docs/interfaces/ModelChassisCompassPluginData.html +1 -1
  230. package/docs/interfaces/ModelChassisCompassPluginExportType.html +1 -1
  231. package/docs/interfaces/ModelChassisCompassPluginParameterType.html +1 -1
  232. package/docs/interfaces/ModelEntryDoorGuidePluginData.html +1 -1
  233. package/docs/interfaces/ModelEntryDoorGuidePluginExportType.html +1 -1
  234. package/docs/interfaces/ModelItemLabelPluginData.html +1 -1
  235. package/docs/interfaces/ModelItemLabelPluginExportReturnsType.html +1 -1
  236. package/docs/interfaces/ModelItemLabelPluginParametersType.html +1 -1
  237. package/docs/interfaces/ModelRoomLabelPluginData.html +1 -1
  238. package/docs/interfaces/ModelTVVideoPluginData.html +1 -1
  239. package/docs/interfaces/ModelTVVideoPluginExportType.html +1 -1
  240. package/docs/interfaces/ModelTVVideoPluginParameterType.html +1 -1
  241. package/docs/interfaces/ModelViewPluginExportType.html +1 -1
  242. package/docs/interfaces/Object3DHelperState.html +1 -1
  243. package/docs/interfaces/OpenParameter.html +2 -2
  244. package/docs/interfaces/PanoCursorRaycasterPluginExportType.html +6 -6
  245. package/docs/interfaces/PanoCursorRaycasterPluginParameterType.html +1 -1
  246. package/docs/interfaces/PanoMeasureParameterType.html +1 -1
  247. package/docs/interfaces/PanoRulerPluginExportType.html +1 -1
  248. package/docs/interfaces/PanoRulerPluginOptions.html +1 -1
  249. package/docs/interfaces/PanoRulerPluginParameterType.html +1 -1
  250. package/docs/interfaces/PanoRulerProPluginExportType.html +1 -1
  251. package/docs/interfaces/PanoRulerProPluginOptions.html +1 -1
  252. package/docs/interfaces/PanoRulerProPluginParameterType.html +1 -1
  253. package/docs/interfaces/PanoRulerProPluginState.html +1 -1
  254. package/docs/interfaces/PanoSpatialTagPluginContentEvent.html +1 -1
  255. package/docs/interfaces/PanoSpatialTagPluginContentReplacement.html +1 -1
  256. package/docs/interfaces/PanoSpatialTagPluginData.html +1 -1
  257. package/docs/interfaces/PanoSpatialTagPluginDataElement.html +1 -1
  258. package/docs/interfaces/PanoSpatialTagPluginExportType.html +1 -1
  259. package/docs/interfaces/PanoSpatialTagPluginOriginElement.html +1 -1
  260. package/docs/interfaces/PanoSpatialTagPluginParameterType.html +1 -1
  261. package/docs/interfaces/PanoSpatialTagPluginPointElement.html +1 -1
  262. package/docs/interfaces/PanoSpatialTagPluginTagElement.html +1 -1
  263. package/docs/interfaces/Point.html +1 -1
  264. package/docs/interfaces/PointJson.html +1 -1
  265. package/docs/interfaces/Room.html +1 -1
  266. package/docs/interfaces/RoomInfo.html +1 -1
  267. package/docs/interfaces/RoomLabel.html +7 -7
  268. package/docs/interfaces/RoomRules.html +1 -1
  269. package/docs/interfaces/Rooms.html +1 -1
  270. package/docs/interfaces/Scissor.html +5 -5
  271. package/docs/interfaces/TagConfig.html +3 -3
  272. package/docs/interfaces/Tags.html +3 -3
  273. package/docs/modules.html +21 -21
  274. package/libs/PanoTagPlugin/Components/Common/Media.js +347 -194
  275. package/libs/PanoTagPlugin/Components/Common/MediaItem.js +216 -0
  276. package/libs/PanoTagPlugin/Components/Common/Text.js +1 -2
  277. package/libs/PanoTagPlugin/Components/Tag/ImageTextTag.js +1 -0
  278. package/libs/PanoTagPlugin/Components/Tag/MediaPlane.js +37 -17
  279. package/libs/PanoTagPlugin/controller/TagComputer.d.ts +10 -11
  280. package/libs/PanoTagPlugin/controller/TagComputer.js +14 -22
  281. package/libs/PanoTagPlugin/controller/index.d.ts +9 -4
  282. package/libs/PanoTagPlugin/controller/index.js +50 -23
  283. package/libs/PanoTagPlugin/mocks/mock1.d.ts +12 -4
  284. package/libs/PanoTagPlugin/mocks/mock1.js +10 -5
  285. package/libs/PanoTagPlugin/mocks/mock3.d.ts +11 -3
  286. package/libs/PanoTagPlugin/mocks/mock3.js +21 -22
  287. package/libs/PanoTagPlugin/typings/controller.d.ts +3 -0
  288. package/libs/PanoTagPlugin/typings/tag.d.ts +10 -0
  289. package/libs/PanoTagPlugin/utils/noTypecheck.d.ts +1 -1
  290. package/package.json +2 -1
  291. package/libs/CSS3DRenderPlugin/Plugin.d.ts +0 -49
  292. package/libs/CSS3DRenderPlugin/Plugin.js +0 -182
  293. package/libs/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +0 -7
  294. package/libs/CSS3DRenderPlugin/utils/createResizeObserver.js +0 -18
  295. package/libs/GuideLinePlugin/utils/getLineGeometry.d.ts +0 -2
  296. package/libs/GuideLinePlugin/utils/getLineGeometry.js +0 -64
  297. package/libs/PanoTagPlugin/Components/Tag/MediaPanel.js +0 -159
@@ -9,9 +9,10 @@ import { TagComputer } from './TagComputer';
9
9
  import { CSS3DRenderPlugin } from '../../CSS3DRenderPlugin';
10
10
  import { DimensionType, PointType } from '../typings';
11
11
  // declare const __APP_VERSION__: string
12
- const VERSION = '0.3.7';
12
+ const VERSION = '1.0.0';
13
13
  const PLUGIN_NAME = `DnalogelPlugin-PanoTagPlugin@${VERSION}`;
14
- const TAG_INITIAL_UNFOLDED = true;
14
+ // 初始是否展开
15
+ const TAG_INITIAL_UNFOLDED = false;
15
16
  export const pluginFlag = (name) => `${PLUGIN_NAME}--${name}`;
16
17
  class PanoTagPluginController extends TagComputer {
17
18
  constructor(five, params) {
@@ -121,8 +122,9 @@ class PanoTagPluginController extends TagComputer {
121
122
  /**
122
123
  * @description: 加载数据
123
124
  */
124
- load(data) {
125
+ load(data, config) {
125
126
  var _a, _b;
127
+ this.clearTags();
126
128
  console.log(PLUGIN_NAME, 'load:', { data });
127
129
  if (this.params.mergePluginDefaultConfigToLoadDataConfig) {
128
130
  this.config = objectAssignDeep({}, this.config, {
@@ -136,17 +138,15 @@ class PanoTagPluginController extends TagComputer {
136
138
  if (data.contentTypeConfig)
137
139
  this.config.contentTypeConfig = data.contentTypeConfig;
138
140
  }
139
- this.clearCache();
140
- this.disposeAllCSS3DContainer();
141
- this.tags = [];
142
- this.addTag(data.tagList);
141
+ this.addTag(data.tagList, config);
142
+ // debug
143
143
  if (this.debug)
144
144
  addDebugPoints(this.five, this.tags);
145
145
  }
146
146
  /**
147
147
  * @description: 添加标签
148
148
  */
149
- addTag(tag) {
149
+ addTag(tag, config) {
150
150
  const tags = Array.isArray(tag) ? tag : [tag];
151
151
  const _tags = tags
152
152
  .map((tag) => {
@@ -156,7 +156,7 @@ class PanoTagPluginController extends TagComputer {
156
156
  .filter((tag) => tag.position);
157
157
  this.tags.push(..._tags);
158
158
  actionAfterFiveModelLoad(this.five, () => {
159
- var _a, _b;
159
+ var _a, _b, _c;
160
160
  // 添加事件
161
161
  if (this.store.eventListenerDisposer) {
162
162
  (_b = (_a = this.store).eventListenerDisposer) === null || _b === void 0 ? void 0 : _b.call(_a);
@@ -172,10 +172,18 @@ class PanoTagPluginController extends TagComputer {
172
172
  }, 200);
173
173
  }
174
174
  this.checkPanelTag();
175
- this.setVisibleAndUnfoldedByPanoIndex();
176
- this.updateRenderAllTag();
175
+ // v0.3.8 新增 withAnimation,默认 false
176
+ // v1.0.0 withAnimation 默认值改为 true
177
+ this.setVisibleAndUnfolded({ withAnimation: (_c = config === null || config === void 0 ? void 0 : config.withAnimation) !== null && _c !== void 0 ? _c : true }).then(() => this.updateRenderAllTags());
178
+ this.updateRenderAllTags();
177
179
  });
178
180
  }
181
+ clearTags() {
182
+ this.tags = [];
183
+ this.clearCache();
184
+ this.disposeAllCSS3DContainer();
185
+ this.updateRenderAllTags();
186
+ }
179
187
  async show(params) {
180
188
  const { userAction = true, withAnimation = false } = params !== null && params !== void 0 ? params : {};
181
189
  if (this.store.disposed)
@@ -266,7 +274,7 @@ class PanoTagPluginController extends TagComputer {
266
274
  }
267
275
  // 3D 转 2D 的时候要销毁 3D container
268
276
  this.checkPanelTag();
269
- this.updateRenderAllTag();
277
+ this.updateRenderAllTags();
270
278
  }
271
279
  /**
272
280
  * @description: 改变tag任意属性
@@ -284,7 +292,7 @@ class PanoTagPluginController extends TagComputer {
284
292
  if ((currentTag === null || currentTag === void 0 ? void 0 : currentTag.tag3DContentSvelte) && (tag === null || tag === void 0 ? void 0 : tag.normal)) {
285
293
  currentTag.tag3DContentSvelte.currentNormal = arrayPositionToVector3(tag.normal);
286
294
  }
287
- this.updateRenderAllTag();
295
+ this.updateRenderAllTags();
288
296
  this.checkPanelTag();
289
297
  }
290
298
  /**
@@ -298,12 +306,31 @@ class PanoTagPluginController extends TagComputer {
298
306
  return;
299
307
  this.tags.splice(index, 1);
300
308
  });
301
- this.updateRenderAllTag();
309
+ this.updateRenderAllTags();
302
310
  }
303
311
  /** 暂停当前标签内进行的所有多媒体 */
304
312
  pauseCurrentMedia() {
305
313
  this.mediaStore.set({ currentMediaUrl: '' });
306
314
  }
315
+ /**
316
+ * @description: 设置 visible 和 unfolded
317
+ */
318
+ async setVisibleAndUnfolded({ withAnimation } = { withAnimation: false }) {
319
+ this.setVisibleByPanoIndex();
320
+ if (withAnimation) {
321
+ return new Promise((resolve, reject) => {
322
+ // setTimeout 初始隐藏,然后展开,而不是一步到位,要不就没动画了
323
+ setTimeout(() => {
324
+ this.setUnfoldedByPanoIndex();
325
+ resolve();
326
+ }, 10); // 10ms 是等待 TextTag onMount
327
+ });
328
+ }
329
+ else {
330
+ this.setUnfoldedByPanoIndex();
331
+ return Promise.resolve();
332
+ }
333
+ }
307
334
  handleShow() {
308
335
  this.state.visible = true;
309
336
  this.updateTagContainerVisible();
@@ -314,7 +341,7 @@ class PanoTagPluginController extends TagComputer {
314
341
  }
315
342
  handleEnable() {
316
343
  this.state.enabled = true;
317
- this.updateRenderAllTag();
344
+ this.updateRenderAllTags();
318
345
  }
319
346
  handleDisable() {
320
347
  var _a;
@@ -360,7 +387,7 @@ class PanoTagPluginController extends TagComputer {
360
387
  // resize
361
388
  const show = () => {
362
389
  this.show();
363
- this.updateRenderAllTag();
390
+ this.updateRenderAllTags();
364
391
  };
365
392
  const { observe: hideObserve, unobserve: hideUnobserve } = resizeObserver(throttle(() => {
366
393
  /**
@@ -398,7 +425,7 @@ class PanoTagPluginController extends TagComputer {
398
425
  tag.temporaryState = Object.assign(Object.assign({}, tag.temporaryState), { visible: false });
399
426
  }
400
427
  });
401
- this.updateRenderAllTag();
428
+ this.updateRenderAllTags();
402
429
  }
403
430
  /**
404
431
  * @description: 走点/切换模型后显示
@@ -436,13 +463,13 @@ class PanoTagPluginController extends TagComputer {
436
463
  tag.state.unfolded = false;
437
464
  });
438
465
  }
439
- this.updateRenderAllTag();
466
+ this.updateRenderAllTags();
440
467
  }
441
468
  }
442
469
  /**
443
470
  * @description: 更新所有标签
444
471
  */
445
- updateRenderAllTag() {
472
+ updateRenderAllTags() {
446
473
  this.updateRenderPointTag();
447
474
  this.updateRenderPlaneTag();
448
475
  }
@@ -463,20 +490,20 @@ class PanoTagPluginController extends TagComputer {
463
490
  // 设置展开/收起
464
491
  this.setUnfoldedByCamera();
465
492
  // 渲染
466
- this.updateRenderAllTag();
493
+ this.updateRenderAllTags();
467
494
  }, 100);
468
495
  }
469
496
  handleFiveCameraUpdate() {
470
497
  // 渲染
471
498
  this.updateRenderPointTag();
472
499
  }
473
- handleFivePanoArrived() {
474
- this.setVisibleAndUnfoldedByPanoIndex();
500
+ async handleFivePanoArrived() {
501
+ await this.setVisibleAndUnfolded();
475
502
  this.tags.forEach((tag) => {
476
503
  tag.temporaryState = Object.assign(Object.assign({}, tag.temporaryState), { visible: true });
477
504
  });
478
505
  // 渲染
479
- this.updateRenderAllTag();
506
+ this.updateRenderAllTags();
480
507
  }
481
508
  setUnfoldedByCamera() {
482
509
  let hasTagUnfolded = false; // 是否有标签由于camera的转动而展开
@@ -30,11 +30,15 @@ declare const _default: {
30
30
  position: number[];
31
31
  data: {
32
32
  text: string;
33
- mediaData: {
33
+ mediaData: ({
34
34
  url: string;
35
35
  videoCoverUrl: string;
36
36
  type: string;
37
- }[];
37
+ } | {
38
+ url: string;
39
+ type: string;
40
+ videoCoverUrl?: undefined;
41
+ })[];
38
42
  title?: undefined;
39
43
  brandTags?: undefined;
40
44
  tags?: undefined;
@@ -52,11 +56,15 @@ declare const _default: {
52
56
  contentType: string;
53
57
  position: number[][];
54
58
  data: {
55
- mediaData: {
59
+ mediaData: ({
56
60
  url: string;
57
61
  videoCoverUrl: string;
58
62
  type: string;
59
- }[];
63
+ } | {
64
+ url: string;
65
+ type: string;
66
+ videoCoverUrl?: undefined;
67
+ })[];
60
68
  text?: undefined;
61
69
  title?: undefined;
62
70
  brandTags?: undefined;
@@ -15,7 +15,6 @@ const tagList = [
15
15
  text: '🙋‍♂️123标题标题🙋‍♂️🙋‍♂️🙋‍♂️🙋‍♂️🙋‍♂️🙋‍♂️标题标🙋‍♂️🙋‍♂️🙋‍♂️🙋‍♂️🙋‍♂️🙋‍♂️🙋‍♂️🙋‍♂️🙋‍♂️🙋‍♂️🙋‍♂️🙋‍♂️🙋‍♂️🙋‍♂️🙋‍♂️🙋‍♂️题标题标题标题标题标',
16
16
  },
17
17
  // element: (content: HTMLElement) => {
18
- // console.log(content)
19
18
  // const a = document.createElement('p')
20
19
  // a.style.width = '100px'
21
20
  // a.style.height = '100px'
@@ -46,8 +45,11 @@ const tagList = [
46
45
  type: 'Video',
47
46
  },
48
47
  {
49
- url: '//vrlab-static.ljcdn.com/release/web/jsl/test.65720b34.png',
50
- videoCoverUrl: '//vrlab-static.ljcdn.com/release/web/jsl/test.65720b34.png',
48
+ url: '//vrlab-static.ljcdn.com/release/web/arrow.c5d028e4.png',
49
+ type: 'Image',
50
+ },
51
+ {
52
+ url: '//vrlab-static.ljcdn.com/release/web/arrow.c5d028e4.png',
51
53
  type: 'Image',
52
54
  },
53
55
  ],
@@ -66,8 +68,11 @@ const tagList = [
66
68
  type: 'Video',
67
69
  },
68
70
  {
69
- url: '//vrlab-static.ljcdn.com/release/web/jsl/test.65720b34.png',
70
- videoCoverUrl: '//vrlab-static.ljcdn.com/release/web/jsl/test.65720b34.png',
71
+ url: '//vrlab-static.ljcdn.com/release/web/arrow.c5d028e4.png',
72
+ type: 'Image',
73
+ },
74
+ {
75
+ url: '//vrlab-static.ljcdn.com/release/web/arrow.c5d028e4.png',
71
76
  type: 'Image',
72
77
  },
73
78
  ],
@@ -1,14 +1,22 @@
1
1
  declare const _default: {
2
2
  tagList: {
3
3
  id: number;
4
- pointType: string;
5
4
  dimensionType: string;
5
+ pointType: string;
6
+ contentType: string;
6
7
  position: number[];
7
8
  data: {
8
9
  text: string;
10
+ mediaData: ({
11
+ url: string;
12
+ videoCoverUrl: string;
13
+ type: string;
14
+ } | {
15
+ url: string;
16
+ type: string;
17
+ videoCoverUrl?: undefined;
18
+ })[];
9
19
  };
10
- normal: number[];
11
- contentType: string;
12
20
  }[];
13
21
  };
14
22
  export default _default;
@@ -1,31 +1,30 @@
1
1
  export default {
2
2
  tagList: [
3
- {
4
- id: 2,
5
- pointType: 'PointTag',
6
- dimensionType: '3D',
7
- position: [-0.8998534645219779, -0.053330655526465105, 0.9791677844715473],
8
- data: {
9
- text: '我是一个3d文字标签',
10
- },
11
- // style: {
12
- // point: {
13
- // style: 'CustomIcon',
14
- // iconUrl: '//vrlab-static.ljcdn.com/release/web/carTagDotContent.08ace25e.png',
15
- // },
16
- // },
17
- normal: [0.6766569516112458, 0, -0.7362984244422746],
18
- contentType: 'Text',
19
- },
20
3
  {
21
4
  id: 1,
22
- dimensionType: '3D',
5
+ dimensionType: '2D',
23
6
  pointType: 'PointTag',
24
- contentType: 'Text',
25
- normal: [-1.3472052051879881, -0.22353184120423517, -0.4423657342911711],
26
- position: [2.4858952, 0.12852754341132364, -3.848354251670743],
7
+ contentType: 'ImageText',
8
+ position: [1.1163144338520299, -1.4289252462321484, -7.767970762686076],
9
+ // normal: [-1.3472052051879881, -0.22353184120423517, -0.4423657342911711],
10
+ // position: [2.4858952, 0.12852754341132364, -3.848354251670743],
27
11
  data: {
28
- text: '112123',
12
+ text: '哈哈哈',
13
+ mediaData: [
14
+ {
15
+ url: '//vrlab-static.ljcdn.com/release/web/jsl/test.69dacffb.mp4',
16
+ videoCoverUrl: '//vrlab-static.ljcdn.com/release/web/jsl/test.65720b34.png',
17
+ type: 'Video',
18
+ },
19
+ {
20
+ url: '//vrlab-static.ljcdn.com/release/web/arrow.c5d028e4.png',
21
+ type: 'Image',
22
+ },
23
+ {
24
+ url: '//vrlab-static.ljcdn.com/release/web/arrow.c5d028e4.png',
25
+ type: 'Image',
26
+ },
27
+ ],
29
28
  },
30
29
  },
31
30
  ],
@@ -12,6 +12,9 @@ export declare type Hooks = InstanceType<typeof PanoTagPluginController>['hooks'
12
12
  declare type NonNullable<T> = T extends null | undefined | void ? never : T;
13
13
  export interface State extends BasePlugin.State {
14
14
  }
15
+ export interface AddTagConfig {
16
+ withAnimation?: boolean;
17
+ }
15
18
  export interface TemporaryState {
16
19
  visible?: boolean;
17
20
  }
@@ -211,6 +211,16 @@ interface ContentTypeMap {
211
211
  adaptationMode?: 'stretch' | 'proportional';
212
212
  /** object-fit doc {@link https://developer.mozilla.org/zh-CN/docs/Web/CSS/object-fit} */
213
213
  objectFit?: ObjectFit;
214
+ /**
215
+ * @description 是否开启自动轮播
216
+ * @param autoplay true: 开启自动轮播, false: 关闭自动播放
217
+ * @param autoplayVideo 自动轮播时,如果是视频, 则自动播放视频
218
+ * @default 默认值 { autoplay: true, autoplayVideo: false }
219
+ */
220
+ autoplayConfig?: {
221
+ autoplay: boolean;
222
+ autoplayVideo: boolean;
223
+ };
214
224
  mediaData: MediaData[];
215
225
  extraData?: Object;
216
226
  };
@@ -1 +1 @@
1
- export declare const noTypecheck: (x: any) => any;
1
+ export declare const noTypecheck: <T = any>(x: T) => any;
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "repository": "https://github.com/realsee-developer/dnalogel.git",
9
9
  "description": "如视 VR 看房插件合集",
10
10
  "private": false,
11
- "version": "2.1.0-alpha.11",
11
+ "version": "2.1.0-alpha.13",
12
12
  "license": "SEE LICENSE IN TERMS.txt",
13
13
  "scripts": {
14
14
  "build": "yarn run tsb && yarn run build:rollup && yarn run build:components && yarn build:docs",
@@ -71,6 +71,7 @@
71
71
  "svelte": "^3.49.0",
72
72
  "classnames": "^2.3.1",
73
73
  "object-assign-deep": "0.4.0",
74
+ "swiper": "^8.4.3",
74
75
  "animejs": "^3.2.1"
75
76
  }
76
77
  }
@@ -1,49 +0,0 @@
1
- import type { FivePlugin } from '@realsee/five';
2
- import type { Vector3Position } from '../typings/math.type';
3
- import { Vector3 } from 'three';
4
- import { CSS3DObject } from 'three/examples/jsm/renderers/CSS3DRenderer';
5
- export declare type CSS3DRenderPluginParameterType = undefined;
6
- export interface CSS3DRenderPluginExportType {
7
- /**
8
- * @description: 根据传入的四个点位创建一个3d dom容器,可以通过ReactDom.render()的方式将react组件放到容器中
9
- * @param {Five} five
10
- * @param {Vector3[] | Vector3Position[]} points: 矩形四个点坐标
11
- * @param {number} config.ratio: 1px对应多少米,默认为 0.002,即1px对应2mm
12
- * @param {number} config.dpr: dpr, 默认为1
13
- * @param {HTMLElement} config.container: HTMLElement
14
- * @param {number} config.autoRender: 默认为true,如果需要手动render则传false
15
- * @param {'front' | 'behind'} config.mode: 两种模式
16
- * @param {HTMLElement} config.behindFiveContainer: 如果config.mode为'behind',需要传入容器,并确保此容器位five下方,且中间没有其他dom元素遮挡
17
- * @return {{ container: HTMLElement; dispose: () => void }}: container: dom容器, dispose: 清理函数
18
- */
19
- create3DDomContainer: (points: Vector3[] | Vector3Position[], config?: {
20
- ratio?: number;
21
- dpr?: number;
22
- autoRender?: boolean;
23
- container?: HTMLElement;
24
- [key: string]: any;
25
- } & ({
26
- mode?: 'front';
27
- } | {
28
- mode: 'behind';
29
- behindFiveContainer: HTMLElement;
30
- })) => {
31
- container: HTMLElement;
32
- dispose: () => void;
33
- css3DObject: CSS3DObject;
34
- render?: () => void;
35
- } | void;
36
- /**
37
- * @description: 销毁所有的渲染内容
38
- * @return {void}
39
- */
40
- disposeAll: () => void;
41
- }
42
- /**
43
- * **CSS3DRenderPlugin** 提供矩形区域(三维空间四个坐标点),你可以在此矩形区域中渲染 DOM 内容。
44
- * 实现原理参考[CSS3DRenderer](https://threejs.org/docs/index.html?q=CSS3D#examples/en/renderers/CSS3DRenderer)。
45
- *
46
- * @returns
47
- */
48
- export declare const CSS3DRenderPlugin: FivePlugin<CSS3DRenderPluginParameterType, CSS3DRenderPluginExportType>;
49
- export default CSS3DRenderPlugin;
@@ -1,182 +0,0 @@
1
- import * as THREE from 'three';
2
- import { Scene, Vector3 } from 'three';
3
- import { CSS3DObject, CSS3DRenderer } from 'three/examples/jsm/renderers/CSS3DRenderer';
4
- import evenNumber from '../shared-utils/math/evenNumber';
5
- import centerPoint from '../shared-utils/three/centerPoint';
6
- import transformPositionToVector3 from '../shared-utils/three/transformPositionToVector3';
7
- import createResizeObserver from './utils/createResizeObserver';
8
- /**
9
- * **CSS3DRenderPlugin** 提供矩形区域(三维空间四个坐标点),你可以在此矩形区域中渲染 DOM 内容。
10
- * 实现原理参考[CSS3DRenderer](https://threejs.org/docs/index.html?q=CSS3D#examples/en/renderers/CSS3DRenderer)。
11
- *
12
- * @returns
13
- */
14
- export const CSS3DRenderPlugin = (five) => {
15
- const state = { disposeCallbacks: [] };
16
- const create3DDomContainer = (...params) => {
17
- var _a, _b, _c;
18
- const points = params[0].map((point) => (point instanceof Vector3 ? point : transformPositionToVector3(point)));
19
- const config = params[1];
20
- if ((points === null || points === void 0 ? void 0 : points.length) < 4)
21
- return console.error('points must be equal or greater than than 4');
22
- if (!((_a = five === null || five === void 0 ? void 0 : five.model) === null || _a === void 0 ? void 0 : _a.loaded))
23
- return console.error('five.model.loaded is: ', (_b = five === null || five === void 0 ? void 0 : five.model) === null || _b === void 0 ? void 0 : _b.loaded);
24
- const fiveElement = five.getElement();
25
- if (!fiveElement)
26
- return console.error('five.getElement() is ' + fiveElement);
27
- const disposers = [];
28
- const ratio = (config === null || config === void 0 ? void 0 : config.ratio) || 0.00216;
29
- if (ratio <= 0.00215)
30
- console.warn('if you need click css3DElement on safari, ratio must be greater than 0.00215');
31
- const dpr = (config === null || config === void 0 ? void 0 : config.dpr) || 1;
32
- const mode = (config === null || config === void 0 ? void 0 : config.mode) || 'front';
33
- const autoRender = (_c = config === null || config === void 0 ? void 0 : config.autoRender) !== null && _c !== void 0 ? _c : true;
34
- const behindFiveContainer = (config === null || config === void 0 ? void 0 : config.behindFiveContainer) || fiveElement.parentElement || document.body;
35
- const container = (config === null || config === void 0 ? void 0 : config.container) || document.createElement('div');
36
- container.classList.add('__Dnalogel-plugin--CSS3DRenderPlugin');
37
- // 获取css3DObject, 如果mode为behind的话,一起获取mesh
38
- const { css3DObject, mesh } = createObject(points, { ratio, dpr, container, mode });
39
- // ======= INIT START =======
40
- let resizeObserver;
41
- const frontModeUnInited = mode === 'front' && !state.frontMode;
42
- const behindModeUnInited = mode === 'behind' && !state.behindMode;
43
- const inited = !(frontModeUnInited || behindModeUnInited);
44
- if (behindModeUnInited) {
45
- state.behindMode = { scene: new Scene(), css3DRenderer: new CSS3DRenderer() };
46
- }
47
- if (frontModeUnInited) {
48
- state.frontMode = { scene: new Scene(), css3DRenderer: new CSS3DRenderer() };
49
- }
50
- const stateMode = mode === 'behind' ? state.behindMode : state.frontMode;
51
- const { scene, css3DRenderer } = stateMode;
52
- const render = (() => {
53
- if (!inited) {
54
- const css3DRendererSetSize = () => {
55
- // 这里evenNumber策略是遇到奇数会加1,不知道为啥会触发滚动条显示,导致fiveElement变小,fiveElement变小又触发了这里的resize,宽高变小,滚动条消失,然后又触发resize。。。无限循环
56
- // 为了规避上面这种情况,evenNumber设置了一个参数,遇到奇数可选择减一
57
- const rendererWidth = evenNumber(fiveElement.clientWidth, { smaller: true });
58
- const rendererHeight = evenNumber(fiveElement.clientHeight, { smaller: true });
59
- css3DRenderer.setSize(rendererWidth, rendererHeight);
60
- };
61
- css3DRendererSetSize();
62
- resizeObserver = createResizeObserver(css3DRendererSetSize, fiveElement);
63
- css3DRenderer.domElement.style.position = 'absolute';
64
- css3DRenderer.domElement.style.top = '0';
65
- css3DRenderer.domElement.style.userSelect = 'none';
66
- css3DRenderer.domElement.style.pointerEvents = 'none';
67
- const renderEveryFrame = () => {
68
- const requestAnimationFrameId = requestAnimationFrame(renderEveryFrame);
69
- stateMode.requestAnimationFrameId = requestAnimationFrameId;
70
- css3DRenderer.render(scene, five.camera);
71
- };
72
- return () => {
73
- var _a;
74
- scene.add(css3DObject);
75
- (_a = resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.observe) === null || _a === void 0 ? void 0 : _a.call(resizeObserver);
76
- renderEveryFrame();
77
- if (mode === 'behind' && mesh) {
78
- five.scene.add(mesh);
79
- disposers.push(() => mesh && five.scene.remove(mesh));
80
- }
81
- };
82
- }
83
- else {
84
- return () => {
85
- scene.add(css3DObject);
86
- };
87
- }
88
- })();
89
- if (frontModeUnInited) {
90
- const wrapper = fiveElement.parentElement || document.body;
91
- wrapper.appendChild(css3DRenderer.domElement);
92
- }
93
- if (behindModeUnInited) {
94
- const wrapper = behindFiveContainer;
95
- wrapper.appendChild(css3DRenderer.domElement);
96
- }
97
- // ======= INIT END =======
98
- const dispose = () => {
99
- var _a;
100
- disposers.forEach((d) => d === null || d === void 0 ? void 0 : d());
101
- scene.remove(css3DObject);
102
- if (scene.children.length === 0) {
103
- if (typeof stateMode.requestAnimationFrameId === 'number') {
104
- cancelAnimationFrame(stateMode.requestAnimationFrameId);
105
- }
106
- css3DRenderer.domElement.remove();
107
- if (mode === 'front')
108
- state.frontMode = undefined;
109
- if (mode === 'behind')
110
- state.behindMode = undefined;
111
- if (!state.behindMode && !state.frontMode) {
112
- (_a = resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.unobserve) === null || _a === void 0 ? void 0 : _a.call(resizeObserver);
113
- }
114
- }
115
- return true;
116
- };
117
- const idx = state.disposeCallbacks.findIndex((item) => item === dispose);
118
- if (idx !== -1) {
119
- state.disposeCallbacks.splice(idx, 1);
120
- }
121
- else {
122
- state.disposeCallbacks.push(dispose);
123
- }
124
- if (autoRender)
125
- render();
126
- return { container, dispose, css3DObject, render: autoRender ? undefined : render };
127
- };
128
- const createObject = (points, config) => {
129
- const { ratio, dpr, container: element, mode } = config;
130
- const planeWidth = points[0].distanceTo(points[1]);
131
- const planeHeight = points[1].distanceTo(points[2]);
132
- const domWidthPx = evenNumber((planeWidth / ratio) * dpr);
133
- const domHeightPx = evenNumber((planeHeight / ratio) * dpr);
134
- const css3DObject = new CSS3DObject(element);
135
- css3DObject.scale.set(ratio, ratio, ratio);
136
- element.style.width = domWidthPx + 'px';
137
- element.style.height = domHeightPx + 'px';
138
- element.style.pointerEvents = 'none';
139
- const centerPosition = centerPoint(points[0], points[2]);
140
- const vector01 = points[1].clone().sub(points[0]); // 点0 -> 点1 的向量
141
- const vector12 = points[2].clone().sub(points[1]); // 点1 -> 点2 的向量
142
- // 旋转
143
- const rotateXAngle = new Vector3(0, 1, 0).angleTo(new Vector3(0, vector12.y, vector12.z));
144
- const rotateYAngle = new Vector3(1, 0, 0).angleTo(new Vector3(vector01.x, 0, vector01.z));
145
- const rotateZAngle = vector01.angleTo(new Vector3(vector01.x, 0, vector01.z));
146
- /**
147
- * [0,1,0] => [0,0,1] 为rotate Worldx正方向
148
- * [0,0,1] => [0,1,0] 为rotate Worldy正方向
149
- * [0,1,1] => [-1,0,0] 为rotate Worldz正方向
150
- */
151
- const rotateX = (vector12.z > 0 ? -1 : 1) * rotateXAngle;
152
- const rotateY = (vector01.z < 0 ? 1 : -1) * rotateYAngle;
153
- const rotateZ = ((vector01.x > 0 && vector01.y < 0) || (vector01.x < 0 && vector01.y > 0) ? -1 : 1) * rotateZAngle;
154
- css3DObject.rotateOnWorldAxis(new Vector3(1, 0, 0), rotateX); // x
155
- css3DObject.rotateOnWorldAxis(new Vector3(0, 1, 0), rotateY); // y
156
- css3DObject.rotateOnWorldAxis(new Vector3(0, 0, 1), rotateZ); // z
157
- css3DObject.position.set(centerPosition.x, centerPosition.y, centerPosition.z);
158
- let mesh;
159
- if (mode === 'behind') {
160
- const material = new THREE.MeshBasicMaterial({
161
- opacity: 0,
162
- transparent: false,
163
- side: THREE.DoubleSide,
164
- });
165
- const geometry = new THREE.PlaneGeometry(domWidthPx, domHeightPx);
166
- mesh = new THREE.Mesh(geometry, material);
167
- mesh.name = 'CSS3DRenderPlugin-mesh';
168
- mesh.position.copy(css3DObject.position);
169
- mesh.rotation.copy(css3DObject.rotation);
170
- mesh.scale.copy(css3DObject.scale);
171
- }
172
- return { css3DObject, mesh };
173
- };
174
- return {
175
- create3DDomContainer,
176
- disposeAll: () => {
177
- state.disposeCallbacks.forEach((d) => d === null || d === void 0 ? void 0 : d());
178
- state.disposeCallbacks = [];
179
- },
180
- };
181
- };
182
- export default CSS3DRenderPlugin;
@@ -1,7 +0,0 @@
1
- /**
2
- * @description: 究极简陋的 ResizeObserver polyfill
3
- */
4
- export default function createResizeObserver(func: () => any, element?: HTMLElement): {
5
- observe: () => void;
6
- unobserve: () => void;
7
- };
@@ -1,18 +0,0 @@
1
- /**
2
- * @description: 究极简陋的 ResizeObserver polyfill
3
- */
4
- export default function createResizeObserver(func, element) {
5
- if (!element || typeof ResizeObserver === 'undefined') {
6
- return {
7
- observe: () => window.addEventListener('resize', func),
8
- unobserve: () => window.removeEventListener('resize', func),
9
- };
10
- }
11
- else {
12
- const observer = new ResizeObserver(func);
13
- return {
14
- observe: () => observer.observe(element),
15
- unobserve: () => observer.unobserve(element),
16
- };
17
- }
18
- }
@@ -1,2 +0,0 @@
1
- import * as THREE from 'three';
2
- export default function getLineGeometry(positionList: THREE.Vector3[]): void | THREE.BufferGeometry;