@realsee/five 5.0.0-alpha.11 → 5.0.0-alpha.112

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 (445) hide show
  1. package/README.md +75 -63
  2. package/docs/.nojekyll +1 -0
  3. package/docs/assets/highlight.css +134 -0
  4. package/docs/assets/icons.css +1043 -0
  5. package/docs/assets/{images/icons.png → icons.png} +0 -0
  6. package/docs/assets/{images/icons@2x.png → icons@2x.png} +0 -0
  7. package/docs/assets/main.js +52 -0
  8. package/docs/assets/search.js +1 -0
  9. package/docs/assets/style.css +1413 -0
  10. package/docs/assets/{images/widgets.png → widgets.png} +0 -0
  11. package/docs/assets/{images/widgets@2x.png → widgets@2x.png} +0 -0
  12. package/docs/classes/five.AnimationFrameLoop.html +15 -0
  13. package/docs/classes/five.BVH.html +10 -0
  14. package/docs/classes/five.BVHIntersect.html +1 -0
  15. package/docs/classes/five.BVHNode.html +7 -0
  16. package/docs/classes/five.BVHVector3.html +1 -0
  17. package/docs/classes/five.Camera.html +11 -0
  18. package/docs/classes/five.Five.html +303 -0
  19. package/docs/classes/five.InternalWebGLRenderer.html +1 -0
  20. package/docs/classes/five.IntersectMesh.html +1 -0
  21. package/docs/classes/five.LegacyPanoCircleMesh.html +5 -0
  22. package/docs/classes/five.Model.html +77 -0
  23. package/docs/classes/five.NetworkSubscribe.html +50 -0
  24. package/docs/classes/five.PBMContainer.html +17 -0
  25. package/docs/classes/five.PBMGroup.html +19 -0
  26. package/docs/classes/five.PBMMaterial.html +15 -0
  27. package/docs/classes/five.PBMMesh.html +7 -0
  28. package/docs/classes/five.PanoCircleMesh.html +7 -0
  29. package/docs/classes/five.Scene.html +3 -0
  30. package/docs/classes/five.Subscribe.html +56 -0
  31. package/docs/classes/five.Work.html +30 -0
  32. package/docs/classes/gltf_loader.GLTFLoader.html +17 -0
  33. package/docs/classes/gltf_loader.GLTFObject.html +7 -0
  34. package/docs/classes/line.Line.html +1 -0
  35. package/docs/classes/line.LineGeometry.html +1 -0
  36. package/docs/classes/line.LineMaterial.html +1 -0
  37. package/docs/classes/line.LineSegmentsGeometry.html +1 -0
  38. package/docs/classes/line.THREE_Line2.html +1 -0
  39. package/docs/classes/line.THREE_LineSegments2.html +1 -0
  40. package/docs/classes/react.Store.html +29 -0
  41. package/docs/classes/server.BVH.html +10 -0
  42. package/docs/classes/server.BVHIntersect.html +1 -0
  43. package/docs/classes/server.BVHNode.html +7 -0
  44. package/docs/classes/server.BVHVector3.html +1 -0
  45. package/docs/classes/server.Model.html +63 -0
  46. package/docs/classes/server.PBMGroup.html +9 -0
  47. package/docs/classes/server.PBMMesh.html +7 -0
  48. package/docs/classes/sticker.Sticker.html +32 -0
  49. package/docs/index.html +166 -420
  50. package/docs/interfaces/five.AddableObject.html +1 -0
  51. package/docs/interfaces/five.AnimationFrame.html +1 -0
  52. package/docs/interfaces/five.CameraPose.html +1 -0
  53. package/docs/interfaces/five.DepthPanoramaControllerCustomInitArgs.html +28 -0
  54. package/docs/interfaces/five.EventCallback.html +391 -0
  55. package/docs/interfaces/five.FiveInitArgs.html +96 -0
  56. package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +15 -0
  57. package/docs/interfaces/five.ImageOptions.html +18 -0
  58. package/docs/interfaces/five.ImageURLOptions.html +15 -0
  59. package/docs/interfaces/five.IntersectMeshInterface.html +3 -0
  60. package/docs/interfaces/five.Intersection.html +7 -0
  61. package/docs/interfaces/five.ModelControllerCustomInitArgs.html +20 -0
  62. package/docs/interfaces/five.ModelEventCallback.html +22 -0
  63. package/docs/interfaces/five.MovePanoOptions.html +40 -0
  64. package/docs/interfaces/five.PBMPanoPicture.html +7 -0
  65. package/docs/interfaces/five.PBMParameters.html +15 -0
  66. package/docs/interfaces/five.PanoCircleMeshInterface.html +19 -0
  67. package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +28 -0
  68. package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +20 -0
  69. package/docs/interfaces/five.Pose.html +35 -0
  70. package/docs/interfaces/five.Scissor.html +14 -0
  71. package/docs/interfaces/five.State.html +19 -0
  72. package/docs/interfaces/five.SubscribeMixinType.emit.html +1 -0
  73. package/docs/interfaces/five.SubscribeMixinType.hasListener.html +1 -0
  74. package/docs/interfaces/five.SubscribeMixinType.off.html +1 -0
  75. package/docs/interfaces/five.SubscribeMixinType.on.html +1 -0
  76. package/docs/interfaces/five.SubscribeMixinType.once.html +1 -0
  77. package/docs/interfaces/five.TextureOptions.html +20 -0
  78. package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +7 -0
  79. package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +24 -0
  80. package/docs/interfaces/five.WorkCubeImage.html +13 -0
  81. package/docs/interfaces/five.WorkImage.html +21 -0
  82. package/docs/interfaces/five.WorkInitial.html +13 -0
  83. package/docs/interfaces/five.WorkModel.html +11 -0
  84. package/docs/interfaces/five.WorkObserver.html +25 -0
  85. package/docs/interfaces/five.WorkTile.html +1 -0
  86. package/docs/interfaces/five.WorkVideo.html +9 -0
  87. package/docs/interfaces/gltf_loader.GLTF.html +7 -0
  88. package/docs/interfaces/react.FiveActionReactCallbacks.html +62 -0
  89. package/docs/interfaces/react.FiveInjectionTypes.html +191 -0
  90. package/docs/interfaces/react.PropTypeOfFiveFeatures.html +1 -0
  91. package/docs/interfaces/server.Intersection.html +7 -0
  92. package/docs/interfaces/server.ModelEventCallback.html +18 -0
  93. package/docs/interfaces/sticker.IntersectionLike.html +8 -0
  94. package/docs/modules/five.SubscribeMixinType.html +1 -0
  95. package/docs/modules/five.html +481 -0
  96. package/docs/modules/gltf_loader.html +1 -0
  97. package/docs/modules/line.html +1 -0
  98. package/docs/modules/react.html +130 -941
  99. package/docs/modules/server.html +18 -0
  100. package/docs/modules/sticker.html +1 -0
  101. package/docs/modules.html +1 -119
  102. package/exporters/staticify.js +203 -0
  103. package/five/index.d.ts +2073 -0
  104. package/five/index.js +372 -0
  105. package/gltf-loader/index.d.ts +75 -0
  106. package/gltf-loader/index.js +260 -0
  107. package/line/index.d.ts +68 -0
  108. package/line/index.js +260 -0
  109. package/package.json +20 -18
  110. package/react/index.d.ts +812 -17
  111. package/react/index.js +260 -1
  112. package/resource/{basis_transcoder.js → basis/basis_transcoder.js} +0 -0
  113. package/resource/{basis_transcoder.wasm → basis/basis_transcoder.wasm} +0 -0
  114. package/resource/gltf/draco_decoder.js +31 -0
  115. package/resource/gltf/draco_decoder.wasm +0 -0
  116. package/resource/gltf/draco_wasm_wrapper.js +119 -0
  117. package/scripts/five-staticify.js +21 -0
  118. package/server/index.d.ts +568 -5
  119. package/server/index.js +367 -1
  120. package/sticker/index.d.ts +70 -0
  121. package/sticker/index.js +260 -0
  122. package/templates/plugin/examples/index.html +1 -1
  123. package/templates/quick-start/README.md +1 -1
  124. package/templates/quick-start/index.tsx +1 -1
  125. package/templates/quick-start/package.json +1 -1
  126. package/templates/react-component/examples/index.html +1 -1
  127. package/templates/react-component/examples/index.tsx +4 -4
  128. package/templates/react-component/lib/index.tsx +5 -5
  129. package/umd/five-gltf-loader.js +2 -0
  130. package/umd/five-gltf-loader.js.LICENSE.txt +14 -0
  131. package/umd/five-line.js +2 -0
  132. package/umd/five-line.js.LICENSE.txt +14 -0
  133. package/umd/five-react.js +2 -0
  134. package/umd/five-react.js.LICENSE.txt +14 -0
  135. package/umd/five-sticker.js +2 -0
  136. package/umd/five-sticker.js.LICENSE.txt +14 -0
  137. package/umd/five.js +2 -0
  138. package/umd/five.js.LICENSE.txt +116 -0
  139. package/application/constant.d.ts +0 -6
  140. package/application/constant.js +0 -1
  141. package/application/controllers.d.ts +0 -31
  142. package/application/controllers.js +0 -1
  143. package/application/events.d.ts +0 -140
  144. package/application/events.js +0 -1
  145. package/application/five.d.ts +0 -418
  146. package/application/five.js +0 -1
  147. package/application/fiveInitArgs.d.ts +0 -157
  148. package/application/fiveInitArgs.js +0 -1
  149. package/application/generateDefaultVideoElement.d.ts +0 -2
  150. package/application/generateDefaultVideoElement.js +0 -1
  151. package/application/getViewportScale.d.ts +0 -2
  152. package/application/getViewportScale.js +0 -1
  153. package/application/initLights.d.ts +0 -3
  154. package/application/initLights.js +0 -1
  155. package/bundles/five.js +0 -2
  156. package/bundles/five.js.LICENSE.txt +0 -160
  157. package/controllers/base.d.ts +0 -80
  158. package/controllers/base.js +0 -1
  159. package/controllers/depthPanorama.d.ts +0 -40
  160. package/controllers/depthPanorama.js +0 -1
  161. package/controllers/events.d.ts +0 -273
  162. package/controllers/events.js +0 -1
  163. package/controllers/floorplan.d.ts +0 -102
  164. package/controllers/floorplan.js +0 -1
  165. package/controllers/model.d.ts +0 -23
  166. package/controllers/model.js +0 -1
  167. package/controllers/panorama.d.ts +0 -69
  168. package/controllers/panorama.js +0 -1
  169. package/controllers/panoramaLike.d.ts +0 -88
  170. package/controllers/panoramaLike.js +0 -1
  171. package/controllers/topview.d.ts +0 -28
  172. package/controllers/topview.js +0 -1
  173. package/controllers/vrPanorama.d.ts +0 -40
  174. package/controllers/vrPanorama.js +0 -1
  175. package/core/camera.d.ts +0 -15
  176. package/core/camera.js +0 -1
  177. package/core/cubeTexture.d.ts +0 -6
  178. package/core/cubeTexture.js +0 -1
  179. package/core/internalWebGLRenderer.d.ts +0 -11
  180. package/core/internalWebGLRenderer.js +0 -1
  181. package/core/pbmGroup.d.ts +0 -22
  182. package/core/pbmGroup.js +0 -1
  183. package/core/pbmMaterial.d.ts +0 -39
  184. package/core/pbmMaterial.js +0 -1
  185. package/core/pbmMesh.d.ts +0 -10
  186. package/core/pbmMesh.js +0 -1
  187. package/core/pbmParameters.d.ts +0 -36
  188. package/core/pbmParameters.js +0 -1
  189. package/core/scene.d.ts +0 -5
  190. package/core/scene.js +0 -1
  191. package/core/subscribe.d.ts +0 -76
  192. package/core/subscribe.js +0 -1
  193. package/core/updatableTexture.d.ts +0 -12
  194. package/core/updatableTexture.js +0 -1
  195. package/docs/assets/css/main.css +0 -2660
  196. package/docs/assets/js/main.js +0 -248
  197. package/docs/assets/js/search.js +0 -1
  198. package/docs/classes/index.five.html +0 -2567
  199. package/docs/classes/index.fivecamera.html +0 -427
  200. package/docs/classes/index.fiveline.html +0 -458
  201. package/docs/classes/index.fivescene.html +0 -302
  202. package/docs/classes/index.internalwebglrenderer.html +0 -316
  203. package/docs/classes/index.model.html +0 -999
  204. package/docs/classes/index.pbmgroup.html +0 -531
  205. package/docs/classes/index.pbmmaterial.html +0 -637
  206. package/docs/classes/index.pbmmesh.html +0 -358
  207. package/docs/classes/index.subscribe.html +0 -672
  208. package/docs/interfaces/index.depthpanoramacontrollercustominitargs.html +0 -524
  209. package/docs/interfaces/index.fiveeventcallback.html +0 -2568
  210. package/docs/interfaces/index.fiveinitargs.html +0 -811
  211. package/docs/interfaces/index.floorplancontrollercustominitargs.html +0 -399
  212. package/docs/interfaces/index.imageoptions.html +0 -436
  213. package/docs/interfaces/index.intersection.html +0 -331
  214. package/docs/interfaces/index.intersectmeshinterface.html +0 -292
  215. package/docs/interfaces/index.modelcontrollercustominitargs.html +0 -470
  216. package/docs/interfaces/index.modeleventcallback.html +0 -432
  217. package/docs/interfaces/index.movepanooptions.html +0 -573
  218. package/docs/interfaces/index.panocirclemeshinterface.html +0 -465
  219. package/docs/interfaces/index.panoramacontrollercustominitargs.html +0 -549
  220. package/docs/interfaces/index.panoramalikecontrollercustominitargs.html +0 -468
  221. package/docs/interfaces/index.pbmparameters.html +0 -578
  222. package/docs/interfaces/index.pose.html +0 -374
  223. package/docs/interfaces/index.scissor.html +0 -356
  224. package/docs/interfaces/index.state.html +0 -404
  225. package/docs/interfaces/index.topviewcontrollercustominitargs.html +0 -330
  226. package/docs/interfaces/index.vrpanoramacontrollercustominitargs.html +0 -536
  227. package/docs/interfaces/react.fiveactionreactcallbacks.html +0 -530
  228. package/docs/interfaces/react.injectfivetoprops.html +0 -231
  229. package/docs/modules/index.html +0 -925
  230. package/five.js.LICENSE.txt +0 -160
  231. package/index.d.ts +0 -33
  232. package/index.js +0 -1
  233. package/loaders/basis/BasisTextureLoader.d.ts +0 -116
  234. package/loaders/basis/BasisTextureLoader.js +0 -1
  235. package/loaders/basis/index.d.ts +0 -3
  236. package/loaders/basis/index.js +0 -1
  237. package/loaders/cubeTexture/imagePool.d.ts +0 -7
  238. package/loaders/cubeTexture/imagePool.js +0 -1
  239. package/loaders/cubeTexture/index.d.ts +0 -58
  240. package/loaders/cubeTexture/index.js +0 -1
  241. package/loaders/depthTexture/index.d.ts +0 -60
  242. package/loaders/depthTexture/index.js +0 -1
  243. package/loaders/model/at3d.d.ts +0 -7
  244. package/loaders/model/at3d.js +0 -1
  245. package/loaders/model/dome.d.ts +0 -14
  246. package/loaders/model/dome.js +0 -1
  247. package/loaders/model/domez.d.ts +0 -7
  248. package/loaders/model/domez.js +0 -1
  249. package/loaders/model/index.d.ts +0 -135
  250. package/loaders/model/index.js +0 -1
  251. package/loaders/model/pbm.d.ts +0 -27
  252. package/loaders/model/pbm.js +0 -1
  253. package/loaders/model/tools/bvhtree/index.d.ts +0 -2
  254. package/loaders/model/tools/bvhtree/index.js +0 -1
  255. package/loaders/model/tools/lzma/index.d.ts +0 -2
  256. package/loaders/model/tools/lzma/index.js +0 -1
  257. package/loaders/model/tools/lzma/lzma-caller.d.ts +0 -13
  258. package/loaders/model/tools/lzma/lzma-caller.js +0 -1
  259. package/loaders/model/tools/lzma/lzma.d.ts +0 -2
  260. package/loaders/model/tools/lzma/lzma.js +0 -1
  261. package/loaders/model/tools/lzma/lzmaWorker.d.ts +0 -1
  262. package/loaders/model/tools/lzma/lzmaWorker.js +0 -1
  263. package/loaders/tileTexture/index.d.ts +0 -26
  264. package/loaders/tileTexture/index.js +0 -1
  265. package/meshes/boundingMesh.d.ts +0 -9
  266. package/meshes/boundingMesh.js +0 -1
  267. package/meshes/intersectMesh.d.ts +0 -11
  268. package/meshes/intersectMesh.js +0 -1
  269. package/meshes/panoCircleMesh.d.ts +0 -29
  270. package/meshes/panoCircleMesh.js +0 -1
  271. package/meshes/panoSphereMesh.d.ts +0 -16
  272. package/meshes/panoSphereMesh.js +0 -1
  273. package/objects/line/circle_png.d.ts +0 -1
  274. package/objects/line/circle_png.js +0 -1
  275. package/objects/line/index.d.ts +0 -12
  276. package/objects/line/index.js +0 -1
  277. package/objects/line/utils/Line2.d.ts +0 -7
  278. package/objects/line/utils/Line2.js +0 -1
  279. package/objects/line/utils/LineGeometry.d.ts +0 -10
  280. package/objects/line/utils/LineGeometry.js +0 -1
  281. package/objects/line/utils/LineMaterial.d.ts +0 -20
  282. package/objects/line/utils/LineMaterial.js +0 -1
  283. package/objects/line/utils/LineSegments2.d.ts +0 -11
  284. package/objects/line/utils/LineSegments2.js +0 -1
  285. package/objects/line/utils/LineSegmentsGeometry.d.ts +0 -15
  286. package/objects/line/utils/LineSegmentsGeometry.js +0 -1
  287. package/react/canvas.d.ts +0 -19
  288. package/react/canvas.js +0 -1
  289. package/react/context.d.ts +0 -9
  290. package/react/context.js +0 -1
  291. package/react/createProvider.d.ts +0 -65
  292. package/react/createProvider.js +0 -1
  293. package/react/createStore.d.ts +0 -138
  294. package/react/createStore.js +0 -1
  295. package/react/hooks/unsafe__useFiveInstance.d.ts +0 -9
  296. package/react/hooks/unsafe__useFiveInstance.js +0 -1
  297. package/react/hooks/useFiveAction.d.ts +0 -154
  298. package/react/hooks/useFiveAction.js +0 -1
  299. package/react/hooks/useFiveCameraDirection.d.ts +0 -7
  300. package/react/hooks/useFiveCameraDirection.js +0 -1
  301. package/react/hooks/useFiveCameraRaycaster.d.ts +0 -7
  302. package/react/hooks/useFiveCameraRaycaster.js +0 -1
  303. package/react/hooks/useFiveCurrentState.d.ts +0 -15
  304. package/react/hooks/useFiveCurrentState.js +0 -1
  305. package/react/hooks/useFiveEvent.d.ts +0 -12
  306. package/react/hooks/useFiveEvent.js +0 -1
  307. package/react/hooks/useFiveModelIntersectRaycaster.d.ts +0 -21
  308. package/react/hooks/useFiveModelIntersectRaycaster.js +0 -1
  309. package/react/hooks/useFiveModelReadyState.d.ts +0 -8
  310. package/react/hooks/useFiveModelReadyState.js +0 -1
  311. package/react/hooks/useFiveProject2d.d.ts +0 -20
  312. package/react/hooks/useFiveProject2d.js +0 -1
  313. package/react/hooks/useFiveScene.d.ts +0 -16
  314. package/react/hooks/useFiveScene.js +0 -1
  315. package/react/hooks/useFiveState.d.ts +0 -6
  316. package/react/hooks/useFiveState.js +0 -1
  317. package/react/hooks/useFiveWork.d.ts +0 -30
  318. package/react/hooks/useFiveWork.js +0 -1
  319. package/react/rendererPool.d.ts +0 -8
  320. package/react/rendererPool.js +0 -1
  321. package/react/withFive.d.ts +0 -239
  322. package/react/withFive.js +0 -1
  323. package/scripts/export-five-resource/chfs.exe +0 -0
  324. package/scripts/export-five-resource/fileify.js +0 -192
  325. package/scripts/export-five-resource/format-work.js +0 -71
  326. package/scripts/export-five-resource/staticify.js +0 -327
  327. package/scripts/transcode-model/BufferGeometryUtils.js +0 -832
  328. package/scripts/transcode-model/LoaderSupport.js +0 -1545
  329. package/scripts/transcode-model/MTLLoader.js +0 -602
  330. package/scripts/transcode-model/OBJLoader2.js +0 -1470
  331. package/scripts/transcode-model/obj2pbm.js +0 -65
  332. package/server/core/pbmGroup.d.ts +0 -11
  333. package/server/core/pbmGroup.js +0 -1
  334. package/server/core/pbmMesh.d.ts +0 -9
  335. package/server/core/pbmMesh.js +0 -1
  336. package/server/model/at3d.d.ts +0 -5
  337. package/server/model/at3d.js +0 -1
  338. package/server/model/dome.d.ts +0 -11
  339. package/server/model/dome.js +0 -1
  340. package/server/model/domez.d.ts +0 -5
  341. package/server/model/domez.js +0 -1
  342. package/server/model/index.d.ts +0 -134
  343. package/server/model/index.js +0 -1
  344. package/server/model/pbm.d.ts +0 -24
  345. package/server/model/pbm.js +0 -1
  346. package/server/model/tools/bvhtree/index.d.ts +0 -2
  347. package/server/model/tools/bvhtree/index.js +0 -1
  348. package/server/model/tools/fetchArraybuffer.d.ts +0 -2
  349. package/server/model/tools/fetchArraybuffer.js +0 -1
  350. package/server/model/tools/lzma/index.d.ts +0 -2
  351. package/server/model/tools/lzma/index.js +0 -1
  352. package/server/model/tools/lzma/lzma.d.ts +0 -2
  353. package/server/model/tools/lzma/lzma.js +0 -1
  354. package/shaders/depth/fragment.d.ts +0 -2
  355. package/shaders/depth/fragment.js +0 -1
  356. package/shaders/depth/vertex.d.ts +0 -2
  357. package/shaders/depth/vertex.js +0 -1
  358. package/shaders/pbm/fragment.d.ts +0 -2
  359. package/shaders/pbm/fragment.js +0 -1
  360. package/shaders/pbm/vertex.d.ts +0 -2
  361. package/shaders/pbm/vertex.js +0 -1
  362. package/three-version-check.d.ts +0 -1
  363. package/three-version-check.js +0 -1
  364. package/types/imageOptions.d.ts +0 -24
  365. package/types/imageOptions.js +0 -1
  366. package/types/mode.d.ts +0 -23
  367. package/types/mode.js +0 -1
  368. package/types/movePanoOptions.d.ts +0 -40
  369. package/types/movePanoOptions.js +0 -1
  370. package/types/plugin.d.ts +0 -26
  371. package/types/plugin.js +0 -1
  372. package/types/pose.d.ts +0 -16
  373. package/types/pose.js +0 -1
  374. package/types/scissor.d.ts +0 -18
  375. package/types/scissor.js +0 -1
  376. package/types/state.d.ts +0 -18
  377. package/types/state.js +0 -1
  378. package/utils/BufferGeometryUtils.d.ts +0 -31
  379. package/utils/BufferGeometryUtils.js +0 -1
  380. package/utils/ajax.d.ts +0 -13
  381. package/utils/ajax.js +0 -1
  382. package/utils/animationFrame.d.ts +0 -24
  383. package/utils/animationFrame.js +0 -1
  384. package/utils/arrayMax.d.ts +0 -10
  385. package/utils/arrayMax.js +0 -1
  386. package/utils/arrayMin.d.ts +0 -11
  387. package/utils/arrayMin.js +0 -1
  388. package/utils/busy.d.ts +0 -13
  389. package/utils/busy.js +0 -1
  390. package/utils/calculateProgress.d.ts +0 -37
  391. package/utils/calculateProgress.js +0 -1
  392. package/utils/calculateThreeMouse.d.ts +0 -13
  393. package/utils/calculateThreeMouse.js +0 -1
  394. package/utils/cameraWorldToLocal.d.ts +0 -13
  395. package/utils/cameraWorldToLocal.js +0 -1
  396. package/utils/coordinatesToVector.d.ts +0 -7
  397. package/utils/coordinatesToVector.js +0 -1
  398. package/utils/createImage.d.ts +0 -2
  399. package/utils/createImage.js +0 -1
  400. package/utils/detector.d.ts +0 -13
  401. package/utils/detector.js +0 -1
  402. package/utils/formatRad.d.ts +0 -7
  403. package/utils/formatRad.js +0 -1
  404. package/utils/headingToLongitude.d.ts +0 -6
  405. package/utils/headingToLongitude.js +0 -1
  406. package/utils/imageLoader.d.ts +0 -10
  407. package/utils/imageLoader.js +0 -1
  408. package/utils/imageURL.d.ts +0 -9
  409. package/utils/imageURL.js +0 -1
  410. package/utils/isAbsoluteURL.d.ts +0 -6
  411. package/utils/isAbsoluteURL.js +0 -1
  412. package/utils/isNil.d.ts +0 -6
  413. package/utils/isNil.js +0 -1
  414. package/utils/longitudeToHeading.d.ts +0 -6
  415. package/utils/longitudeToHeading.js +0 -1
  416. package/utils/mouseWheel.d.ts +0 -17
  417. package/utils/mouseWheel.js +0 -1
  418. package/utils/noop.d.ts +0 -6
  419. package/utils/noop.js +0 -1
  420. package/utils/now.d.ts +0 -5
  421. package/utils/now.js +0 -1
  422. package/utils/preload.d.ts +0 -5
  423. package/utils/preload.js +0 -1
  424. package/utils/tween.d.ts +0 -88
  425. package/utils/tween.js +0 -1
  426. package/utils/uuid.d.ts +0 -5
  427. package/utils/uuid.js +0 -1
  428. package/utils/vectorTocoordinates.d.ts +0 -7
  429. package/utils/vectorTocoordinates.js +0 -1
  430. package/utils/webglError.d.ts +0 -7
  431. package/utils/webglError.js +0 -1
  432. package/webvr/helper.img.d.ts +0 -1
  433. package/webvr/helper.img.js +0 -1
  434. package/webvr/vrEffect.d.ts +0 -13
  435. package/webvr/vrEffect.js +0 -1
  436. package/work/index.d.ts +0 -5
  437. package/work/index.js +0 -1
  438. package/work/looseWorkType.d.ts +0 -61
  439. package/work/looseWorkType.js +0 -1
  440. package/work/parse.d.ts +0 -4
  441. package/work/parse.js +0 -1
  442. package/work/stringify.d.ts +0 -4
  443. package/work/stringify.js +0 -1
  444. package/work/workType.d.ts +0 -49
  445. package/work/workType.js +0 -1
