@realsee/dnalogel 0.1.7 → 2.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (477) hide show
  1. package/README.md +6 -90
  2. package/dist/dnalogel.es.js +37145 -0
  3. package/dist/dnalogel.umd.js +2 -0
  4. package/dist/style.css +1 -0
  5. package/{plugins → libs}/CSS3DRenderPlugin/index.d.ts +1 -1
  6. package/libs/CSS3DRenderPlugin/index.js +181 -0
  7. package/libs/CSS3DRenderPlugin/utils/createResizeObserver.d.ts +7 -0
  8. package/libs/CSS3DRenderPlugin/utils/createResizeObserver.js +18 -0
  9. package/{plugins → libs}/CameraMovementPlugin/index.d.ts +0 -0
  10. package/libs/CameraMovementPlugin/index.js +159 -0
  11. package/{plugins → libs}/CameraMovementPlugin/typing.d.ts +0 -0
  12. package/libs/CameraMovementPlugin/typing.js +17 -0
  13. package/{plugins → libs}/ModelChassisCompassPlugin/index.d.ts +1 -1
  14. package/libs/ModelChassisCompassPlugin/index.js +75 -0
  15. package/{plugins → libs}/ModelEntryDoorGuidePlugin/index.d.ts +6 -2
  16. package/libs/ModelEntryDoorGuidePlugin/index.js +136 -0
  17. package/libs/ModelRoomLabelPlugin/Assets/roomLabelBg.d.ts +1 -0
  18. package/libs/ModelRoomLabelPlugin/Assets/roomLabelBg.js +1 -0
  19. package/{plugins → libs}/ModelRoomLabelPlugin/Controller.d.ts +3 -2
  20. package/libs/ModelRoomLabelPlugin/Controller.js +100 -0
  21. package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte +63 -0
  22. package/libs/ModelRoomLabelPlugin/RoomLabelItem.svelte.map +1 -0
  23. package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte +80 -0
  24. package/libs/ModelRoomLabelPlugin/RoomLabelItems.svelte.map +1 -0
  25. package/libs/ModelRoomLabelPlugin/index.d.ts +12 -0
  26. package/libs/ModelRoomLabelPlugin/index.js +9 -0
  27. package/{plugins → libs}/ModelRoomLabelPlugin/typings.d.ts +2 -2
  28. package/libs/ModelRoomLabelPlugin/typings.js +1 -0
  29. package/{plugins → libs}/ModelRoomLabelPlugin/utils/parseData.d.ts +0 -0
  30. package/libs/ModelRoomLabelPlugin/utils/parseData.js +14 -0
  31. package/{plugins → libs}/ModelViewPlugin/index.d.ts +0 -0
  32. package/libs/ModelViewPlugin/index.js +160 -0
  33. package/{plugins → libs}/PanoCursorRaycasterPlugin/index.d.ts +2 -3
  34. package/libs/PanoCursorRaycasterPlugin/index.js +74 -0
  35. package/libs/floorplan/Assets/camera.d.ts +1 -0
  36. package/libs/floorplan/Assets/camera.js +1 -0
  37. package/libs/floorplan/Assets/floorplanExtraObject.d.ts +1 -0
  38. package/libs/floorplan/Assets/floorplanExtraObject.js +1 -0
  39. package/libs/floorplan/Components/BaseImage.svelte +25 -0
  40. package/libs/floorplan/Components/BaseImage.svelte.map +1 -0
  41. package/libs/floorplan/Components/Normalmage.svelte +11 -0
  42. package/libs/floorplan/Components/Normalmage.svelte.map +1 -0
  43. package/libs/floorplan/Components/RoomHighlight/Room.svelte +21 -0
  44. package/libs/floorplan/Components/RoomHighlight/Room.svelte.map +1 -0
  45. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte +60 -0
  46. package/libs/floorplan/Components/RoomHighlight/RoomHighlight.svelte.map +1 -0
  47. package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte +35 -0
  48. package/libs/floorplan/Components/RoomMaterials/RoomMaterial.svelte.map +1 -0
  49. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte +7 -0
  50. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_0.svelte.map +1 -0
  51. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte +16 -0
  52. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_1.svelte.map +1 -0
  53. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte +17 -0
  54. package/libs/floorplan/Components/RoomMaterials/RoomMaterial_2.svelte.map +1 -0
  55. package/libs/floorplan/Components/SvgImage.svelte +25 -0
  56. package/libs/floorplan/Components/SvgImage.svelte.map +1 -0
  57. package/libs/floorplan/ModelFloorplanPlugin/Assets/compass.d.ts +1 -0
  58. package/libs/floorplan/ModelFloorplanPlugin/Assets/compass.js +1 -0
  59. package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte +46 -0
  60. package/libs/floorplan/ModelFloorplanPlugin/Components/Camera.svelte.map +1 -0
  61. package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte +48 -0
  62. package/libs/floorplan/ModelFloorplanPlugin/Components/Compass.svelte.map +1 -0
  63. package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte +37 -0
  64. package/libs/floorplan/ModelFloorplanPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +1 -0
  65. package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte +50 -0
  66. package/libs/floorplan/ModelFloorplanPlugin/Components/Main.svelte.map +1 -0
  67. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte +41 -0
  68. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabel.svelte.map +1 -0
  69. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte +25 -0
  70. package/libs/floorplan/ModelFloorplanPlugin/Components/RoomLabels/RoomLabels.svelte.map +1 -0
  71. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte +148 -0
  72. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleItem.svelte.map +1 -0
  73. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte +15 -0
  74. package/libs/floorplan/ModelFloorplanPlugin/Components/RuleLabels/RuleLabels.svelte.map +1 -0
  75. package/{plugins → libs}/floorplan/ModelFloorplanPlugin/Controller.d.ts +16 -14
  76. package/libs/floorplan/ModelFloorplanPlugin/Controller.js +357 -0
  77. package/{plugins → libs}/floorplan/ModelFloorplanPlugin/index.d.ts +1 -1
  78. package/libs/floorplan/ModelFloorplanPlugin/index.js +5 -0
  79. package/{plugins → libs}/floorplan/ModelFloorplanPlugin/typings/events.type.d.ts +0 -0
  80. package/libs/floorplan/ModelFloorplanPlugin/typings/events.type.js +1 -0
  81. package/{plugins → libs}/floorplan/ModelFloorplanPlugin/utils/constant.d.ts +1 -1
  82. package/libs/floorplan/ModelFloorplanPlugin/utils/constant.js +16 -0
  83. package/{plugins → libs}/floorplan/ModelFloorplanPlugin/utils/correctFiveState.d.ts +0 -0
  84. package/libs/floorplan/ModelFloorplanPlugin/utils/correctFiveState.js +46 -0
  85. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte +84 -0
  86. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Camera.svelte.map +1 -0
  87. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte +18 -0
  88. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/CurrentFloor.svelte.map +1 -0
  89. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte +40 -0
  90. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/CurrentFloor/ExtraObjects.svelte.map +1 -0
  91. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte +61 -0
  92. package/libs/floorplan/PanoFloorplanRadarPlugin/Components/Main.svelte.map +1 -0
  93. package/{plugins → libs}/floorplan/PanoFloorplanRadarPlugin/Controller.d.ts +6 -11
  94. package/libs/floorplan/PanoFloorplanRadarPlugin/Controller.js +88 -0
  95. package/{plugins → libs}/floorplan/PanoFloorplanRadarPlugin/index.d.ts +0 -0
  96. package/libs/floorplan/PanoFloorplanRadarPlugin/index.js +5 -0
  97. package/{plugins → libs}/floorplan/TopviewFloorplanPlugin/Controller.d.ts +15 -11
  98. package/libs/floorplan/TopviewFloorplanPlugin/Controller.js +189 -0
  99. package/{plugins → libs}/floorplan/TopviewFloorplanPlugin/index.d.ts +0 -0
  100. package/libs/floorplan/TopviewFloorplanPlugin/index.js +5 -0
  101. package/{plugins → libs}/floorplan/TopviewFloorplanPlugin/style.d.ts +0 -0
  102. package/libs/floorplan/TopviewFloorplanPlugin/style.js +8 -0
  103. package/{plugins → libs}/floorplan/typings/floorplanData.d.ts +6 -0
  104. package/libs/floorplan/typings/floorplanData.js +6 -0
  105. package/{plugins → libs}/floorplan/typings/floorplanServerData.d.ts +4 -2
  106. package/libs/floorplan/typings/floorplanServerData.js +101 -0
  107. package/libs/floorplan/typings/utility.d.ts +2 -0
  108. package/libs/floorplan/typings/utility.js +1 -0
  109. package/{plugins → libs}/floorplan/utils/formatData.d.ts +3 -3
  110. package/libs/floorplan/utils/formatData.js +94 -0
  111. package/{plugins → libs}/floorplan/utils/formatPosition.d.ts +3 -4
  112. package/libs/floorplan/utils/formatPosition.js +50 -0
  113. package/libs/index.d.ts +17 -0
  114. package/libs/index.js +10 -0
  115. package/{shared-utils → libs/shared-utils}/Preloader.d.ts +0 -0
  116. package/libs/shared-utils/Preloader.js +38 -0
  117. package/{shared-utils → libs/shared-utils}/Subscribe.d.ts +3 -3
  118. package/libs/shared-utils/Subscribe.js +101 -0
  119. package/{shared-utils → libs/shared-utils}/animationFrame/BetterTween.d.ts +0 -0
  120. package/libs/shared-utils/animationFrame/BetterTween.js +30 -0
  121. package/{shared-utils → libs/shared-utils}/animationFrame/calculateProgress.d.ts +0 -0
  122. package/libs/shared-utils/animationFrame/calculateProgress.js +23 -0
  123. package/{shared-utils → libs/shared-utils}/animationFrame/formatRad.d.ts +0 -0
  124. package/libs/shared-utils/animationFrame/formatRad.js +20 -0
  125. package/{shared-utils → libs/shared-utils}/animationFrame/index.d.ts +0 -0
  126. package/libs/shared-utils/animationFrame/index.js +48 -0
  127. package/{shared-utils → libs/shared-utils}/animationFrame/tween.d.ts +0 -0
  128. package/libs/shared-utils/animationFrame/tween.js +44 -0
  129. package/libs/shared-utils/changeModelCanvasOpacity.d.ts +2 -0
  130. package/libs/shared-utils/changeModelCanvasOpacity.js +15 -0
  131. package/{shared-utils → libs/shared-utils}/createCanvasTextTexture.d.ts +0 -0
  132. package/libs/shared-utils/createCanvasTextTexture.js +19 -0
  133. package/{shared-utils → libs/shared-utils}/createLine/index.d.ts +1 -1
  134. package/libs/shared-utils/createLine/index.js +8 -0
  135. package/{shared-utils → libs/shared-utils}/debounce.d.ts +1 -1
  136. package/libs/shared-utils/debounce.js +14 -0
  137. package/{shared-utils → libs/shared-utils}/equal.d.ts +0 -0
  138. package/libs/shared-utils/equal.js +84 -0
  139. package/{shared-utils → libs/shared-utils}/filter.d.ts +0 -0
  140. package/libs/shared-utils/filter.js +53 -0
  141. package/{shared-utils → libs/shared-utils}/five/changeMode.d.ts +0 -0
  142. package/libs/shared-utils/five/changeMode.js +15 -0
  143. package/{shared-utils → libs/shared-utils}/five/useFivePlugin.d.ts +0 -0
  144. package/libs/shared-utils/five/useFivePlugin.js +8 -0
  145. package/{shared-utils → libs/shared-utils}/formatRad.d.ts +0 -0
  146. package/libs/shared-utils/formatRad.js +10 -0
  147. package/{shared-utils → libs/shared-utils}/getPxmm.d.ts +0 -0
  148. package/libs/shared-utils/getPxmm.js +20 -0
  149. package/{shared-utils → libs/shared-utils}/getRandomColor.d.ts +0 -0
  150. package/libs/shared-utils/getRandomColor.js +10 -0
  151. package/{shared-utils → libs/shared-utils}/isNil.d.ts +0 -0
  152. package/libs/shared-utils/isNil.js +14 -0
  153. package/{shared-utils → libs/shared-utils}/isTruelyObject.d.ts +0 -0
  154. package/libs/shared-utils/isTruelyObject.js +20 -0
  155. package/libs/shared-utils/math/evenNumber.d.ts +3 -0
  156. package/libs/shared-utils/math/evenNumber.js +4 -0
  157. package/{shared-utils → libs/shared-utils}/math/planimetry.d.ts +4 -4
  158. package/libs/shared-utils/math/planimetry.js +288 -0
  159. package/{shared-utils → libs/shared-utils}/math/rad2Deg.d.ts +0 -0
  160. package/libs/shared-utils/math/rad2Deg.js +3 -0
  161. package/{shared-utils → libs/shared-utils}/nearlyEqual.d.ts +0 -0
  162. package/libs/shared-utils/nearlyEqual.js +9 -0
  163. package/{shared-utils → libs/shared-utils}/nextFrame.d.ts +0 -0
  164. package/libs/shared-utils/nextFrame.js +6 -0
  165. package/{shared-utils → libs/shared-utils}/noop.d.ts +0 -0
  166. package/libs/shared-utils/noop.js +7 -0
  167. package/{shared-utils → libs/shared-utils}/object3d2LocalMatrix.d.ts +0 -0
  168. package/libs/shared-utils/object3d2LocalMatrix.js +29 -0
  169. package/{shared-utils → libs/shared-utils}/px2rem.d.ts +0 -0
  170. package/libs/shared-utils/px2rem.js +4 -0
  171. package/libs/shared-utils/removeArrayItem.d.ts +7 -0
  172. package/libs/shared-utils/removeArrayItem.js +12 -0
  173. package/{shared-utils → libs/shared-utils}/tap.d.ts +0 -0
  174. package/{shared-utils → libs/shared-utils}/tap.js +4 -13
  175. package/{shared-utils → libs/shared-utils}/three/centerPoint.d.ts +0 -0
  176. package/libs/shared-utils/three/centerPoint.js +4 -0
  177. package/{shared-utils → libs/shared-utils}/three/getExtraModelLoader.d.ts +0 -0
  178. package/libs/shared-utils/three/getExtraModelLoader.js +18 -0
  179. package/{shared-utils → libs/shared-utils}/three/getNormal.d.ts +0 -0
  180. package/libs/shared-utils/three/getNormal.js +6 -0
  181. package/{shared-utils → libs/shared-utils}/three/getTextureLoader.d.ts +0 -0
  182. package/libs/shared-utils/three/getTextureLoader.js +17 -0
  183. package/{shared-utils → libs/shared-utils}/three/loadFbxObj.d.ts +0 -0
  184. package/libs/shared-utils/three/loadFbxObj.js +13 -0
  185. package/libs/shared-utils/three/loadTexture.d.ts +2 -0
  186. package/libs/shared-utils/three/loadTexture.js +10 -0
  187. package/{shared-utils → libs/shared-utils}/three/transformPositionToVector3.d.ts +0 -0
  188. package/libs/shared-utils/three/transformPositionToVector3.js +3 -0
  189. package/{shared-utils → libs/shared-utils}/three/transfromToMeshBasicMaterial.d.ts +0 -0
  190. package/libs/shared-utils/three/transfromToMeshBasicMaterial.js +14 -0
  191. package/{shared-utils → libs/shared-utils}/throttle.d.ts +1 -1
  192. package/libs/shared-utils/throttle.js +18 -0
  193. package/{shared-utils → libs/shared-utils}/to.d.ts +0 -0
  194. package/libs/shared-utils/to.js +18 -0
  195. package/{shared-utils → libs/shared-utils}/useDebounce.d.ts +0 -0
  196. package/libs/shared-utils/useDebounce.js +22 -0
  197. package/{shared-utils → libs/shared-utils}/useThrottle.d.ts +0 -0
  198. package/libs/shared-utils/useThrottle.js +25 -0
  199. package/libs/{gltf-viewer → shared-utils}/uuid.d.ts +0 -0
  200. package/libs/shared-utils/uuid.js +11 -0
  201. package/{shared-utils → libs/shared-utils}/vectorTocoordinates.d.ts +0 -0
  202. package/libs/shared-utils/vectorTocoordinates.js +9 -0
  203. package/{typings → libs/typings}/math.type.d.ts +0 -0
  204. package/libs/typings/math.type.js +1 -0
  205. package/{typings → libs/typings}/utils.type.d.ts +0 -0
  206. package/libs/typings/utils.type.js +1 -0
  207. package/package.json +45 -17
  208. package/TERMS.txt +0 -56
  209. package/components/ARVideoFigure/ARVideoFigureMesh.d.ts +0 -44
  210. package/components/ARVideoFigure/ARVideoFigureMesh.js +0 -371
  211. package/components/ARVideoFigure/ARVideoFigureScene.d.ts +0 -11
  212. package/components/ARVideoFigure/ARVideoFigureScene.js +0 -85
  213. package/components/ARVideoFigure/ImgBgTransparent.d.ts +0 -16
  214. package/components/ARVideoFigure/ImgBgTransparent.js +0 -65
  215. package/components/ARVideoFigure/ImgBgTransparentMesh.d.ts +0 -30
  216. package/components/ARVideoFigure/ImgBgTransparentMesh.js +0 -183
  217. package/components/ARVideoFigure/fragmentShader.d.ts +0 -5
  218. package/components/ARVideoFigure/fragmentShader.js +0 -18
  219. package/components/ARVideoFigure/index.d.ts +0 -15
  220. package/components/ARVideoFigure/index.js +0 -80
  221. package/components/ARVideoFigure/vertexShader.d.ts +0 -1
  222. package/components/ARVideoFigure/vertexShader.js +0 -10
  223. package/components/GLTFView/index.d.ts +0 -72
  224. package/components/GLTFView/index.js +0 -149
  225. package/components/GlassFilters/index.d.ts +0 -32
  226. package/components/GlassFilters/index.js +0 -78
  227. package/components/ModelView/ModelViewController.d.ts +0 -18
  228. package/components/ModelView/ModelViewController.js +0 -157
  229. package/components/ModelView/index.d.ts +0 -10
  230. package/components/ModelView/index.js +0 -24
  231. package/components/PaintBrush/index.d.ts +0 -16
  232. package/components/PaintBrush/index.js +0 -47
  233. package/components/PanoTag/index.d.ts +0 -4
  234. package/components/PanoTag/index.js +0 -13
  235. package/custom.d.js +0 -3
  236. package/data/1aGKl9JmrlXMXx8d.d.ts +0 -104
  237. package/data/1aGKl9JmrlXMXx8d.js +0 -537
  238. package/data/54djM0oR6ky3Ey8e.d.ts +0 -55
  239. package/data/54djM0oR6ky3Ey8e.js +0 -350
  240. package/data/6gyq3v1verxD7JO1.d.ts +0 -104
  241. package/data/6gyq3v1verxD7JO1.js +0 -462
  242. package/data/8054djM0oR6ky3Ey8e.d.ts +0 -55
  243. package/data/8054djM0oR6ky3Ey8e.js +0 -350
  244. package/data/KpokNd82rwjhackhQTBEoYKHg8zGbPXe.d.ts +0 -84
  245. package/data/KpokNd82rwjhackhQTBEoYKHg8zGbPXe.js +0 -600
  246. package/data/PrXel3aqGbp34JQn.d.ts +0 -389
  247. package/data/PrXel3aqGbp34JQn.js +0 -4649
  248. package/data/XJ6NMLWnkAY3Rdx8.d.ts +0 -843
  249. package/data/XJ6NMLWnkAY3Rdx8.js +0 -7989
  250. package/data/YdoNP9K4rwQDwjJr.d.ts +0 -83
  251. package/data/YdoNP9K4rwQDwjJr.js +0 -1453
  252. package/data/ZLvK29zj4L29Jowd.d.ts +0 -55
  253. package/data/ZLvK29zj4L29Jowd.js +0 -372
  254. package/data/auto3d-njL5J99VwCmnjtQElOmXQr.d.ts +0 -86
  255. package/data/auto3d-njL5J99VwCmnjtQElOmXQr.js +0 -711
  256. package/data/extrude-walls/ZLvK29zj4L29Jowd.d.ts +0 -5
  257. package/data/extrude-walls/ZLvK29zj4L29Jowd.js +0 -14
  258. package/data/extrude-walls/lo024DEgzanMj5BE.d.ts +0 -5
  259. package/data/extrude-walls/lo024DEgzanMj5BE.js +0 -14
  260. package/data/jd6oMOzPxnQ3BvxY_B7yw51J9rXlhYhjhGTOgRVqu6WeEqjNX.d.ts +0 -85
  261. package/data/jd6oMOzPxnQ3BvxY_B7yw51J9rXlhYhjhGTOgRVqu6WeEqjNX.js +0 -511
  262. package/data/lo024DEgzanMj5BE.d.ts +0 -55
  263. package/data/lo024DEgzanMj5BE.js +0 -966
  264. package/data/oPzy3ApbjjpD8YdR.d.ts +0 -83
  265. package/data/oPzy3ApbjjpD8YdR.js +0 -283
  266. package/data/qjAxMG4XbPn96wKG.d.ts +0 -104
  267. package/data/qjAxMG4XbPn96wKG.js +0 -637
  268. package/data/rXel3aPQRRBD4JQn.d.ts +0 -86
  269. package/data/rXel3aPQRRBD4JQn.js +0 -622
  270. package/data/vLykj3NWrllMrG06.d.ts +0 -91
  271. package/data/vLykj3NWrllMrG06.js +0 -2729
  272. package/data/wz0QV9KA4ugyo9ME.d.ts +0 -39
  273. package/data/wz0QV9KA4ugyo9ME.js +0 -136
  274. package/data/zxMawr9raSg8LYjG.d.ts +0 -53
  275. package/data/zxMawr9raSg8LYjG.js +0 -590
  276. package/examples/FiveStateController/index.js +0 -134
  277. package/examples/VRHouse/Mobile.js +0 -36
  278. package/examples/VRHouse/PC.js +0 -36
  279. package/examples/VRHouse/index.js +0 -36
  280. package/index.d.ts +0 -15
  281. package/index.js +0 -45
  282. package/libs/gltf-viewer/Subscribe.d.ts +0 -76
  283. package/libs/gltf-viewer/Subscribe.js +0 -231
  284. package/libs/gltf-viewer/coordsMoveByOffset.d.ts +0 -13
  285. package/libs/gltf-viewer/coordsMoveByOffset.js +0 -22
  286. package/libs/gltf-viewer/coordsToDirection.d.ts +0 -5
  287. package/libs/gltf-viewer/coordsToDirection.js +0 -41
  288. package/libs/gltf-viewer/formatRad.d.ts +0 -1
  289. package/libs/gltf-viewer/formatRad.js +0 -13
  290. package/libs/gltf-viewer/getFrameTime.d.ts +0 -1
  291. package/libs/gltf-viewer/getFrameTime.js +0 -28
  292. package/libs/gltf-viewer/index.d.ts +0 -55
  293. package/libs/gltf-viewer/index.js +0 -650
  294. package/libs/gltf-viewer/mouseWheel.d.ts +0 -2
  295. package/libs/gltf-viewer/mouseWheel.js +0 -59
  296. package/libs/gltf-viewer/requestAnimationFrame.d.ts +0 -1
  297. package/libs/gltf-viewer/requestAnimationFrame.js +0 -18
  298. package/libs/gltf-viewer/requestAnimationFrameInterval.d.ts +0 -1
  299. package/libs/gltf-viewer/requestAnimationFrameInterval.js +0 -31
  300. package/libs/gltf-viewer/uuid.js +0 -28
  301. package/plugins/AutoPreloadPlugin/index.d.ts +0 -23
  302. package/plugins/AutoPreloadPlugin/index.js +0 -111
  303. package/plugins/CSS3DRenderPlugin/components/Marker/index.d.ts +0 -12
  304. package/plugins/CSS3DRenderPlugin/components/Marker/index.js +0 -121
  305. package/plugins/CSS3DRenderPlugin/index.js +0 -298
  306. package/plugins/CameraMovementPlugin/index.js +0 -362
  307. package/plugins/CameraMovementPlugin/typing.js +0 -37
  308. package/plugins/ModelChassisCompassPlugin/index.js +0 -157
  309. package/plugins/ModelEntryDoorGuidePlugin/index.js +0 -247
  310. package/plugins/ModelExtrudeWallsPlugin/index.d.ts +0 -16
  311. package/plugins/ModelExtrudeWallsPlugin/index.js +0 -252
  312. package/plugins/ModelRoomLabelPlugin/Controller.js +0 -153
  313. package/plugins/ModelRoomLabelPlugin/RoomLabelItem.d.ts +0 -8
  314. package/plugins/ModelRoomLabelPlugin/RoomLabelItem.js +0 -66
  315. package/plugins/ModelRoomLabelPlugin/RoomLabelItems.d.ts +0 -7
  316. package/plugins/ModelRoomLabelPlugin/RoomLabelItems.js +0 -159
  317. package/plugins/ModelRoomLabelPlugin/index.d.ts +0 -8
  318. package/plugins/ModelRoomLabelPlugin/index.js +0 -18
  319. package/plugins/ModelRoomLabelPlugin/typings.js +0 -7
  320. package/plugins/ModelRoomLabelPlugin/utils/parseData.js +0 -35
  321. package/plugins/ModelTVVideoPlugin/index.d.ts +0 -21
  322. package/plugins/ModelTVVideoPlugin/index.js +0 -397
  323. package/plugins/ModelViewPlugin/index.js +0 -223
  324. package/plugins/PanoCursorRaycasterPlugin/PanoCursorRaycasterPluginUsage.d.ts +0 -48
  325. package/plugins/PanoCursorRaycasterPlugin/components/MovePointTowardsCamera.d.ts +0 -9
  326. package/plugins/PanoCursorRaycasterPlugin/components/MovePointTowardsCamera.js +0 -117
  327. package/plugins/PanoCursorRaycasterPlugin/components/PointAxesHelper.d.ts +0 -11
  328. package/plugins/PanoCursorRaycasterPlugin/components/PointAxesHelper.js +0 -39
  329. package/plugins/PanoCursorRaycasterPlugin/index.js +0 -126
  330. package/plugins/PanoCursorRaycasterPlugin/utils/addLineToFive.d.ts +0 -5
  331. package/plugins/PanoCursorRaycasterPlugin/utils/addLineToFive.js +0 -27
  332. package/plugins/PanoCursorRaycasterPlugin/utils/createLine.d.ts +0 -3
  333. package/plugins/PanoCursorRaycasterPlugin/utils/createLine.js +0 -48
  334. package/plugins/PanoDoorLabelPlugin/index.d.ts +0 -4
  335. package/plugins/PanoDoorLabelPlugin/index.js +0 -14
  336. package/plugins/PanoIRobotPlugin/index.d.ts +0 -10
  337. package/plugins/PanoIRobotPlugin/index.js +0 -18
  338. package/plugins/PanoMaskSelectorPlugin/compare.d.ts +0 -1
  339. package/plugins/PanoMaskSelectorPlugin/compare.js +0 -17
  340. package/plugins/PanoMaskSelectorPlugin/createBox.d.ts +0 -7
  341. package/plugins/PanoMaskSelectorPlugin/createBox.js +0 -79
  342. package/plugins/PanoMaskSelectorPlugin/createTextures.d.ts +0 -3
  343. package/plugins/PanoMaskSelectorPlugin/createTextures.js +0 -45
  344. package/plugins/PanoMaskSelectorPlugin/fragmentShader.d.ts +0 -1
  345. package/plugins/PanoMaskSelectorPlugin/fragmentShader.js +0 -10
  346. package/plugins/PanoMaskSelectorPlugin/index.d.ts +0 -49
  347. package/plugins/PanoMaskSelectorPlugin/index.js +0 -348
  348. package/plugins/PanoMaskSelectorPlugin/vertexShader.d.ts +0 -1
  349. package/plugins/PanoMaskSelectorPlugin/vertexShader.js +0 -10
  350. package/plugins/PanoRulerPlugin/data/roomInfo.d.ts +0 -3
  351. package/plugins/PanoRulerPlugin/data/roomInfo.js +0 -51
  352. package/plugins/PanoRulerPlugin/data/roomRules.d.ts +0 -3
  353. package/plugins/PanoRulerPlugin/data/roomRules.js +0 -235
  354. package/plugins/PanoRulerPlugin/index.d.ts +0 -27
  355. package/plugins/PanoRulerPlugin/index.js +0 -637
  356. package/plugins/PanoRulerPlugin/typings.d.ts +0 -21
  357. package/plugins/PanoRulerPlugin/typings.js +0 -7
  358. package/plugins/PanoTVVideoPlugin/index.d.ts +0 -26
  359. package/plugins/PanoTVVideoPlugin/index.js +0 -433
  360. package/plugins/TreasurePlugin/Controller.d.ts +0 -73
  361. package/plugins/TreasurePlugin/Controller.js +0 -250
  362. package/plugins/TreasurePlugin/TreasureFaceAnime.d.ts +0 -25
  363. package/plugins/TreasurePlugin/TreasureFaceAnime.js +0 -143
  364. package/plugins/TreasurePlugin/TreasureObject.d.ts +0 -53
  365. package/plugins/TreasurePlugin/TreasureObject.js +0 -406
  366. package/plugins/TreasurePlugin/TreasureOpenAnime.d.ts +0 -25
  367. package/plugins/TreasurePlugin/TreasureOpenAnime.js +0 -127
  368. package/plugins/TreasurePlugin/constants.d.ts +0 -33
  369. package/plugins/TreasurePlugin/constants.js +0 -67
  370. package/plugins/TreasurePlugin/index.d.ts +0 -11
  371. package/plugins/TreasurePlugin/index.js +0 -26
  372. package/plugins/TreasurePlugin/typings.d.ts +0 -2
  373. package/plugins/TreasurePlugin/typings.js +0 -7
  374. package/plugins/floorplan/Assets/floorplanExtraObject.d.ts +0 -1
  375. package/plugins/floorplan/Assets/floorplanExtraObject.js +0 -10
  376. package/plugins/floorplan/ModelFloorplanPlugin/Controller.js +0 -626
  377. package/plugins/floorplan/ModelFloorplanPlugin/components/Camera.d.ts +0 -13
  378. package/plugins/floorplan/ModelFloorplanPlugin/components/Camera.js +0 -78
  379. package/plugins/floorplan/ModelFloorplanPlugin/components/Compass.d.ts +0 -5
  380. package/plugins/floorplan/ModelFloorplanPlugin/components/Compass.js +0 -84
  381. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomHighlight.d.ts +0 -10
  382. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomHighlight.js +0 -129
  383. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomLabels.d.ts +0 -13
  384. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/RoomLabels.js +0 -118
  385. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/index.d.ts +0 -13
  386. package/plugins/floorplan/ModelFloorplanPlugin/components/NowFloor/index.js +0 -62
  387. package/plugins/floorplan/ModelFloorplanPlugin/components/index.d.ts +0 -20
  388. package/plugins/floorplan/ModelFloorplanPlugin/components/index.js +0 -88
  389. package/plugins/floorplan/ModelFloorplanPlugin/controller.style.d.ts +0 -1
  390. package/plugins/floorplan/ModelFloorplanPlugin/controller.style.js +0 -16
  391. package/plugins/floorplan/ModelFloorplanPlugin/index.js +0 -20
  392. package/plugins/floorplan/ModelFloorplanPlugin/typings/events.type.js +0 -7
  393. package/plugins/floorplan/ModelFloorplanPlugin/utils/constant.js +0 -33
  394. package/plugins/floorplan/ModelFloorplanPlugin/utils/correctFiveState.js +0 -154
  395. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.d.ts +0 -13
  396. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.js +0 -113
  397. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.style.d.ts +0 -3
  398. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/Camera.style.js +0 -39
  399. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/ExtraObjects.d.ts +0 -5
  400. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/ExtraObjects.js +0 -66
  401. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/RoomHighlight.d.ts +0 -9
  402. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/RoomHighlight.js +0 -126
  403. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/index.d.ts +0 -11
  404. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/NowFloor/index.js +0 -58
  405. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.d.ts +0 -17
  406. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.js +0 -85
  407. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.style.d.ts +0 -2
  408. package/plugins/floorplan/PanoFloorplanRadarPlugin/Content/index.style.js +0 -15
  409. package/plugins/floorplan/PanoFloorplanRadarPlugin/Controller.js +0 -211
  410. package/plugins/floorplan/PanoFloorplanRadarPlugin/index.js +0 -20
  411. package/plugins/floorplan/TopviewFloorplanPlugin/Controller.js +0 -262
  412. package/plugins/floorplan/TopviewFloorplanPlugin/index.js +0 -18
  413. package/plugins/floorplan/TopviewFloorplanPlugin/style.js +0 -16
  414. package/plugins/floorplan/components/FloorplanImage.d.ts +0 -7
  415. package/plugins/floorplan/components/FloorplanImage.js +0 -90
  416. package/plugins/floorplan/typings/floorplanData.js +0 -7
  417. package/plugins/floorplan/typings/floorplanServerData.js +0 -382
  418. package/plugins/floorplan/utils/formatData.js +0 -217
  419. package/plugins/floorplan/utils/formatPosition.js +0 -89
  420. package/shared-utils/Preloader.js +0 -57
  421. package/shared-utils/Subscribe.js +0 -230
  422. package/shared-utils/animationFrame/BetterTween.js +0 -103
  423. package/shared-utils/animationFrame/calculateProgress.js +0 -40
  424. package/shared-utils/animationFrame/formatRad.js +0 -36
  425. package/shared-utils/animationFrame/index.js +0 -81
  426. package/shared-utils/animationFrame/tween.js +0 -92
  427. package/shared-utils/changeModelCanvansOpacity.d.ts +0 -2
  428. package/shared-utils/changeModelCanvansOpacity.js +0 -38
  429. package/shared-utils/createCanvasTextTexture.js +0 -31
  430. package/shared-utils/createFiveContainer.d.ts +0 -10
  431. package/shared-utils/createFiveContainer.js +0 -171
  432. package/shared-utils/createLine/index.js +0 -43
  433. package/shared-utils/debounce.js +0 -30
  434. package/shared-utils/equal.js +0 -107
  435. package/shared-utils/filter.js +0 -127
  436. package/shared-utils/five/changeMode.js +0 -82
  437. package/shared-utils/five/useFivePlugin.js +0 -17
  438. package/shared-utils/formatRad.js +0 -18
  439. package/shared-utils/getPxmm.js +0 -51
  440. package/shared-utils/getRandomColor.js +0 -23
  441. package/shared-utils/isNil.js +0 -26
  442. package/shared-utils/isTruelyObject.js +0 -31
  443. package/shared-utils/math/evenNumber.d.ts +0 -1
  444. package/shared-utils/math/evenNumber.js +0 -13
  445. package/shared-utils/math/planimetry.js +0 -352
  446. package/shared-utils/math/rad2Deg.js +0 -12
  447. package/shared-utils/nearlyEqual.js +0 -19
  448. package/shared-utils/nextFrame.js +0 -15
  449. package/shared-utils/noop.js +0 -19
  450. package/shared-utils/object3d2LocalMatrix.js +0 -79
  451. package/shared-utils/px2rem.js +0 -22
  452. package/shared-utils/three/centerPoint.js +0 -14
  453. package/shared-utils/three/getExtraModelLoader.js +0 -45
  454. package/shared-utils/three/getNormal.js +0 -17
  455. package/shared-utils/three/getTextureLoader.js +0 -50
  456. package/shared-utils/three/loadFbxObj.js +0 -54
  457. package/shared-utils/three/loadTexture.d.ts +0 -2
  458. package/shared-utils/three/loadTexture.js +0 -46
  459. package/shared-utils/three/transformPositionToVector3.js +0 -20
  460. package/shared-utils/three/transfromToMeshBasicMaterial.js +0 -33
  461. package/shared-utils/throttle.js +0 -29
  462. package/shared-utils/to.js +0 -67
  463. package/shared-utils/useDebounce.js +0 -49
  464. package/shared-utils/useThrottle.js +0 -47
  465. package/shared-utils/uuid.d.ts +0 -4
  466. package/shared-utils/uuid.js +0 -28
  467. package/shared-utils/vectorTocoordinates.js +0 -18
  468. package/typedoc/components.d.ts +0 -6
  469. package/typedoc/components.js +0 -7
  470. package/typedoc/plugins.d.ts +0 -19
  471. package/typedoc/plugins.js +0 -165
  472. package/typedoc/shared-utils.d.ts +0 -3
  473. package/typedoc/shared-utils.js +0 -7
  474. package/typedoc/typings.d.ts +0 -3
  475. package/typedoc/typings.js +0 -7
  476. package/typings/math.type.js +0 -7
  477. package/typings/utils.type.js +0 -7
@@ -1,397 +0,0 @@
1
- "use strict";
2
-
3
- require("core-js/modules/es.weak-map.js");
4
-
5
- require("core-js/modules/es.object.define-property.js");
6
-
7
- require("core-js/modules/es.object.get-own-property-descriptor.js");
8
-
9
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
10
-
11
- var _typeof = require("@babel/runtime/helpers/typeof");
12
-
13
- Object.defineProperty(exports, "__esModule", {
14
- value: true
15
- });
16
- exports["default"] = exports.ModelTVVideoPlugin = void 0;
17
-
18
- var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
19
-
20
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
21
-
22
- var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
23
-
24
- require("core-js/modules/es.array.for-each.js");
25
-
26
- require("core-js/modules/web.dom-collections.for-each.js");
27
-
28
- require("core-js/modules/es.array.map.js");
29
-
30
- require("core-js/modules/es.array.iterator.js");
31
-
32
- require("core-js/modules/es.array-buffer.slice.js");
33
-
34
- require("core-js/modules/es.object.to-string.js");
35
-
36
- require("core-js/modules/es.typed-array.float32-array.js");
37
-
38
- require("core-js/modules/es.typed-array.copy-within.js");
39
-
40
- require("core-js/modules/es.typed-array.every.js");
41
-
42
- require("core-js/modules/es.typed-array.fill.js");
43
-
44
- require("core-js/modules/es.typed-array.filter.js");
45
-
46
- require("core-js/modules/es.typed-array.find.js");
47
-
48
- require("core-js/modules/es.typed-array.find-index.js");
49
-
50
- require("core-js/modules/es.typed-array.for-each.js");
51
-
52
- require("core-js/modules/es.typed-array.includes.js");
53
-
54
- require("core-js/modules/es.typed-array.index-of.js");
55
-
56
- require("core-js/modules/es.typed-array.iterator.js");
57
-
58
- require("core-js/modules/es.typed-array.join.js");
59
-
60
- require("core-js/modules/es.typed-array.last-index-of.js");
61
-
62
- require("core-js/modules/es.typed-array.map.js");
63
-
64
- require("core-js/modules/es.typed-array.reduce.js");
65
-
66
- require("core-js/modules/es.typed-array.reduce-right.js");
67
-
68
- require("core-js/modules/es.typed-array.reverse.js");
69
-
70
- require("core-js/modules/es.typed-array.set.js");
71
-
72
- require("core-js/modules/es.typed-array.slice.js");
73
-
74
- require("core-js/modules/es.typed-array.some.js");
75
-
76
- require("core-js/modules/es.typed-array.sort.js");
77
-
78
- require("core-js/modules/es.typed-array.subarray.js");
79
-
80
- require("core-js/modules/es.typed-array.to-locale-string.js");
81
-
82
- require("core-js/modules/es.typed-array.to-string.js");
83
-
84
- require("core-js/modules/es.typed-array.uint32-array.js");
85
-
86
- require("core-js/modules/es.function.name.js");
87
-
88
- require("core-js/modules/es.array.concat.js");
89
-
90
- require("core-js/modules/es.promise.js");
91
-
92
- require("core-js/modules/es.string.iterator.js");
93
-
94
- require("core-js/modules/web.dom-collections.iterator.js");
95
-
96
- require("core-js/modules/web.url.js");
97
-
98
- require("core-js/modules/web.url-search-params.js");
99
-
100
- require("core-js/modules/es.object.assign.js");
101
-
102
- require("core-js/modules/es.array.find.js");
103
-
104
- require("core-js/modules/es.array.reduce.js");
105
-
106
- require("core-js/modules/es.array.filter.js");
107
-
108
- require("core-js/modules/es.string.sub.js");
109
-
110
- var THREE = _interopRequireWildcard(require("three"));
111
-
112
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
113
-
114
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
115
-
116
- var ModelTVVideoPlugin = function ModelTVVideoPlugin(five, _ref) {
117
- var videoElement = _ref.videoElement;
118
- var state = {
119
- videoMeshes: [],
120
- videoTextureEnabled: false,
121
- videoSource: '',
122
- rectPoints: [],
123
- enabled: false,
124
- videoElement: videoElement
125
- };
126
-
127
- var setMuted = function setMuted(muted) {
128
- if (state.videoTexture) {
129
- state.videoTexture.image.muted = muted;
130
- state.videoTexture.image.play();
131
- }
132
- };
133
-
134
- var getMuted = function getMuted() {
135
- if (state.videoTexture) return state.videoTexture.image.muted;else return true;
136
- };
137
-
138
- var enable = function enable() {
139
- if (state.enabled) return;
140
- if (!state.videoTexture) return;
141
- state.enabled = true;
142
- state.videoMeshes = createPanoVideoMeshes();
143
- console.log('state.videoMeshes', state.videoMeshes);
144
- state.videoMeshes.forEach(function (mesh) {
145
- return five.scene.add(mesh);
146
- });
147
-
148
- var play = function play() {
149
- console.log('play', state.videoTexture);
150
- if (!state.videoTexture) return;
151
-
152
- var timeupdate = function timeupdate() {
153
- var _state$videoTexture;
154
-
155
- if (!state.videoTexture) return;
156
- (_state$videoTexture = state.videoTexture) === null || _state$videoTexture === void 0 ? void 0 : _state$videoTexture.image.removeEventListener('timeupdate', timeupdate);
157
- state.videoTextureEnabled = true;
158
- state.videoMeshes.forEach(function (mesh) {
159
- if (mesh.material.map !== state.videoTexture) mesh.material.map = state.videoTexture;
160
- });
161
- five.needsRender = true;
162
- };
163
-
164
- state.videoTexture.image.addEventListener('timeupdate', timeupdate);
165
-
166
- if (state.videoTexture && state.videoMeshes.length) {
167
- state.videoTexture.image.play();
168
- }
169
- };
170
-
171
- if (five.model.loaded) play();else {
172
- return five.once('modelLoaded', function () {
173
- return play();
174
- });
175
- }
176
- };
177
-
178
- var disable = function disable() {
179
- if (!state.enabled) return;
180
- state.enabled = false;
181
- state.videoMeshes.forEach(function (mesh) {
182
- mesh.geometry.dispose();
183
- mesh.material.dispose();
184
- five.scene.remove(mesh);
185
- if (state.videoTexture) state.videoTexture.image.pause();
186
- });
187
- state.videoMeshes = [];
188
- five.needsRender = true;
189
- };
190
-
191
- var createPanoVideoMeshes = function createPanoVideoMeshes() {
192
- return state.rectPoints.map(function (points, index) {
193
- var geometry = new THREE.BufferGeometry();
194
- var segments = 128;
195
- var verticesArray = [];
196
- verticesArray.push(points[0].x, points[0].y, points[0].z);
197
-
198
- for (var i = 1; i < segments; i++) {
199
- verticesArray.push(points[0].x + (points[1].x - points[0].x) * i / segments, points[0].y + (points[1].y - points[0].y) * i / segments, points[0].z + (points[1].z - points[0].z) * i / segments);
200
- }
201
-
202
- verticesArray.push(points[1].x, points[1].y, points[1].z);
203
- verticesArray.push(points[2].x, points[2].y, points[2].z);
204
-
205
- for (var _i = 1; _i < segments; _i++) {
206
- verticesArray.push(points[2].x + (points[3].x - points[2].x) * _i / segments, points[2].y + (points[3].y - points[2].y) * _i / segments, points[2].z + (points[3].z - points[2].z) * _i / segments);
207
- }
208
-
209
- verticesArray.push(points[3].x, points[3].y, points[3].z);
210
- var uvArray = [];
211
- uvArray.push(0, 1);
212
-
213
- for (var _i2 = 1; _i2 < segments; _i2++) {
214
- uvArray.push(0, 1 - _i2 / segments);
215
- }
216
-
217
- uvArray.push(0, 0);
218
- uvArray.push(1, 0);
219
-
220
- for (var _i3 = 1; _i3 < segments; _i3++) {
221
- uvArray.push(1, _i3 / segments);
222
- }
223
-
224
- uvArray.push(1, 1);
225
- var indicesArray = [];
226
-
227
- for (var _i4 = 0; _i4 < segments; _i4++) {
228
- indicesArray.push(_i4, _i4 + 1, segments * 2 - _i4, _i4, segments * 2 - _i4, segments * 2 + 1 - _i4);
229
- }
230
-
231
- geometry.setAttribute('position', new THREE.BufferAttribute(new Float32Array(verticesArray), 3));
232
- geometry.setAttribute('uv', new THREE.BufferAttribute(new Float32Array(uvArray), 2));
233
- geometry.setIndex(new THREE.BufferAttribute(new Uint32Array(indicesArray), 1));
234
- var material = new THREE.MeshBasicMaterial({
235
- map: state.videoTextureEnabled ? state.videoTexture : state.imageTexture,
236
- side: THREE.DoubleSide
237
- });
238
- var mesh = new THREE.Mesh(geometry, material);
239
- mesh.renderOrder = 1;
240
- mesh.name = "video-".concat(index, "-").concat(performance.now());
241
- return mesh;
242
- });
243
- };
244
-
245
- var getImageTexture = function getImageTexture(source) {
246
- var texture = new THREE.TextureLoader().load(source);
247
- texture.minFilter = THREE.LinearFilter;
248
- texture.magFilter = THREE.LinearFilter;
249
- texture.format = THREE.RGBFormat;
250
- return texture;
251
- };
252
-
253
- var getVideoTexture = function getVideoTexture(source, video) {
254
- return new Promise(function (resolve, reject) {
255
- var xhr = new XMLHttpRequest();
256
-
257
- xhr.onreadystatechange = function () {
258
- if (xhr.readyState == 4) {
259
- if (xhr.status == 200) {
260
- var url = window.URL || window.webkitURL;
261
- video = video || document.createElement('video');
262
- video.crossOrigin = 'anonymous';
263
- video.autoplay = true;
264
- video.muted = true;
265
- video.loop = true;
266
- video.playsInline = true;
267
- video.src = url.createObjectURL(xhr.response);
268
- var texture = new THREE.VideoTexture(video);
269
- texture.minFilter = THREE.LinearFilter;
270
- texture.magFilter = THREE.LinearFilter;
271
- texture.format = THREE.RGBFormat;
272
- resolve(Object.assign(texture, {
273
- videoSource: source
274
- }));
275
- } else {
276
- reject(new Error('Video download Error: ' + xhr.status));
277
- }
278
- }
279
- };
280
-
281
- xhr.onerror = function (error) {
282
- return reject(error);
283
- };
284
-
285
- xhr.open('GET', source);
286
- xhr.responseType = 'blob';
287
- xhr.send();
288
- });
289
- };
290
-
291
- var load = /*#__PURE__*/function () {
292
- var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(data, videoElement) {
293
- var video_src, video_poster_src, points;
294
- return _regenerator["default"].wrap(function _callee$(_context) {
295
- while (1) {
296
- switch (_context.prev = _context.next) {
297
- case 0:
298
- video_src = data.video_src, video_poster_src = data.video_poster_src, points = data.points;
299
- state.videoSource = video_src;
300
- state.rectPoints = points.map(function (items) {
301
- return items.map(function (_ref3) {
302
- var x = _ref3.x,
303
- y = _ref3.y,
304
- z = _ref3.z;
305
- return new THREE.Vector3(x, y, z);
306
- });
307
- });
308
- state.imageTexture = getImageTexture(video_poster_src);
309
-
310
- if (videoElement) {
311
- state.videoElement = videoElement;
312
- }
313
-
314
- _context.next = 7;
315
- return getVideoTexture(state.videoSource, state.videoElement);
316
-
317
- case 7:
318
- state.videoTexture = _context.sent;
319
- state.enabled = !!data.enable;
320
- if (state.enabled) enable();
321
-
322
- case 10:
323
- case "end":
324
- return _context.stop();
325
- }
326
- }
327
- }, _callee);
328
- }));
329
-
330
- return function load(_x, _x2) {
331
- return _ref2.apply(this, arguments);
332
- };
333
- }();
334
-
335
- five.on('modeChange', function () {
336
- return setMuted(true);
337
- });
338
- five.on('wantsTapGesture', function (raycaster) {
339
- if (!state.enabled) return;
340
-
341
- var _raycaster$intersectO = raycaster.intersectObjects(five.scene.children, true),
342
- _raycaster$intersectO2 = (0, _slicedToArray2["default"])(_raycaster$intersectO, 1),
343
- intersect = _raycaster$intersectO2[0];
344
-
345
- if (!!intersect && /^video/.test(intersect.object.name)) {
346
- if (state.videoTexture) setMuted(!state.videoTexture.image.muted);
347
- return false;
348
- }
349
- });
350
- five.on('panoArrived', function () {
351
- if (!state.enabled) return;
352
- if (getMuted()) return;
353
- var cameraPosition = five.camera.position;
354
- var visible = state.rectPoints.find(function (points) {
355
- var centerVector = points.reduce(function (total, curr) {
356
- return new THREE.Vector3(total.x + curr.x / points.length, total.y + curr.y / points.length, total.z + curr.z / points.length);
357
- }, new THREE.Vector3());
358
- return points.map(function (point) {
359
- return new THREE.Vector3((point.x + centerVector.x) / 2, (point.y + centerVector.y) / 2, (point.z + centerVector.z) / 2);
360
- }).filter(function (vector) {
361
- vector = vector.clone().sub(cameraPosition).normalize();
362
- var raycaster = new THREE.Raycaster(cameraPosition, vector);
363
-
364
- var _raycaster$intersectO3 = raycaster.intersectObjects(five.scene.children, true),
365
- _raycaster$intersectO4 = (0, _slicedToArray2["default"])(_raycaster$intersectO3, 1),
366
- intersect = _raycaster$intersectO4[0];
367
-
368
- return !!intersect && /^video/.test(intersect.object.name);
369
- }).length >= 2;
370
- });
371
- if (!visible) setMuted(true);
372
- });
373
- five.on('renderFrame', function () {
374
- // console.log('renderFrame', state.videoMeshes)
375
- state.videoMeshes.forEach(function (meshes) {
376
- if (meshes) //@ts-ignore
377
- meshes.needsRender = true;
378
- });
379
- });
380
- five.on('load', function (input) {
381
- if (input.modelTVVideoData) {
382
- load(input.modelTVVideoData);
383
- }
384
- });
385
- Object.assign(window, {
386
- $state: state
387
- });
388
- return {
389
- enable: enable,
390
- disable: disable,
391
- load: load
392
- };
393
- };
394
-
395
- exports.ModelTVVideoPlugin = ModelTVVideoPlugin;
396
- var _default = ModelTVVideoPlugin;
397
- exports["default"] = _default;
@@ -1,223 +0,0 @@
1
- "use strict";
2
-
3
- require("core-js/modules/es.array.iterator.js");
4
-
5
- require("core-js/modules/es.object.to-string.js");
6
-
7
- require("core-js/modules/es.string.iterator.js");
8
-
9
- require("core-js/modules/es.weak-map.js");
10
-
11
- require("core-js/modules/web.dom-collections.iterator.js");
12
-
13
- require("core-js/modules/es.object.define-property.js");
14
-
15
- require("core-js/modules/es.object.get-own-property-descriptor.js");
16
-
17
- var _typeof = require("@babel/runtime/helpers/typeof");
18
-
19
- Object.defineProperty(exports, "__esModule", {
20
- value: true
21
- });
22
- exports["default"] = exports.ModelViewPlugin = void 0;
23
-
24
- require("core-js/modules/es.array.concat.js");
25
-
26
- require("core-js/modules/es.array.for-each.js");
27
-
28
- require("core-js/modules/web.dom-collections.for-each.js");
29
-
30
- require("core-js/modules/es.array.map.js");
31
-
32
- require("core-js/modules/es.array.is-array.js");
33
-
34
- var THREE = _interopRequireWildcard(require("three"));
35
-
36
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
37
-
38
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
39
-
40
- /**
41
- * Five 模型插件
42
- * @template ExportType 导出方法
43
- */
44
- var ModelViewPlugin = function ModelViewPlugin(five) {
45
- var needsRender = true;
46
- var scene = new THREE.Scene();
47
- var camera = new THREE.PerspectiveCamera(60, 1, 0.1, 1000);
48
- var model = new THREE.Object3D();
49
- {
50
- var light = new THREE.DirectionalLight(0xffffff, 0.5);
51
- light.position.copy(new THREE.Vector3(1, 1, 1));
52
- scene.add(light);
53
- }
54
- {
55
- var _light = new THREE.DirectionalLight(0xffffff, 0.3);
56
-
57
- scene.add(_light);
58
- }
59
- {
60
- var _light2 = new THREE.AmbientLight(0xffffff, 0.3);
61
-
62
- scene.add(_light2);
63
- }
64
- scene.add(model);
65
- var renderer = null;
66
-
67
- var initRendererIfNeeds = function initRendererIfNeeds() {
68
- if (!five.renderer) return;
69
-
70
- if (!renderer) {
71
- renderer = new THREE.WebGLRenderer({
72
- antialias: false,
73
- alpha: true
74
- });
75
- renderer.setPixelRatio(five.renderer.getPixelRatio());
76
- renderer.outputEncoding = THREE.sRGBEncoding;
77
- renderer.setClearColor(0x181a1c, 0);
78
- renderer.autoClear = true;
79
- }
80
-
81
- return renderer;
82
- };
83
-
84
- var modelWillLoad = function modelWillLoad() {
85
- model.traverse(function (object) {
86
- if (object instanceof THREE.Mesh) {
87
- var materials = [].concat(object.material);
88
- materials.forEach(function (material) {
89
- return material.dispose();
90
- });
91
- }
92
- });
93
- scene.remove(model);
94
- model = new THREE.Object3D();
95
- scene.add(model);
96
- update();
97
- };
98
-
99
- var modelLoaded = function modelLoaded() {
100
- function cloneMaterial(material) {
101
- material = material.clone();
102
- material.uniforms.modelAlpha.value = 1;
103
-
104
- if (material.uniforms.map.value) {
105
- material.uniforms.map.value.needsUpdate = true;
106
- }
107
-
108
- return material;
109
- }
110
-
111
- function cloneModel(model) {
112
- if (model instanceof THREE.Mesh) {
113
- var geometry = model.geometry;
114
- var material = Array.isArray(model.material) ? model.material.map(cloneMaterial) : cloneMaterial(model.material);
115
- return new THREE.Mesh(geometry, material);
116
- } else if (model instanceof THREE.Group) {
117
- var group = new THREE.Group();
118
- model.children.forEach(function (object) {
119
- return group.add(cloneModel(object));
120
- });
121
- return group;
122
- } else {
123
- var object3D = new THREE.Object3D();
124
- model.children.forEach(function (object) {
125
- return object3D.add(cloneModel(object));
126
- });
127
- return object3D;
128
- }
129
- }
130
-
131
- scene.remove(model);
132
- model = cloneModel(five.model);
133
- scene.add(model);
134
- update();
135
- };
136
-
137
- var appendTo = function appendTo(element) {
138
- var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
139
- var renderer = initRendererIfNeeds();
140
- if (!renderer) return;
141
- element.appendChild(renderer.domElement);
142
- refresh(size);
143
- var positionType = window.getComputedStyle(element).position;
144
- if (positionType !== 'relative' && positionType !== 'absolute' && positionType !== 'fixed' && positionType !== 'sticky') element.style.position = 'relative';
145
- };
146
-
147
- var refresh = function refresh() {
148
- var size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
149
- if (!renderer) return;
150
- var element = renderer.domElement;
151
- var container = element.parentNode;
152
-
153
- if (container && container.nodeName) {
154
- var _size$width = size.width,
155
- width = _size$width === void 0 ? container.offsetWidth : _size$width,
156
- _size$height = size.height,
157
- height = _size$height === void 0 ? container.offsetHeight : _size$height;
158
- renderer.setSize(width, height); // 修改摄像机 aspect 比值
159
-
160
- camera.aspect = width / height;
161
- camera.updateProjectionMatrix();
162
- }
163
-
164
- needsRender = true;
165
- };
166
-
167
- var cameraDistance = function cameraDistance() {
168
- var bounding = five.model.bounding;
169
- var fov = camera.fov,
170
- aspect = camera.aspect;
171
- var radius = Math.sqrt(Math.pow(bounding.max.x - bounding.min.x + 2, 2) + Math.pow(bounding.max.y - bounding.min.y + 2, 2) + Math.pow(bounding.max.z - bounding.min.z + 2, 2)); // fit screen
172
-
173
- var distance = radius / 2 / Math.tan(Math.PI * fov / 360);
174
- if (aspect < 1) distance = distance / aspect;
175
- return isNaN(distance) ? radius : distance;
176
- };
177
-
178
- var update = function update() {
179
- var _five$getPose = five.getPose(),
180
- longitude = _five$getPose.longitude,
181
- latitude = _five$getPose.latitude;
182
-
183
- var distance = cameraDistance();
184
- var lookAt = five.model.bounding.getCenter(new THREE.Vector3());
185
- var longitudeDistance = distance * Math.cos(latitude);
186
- var cameraPosition = new THREE.Vector3();
187
- cameraPosition.x = Math.sin(longitude) * longitudeDistance + lookAt.x;
188
- cameraPosition.z = Math.cos(longitude) * longitudeDistance + lookAt.z;
189
- cameraPosition.y = Math.sin(latitude) * distance + lookAt.y;
190
- camera.position.copy(cameraPosition);
191
- camera.lookAt(lookAt);
192
- needsRender = true;
193
- };
194
-
195
- var render = function render() {
196
- if (needsRender !== true) return;
197
- if (!renderer) return;
198
- if (!renderer.domElement.parentNode) return;
199
- var parentNode = renderer.domElement.parentNode;
200
- if (parentNode.offsetWidth === 0) return;
201
- renderer.render(scene, camera);
202
- needsRender = false;
203
- };
204
-
205
- var dispose = function dispose() {
206
- if (renderer) renderer.dispose();
207
- renderer = null;
208
- };
209
-
210
- five.on('modelLoaded', modelLoaded);
211
- five.on('modelWillLoad', modelWillLoad);
212
- five.on('cameraDirectionUpdate', update);
213
- five.on('dispose', dispose);
214
- five.on('renderFrame', render);
215
- return {
216
- appendTo: appendTo,
217
- refresh: refresh
218
- };
219
- };
220
-
221
- exports.ModelViewPlugin = ModelViewPlugin;
222
- var _default = ModelViewPlugin;
223
- exports["default"] = _default;
@@ -1,48 +0,0 @@
1
- /// <reference types="react" />
2
- import { Intersection } from '@realsee/five';
3
- export declare type StateType = {
4
- fixDistance: number;
5
- originPoint: Intersection['point'];
6
- } & Intersection;
7
- export interface PanoCursorRaycasterPluginUsageProps {
8
- enable?: boolean;
9
- pointAxesHelperEnable?: boolean;
10
- movePointTowradsCameraEnable?: boolean;
11
- dashLineFollowCursor?: boolean;
12
- }
13
- /**
14
- * **PanoCursorRaycaster** 全景鼠标碰撞监测应用举例:选择四个点生成矩形区域,然后在此区域中放置视频广告。
15
- *
16
- * ### Usage
17
- *
18
- * ```ts
19
- * import PanoCursorRaycasterPlugin from '@realsee/dnalogel/plugins/PanoCursorRaycasterPlugin'
20
- * const five = new Five({ plugins: [[PanoCursorRaycasterPlugin, 'panoCursorRaycasterPlugin', {}]] })
21
- *
22
- * // 计算当前鼠标在当前点位全景中的碰撞监测结果。
23
- * const res: Five.Intersection = panoCursorRaycasterPlugin.intersection()
24
- * // 在点位上添加辅助坐标轴
25
- * panoCursorRaycasterPlugin.pointAxesHelper(res.point)
26
- *
27
- *
28
- * ```
29
- *
30
- * `Five.Intersection` 数据结构声明:
31
- *
32
- * ```ts
33
- * export declare interface Intersection {
34
- * // 焦点坐标
35
- * point: THREE.Vector3;
36
- * // 焦点面片
37
- * face?: {
38
- * normal: THREE.Vector3;
39
- * };
40
- * // 焦点距离
41
- * distance: number;
42
- * }
43
- * ```
44
- *
45
- * > **注意事项**: 仅限有鼠标场景的碰撞监测,触摸屏不可用。
46
- * @returns
47
- */
48
- export declare function PanoCursorRaycasterPluginUsage(props: PanoCursorRaycasterPluginUsageProps): JSX.Element;
@@ -1,9 +0,0 @@
1
- import * as React from 'react';
2
- import * as THREE from 'three';
3
- import { StateType } from '../PanoCursorRaycasterPluginUsage';
4
- export default function MovePointTowardsCamera(props: {
5
- state: StateType[];
6
- pointColors: string[];
7
- setState: React.Dispatch<React.SetStateAction<StateType[]>>;
8
- movePointTowardsCamera: (point: THREE.Vector3, distance: number) => THREE.Vector3;
9
- }): JSX.Element | null;