@@ -1,160 +0,0 @@
1
- /*! *****************************************************************************
2
- Copyright (c) Microsoft Corporation.
3
-
4
- Permission to use, copy, modify, and/or distribute this software for any
5
- purpose with or without fee is hereby granted.
6
-
7
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
- PERFORMANCE OF THIS SOFTWARE.
14
- ***************************************************************************** */
15
-
16
- /*! Hammer.JS - v2.0.7 - 2016-04-22
17
- * http://hammerjs.github.io/
18
- *
19
- * Copyright (c) 2016 Jorik Tangelder;
20
- * Licensed under the MIT license */
21
-
22
- /**
23
- * @license
24
- * cardboard-vr-display
25
- * Copyright (c) 2015-2017 Google
26
- * Licensed under the Apache License, Version 2.0 (the "License");
27
- * you may not use this file except in compliance with the License.
28
- * You may obtain a copy of the License at
29
- *
30
- * http://www.apache.org/licenses/LICENSE-2.0
31
- *
32
- * Unless required by applicable law or agreed to in writing, software
33
- * distributed under the License is distributed on an "AS IS" BASIS,
34
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35
- * See the License for the specific language governing permissions and
36
- * limitations under the License.
37
- */
38
-
39
- /**
40
- * @license
41
- * gl-preserve-state
42
- * Copyright (c) 2016, Brandon Jones.
43
- *
44
- * Permission is hereby granted, free of charge, to any person obtaining a copy
45
- * of this software and associated documentation files (the "Software"), to deal
46
- * in the Software without restriction, including without limitation the rights
47
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
48
- * copies of the Software, and to permit persons to whom the Software is
49
- * furnished to do so, subject to the following conditions:
50
- *
51
- * The above copyright notice and this permission notice shall be included in
52
- * all copies or substantial portions of the Software.
53
- *
54
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
55
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
56
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
57
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
58
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
59
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
60
- * THE SOFTWARE.
61
- */
62
-
63
- /**
64
- * @license
65
- * nosleep.js
66
- * Copyright (c) 2017, Rich Tibbett
67
- *
68
- * Permission is hereby granted, free of charge, to any person obtaining a copy
69
- * of this software and associated documentation files (the "Software"), to deal
70
- * in the Software without restriction, including without limitation the rights
71
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
72
- * copies of the Software, and to permit persons to whom the Software is
73
- * furnished to do so, subject to the following conditions:
74
- *
75
- * The above copyright notice and this permission notice shall be included in
76
- * all copies or substantial portions of the Software.
77
- *
78
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
79
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
80
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
81
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
82
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
83
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
84
- * THE SOFTWARE.
85
- */
86
-
87
- /**
88
- * @license
89
- * webvr-polyfill
90
- * Copyright (c) 2015-2017 Google
91
- * Licensed under the Apache License, Version 2.0 (the "License");
92
- * you may not use this file except in compliance with the License.
93
- * You may obtain a copy of the License at
94
- *
95
- * http://www.apache.org/licenses/LICENSE-2.0
96
- *
97
- * Unless required by applicable law or agreed to in writing, software
98
- * distributed under the License is distributed on an "AS IS" BASIS,
99
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
100
- * See the License for the specific language governing permissions and
101
- * limitations under the License.
102
- */
103
-
104
- /**
105
- * @license
106
- * webvr-polyfill-dpdb
107
- * Copyright (c) 2015-2017 Google
108
- * Licensed under the Apache License, Version 2.0 (the "License");
109
- * you may not use this file except in compliance with the License.
110
- * You may obtain a copy of the License at
111
- *
112
- * http://www.apache.org/licenses/LICENSE-2.0
113
- *
114
- * Unless required by applicable law or agreed to in writing, software
115
- * distributed under the License is distributed on an "AS IS" BASIS,
116
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
117
- * See the License for the specific language governing permissions and
118
- * limitations under the License.
119
- */
120
-
121
- /**
122
- * @license
123
- * webvr-polyfill-dpdb
124
- * Copyright (c) 2017 Google
125
- * Licensed under the Apache License, Version 2.0 (the "License");
126
- * you may not use this file except in compliance with the License.
127
- * You may obtain a copy of the License at
128
- *
129
- * http://www.apache.org/licenses/LICENSE-2.0
130
- *
131
- * Unless required by applicable law or agreed to in writing, software
132
- * distributed under the License is distributed on an "AS IS" BASIS,
133
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
134
- * See the License for the specific language governing permissions and
135
- * limitations under the License.
136
- */
137
-
138
- /**
139
- * @license
140
- * wglu-preserve-state
141
- * Copyright (c) 2016, Brandon Jones.
142
- *
143
- * Permission is hereby granted, free of charge, to any person obtaining a copy
144
- * of this software and associated documentation files (the "Software"), to deal
145
- * in the Software without restriction, including without limitation the rights
146
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
147
- * copies of the Software, and to permit persons to whom the Software is
148
- * furnished to do so, subject to the following conditions:
149
- *
150
- * The above copyright notice and this permission notice shall be included in
151
- * all copies or substantial portions of the Software.
152
- *
153
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
154
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
155
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
156
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
157
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
158
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
159
- * THE SOFTWARE.
160
- */
package/index.d.ts DELETED
@@ -1,33 +0,0 @@
1
- import "./three-version-check";
2
- export { Five } from "./application/five";
3
- export { FiveLine } from "./objects/line";
4
- export { Mode } from "./application/controllers";
5
- export { Easing } from "./utils/tween";
6
- export { Subscribe } from "./core/subscribe";
7
- export { PBMGroup } from "./core/pbmGroup";
8
- export { PBMMesh } from "./core/pbmMesh";
9
- export { PBMMaterial } from "./core/pbmMaterial";
10
- export { PBMParameters } from "./core/pbmParameters";
11
- export { InternalWebGLRenderer } from "./core/internalWebGLRenderer";
12
- export { Scene as FiveScene } from "./core/scene";
13
- export { Camera as FiveCamera } from "./core/camera";
14
- export { Model, Intersection, EventType as ModelEventType, EventCallback as ModelEventCallback } from "./loaders/model";
15
- export { Work, parseWork, stringifyWork } from "./work";
16
- export { getViewportScale } from "./application/getViewportScale";
17
- export type { PanoCircleMeshInterface } from "./meshes/panoCircleMesh";
18
- export type { IntersectMeshInterface } from "./meshes/intersectMesh";
19
- export type { FivePlugin, FivePluginInstance, FivePluginInit } from "./types/plugin";
20
- export type { EventType as FiveEventType, EventCallback as FiveEventCallback } from "./application/events";
21
- export type { ImageOptions } from "./types/imageOptions";
22
- export type { MovePanoOptions } from "./types/movePanoOptions";
23
- export type { Scissor } from "./types/scissor";
24
- export type { Pose } from "./types/pose";
25
- export type { State } from "./types/state";
26
- export type { FiveInitArgs } from "./application/five";
27
- export type { DepthPanoramaControllerCustomInitArgs } from "./controllers/depthPanorama";
28
- export type { FloorplanControllerCustomInitArgs } from "./controllers/floorplan";
29
- export type { ModelControllerCustomInitArgs } from "./controllers/model";
30
- export type { PanoramaControllerCustomInitArgs } from "./controllers/panorama";
31
- export type { TopviewControllerCustomInitArgs } from "./controllers/topview";
32
- export type { VRPanoramaControllerCustomInitArgs } from "./controllers/vrPanorama";
33
- export type { PanoramaLikeControllerCustomInitArgs } from "./controllers/panoramaLike";
package/index.js DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getViewportScale=exports.stringifyWork=exports.parseWork=exports.Model=exports.FiveCamera=exports.FiveScene=exports.InternalWebGLRenderer=exports.PBMMaterial=exports.PBMMesh=exports.PBMGroup=exports.Subscribe=exports.Easing=exports.FiveLine=exports.Five=void 0,require("./three-version-check");var e=require("./application/five");Object.defineProperty(exports,"Five",{enumerable:!0,get:function(){return e.Five}});var r=require("./objects/line");Object.defineProperty(exports,"FiveLine",{enumerable:!0,get:function(){return r.FiveLine}});var t=require("./utils/tween");Object.defineProperty(exports,"Easing",{enumerable:!0,get:function(){return t.Easing}});var n=require("./core/subscribe");Object.defineProperty(exports,"Subscribe",{enumerable:!0,get:function(){return n.Subscribe}});var o=require("./core/pbmGroup");Object.defineProperty(exports,"PBMGroup",{enumerable:!0,get:function(){return o.PBMGroup}});var i=require("./core/pbmMesh");Object.defineProperty(exports,"PBMMesh",{enumerable:!0,get:function(){return i.PBMMesh}});var u=require("./core/pbmMaterial");Object.defineProperty(exports,"PBMMaterial",{enumerable:!0,get:function(){return u.PBMMaterial}});var a=require("./core/internalWebGLRenderer");Object.defineProperty(exports,"InternalWebGLRenderer",{enumerable:!0,get:function(){return a.InternalWebGLRenderer}});var p=require("./core/scene");Object.defineProperty(exports,"FiveScene",{enumerable:!0,get:function(){return p.Scene}});var c=require("./core/camera");Object.defineProperty(exports,"FiveCamera",{enumerable:!0,get:function(){return c.Camera}});var s=require("./loaders/model");Object.defineProperty(exports,"Model",{enumerable:!0,get:function(){return s.Model}});var b=require("./work");Object.defineProperty(exports,"parseWork",{enumerable:!0,get:function(){return b.parseWork}}),Object.defineProperty(exports,"stringifyWork",{enumerable:!0,get:function(){return b.stringifyWork}});var l=require("./application/getViewportScale");Object.defineProperty(exports,"getViewportScale",{enumerable:!0,get:function(){return l.getViewportScale}});
@@ -1,116 +0,0 @@
1
- import * as THREE from "three";
2
- /**
3
- * Loader for Basis Universal GPU Texture Codec.
4
- *
5
- * Basis Universal is a "supercompressed" GPU texture and texture video
6
- * compression system that outputs a highly compressed intermediate file format
7
- * (.basis) that can be quickly transcoded to a wide variety of GPU texture
8
- * compression formats.
9
- *
10
- * This loader parallelizes the transcoding process across a configurable number
11
- * of web workers, before transferring the transcoded compressed texture back
12
- * to the main thread.
13
- */
14
- declare type BasisWorkerTransCodeResult = {
15
- width: number;
16
- height: number;
17
- mipmaps: ImageData[];
18
- format: number;
19
- };
20
- declare type BasisWorkerCallbackType = {
21
- resolve: (result: BasisWorkerTransCodeResult) => void;
22
- reject: (error: Error) => void;
23
- };
24
- declare class BasisWorker extends Worker {
25
- _callbacks: {
26
- [taskID: string]: BasisWorkerCallbackType;
27
- };
28
- _initialized: boolean;
29
- _taskLoad: number;
30
- constructor(workerSourceURL: string);
31
- }
32
- declare const BASIS_FORMAT: {
33
- readonly cTFETC1: 0;
34
- readonly cTFETC2: 1;
35
- readonly cTFBC1: 2;
36
- readonly cTFBC3: 3;
37
- readonly cTFBC4: 4;
38
- readonly cTFBC5: 5;
39
- readonly cTFBC7_M6_OPAQUE_ONLY: 6;
40
- readonly cTFBC7_M5: 7;
41
- readonly cTFPVRTC1_4_RGB: 8;
42
- readonly cTFPVRTC1_4_RGBA: 9;
43
- readonly cTFASTC_4x4: 10;
44
- readonly cTFATC_RGB: 11;
45
- readonly cTFATC_RGBA_INTERPOLATED_ALPHA: 12;
46
- readonly cTFRGBA32: 13;
47
- readonly cTFRGB565: 14;
48
- readonly cTFBGR565: 15;
49
- readonly cTFRGBA4444: 16;
50
- };
51
- declare class BasisTextureLoader extends THREE.Loader {
52
- static taskCache: WeakMap<ArrayBuffer, {
53
- url: string;
54
- promise: Promise<THREE.CompressedTexture>;
55
- }>;
56
- static BASIS_FORMAT: {
57
- readonly cTFETC1: 0;
58
- readonly cTFETC2: 1;
59
- readonly cTFBC1: 2;
60
- readonly cTFBC3: 3;
61
- readonly cTFBC4: 4;
62
- readonly cTFBC5: 5;
63
- readonly cTFBC7_M6_OPAQUE_ONLY: 6;
64
- readonly cTFBC7_M5: 7;
65
- readonly cTFPVRTC1_4_RGB: 8;
66
- readonly cTFPVRTC1_4_RGBA: 9;
67
- readonly cTFASTC_4x4: 10;
68
- readonly cTFATC_RGB: 11;
69
- readonly cTFATC_RGBA_INTERPOLATED_ALPHA: 12;
70
- readonly cTFRGBA32: 13;
71
- readonly cTFRGB565: 14;
72
- readonly cTFBGR565: 15;
73
- readonly cTFRGBA4444: 16;
74
- };
75
- static DXT_FORMAT: {
76
- readonly COMPRESSED_RGB_S3TC_DXT1_EXT: 33776;
77
- readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: 33777;
78
- readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: 33778;
79
- readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: 33779;
80
- };
81
- static DXT_FORMAT_MAP: {
82
- readonly 2: 33776;
83
- readonly 3: 33779;
84
- };
85
- transcoderPath: string;
86
- transcoderBinary: ArrayBuffer | null;
87
- transcoderPending: Promise<void> | null;
88
- workerLimit: number;
89
- workerPool: BasisWorker[];
90
- workerNextTaskID: number;
91
- workerSourceURL: string;
92
- workerConfig: {
93
- format: null | typeof BASIS_FORMAT[keyof typeof BASIS_FORMAT];
94
- astcSupported: boolean;
95
- bptcSupported: boolean;
96
- etcSupported: boolean;
97
- dxtSupported: boolean;
98
- pvrtcSupported: boolean;
99
- };
100
- constructor(manager?: THREE.LoadingManager);
101
- setTranscoderPath(path: string): this;
102
- setWorkerLimit(workerLimit: number): this;
103
- isInitialized(): boolean;
104
- detectSupport(renderer: THREE.WebGLRenderer): this;
105
- load(url: string, onLoad: (texture: THREE.CompressedTexture) => void, onProgress: Parameters<typeof THREE.FileLoader.prototype.load>[2], onError: Parameters<typeof THREE.FileLoader.prototype.load>[3]): void;
106
- /**
107
- * @param {ArrayBuffer} buffer
108
- * @param {string} url
109
- * @return {Promise<THREE.CompressedTexture>}
110
- */
111
- _createTexture(buffer: ArrayBuffer, url: string): Promise<THREE.CompressedTexture>;
112
- _initTranscoder(): Promise<void>;
113
- _allocateWorker(taskCost: number): Promise<BasisWorker>;
114
- dispose(): this;
115
- }
116
- export { BasisTextureLoader };
@@ -1 +0,0 @@
1
- "use strict";var e;Object.defineProperty(exports,"__esModule",{value:!0}),exports.BasisTextureLoader=void 0;var r=require("tslib"),t=r.__importStar(require("three")),a=function(e){function t(r){var t=e.call(this,r)||this;return t._callbacks={},t._initialized=!1,t._taskLoad=0,t}return r.__extends(t,e),t}(Worker),n='\nvar config, transcoderPending, _BasisFile;\nself.onmessage = function(e) {\n var message = e.data;\n switch (message.type) {\n case "init":\n config = message.config;\n init(message.transcoderBinary);\n break;\n case "transcode":\n transcoderPending.then(function() {\n try {\n var result = transcode(message.buffer);\n var width = result.width;\n var height = result.height;\n var hasAlpha = result.hasAlpha;\n var mipmaps = result.mipmaps;\n var format = result.format;\n var buffers = [];\n for (var i = 0; i < mipmaps.length; ++i) {\n buffers.push(mipmaps[i].data.buffer);\n }\n self.postMessage({ type: "transcode", id: message.id, width, height, hasAlpha, mipmaps, format }, buffers);\n } catch (error) {\n console.error(error);\n self.postMessage({ type: "error", id: message.id, error: error.message });\n }\n });\n break;\n default: break;\n }\n};\n\nfunction init(wasmBinary) {\n var BasisModule;\n transcoderPending = new Promise(function(resolve) {\n BasisModule = { wasmBinary, onRuntimeInitialized: resolve };\n BASIS(BasisModule); // eslint-disable-line no-undef\n }).then(function() {\n _BasisFile = BasisModule.BasisFile;\n BasisModule.initializeBasis();\n self.postMessage({ type: "initialized" });\n });\n}\n\nfunction transcode(buffer) {\n var basisFile = new _BasisFile(new Uint8Array(buffer));\n var width = basisFile.getImageWidth(0, 0);\n var height = basisFile.getImageHeight(0, 0);\n var levels = basisFile.getNumLevels(0);\n var hasAlpha = basisFile.getHasAlpha();\n function cleanup() {\n basisFile.close();\n basisFile.delete();\n }\n if (!hasAlpha) {\n switch (config.format) {\n case 9: // Hardcoded: BasisTextureLoader.BASIS_FORMAT.cTFPVRTC1_4_RGBA\n config.format = 8; // Hardcoded: BasisTextureLoader.BASIS_FORMAT.cTFPVRTC1_4_RGB;\n break;\n default: break;\n }\n }\n if (!width || !height || !levels) {\n cleanup();\n throw new Error("BasisTextureLoader: Invalid .basis file");\n }\n if (!basisFile.startTranscoding()) {\n cleanup();\n throw new Error("BasisTextureLoader: .startTranscoding failed");\n }\n var mipmaps = [];\n for (var mip = 0; mip < levels; mip++) {\n var mipWidth = basisFile.getImageWidth(0, mip);\n var mipHeight = basisFile.getImageHeight(0, mip);\n var dst = new Uint8Array(basisFile.getImageTranscodedSizeInBytes(0, mip, config.format));\n var status = basisFile.transcodeImage(dst, 0, mip, config.format, 0, hasAlpha);\n if (!status) {\n cleanup();\n throw new Error("BasisTextureLoader: .transcodeImage failed.");\n }\n mipmaps.push({ data: dst, width: mipWidth, height: mipHeight });\n }\n cleanup();\n return { width, height, hasAlpha, mipmaps, format: config.format };\n}\n',s={cTFETC1:0,cTFETC2:1,cTFBC1:2,cTFBC3:3,cTFBC4:4,cTFBC5:5,cTFBC7_M6_OPAQUE_ONLY:6,cTFBC7_M5:7,cTFPVRTC1_4_RGB:8,cTFPVRTC1_4_RGBA:9,cTFASTC_4x4:10,cTFATC_RGB:11,cTFATC_RGBA_INTERPOLATED_ALPHA:12,cTFRGBA32:13,cTFRGB565:14,cTFBGR565:15,cTFRGBA4444:16},i={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779},o=((e={})[s.cTFBC1]=i.COMPRESSED_RGB_S3TC_DXT1_EXT,e[s.cTFBC3]=i.COMPRESSED_RGBA_S3TC_DXT5_EXT,e),c=function(e){function c(r){var t=e.call(this,r)||this;return t.transcoderPath="",t.transcoderBinary=null,t.transcoderPending=null,t.workerLimit=4,t.workerPool=[],t.workerNextTaskID=1,t.workerSourceURL="",t.workerConfig={format:null,astcSupported:!1,bptcSupported:!1,etcSupported:!1,dxtSupported:!1,pvrtcSupported:!1},t}return r.__extends(c,e),c.prototype.setTranscoderPath=function(e){return this.transcoderPath=e,this},c.prototype.setWorkerLimit=function(e){return this.workerLimit=e,this},c.prototype.isInitialized=function(){return 0!==this.workerPool.filter((function(e){return e._initialized})).length},c.prototype.detectSupport=function(e){var r=this.workerConfig;if(r.astcSupported=!!e.extensions.get("WEBGL_compressed_texture_astc"),r.bptcSupported=!!e.extensions.get("EXT_texture_compression_bptc"),r.etcSupported=!!e.extensions.get("WEBGL_compressed_texture_etc1"),r.dxtSupported=!!e.extensions.get("WEBGL_compressed_texture_s3tc"),r.pvrtcSupported=!!e.extensions.get("WEBGL_compressed_texture_pvrtc")||!!e.extensions.get("WEBKIT_WEBGL_compressed_texture_pvrtc"),r.astcSupported)r.format=c.BASIS_FORMAT.cTFASTC_4x4;else if(r.bptcSupported)r.format=c.BASIS_FORMAT.cTFBC7_M5;else if(r.dxtSupported)r.format=c.BASIS_FORMAT.cTFBC3;else if(r.pvrtcSupported)r.format=c.BASIS_FORMAT.cTFPVRTC1_4_RGBA;else{if(!r.etcSupported)throw new Error("BasisTextureLoader: No suitable compressed texture format found.");r.format=c.BASIS_FORMAT.cTFETC1}return this},c.prototype.load=function(e,r,a,n){var s=this,i=new t.FileLoader(this.manager);i.setResponseType("arraybuffer"),i.load(e,(function(t){var a=t;if(c.taskCache.has(a))return c.taskCache.get(a).promise.then(r).catch(n);s._createTexture(a,e).then(r).catch(n)}),a,n)},c.prototype._createTexture=function(e,r){var a,n,i=this,d=e.byteLength,l=this._allocateWorker(d).then((function(r){return a=r,n=i.workerNextTaskID++,new Promise((function(r,t){a._callbacks[n]={resolve:r,reject:t},a.postMessage({type:"transcode",id:n,buffer:e},[e])}))})).then((function(e){var r,a=i.workerConfig,n=e.width,c=e.height,d=e.mipmaps;switch(e.format){case s.cTFASTC_4x4:r=new t.CompressedTexture(d,n,c,t.RGBA_ASTC_4x4_Format);break;case s.cTFBC1:case s.cTFBC3:r=new t.CompressedTexture(d,n,c,o[a.format],t.UnsignedByteType);break;case s.cTFETC1:r=new t.CompressedTexture(d,n,c,t.RGB_ETC1_Format);break;case s.cTFPVRTC1_4_RGB:r=new t.CompressedTexture(d,n,c,t.RGB_PVRTC_4BPPV1_Format);break;case s.cTFPVRTC1_4_RGBA:r=new t.CompressedTexture(d,n,c,t.RGBA_PVRTC_4BPPV1_Format);break;default:throw new Error("BasisTextureLoader: No supported format available.")}return r.minFilter=1===d.length?t.LinearFilter:t.LinearMipmapLinearFilter,r.magFilter=t.LinearFilter,r.generateMipmaps=!1,r.needsUpdate=!0,r}));return l.catch((function(){return!0})).then((function(){a&&n&&(a._taskLoad-=d,delete a._callbacks[n])})),c.taskCache.set(e,{url:r,promise:l}),l},c.prototype._initTranscoder=function(){var e=this;if(!this.transcoderPending){var r=new t.FileLoader(this.manager);r.setPath(this.transcoderPath);var a=new Promise((function(e,t){r.load("basis_transcoder.js",e,void 0,t)})),s=new t.FileLoader(this.manager);s.setPath(this.transcoderPath),s.setResponseType("arraybuffer");var i=new Promise((function(e,r){s.load("basis_transcoder.wasm",e,void 0,r)}));this.transcoderPending=Promise.all([a,i]).then((function(r){var t=r[0],a=r[1],s=["/* basis_transcoder.js */",t,"/* worker */",n].join("\n");e.workerSourceURL=URL.createObjectURL(new Blob([s])),e.transcoderBinary=a}))}return this.transcoderPending},c.prototype._allocateWorker=function(e){var r=this;return this._initTranscoder().then((function(){if(r.workerPool.length<r.workerLimit){var t=new a(r.workerSourceURL);t._callbacks={},t._initialized=!1,t._taskLoad=0,t.postMessage({type:"init",config:r.workerConfig,transcoderBinary:r.transcoderBinary}),t.onmessage=function(e){var r=e.data;switch(r.type){case"initialized":t._initialized=!0,console.log("BasisTextureLoader: basis loader initialized");break;case"transcode":t._callbacks[r.id].resolve(r);break;case"error":t._callbacks[r.id].reject(r);break;default:console.error('BasisTextureLoader: Unexpected message, "'+r.type+'"')}},r.workerPool.push(t)}else r.workerPool.sort((function(e,r){return e._taskLoad>r._taskLoad?-1:1}));var n=r.workerPool[r.workerPool.length-1];return n._taskLoad+=e,n}))},c.prototype.dispose=function(){for(var e=0;e<this.workerPool.length;e++)this.workerPool[e].terminate();return this.workerPool.length=0,this},c.taskCache=new WeakMap,c.BASIS_FORMAT=s,c.DXT_FORMAT=i,c.DXT_FORMAT_MAP=o,c}(t.Loader);exports.BasisTextureLoader=c;
@@ -1,3 +0,0 @@
1
- import { BasisTextureLoader } from "./BasisTextureLoader";
2
- declare const loader: BasisTextureLoader;
3
- export { loader as basisLoader };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.basisLoader=void 0;var e=new(require("./BasisTextureLoader").BasisTextureLoader);exports.basisLoader=e,e.setWorkerLimit(1),e.setTranscoderPath("https://vrlab-public.ljcdn.com/release/static/image/release/five/basis/");
@@ -1,7 +0,0 @@
1
- import * as THREE from "three";
2
- declare function createImage(): HTMLImageElement;
3
- declare function disposeImage(image: HTMLImageElement | THREE.Texture): void;
4
- declare function loadImage(url?: string, onLoad?: (image: HTMLImageElement | THREE.Texture) => void, onError?: (error: Error) => void, onProgress?: (percent: number) => void, onAbort?: () => void): ({
5
- abort: () => void;
6
- });
7
- export { createImage, disposeImage, loadImage, };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.loadImage=exports.disposeImage=exports.createImage=void 0;var e=require("tslib").__importStar(require("three")),o=require("../../utils/ajax"),r=require("../../utils/noop"),t=require("../../utils/createImage"),n=require("../../utils/animationFrame"),i=require("../basis"),a=[];function s(e){return e.onload=e.onerror=r.noop,e.crossOrigin="",/^blob\:/.test(e.src)&&URL.revokeObjectURL(e.src),e.removeAttribute("src"),e}function u(){return s(a.shift()||t.createImage())}function c(o){o instanceof e.Texture?o.dispose():(s(o),0===a.indexOf(o)&&a.push(o))}exports.createImage=u,exports.disposeImage=c,exports.loadImage=function(e,t,a,s,d){if(void 0===e&&(e=""),void 0===t&&(t=r.noop),void 0===a&&(a=r.noop),void 0===s&&(s=r.noop),void 0===d&&(d=r.noop),/\.basis(\?|$)/.test(e)){var p=!1,f=!1;return i.basisLoader.load(e,(function(e){t(e),s(1),!0===f&&e.dispose(),p=!0}),(function(e){s(e.loaded/e.total)}),(function(e){a(e.error),p=!0})),{abort:function(){p||d(),f=!0}}}var l=!1;return o.ajax(e,{responseType:"blob"},(function(e,o){if(!l){if(e)return a(e),void(l=!0);var i=URL.createObjectURL(o),d=u();d.onload=function(){d.onload=d.onerror=r.noop,l?c(d):(n.nextFrame((function(){return t(d)})),s(1),l=!0)},d.onerror=function(){d.onload=d.onerror=r.noop,l||(a(new Error("image load error.")),l=!0),c(d)},d.src=i}}),s,(function(){l||(l=!1,d())}))};
@@ -1,58 +0,0 @@
1
- import * as THREE from "three";
2
- import { ImageOptions } from "../../types/imageOptions";
3
- import { Subscribe } from "../../core/subscribe";
4
- import { HashCubeTexture as CubeTexture } from "../../core/cubeTexture";
5
- export declare type ParseImageURLOptions = {
6
- index: number;
7
- images: {
8
- [key: string]: string;
9
- };
10
- imageOptions: ImageOptions;
11
- };
12
- declare type EventType = {
13
- /**
14
- * 加载完成
15
- * @param cubeTexture 返回贴图
16
- * @param option 图片参数
17
- */
18
- load(cubeTexture: CubeTexture, option: ParseImageURLOptions): void;
19
- /**
20
- * 加载失败
21
- * @param error 错误对象
22
- * @param option 图片参数
23
- */
24
- error(error: Error, option: ParseImageURLOptions): void;
25
- /**
26
- * 加载中
27
- * @param pst 加载进度 [0-1]
28
- * @param option 图片参数
29
- */
30
- progress(pst: number, option: ParseImageURLOptions): void;
31
- /**
32
- * 加载被取消
33
- * @param option 图片参数
34
- */
35
- abort(option: ParseImageURLOptions): void;
36
- /**
37
- * 加载开始
38
- * @param option 图片参数
39
- */
40
- start(option: ParseImageURLOptions): void;
41
- };
42
- declare class CubeTextureLoader extends Subscribe<EventType> {
43
- private renderer;
44
- private images;
45
- private xhr;
46
- private aborted;
47
- constructor(renderer: THREE.WebGLRenderer);
48
- load(options: ParseImageURLOptions, callbacks: ((error: Error | null, cubeTexture?: CubeTexture) => void) | {
49
- onLoad: (cubeTexture: CubeTexture) => void;
50
- onProgress: (percent: number) => void;
51
- onError: (error: Error) => void;
52
- onAbort: (error: Error) => void;
53
- }): void;
54
- abort(): void;
55
- disposeImages(): void;
56
- toCubeTexture(): CubeTexture;
57
- }
58
- export { CubeTextureLoader };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CubeTextureLoader=void 0;var e=require("tslib"),r=e.__importStar(require("three")),i=require("../../utils/noop"),t=require("./imagePool"),o=require("../../utils/imageURL"),n=require("../../core/subscribe"),s=require("../basis"),a=e.__importStar(require("json-hash")),u=require("../../core/cubeTexture"),l=["right","left","up","down","front","back"];var h=function(n){function h(e){var r=n.call(this)||this;return r.images=[null,null,null,null,null,null],r.xhr=[null,null,null,null,null,null],r.aborted=!1,r.renderer=e,r}return e.__extends(h,n),h.prototype.load=function(e,r){var n=this,u=a.digest(e),h=i.noop,d=i.noop,g=i.noop,m=i.noop;"function"==typeof r?(h=r.bind(this,null),g=r.bind(this),m=r.bind(this)):(r.onLoad&&(h=r.onLoad),r.onProgress&&(d=r.onProgress),r.onError&&(g=r.onError),r.onAbort&&(m=r.onAbort)),this.abort(),this.disposeImages(),this.aborted=!1;for(var c=[0,0,0,0,0,0],f=function(r,i){c[i]=r,r=c.reduce((function(e,r){return e+r}),0)/c.length,d(r),n.emit("progress",r,e)},p=function(r){var i=function(e,r){var i=r.index,t=void 0===i?0:i,n=r.images,a=void 0===n?{}:n,u=r.imageOptions,l=void 0===u?{}:u,h=a[e],d=["cube",t,e].join("."),g=s.basisLoader.isInitialized();return o.imageURL(h,Object.assign({key:d,basisLoaderInitialized:g},l))}(l[r],e);b.xhr[r]=t.loadImage(i,(function(i){return function(r,i){f(1,i),n.images[i]=r,n.xhr[i]=null;for(var t=0,o=n.images;t<o.length;t++)if(!o[t])return;var s=n.toCubeTexture();s.hash=u,h(s),n.emit("load",s,e)}(i,r)}),(function(i){return function(r,i){n.aborted||(g(r),n.emit("error",r,e),n.xhr[i]=null,n.xhr.forEach((function(e,r,i){e&&e.abort(),i[r]=null})),n.disposeImages())}(i,r)}),(function(e){return f(e,r)}),(function(){n.aborted||(n.aborted=!0,n.xhr.forEach((function(e,r,i){e&&e.abort(),i[r]=null})),n.disposeImages(),m(new Error("image aborted")),n.emit("abort",e))}))},b=this,x=0;x<this.images.length;x++)p(x);this.emit("start",e)},h.prototype.abort=function(){this.xhr.forEach((function(e,r,i){e&&e.abort(),i[r]=null}))},h.prototype.disposeImages=function(){for(var e=0;e<this.images.length;e++)if(this.images[e]){var r=this.images[e];r&&t.disposeImage(r),this.images[e]=null}},h.prototype.toCubeTexture=function(){var i=new u.HashCubeTexture;i.generateMipmaps=!0;var o=i.dispose;return this.images[0]instanceof r.Texture?(i.format=this.images[0].format,i.encoding=this.images[0].encoding,i.minFilter=this.images[0].minFilter,i.magFilter=this.images[0].magFilter,i.isCompressedTexture=!0):i.minFilter=r.LinearFilter,this.images.forEach((function(e,r,t){i.images[r]=e,t[r]=null})),i.needsUpdate=!0,i.dispose=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return this.images.forEach((function(e){e&&t.disposeImage(e)})),this.images=[],o.call.apply(o,e.__spreadArray([this],r))},i},h}(n.Subscribe);exports.CubeTextureLoader=h;
@@ -1,60 +0,0 @@
1
- import * as THREE from "three";
2
- import { Subscribe } from "../../core/subscribe";
3
- import { ParseImageURLOptions } from "../cubeTexture";
4
- export declare type PanoModel = THREE.Mesh & {
5
- dispose: () => void;
6
- };
7
- declare type DepthParseImageURLOptions = ParseImageURLOptions & {
8
- position: THREE.Vector3;
9
- matrix: THREE.Matrix4;
10
- };
11
- declare type EventType = {
12
- /**
13
- * 加载完成
14
- * @param panoModel 返回深度模型
15
- * @param options 图片参数
16
- */
17
- load(panoModel: THREE.Mesh & {
18
- hash: string;
19
- }, options: DepthParseImageURLOptions): void;
20
- /**
21
- * 加载失败
22
- * @param error 错误对象
23
- * @param options 图片参数
24
- */
25
- error(error: Error, options: DepthParseImageURLOptions): void;
26
- /**
27
- * 加载中
28
- * @param pst 加载进度 [0-1]
29
- * @param options 图片参数
30
- */
31
- progress(pst: number, options: DepthParseImageURLOptions): void;
32
- /**
33
- * 加载被取消
34
- * @param options 图片参数
35
- */
36
- abort(options: DepthParseImageURLOptions): void;
37
- /**
38
- * 加载开始
39
- * @param options 图片参数
40
- */
41
- start(options: DepthParseImageURLOptions): void;
42
- };
43
- declare class DepthTextureLoader extends Subscribe<EventType> {
44
- private renderer;
45
- private images;
46
- private xhr;
47
- private aborted;
48
- private cubeTextureLoader;
49
- constructor(renderer: THREE.WebGLRenderer);
50
- load(options: DepthParseImageURLOptions, callbacks: ((error: Error | null, panoModel?: PanoModel) => void) | {
51
- onLoad: (panoModel: PanoModel) => void;
52
- onProgress: (percent: number) => void;
53
- onError: (error: Error) => void;
54
- onAbort: (error: Error) => void;
55
- }): void;
56
- abort(): void;
57
- disposeImages(): void;
58
- toPanoModel(texture: THREE.CubeTexture, depth: HTMLImageElement | THREE.Texture, position: THREE.Vector3, matrix: THREE.Matrix4): PanoModel;
59
- }
60
- export { DepthTextureLoader };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DepthTextureLoader=void 0;var e=require("tslib"),r=e.__importStar(require("three")),t=require("../../core/subscribe"),n=require("../../utils/noop"),o=require("../cubeTexture/imagePool"),i=require("../cubeTexture"),a=e.__importDefault(require("../../shaders/depth/vertex")),s=e.__importDefault(require("../../shaders/depth/fragment")),u=function(e){return{value:e}},l=Object.assign({opacity:u(1),scale:u(13.1),panoMap:u(null),panoDisplacementMap:u(null),panoPosition:u(new r.Vector3),panoMatrix:u(new r.Matrix4)},{emissive:u(new r.Color(0)),emissiveMap:u(null),specular:u(new r.Color(1118481)),specularMap:u(null),normalMap:u(null),bumpMap:u(null),shininess:u(30)},r.UniformsLib.common,r.UniformsLib.lights),p=new r.SphereBufferGeometry(.01,128,128),m=function(t){function u(e){var r=t.call(this)||this;return r.images=[null,null],r.xhr=[null,null],r.aborted=!1,r.cubeTextureLoader=new i.CubeTextureLoader(e),r.renderer=e,r}return e.__extends(u,t),u.prototype.load=function(e,r){var t=this,i=n.noop,a=n.noop,s=n.noop,u=n.noop;"function"==typeof r?(i=r.bind(this,null),s=r.bind(this),u=r.bind(this)):(r.onLoad&&(i=r.onLoad),r.onProgress&&(a=r.onProgress),r.onError&&(s=r.onError),r.onAbort&&(u=r.onAbort)),this.abort(),this.disposeImages(),this.aborted=!1;var l=[0,0];this.cubeTextureLoader.load(e,(function(r,n){if(r)s(r);else{var a=e.images.depth;t.xhr[0]=o.loadImage(a,(function(r){var o=Object.assign(t.toPanoModel(n,r,e.position,e.matrix),{hash:n.hash});i(o),t.emit("load",o,e)}),(function(e){return p(e,0)}),(function(e){return m(e,0)}),(function(){return d()}))}}));var p=function(r,n){t.aborted||(s(r),t.emit("error",r,e),t.xhr[n]=null,t.xhr.forEach((function(e,r,t){e&&e.abort(),t[r]=null})),t.disposeImages())},m=function(r,n){l[n]=r,r=l.reduce((function(e,r){return e+r}),0)/l.length,a(r),t.emit("progress",r,e)},d=function(){t.aborted||(t.aborted=!0,t.xhr.forEach((function(e,r,t){e&&e.abort(),t[r]=null})),t.disposeImages(),u(new Error("image aborted")),t.emit("abort",e))};this.emit("start",e)},u.prototype.abort=function(){this.xhr.forEach((function(e,r,t){e&&e.abort(),t[r]=null}))},u.prototype.disposeImages=function(){for(var e=0;e<this.images.length;e++)if(this.images[e]){var r=this.images[e];r&&o.disposeImage(r),this.images[e]=null}},u.prototype.toPanoModel=function(e,t,n,o){var i=new r.ShaderMaterial({side:r.BackSide,vertexShader:a.default,fragmentShader:s.default,transparent:!0,uniforms:r.UniformsUtils.clone(l)}),u=e;u.needsUpdate=!0,u.minFilter=r.LinearFilter,u.magFilter=r.LinearFilter;var m=t instanceof r.Texture?t:new r.Texture(t);return m.needsUpdate=!0,m.minFilter=r.LinearFilter,m.magFilter=r.LinearFilter,i.uniforms.opacity.value=0,i.uniforms.panoMap.value=u,i.uniforms.panoDisplacementMap.value=m,i.uniforms.panoPosition.value=n,i.uniforms.panoMatrix.value=o,Object.assign(new r.Mesh(p,i),{frustumCulled:!1,dispose:function(){this.material instanceof r.ShaderMaterial&&(this.material.uniforms.panoDisplacementMap.value.dispose(),this.material.uniforms.panoDisplacementMap.value=null,this.material.dispose())}})},u}(t.Subscribe);exports.DepthTextureLoader=m;
@@ -1,7 +0,0 @@
1
- import { Model as WorkModel } from "../../work";
2
- import { ImageOptions } from "../../types/imageOptions";
3
- declare function at3dLoader(workModel: WorkModel, imageOptions: ImageOptions): Promise<{
4
- objects: import("../../core/pbmMesh").PBMMesh[];
5
- textureReady: Promise<void>;
6
- }>;
7
- export { at3dLoader };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.at3dLoader=void 0;var e=require("./pbm"),r=require("../../utils/ajax"),t=require("../../utils/busy"),n=require("./tools/lzma");exports.at3dLoader=function(u,o){return Promise.resolve().then((function(){return r.ajax.async(u.file,{responseType:"arraybuffer"})})).then((function(e){return n.lzma(e)})).then((function(r){return t.delay((function(){for(var t=[],n=0,u=r;n<u.length;n++){var o=u[n],a=e.protobuf.decode(o);t.push.apply(t,a.chunks)}return t}))})).then((function(r){return t.delay((function(){return e.parse(r,u.textureBase,u.textures,o)}))}))};
@@ -1,14 +0,0 @@
1
- import { Model as WorkModel } from "../../work";
2
- import { PBMMesh } from "../../core/pbmMesh";
3
- import { PBMGroup } from "../../core/pbmGroup";
4
- import { ImageOptions } from "../../types/imageOptions";
5
- declare function parse(domeBuffer: ArrayLike<number>, textureBase: WorkModel["textureBase"], imageOptions: ImageOptions): {
6
- objects: (PBMMesh | PBMGroup)[];
7
- textureReady: Promise<void>;
8
- };
9
- declare function clearCache(): void;
10
- declare function domeLoader(workModel: WorkModel, imageOptions: ImageOptions): Promise<{
11
- objects: (PBMMesh | PBMGroup)[];
12
- textureReady: Promise<void>;
13
- }>;
14
- export { domeLoader, parse, clearCache };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.clearCache=exports.parse=exports.domeLoader=void 0;var r=require("tslib"),e=r.__importStar(require("three")),t=require("../../utils/imageURL"),a=require("../../utils/ajax"),n=require("../../utils/isAbsoluteURL"),o=require("../../utils/noop"),i=require("../../utils/imageLoader"),s=r.__importStar(require("protobufjs")),u=require("../../core/pbmMaterial"),p=require("../../core/pbmMesh"),l=require("../../core/pbmGroup"),m=s.parse("\nmessage Model {\n repeated Mesh meshes = 1;\n}\nmessage Mesh {\n required string name = 1;\n repeated Chunk chunks = 2;\n repeated Matrix matrix = 3;\n}\nmessage Matrix {\n repeated float elements = 1;\n}\nmessage Chunk {\n required Geometry geometry = 2;\n repeated Material material = 3;\n}\nmessage Geometry {\n required Position position = 1;\n optional UV uv = 2;\n optional UV uv2 = 3;\n required Normal normal = 4;\n repeated Group groups = 5;\n}\nmessage Position {\n repeated float array = 1[packed=true];\n}\nmessage UV {\n repeated float array = 1[packed=true];\n}\nmessage Normal {\n repeated float array = 1[packed=true];\n}\nmessage Group {\n required uint32 start = 1;\n required uint32 count = 2;\n required uint32 materialIndex = 3;\n}\nmessage Material {\n optional Color kd = 1;\n optional Color ks = 2;\n optional Color ke = 3;\n optional string mapkd = 4;\n optional string mapks = 5;\n optional string mapke = 6;\n optional string norm = 7;\n optional string mapbump = 8;\n optional string bump = 9;\n optional string mapd = 10;\n optional float ns = 11;\n optional float d = 12;\n optional float tr = 13;\n optional string mapkdrepeat = 14;\n}\nmessage Color {\n repeated float rgb = 1;\n}\n").root.lookup("Model");var c={};function b(r,a,s){var b,y=[],f=[];function d(r,l,m){var b=function(r){var t=r.position,a=r.normal,n=r.uv,o=r.uv2,i=r.groups,s=new e.BufferGeometry;return s.setAttribute("position",new e.BufferAttribute(new Float32Array(t.array),3)),a&&s.setAttribute("normal",new e.BufferAttribute(new Float32Array(a.array),3)),n&&s.setAttribute("uv",new e.BufferAttribute(new Float32Array(n.array),2)),o&&s.setAttribute("uv2",new e.BufferAttribute(new Float32Array(o.array),2)),i.forEach((function(r){return s.addGroup(r.start,r.count,r.materialIndex)})),s}(r);b.applyMatrix4(m);var y=new e.Vector3,d=new e.Quaternion,h=new e.Vector3;m.decompose(y,d,h),h.x*h.y*h.z<0&&b.attributes.normal&&b.attributes.position&&b.attributes.uv&&function(r){for(var e=[0,0,0],t=0;t<r.attributes.normal.array.length/9;t++)e[0]=r.attributes.normal.array[9*t],e[1]=r.attributes.normal.array[9*t+1],e[2]=r.attributes.normal.array[9*t+2],r.attributes.normal.array[9*t]=r.attributes.normal.array[9*t+6],r.attributes.normal.array[9*t+1]=r.attributes.normal.array[9*t+7],r.attributes.normal.array[9*t+2]=r.attributes.normal.array[9*t+8],r.attributes.normal.array[9*t+6]=e[0],r.attributes.normal.array[9*t+7]=e[1],r.attributes.normal.array[9*t+8]=e[2];for(t=0;t<r.attributes.position.array.length/9;t++)e[0]=r.attributes.position.array[9*t],e[1]=r.attributes.position.array[9*t+1],e[2]=r.attributes.position.array[9*t+2],r.attributes.position.array[9*t]=r.attributes.position.array[9*t+6],r.attributes.position.array[9*t+1]=r.attributes.position.array[9*t+7],r.attributes.position.array[9*t+2]=r.attributes.position.array[9*t+8],r.attributes.position.array[9*t+6]=e[0],r.attributes.position.array[9*t+7]=e[1],r.attributes.position.array[9*t+8]=e[2];for(t=0;t<r.attributes.uv.array.length/6;t++)e[0]=r.attributes.uv.array[6*t],e[1]=r.attributes.uv.array[6*t+1],r.attributes.uv.array[6*t]=r.attributes.uv.array[6*t+4],r.attributes.uv.array[6*t+1]=r.attributes.uv.array[6*t+5],r.attributes.uv.array[6*t+4]=e[0],r.attributes.uv.array[6*t+5]=e[1];r.attributes.normal.needsUpdate=!0,r.attributes.position.needsUpdate=!0,r.attributes.uv.needsUpdate=!0}(b);var v=l.map((function(r){var p=function(r,a,s){var p={sourceFile:null,needsUpdate:!0,wrapS:e.RepeatWrapping,wrapT:e.RepeatWrapping};function l(r,u){return c[r]?Promise.resolve(c[r]):new Promise((function(l,m){var b=new i.ImageLoader;n.isAbsoluteURL(r)||(r=a+r),-1!==(r=(r=r.replace(/\/\/vrlab-image\d*.ljcdn.com\//,"//vrlab-public.ljcdn.com/")).split("?")[0]).indexOf(".png")&&(r=r.split(".png")[0]+".png"),-1!==r.indexOf(".jpg")&&(r=r.split(".jpg")[0]+".jpg"),0===r.indexOf("//")&&(r="https:"+r),r=t.imageURL(r,Object.assign({key:"texture"},s,{size:64})),b.load(r,(function(t){var a=new e.Texture(t),n=a.dispose;a.dispose=function(){n.call(a),/^blob\:/.test(t.src)&&URL.revokeObjectURL(t.src)},u&&Object.assign(a.repeat,u),Object.assign(a,p,{sourceFile:r}),a.updateMatrix(),c[r]=a,l(a)}),o.noop,(function(r){return m(r.error)}))}))}var m,b=[],y=new u.PBMMaterial,f=y.uniforms;if(r.hasOwnProperty("kd")&&(f.diffuse.value=(new e.Color).fromArray(r.kd.rgb)),r.hasOwnProperty("mapkd")){var d=void 0;if(r.mapkdrepeat){var h=r.mapkdrepeat.split(/\s+/).map((function(r){return Number(r)})),v=h[0],g=h[1];d=new e.Vector2(v,g)}b.push(l(r.mapkd,d).then((function(r){f.map.value=r,f.uvTransform.value=r.matrix})).catch((function(r){})))}return r.hasOwnProperty("ks")&&(f.specular.value=(new e.Color).fromArray(r.ks.rgb)),r.hasOwnProperty("mapks")&&b.push(l(r.mapks).then((function(r){f.specularMap.value=r})).catch((function(r){}))),r.hasOwnProperty("ke")&&(f.emissive.value=(new e.Color).fromArray(r.ke.rgb)),r.hasOwnProperty("mapke")&&b.push(l(r.mapke).then((function(r){f.emissiveMap.value=r})).catch((function(r){}))),r.hasOwnProperty("norm")&&b.push(l(r.norm).then((function(r){f.normalMap.value=r})).catch((function(r){}))),r.hasOwnProperty("mapbump")&&b.push(l(r.mapbump).then((function(r){f.bumpMap.value=r})).catch((function(r){}))),r.hasOwnProperty("bump")&&b.push(l(r.bump).then((function(r){f.bumpMap.value=r})).catch((function(r){}))),r.hasOwnProperty("ns")&&(f.shininess.value=r.ns),r.hasOwnProperty("d")&&(m=r.d)>=0&&m<1&&(f.originOpacity.value=m),r.hasOwnProperty("tr")&&(m=1-r.tr)>=0&&m<1&&(f.originOpacity.value=m),f.originOpacity.value<1&&(y.transparent=!0),{material:y,textureReady:Promise.all(b).then((function(){}))}}(r,a,s),l=p.material,m=p.textureReady;return f.push(m),l}));return new p.PBMMesh(b,v)}return(b=r,m.decode(b)).meshes.forEach((function(r){var t=r.name,a=r.chunks,n=r.matrix;"Ceiling"!==t&&"CeilingDrop"!==t&&n.map((function(r){var n,o=new e.Matrix4;if(o.elements=r.elements,1===a.length){var i=a[0],s=i.geometry,u=i.material;n=d(s,u,o)}else n=new l.PBMGroup,a.forEach((function(r,e){var t=d(r.geometry,r.material,o);t.name="chunk"+e,n.add(t)}));n.floorIndex=0,n.name=t,y.push(n)}))})),{objects:y,textureReady:Promise.all(f).then((function(){}))}}function y(){Object.keys(c).forEach((function(r){c[r].dispose(),delete c[r]}))}exports.parse=b,exports.clearCache=y,exports.domeLoader=function(r,e){return Promise.resolve().then((function(){return y()})).then((function(){return a.ajax.async(r.file,{responseType:"arraybuffer"})})).then((function(t){return b(new Uint8Array(t),r.textureBase,e)}))};
@@ -1,7 +0,0 @@
1
- import { Model as WorkModel } from "../../work";
2
- import { ImageOptions } from "../../types/imageOptions";
3
- declare function domezLoader(workModel: WorkModel, imageOptions: ImageOptions): Promise<{
4
- objects: (import("../../core/pbmMesh").PBMMesh | import("../../core/pbmGroup").PBMGroup)[];
5
- textureReady: Promise<void>;
6
- }>;
7
- export { domezLoader };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.domezLoader=void 0;var e=require("./dome"),r=require("../../utils/ajax"),n=require("./tools/lzma");exports.domezLoader=function(t,o){return Promise.resolve().then((function(){return e.clearCache()})).then((function(){return r.ajax.async(t.file,{responseType:"arraybuffer"})})).then((function(e){return n.lzma(e)})).then((function(e){var r=e.reduce((function(e,r){return e+r.length}),0),n=new Uint8Array(r),t=0;return e.forEach((function(e){n.set(e,t),t+=e.length})),n})).then((function(r){return e.parse(r,t.textureBase,o)}))};