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

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 +1388 -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 +19 -17
  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
@@ -0,0 +1,14 @@
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
+ ***************************************************************************** */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see five-line.js.LICENSE.txt */
2
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.FiveSDK_Line=e():t.FiveSDK_Line=e()}(self,(function(){return(()=>{var t={438:t=>{if(!("THREE"in window))throw new Error('"THREE" is not available. Please include "three.js" in your HTML.');const e=Number(THREE.REVISION);if(e<115||e>117)throw new Error('"Five" needs "THREE.js" version between 125 - 117.');t.exports=window.THREE}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,n),o.exports}n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{"use strict";n.r(i),n.d(i,{Line:()=>p,LineGeometry:()=>l,LineMaterial:()=>s,LineSegmentsGeometry:()=>o,THREE_Line2:()=>c,THREE_LineSegments2:()=>u});var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};function e(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}Object.create,Object.create;var r=n(438),o=function(t){function n(){var e=t.call(this)||this;return e.type="LineSegmentsGeometry",e.setIndex([0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5]),e.setAttribute("position",new r.Float32BufferAttribute([-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],3)),e.setAttribute("uv",new r.Float32BufferAttribute([-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],2)),e}return e(n,t),n.prototype.applyMatrix4=function(t){var e=this.attributes.instanceStart,n=this.attributes.instanceEnd;return void 0!==e&&(e.applyMatrix4(t),n.applyMatrix4(t),e.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},n.prototype.setPositions=function(t){var e;e=t instanceof Float32Array?t:Array.isArray(t)?new Float32Array(t):new Float32Array;var n=new r.InstancedInterleavedBuffer(e,6,1);return this.setAttribute("instanceStart",new r.InterleavedBufferAttribute(n,3,0)),this.setAttribute("instanceEnd",new r.InterleavedBufferAttribute(n,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this},n.prototype.setColors=function(t){var e;e=t instanceof Float32Array?t:Array.isArray(t)?new Float32Array(t):new Float32Array;var n=new r.InstancedInterleavedBuffer(e,6,1);return this.setAttribute("instanceColorStart",new r.InterleavedBufferAttribute(n,3,0)),this.setAttribute("instanceColorEnd",new r.InterleavedBufferAttribute(n,3,3)),this},n.prototype.fromWireframeGeometry=function(t){return this.setPositions(t.attributes.position.array),this},n.prototype.fromEdgesGeometry=function(t){return this.setPositions(t.attributes.position.array),this},n.prototype.fromMesh=function(t){return this.fromWireframeGeometry(new r.WireframeGeometry(t.geometry)),this},n.prototype.fromLineSegments=function(t){var e=t.geometry;if(e instanceof r.Geometry){var n=(new r.BufferGeometry).fromGeometry(e);this.setPositions(n.attributes.position.array)}else e instanceof r.BufferGeometry&&this.setPositions(e.attributes.position.array);return this},n.prototype.computeBoundingBox=function(){null===this.boundingBox&&(this.boundingBox=new r.Box3);var t=this.attributes.instanceStart,e=this.attributes.instanceEnd;if(void 0!==t&&void 0!==e){var n=new r.Box3;this.boundingBox.setFromBufferAttribute(t),n.setFromBufferAttribute(e),this.boundingBox.union(n)}},n.prototype.computeBoundingSphere=function(){null===this.boundingSphere&&(this.boundingSphere=new r.Sphere),null===this.boundingBox&&this.computeBoundingBox();var t=this.attributes.instanceStart,e=this.attributes.instanceEnd;if(void 0!==t&&void 0!==e){var n=this.boundingSphere.center;this.boundingBox.getCenter(n);for(var i=0,o=new r.Vector3,a=0,s=t.count;a<s;a++)o.fromBufferAttribute(t,a),i=Math.max(i,n.distanceToSquared(o)),o.fromBufferAttribute(e,a),i=Math.max(i,n.distanceToSquared(o));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}},n.prototype.toJSON=function(){},n}(r.InstancedBufferGeometry);Object.assign(o.prototype,{isLineSegmentsGeometry:!0});var a={uniforms:r.UniformsUtils.merge([r.UniformsLib.common,r.UniformsLib.fog,{linewidth:{value:1},resolution:{value:new r.Vector2(1,1)},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1},opacity:{value:1}}]),vertexShader:"\n\t\t#include <common>\n\t\t#include <color_pars_vertex>\n\t\t#include <fog_pars_vertex>\n\t\t#include <logdepthbuf_pars_vertex>\n\t\t#include <clipping_planes_pars_vertex>\n\n\t\tuniform float linewidth;\n\t\tuniform vec2 resolution;\n\n\t\tattribute vec3 instanceStart;\n\t\tattribute vec3 instanceEnd;\n\n\t\tattribute vec3 instanceColorStart;\n\t\tattribute vec3 instanceColorEnd;\n\n\t\tvarying vec2 vUv;\n\n\t\t#ifdef USE_DASH\n\n\t\t\tuniform float dashScale;\n\t\t\tattribute float instanceDistanceStart;\n\t\t\tattribute float instanceDistanceEnd;\n\t\t\tvarying float vLineDistance;\n\n\t\t#endif\n\n\t\tvoid trimSegment( const in vec4 start, inout vec4 end ) {\n\n\t\t\t// trim end segment so it terminates between the camera plane and the near plane\n\n\t\t\t// conservative estimate of the near plane\n\t\t\tfloat a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column\n\t\t\tfloat b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column\n\t\t\tfloat nearEstimate = - 0.5 * b / a;\n\n\t\t\tfloat alpha = ( nearEstimate - start.z ) / ( end.z - start.z );\n\n\t\t\tend.xyz = mix( start.xyz, end.xyz, alpha );\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\t#ifdef USE_COLOR\n\n\t\t\t\tvColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;\n\n\t\t\t#endif\n\n\t\t\t#ifdef USE_DASH\n\n\t\t\t\tvLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;\n\n\t\t\t#endif\n\n\t\t\tfloat aspect = resolution.x / resolution.y;\n\n\t\t\tvUv = uv;\n\n\t\t\t// camera space\n\t\t\tvec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );\n\t\t\tvec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );\n\n\t\t\t// special case for perspective projection, and segments that terminate either in, or behind, the camera plane\n\t\t\t// clearly the gpu firmware has a way of addressing this issue when projecting into ndc space\n\t\t\t// but we need to perform ndc-space calculations in the shader, so we must address this issue directly\n\t\t\t// perhaps there is a more elegant solution -- WestLangley\n\n\t\t\tbool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column\n\n\t\t\tif ( perspective ) {\n\n\t\t\t\tif ( start.z < 0.0 && end.z >= 0.0 ) {\n\n\t\t\t\t\ttrimSegment( start, end );\n\n\t\t\t\t} else if ( end.z < 0.0 && start.z >= 0.0 ) {\n\n\t\t\t\t\ttrimSegment( end, start );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// clip space\n\t\t\tvec4 clipStart = projectionMatrix * start;\n\t\t\tvec4 clipEnd = projectionMatrix * end;\n\n\t\t\t// ndc space\n\t\t\tvec2 ndcStart = clipStart.xy / clipStart.w;\n\t\t\tvec2 ndcEnd = clipEnd.xy / clipEnd.w;\n\n\t\t\t// direction\n\t\t\tvec2 dir = ndcEnd - ndcStart;\n\n\t\t\t// account for clip-space aspect ratio\n\t\t\tdir.x *= aspect;\n\t\t\tdir = normalize( dir );\n\n\t\t\t// perpendicular to dir\n\t\t\tvec2 offset = vec2( dir.y, - dir.x );\n\n\t\t\t// undo aspect ratio adjustment\n\t\t\tdir.x /= aspect;\n\t\t\toffset.x /= aspect;\n\n\t\t\t// sign flip\n\t\t\tif ( position.x < 0.0 ) offset *= - 1.0;\n\n\t\t\t// endcaps\n\t\t\tif ( position.y < 0.0 ) {\n\n\t\t\t\toffset += - dir;\n\n\t\t\t} else if ( position.y > 1.0 ) {\n\n\t\t\t\toffset += dir;\n\n\t\t\t}\n\n\t\t\t// adjust for linewidth\n\t\t\toffset *= linewidth;\n\n\t\t\t// adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ...\n\t\t\toffset /= resolution.y;\n\n\t\t\t// select end\n\t\t\tvec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;\n\n\t\t\t// back to clip space\n\t\t\toffset *= clip.w;\n\n\t\t\tclip.xy += offset;\n\n\t\t\tgl_Position = clip;\n\n\t\t\tvec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation\n\n\t\t\t#include <logdepthbuf_vertex>\n\t\t\t#include <clipping_planes_vertex>\n\t\t\t#include <fog_vertex>\n\n\t\t}\n\t\t",fragmentShader:"\n\t\tuniform vec3 diffuse;\n\t\tuniform float opacity;\n\n\t\t#ifdef USE_DASH\n\n\t\t\tuniform float dashSize;\n\t\t\tuniform float gapSize;\n\n\t\t#endif\n\n\t\tvarying float vLineDistance;\n\n\t\t#include <common>\n\t\t#include <color_pars_fragment>\n\t\t#include <fog_pars_fragment>\n\t\t#include <logdepthbuf_pars_fragment>\n\t\t#include <clipping_planes_pars_fragment>\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\t#include <clipping_planes_fragment>\n\n\t\t\t#ifdef USE_DASH\n\n\t\t\t\tif ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps\n\n\t\t\t\tif ( mod( vLineDistance, dashSize + gapSize ) > dashSize ) discard; // todo - FIX\n\n\t\t\t#endif\n\n\t\t\tif ( abs( vUv.y ) > 1.0 ) {\n\n\t\t\t\tfloat a = vUv.x;\n\t\t\t\tfloat b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;\n\t\t\t\tfloat len2 = a * a + b * b;\n\n\t\t\t\tif ( len2 > 1.0 ) discard;\n\n\t\t\t}\n\n\t\t\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\t\t\t#include <logdepthbuf_fragment>\n\t\t\t#include <color_fragment>\n\n\t\t\tgl_FragColor = vec4( diffuseColor.rgb, diffuseColor.a );\n\n\t\t\t#include <tonemapping_fragment>\n\t\t\t#include <fog_fragment>\n\t\t\t#include <premultiplied_alpha_fragment>\n\n\t\t}\n\t\t"},s=function(t){function n(e){var n=t.call(this,{uniforms:r.UniformsUtils.clone(a.uniforms),vertexShader:a.vertexShader,fragmentShader:a.fragmentShader,clipping:!0})||this;return n.type="LineMaterial",n.dashed=!1,Object.defineProperties(n,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(t){this.uniforms.diffuse.value=t}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(t){this.uniforms.linewidth.value=t}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(t){this.uniforms.dashScale.value=t}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(t){this.uniforms.dashSize.value=t}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(t){this.uniforms.gapSize.value=t}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(t){this.uniforms.opacity.value=t}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(t){this.uniforms.resolution.value.copy(t)}}}),n.setValues(e),n}return e(n,t),n}(r.ShaderMaterial);Object.assign(s.prototype,{isLineMaterial:!0});var u=function(t){function n(e,n){var i=t.call(this)||this;return i.type="LineSegments2",i.geometry=void 0!==e?e:new o,i.material=void 0!==n?n:new s({color:16777215*Math.random()}),i}return e(n,t),n.prototype.computeLineDistances=function(){for(var t=this.geometry,e=t.attributes.instanceStart,n=t.attributes.instanceEnd,i=new Float32Array(2*e.count),o=new r.Vector3,a=new r.Vector3,s=0,u=0,c=e.count;s<c;s++,u+=2)o.fromBufferAttribute(e,s),a.fromBufferAttribute(n,s),i[u]=0===u?0:i[u-1],i[u+1]=i[u]+o.distanceTo(a);var l=new r.InstancedInterleavedBuffer(i,2,1);return t.setAttribute("instanceDistanceStart",new r.InterleavedBufferAttribute(l,1,0)),t.setAttribute("instanceDistanceEnd",new r.InterleavedBufferAttribute(l,1,1)),this},n.prototype.raycast=function(t,e){null===t.camera&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2.');var n=t.ray,i=t.camera,o=i.projectionMatrix,a=this.geometry,s=this.material,u=s.resolution,c=s.linewidth,l=a.attributes.instanceStart,f=a.attributes.instanceEnd,d=new r.Vector4,p=new r.Vector4,m=new r.Vector4,v=new r.Vector3,h=new r.Matrix4,y=new r.Line3,A=new r.Vector3;n.at(1,m),m.w=1,m.applyMatrix4(i.matrixWorldInverse),m.applyMatrix4(o),m.multiplyScalar(1/m.w),m.x*=u.x/2,m.y*=u.y/2,m.z=0,v.copy(m);var g=this.matrixWorld;h.multiplyMatrices(i.matrixWorldInverse,g);for(var b=0,w=l.count;b<w;b++){d.fromBufferAttribute(l,b),p.fromBufferAttribute(f,b),d.w=1,p.w=1,d.applyMatrix4(h),p.applyMatrix4(h),d.applyMatrix4(o),p.applyMatrix4(o),d.multiplyScalar(1/d.w),p.multiplyScalar(1/p.w);var S=d.z<-1&&p.z<-1,x=d.z>1&&p.z>1;if(!S&&!x){d.x*=u.x/2,d.y*=u.y/2,p.x*=u.x/2,p.y*=u.y/2,y.start.copy(d),y.start.z=0,y.end.copy(p),y.end.z=0;var E=y.closestPointToPointParameter(v,!0);y.at(E,A);var B=r.MathUtils.lerp(d.z,p.z,E),M=B>=-1&&B<=1,P=v.distanceTo(A)<.5*c;if(M&&P){y.start.fromBufferAttribute(l,b),y.end.fromBufferAttribute(f,b),y.start.applyMatrix4(g),y.end.applyMatrix4(g);var z=new r.Vector3,L=new r.Vector3;n.distanceSqToSegment(y.start,y.end,L,z),e.push({point:L,pointOnLine:z,distance:n.origin.distanceTo(L),object:this,faceIndex:b})}}}},n}(r.Mesh);Object.assign(u.prototype,{isLineSegments2:!0});var c=function(t){function n(e,n){var i=t.call(this,e,n)||this;return i.type="Line2",i}return e(n,t),n}(u);Object.assign(c.prototype,{isLine2:!0});var l=function(t){function n(){var e=t.call(this)||this;return e.type="LineGeometry",e}return e(n,t),n.prototype.setPositions=function(e){for(var n=e.length-3,i=new Float32Array(2*n),r=0;r<n;r+=3)i[2*r]=e[r],i[2*r+1]=e[r+1],i[2*r+2]=e[r+2],i[2*r+3]=e[r+3],i[2*r+4]=e[r+4],i[2*r+5]=e[r+5];return t.prototype.setPositions.call(this,i),this},n.prototype.setColors=function(e){for(var n=e.length-3,i=new Float32Array(2*n),r=0;r<n;r+=3)i[2*r]=e[r],i[2*r+1]=e[r+1],i[2*r+2]=e[r+2],i[2*r+3]=e[r+3],i[2*r+4]=e[r+4],i[2*r+5]=e[r+5];return t.prototype.setColors.call(this,i),this},n.prototype.fromLine=function(t){var e=t.geometry;if(e instanceof r.Geometry){var n=(new r.BufferGeometry).fromGeometry(e);this.setPositions(n.attributes.position.array)}else e instanceof r.BufferGeometry&&this.setPositions(e.attributes.position.array);return this},n.prototype.copy=function(){return this},n}(o);Object.assign(l.prototype,{isLineGeometry:!0});var f=14467195,d=null,p=function(t){function n(e,n){void 0===e&&(e=new r.Vector3),void 0===n&&(n=new r.Vector3);var i=t.call(this)||this;i.type="FiveLine",i.needsRender=!0;var o=new l,a=new s({color:f,linewidth:2,dashScale:20,dashed:!1});i.line=new c(o,a);var u=new r.BufferGeometry,p=new r.PointsMaterial({color:f,size:8,map:d||(d=(new r.TextureLoader).load("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sHDgwCEMBJZu0AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAABM5JREFUWMO1V0tPG2cUPZ4Hxh6DazIOrjFNqJs0FIMqWFgWQkatsmvVbtggKlSVRVf5AWz4AWz4AUSKEChll19QJYSXkECuhFxsHjEhxCYm+DWGMZ5HF72DJq4bAzFXurI0M/I5997v3u9cC65vTJVn2lX/xHINQOYSBLTLEuIuCWw4Z3IGAEvf6ASmVHjNzHCXBG4A0AjACsAOwEbO0nsFQBnAGYASAIl+ZRMR7SolMEdsByD09fV5R0ZGgg8ePPjW5/N1iqLYpuu6RZblciKR2I9Go69evnwZnZ+fjwI4IS8AKBIRzeQfJWCANwKwh0KhtrGxsYehUOin1tbW+zzP23ietzY2NnIAoGmaLsuyUiqVyvl8XtrY2NiamZn589mzZxsAUgCOAeQAnFI2tI+VxIjaAeDzoaGh7xYWFuZOTk6OZVk+12uYqqq6JEnn0Wg0OT4+/geAXwGEAdwDIFJQXC1wO4DWR48e/RCPxxclSSroVzRFUbSDg4P848ePFwH8DuAhkWih83TRQWxFOXgAwvDwcOfo6OhvXV1d39tsNtuVBwTDWBwOh1UUxVsMw1hXVlbSdCgNV43uYSvrHg6H24aHh38eHBz85TrgF9FYLHA4HLzH43FvbW2d7u/vG+dANp8FpqIlbd3d3V8Fg8EfBUFw4BONZVmL3+9vHhkZCQL4AoAHgJPK8G+yzC0XDofdoVAo5PP5vkadTBAEtr+/39ff3x8gAp/RPOEqx2qjx+NpvXv3bk9DQ0NDvQgwDIOWlhZrMBj8kgi0UJdxRgYMArzL5XJ7vd57qLPZ7Xamp6fnNgBXtQxcjFuHw+Hyer3t9SYgCAITCAScAJoBNNEY/08GOFVVrfVMv7kMNDntFD1vjIAPrlRN0xjckOm6biFQ3jwNPwDMZrOnqVTqfb3Bi8Wivru7W/VCYkwPlKOjo0IikXh7EwQikYgE4Nw0CfXKDCipVCoTj8df3QABbW1tLUc6oUgkFPMkVACUNjc337148eKvw8PDbJ2jP1taWkoCyNDVXDSECmNSK4qiKNLq6urW8+fPI/UicHx8rD59+jSVy+WOAKSJhKENwFItLtoxk8mwsixzHR0dHe3t7c5PAU+n09rs7OzJkydPYqVSaQfANoDXALIk31S2smU1TWMPDg7K5XKZ7+3t9TudTut1U7+wsFCcmJiIpdPpbQBxADsAknQWymYCOukBHYCuKApisdhpMpnURFEU79y503TVyKenpzOTk5M7e3t7MQKPV0Zv1gNm+awB0MvlshqLxfLb29uyJElWURSbXC4XXyvqxcXFs6mpqeTc3Nzu3t7e3wQcA7BPZ8Cov1pNlJplmQtAG8MwHV6v95tAINA5MDBwPxAIuLu6upr8fr/VAN3c3JQjkcjZ+vp6fnl5+d2bN29SuVzuNYAEpf01CdRChUL+X1VskHACuA3Ay3Fcu9vt7nA6nZ7m5uYWQRCaNE3jVVW15PP580KhIGUymWw2m00DOAJwSP4WwPtq4LX2Ao6USxNlQyS/RcQcdLGwlNIz6vEMAaZpNzCk2Pll94LK/cDYimxERiBwG10sxjgvEZBE0UpE6vxj+0Ct5bTaXthgEhRmja8QWNkkPGsuIpfdjpkK+cZUWTC0KredVmtD/gdlSl6EG4AMvQAAAABJRU5ErkJggg==")),sizeAttenuation:!1,transparent:!0});return i.points=new r.Points(u,p),i.points.renderOrder=11,i.points.frustumCulled=!1,i.setPoints(e,n),i.add(i.line,i.points),i}return e(n,t),n.prototype.setPoints=function(t,e){var n=[].concat(t.toArray(),e.toArray());this.points.geometry.setAttribute("position",new r.BufferAttribute(new Float32Array(n),3)),this.line.geometry.setPositions(n),this.line.computeLineDistances(),this.needsRender=!0},n.prototype.getPoints=function(){var t=this.points.geometry.attributes.position.array;return[new r.Vector3(t[0],t[1],t[2]),new r.Vector3(t[3],t[4],t[5])]},n.prototype.setMaterial=function(t){var e=this.line.material;for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];"dashed"===n?(e.dashed=i,i?e.defines.USE_DASH="":delete e.defines.USE_DASH,e.needsUpdate=!0):e[n]=t[n]}this.needsRender=!0},n.prototype.setResolution=function(t,e){var n=this.line.material.resolution;n.x===t&&n.y===e||(n.set(t,e),this.needsRender=!0)},n}(r.Object3D);Object.assign(p.prototype,{isFiveLine:!0})})(),i})()}));
@@ -0,0 +1,14 @@
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
+ ***************************************************************************** */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see five-react.js.LICENSE.txt */
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.FiveSDK_React=t():e.FiveSDK_React=t()}(self,(function(){return(()=>{var e={348:e=>{if(!("FiveSDK"in window))throw new Error('"FiveSDK" is not available. Please include "five" in your HTML.');e.exports=window.FiveSDK},751:e=>{if(!("React"in window))throw new Error('"React" is not available. Please include "react" in your HTML.');e.exports=window.React},438:e=>{if(!("THREE"in window))throw new Error('"THREE" is not available. Please include "three.js" in your HTML.');const t=Number(THREE.REVISION);if(t<115||t>117)throw new Error('"Five" needs "THREE.js" version between 125 - 117.');e.exports=window.THREE}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var u=t[r]={exports:{}};return e[r](u,u.exports,n),u.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{FiveCanvas:()=>h,INJECTION_PROPNAME:()=>T,Store:()=>oe,createFiveFeature:()=>te,createFiveProvider:()=>v,createStore:()=>ue,unsafe__useFiveInstance:()=>y,useFiveAction:()=>L,useFiveCameraDirection:()=>V,useFiveCameraRaycaster:()=>x,useFiveCurrentObserver:()=>E,useFiveCurrentState:()=>C,useFiveEventCallback:()=>k,useFiveFloor:()=>_,useFiveHelper:()=>W,useFiveModelIntersectRaycaster:()=>O,useFiveModelReadyState:()=>M,useFiveProject2d:()=>F,useFiveScene:()=>S,useFiveSceneEffect:()=>m,useFiveState:()=>b,useFiveWork:()=>w,withFive:()=>ee});var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};function t(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function u(e,t,n){if(n||2===arguments.length)for(var r,o=0,u=t.length;o<u;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create,Object.create;var i=n(751),a=n(438),f=[],c=i.createContext(null);function s(){var e=i.useContext(c);if(!e)throw new Error("FiveProvider never found.");return e.five}function l(){var e=i.useContext(c);if(!e)throw new Error("FiveProvider never found.");return e.loadWork}var d=n(348);function v(e){return void 0===e&&(e={}),function(n){function r(t){var r,u=n.call(this,t)||this,i=function(e){var t=void 0===e?{}:e,n=t.backgroundColor,r=void 0===n?1579548:n,o=t.backgroundAlpha,u=void 0===o?1:o,i=t.pixelRatio,c=void 0===i?1:i;if("undefined"!=typeof window){var s=f.shift();return s||((s=new a.WebGLRenderer({antialias:!1,alpha:!0})).outputEncoding=a.sRGBEncoding),s.setPixelRatio(c),s.setClearColor(r,u),s.autoClear=!0,s}}({pixelRatio:1===(0,d.getViewportScale)()?window.devicePixelRatio:1});return u.five=new d.Five(o({renderer:i},e)),(t.work||t.initialWork)&&u.five.load(t.work||t.initialWork,t.initialState,void 0,null===(r=t.initialUserAction)||void 0===r||r),u.five.on("load",(function(){var e;u.props.onWorkChange&&u.props.onWorkChange(null===(e=u.five)||void 0===e?void 0:e.work)})),u.five.on("stateChange",(function(e,t){u.props.onStateChange&&u.props.onStateChange(e,t)})),u.five.on("currentStateChange",(function(e,t){u.props.onCurrentStateChange&&u.props.onCurrentStateChange(e,t)})),u.five.on("error",(function(e){u.props.onError?u.props.onError(e):console.warn(e.message)})),u}return t(r,n),r.prototype.loadWork=function(e,t,n,r){if(void 0===r&&(r=!0),this.props.work)throw new Error("props 'work' is set in fiveProvider, if you need modify work internal, use 'initialWork' instead.");return this.five.load(e,t,n,r)},r.prototype.shouldComponentUpdate=function(e){var t,n;return e.work&&e.work!==(null===(t=this.five)||void 0===t?void 0:t.work)&&(null===(n=this.five)||void 0===n||n.load(e.work,e.initialState)),!0},r.prototype.componentWillUnmount=function(){var e;this.five&&(this.five.dispose(),(e=this.five.renderer)&&-1===f.indexOf(e)&&f.push(e),delete this.five)},r.prototype.render=function(){var e=this;return i.createElement(c.Provider,{value:{five:this.five,loadWork:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.loadWork.apply(e,t)}}},this.props.children)},r}(i.Component)}var p={display:"inline-block",overflow:"hidden"},h=function(e){var t=e.width,n=e.height,r=s(),u=i.createRef(),a=o({width:t,height:n},p);return i.useLayoutEffect((function(){if(u.current&&r.renderer){if(null!==r.renderer.domElement.parentNode&&r.renderer.domElement.parentNode!==u.current)throw new Error("There are more than 2 fiveCanvas in this context.");r.renderer.domElement.parentNode!==u.current&&u.current.appendChild(r.renderer.domElement),r.camera.aspect=t/n,r.camera.updateProjectionMatrix(),r.renderer.setSize(t,n),r.needsRender=!0}}),[t,n,u.current]),i.createElement("div",{ref:u,style:a})};function y(){return s()}function m(e,t){var n=s(),r=[n];void 0!==t&&(r=r.concat(t)),i.useLayoutEffect((function(){return e(n.scene)}),r)}var S=m;function w(){var e=s(),t=l(),n=i.useState((function(){return e.work})),r=n[0],o=n[1];return i.useLayoutEffect((function(){return e.on("load",(function(){return o(e.work)}))}),[e]),[r,t]}function g(e){return o({},e.state)}function b(){var e=s(),t=i.useState((function(){return g(e)})),n=t[0],r=t[1],o=i.useCallback((function(t,n,r){void 0===n&&(n=!1),void 0===r&&(r=!0);var o="function"==typeof t?t(e.getCurrentState()):t;e.setState(o,n,r)}),[e]);return i.useLayoutEffect((function(){return e.on("stateChange",(function(){return r(g(e))}))}),[e]),[n,o]}function C(){var e=s(),t=i.useState((function(){return e.getCurrentState()})),n=t[0],r=t[1],o=i.useCallback((function(t,n,r){void 0===n&&(n=!1),void 0===r&&(r=!0);var o="function"==typeof t?t(e.getCurrentState()):t;e.setState(o,n,r)}),[e]);return i.useLayoutEffect((function(){return e.on("currentStateChange",(function(){return r(e.getCurrentState())}))}),[e]),[n,o]}function E(){var e=s(),t=i.useState((function(){return e.getCurrentState()})),n=t[0],r=t[1];return i.useLayoutEffect((function(){return e.on("currentStateChange",(function(){return r(e.getCurrentState())}))}),[e]),e.work?e.work.observers[n.panoIndex]:null}function k(e,t,n){var r=s(),o=[r,e];void 0!==n&&(o=o.concat(n)),i.useLayoutEffect((function(){return r.on(e,t)}),o)}function L(){var e=s();return{updateCamera:i.useCallback((function(t,n){return e.updateCamera(t,n)}),[e]),initBasisLoader:i.useCallback((function(t){return e.initBasisLoader(t)}),[e]),getPixels:i.useCallback((function(t,n,r,o,u){return e.getPixels(t,n,r,o,u)}),[e]),render:i.useCallback((function(t){return e.render(t)}),[e]),needsRender:i.useCallback((function(){return e.needsRender=!0}),[e]),preloadPano:i.useCallback((function(t,n){return e.preloadPano(t,n)}),[e])}}function F(){var e=s(),t=i.useState((function(){return Symbol()})),n=(t[0],t[1]);return i.useLayoutEffect((function(){return e.on("cameraUpdate",(function(){return n(Symbol())}))}),[e]),i.useCallback((function(t,n){return e.project2d(t,n)}),[e])}function R(e){var t=e.camera.getWorldDirection(new a.Vector3);return new a.Raycaster(e.camera.position,t)}function x(){var e=s(),t=i.useState((function(){return R(e)})),n=t[0],r=t[1];return i.useLayoutEffect((function(){return e.on("cameraUpdate",(function(){return r(R(e))}))}),[e]),n}function P(e){return e.camera.getWorldDirection(new a.Vector3)}function V(){var e=s(),t=i.useState((function(){return P(e)})),n=t[0],r=t[1];return i.useLayoutEffect((function(){return e.on("cameraUpdate",(function(){return r(P(e))}))}),[e]),n}function O(){var e=s();return i.useCallback((function(t){return e.model.intersectRaycaster(t)}),[e])}function j(e){return e.model.empty?"Empty":"Loaded"}function M(){var e=s(),t=i.useState((function(){return j(e)})),n=t[0],r=t[1];return i.useLayoutEffect((function(){return e.on("modelLoaded",(function(){return r(j(e))}))}),[e]),n}function _(){var e=s(),t=i.useState(e.model.shownFloor),n=t[0],r=t[1],o=i.useState(e.model.floorLength),u=o[0],a=o[1],f=i.useCallback((function(t){"number"==typeof t?e.model.show(t):e.model.show()}),[e]);return i.useLayoutEffect((function(){var t=[];return t.push(e.on("modelShownFloorChange",(function(){return r(e.model.shownFloor)}))),t.push(e.on("modelLoaded",(function(){return a(e.model.floorLength)}))),function(){for(var e;e=t.shift();)e()}}),[e]),[n,u,f]}function W(){var e=s(),t=i.useState(e.helperVisible),n=t[0],r=t[1],o=i.useCallback((function(t){e.helperVisible=t}),[e]);return i.useLayoutEffect((function(){return e.on("helpersVisibleChange",(function(e){return r(e)}))}),[e]),[n,o]}var T="$five";function D(e,t){return t.indexOf(e)>=0}function N(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];void 0!==t[o]&&(e[o]=t[o])}}function H(e,t){if(D("loadWork",t))return e}function I(e,t){if(D("setState",t))return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.setState.apply(e,t)}}function U(e,t){if(D("on",t))return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.on.apply(e,t)}}function A(e,t){if(D("on",t))return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.once.apply(e,t)}}function B(e,t){if(D("off",t))return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.off.apply(e,t)}}function K(e,t){if(D("intersectRaycaster",t))return function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return(t=e.model).intersectRaycaster.apply(t,n)}}function G(e,t){if(D("project2d",t))return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.project2d.apply(e,t)}}function $(e,t){if(D("updateCamera",t))return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.updateCamera.apply(e,t)}}function z(e,t){if(D("initBasisLoader",t))return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.initBasisLoader.apply(e,t)}}function J(e,t){if(D("getPixels",t))return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.getPixels.apply(e,t)}}function q(e,t){if(D("render",t))return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.render.apply(e,t)}}function Q(e,t){if(D("needsRender",t))return function(){e.needsRender=!0}}function X(e,t){if(D("preloadPano",t))return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.preloadPano.apply(e,t)}}function Y(e,t){if(D("showFloor",t))return function(t){"number"==typeof t?e.model.show(t):e.model.show()}}function Z(e,t){if(D("toggleHelperVisible",t))return function(t){e.helperVisible=t}}function ee(e){return function(t){return i.forwardRef((function(n,r){var u=s(),f=l(),c=function(e,t){return[D("unsafe__fiveInstance",t)?e:void 0]}(u,e)[0],d=function(e,t){var n=D("state",t),r=i.useState(Symbol()),u=r[0],a=r[1],f=i.useMemo((function(){if(n)return o({},e.state)}),[e,u]);return i.useLayoutEffect((function(){if(n)return e.on("stateChange",(function(){return a(Symbol())}))}),[e]),[f,u]}(u,e),v=d[0],p=d[1],h=function(e,t){var n=D("currentState",t),r=i.useState(Symbol()),o=r[0],u=r[1],a=i.useMemo((function(){if(n)return e.getCurrentState()}),[e,o]);return i.useLayoutEffect((function(){if(n)return e.on("currentStateChange",(function(){return u(Symbol())}))}),[e]),[a,o]}(u,e),y=h[0],m=h[1],S=function(e,t){var n=D("currentObserver",t),r=i.useState(Symbol()),o=r[0],u=r[1],a=i.useMemo((function(){if(n)return e.getCurrentState()}),[e,o]);return i.useLayoutEffect((function(){if(n)return e.on("currentStateChange",(function(){return u(Symbol())}))}),[e]),[a?e.work?e.work.observers[a.panoIndex]:null:void 0,o]}(u,e),w=S[0],g=S[1],b=function(e,t){var n=D("work",t),r=i.useState(Symbol()),o=r[0],u=r[1],a=i.useMemo((function(){if(n)return e.work}),[e,o]);return i.useLayoutEffect((function(){if(n)return e.on("load",(function(){return u(Symbol())}))}),[e]),[a,o]}(u,e),C=b[0],E=b[1],k=function(e,t){var n=D("model",t),r=i.useState(Symbol()),o=r[0],u=r[1],a=i.useMemo((function(){if(n)return e.model}),[e,o]);return i.useLayoutEffect((function(){if(n)return e.on("modelLoaded",(function(){return u(Symbol())}))}),[e]),[a,o]}(u,e),L=k[0],F=k[1],R=function(e,t){return[D("scene",t)?e.scene:void 0]}(u,e)[0],x=function(e,t){var n=D("cameraDirection",t),r=i.useState(Symbol()),o=r[0],u=r[1],f=i.useMemo((function(){if(n)return e.camera.getWorldDirection(new a.Vector3)}),[e,o]);return i.useLayoutEffect((function(){if(n)return e.on("cameraUpdate",(function(){return u(Symbol())}))}),[e]),[f,o]}(u,e),P=x[0],V=x[1],O=function(e,t){var n=D("cameraRaycaster",t),r=i.useState(Symbol()),o=r[0],u=r[1],f=i.useMemo((function(){if(n){var t=e.camera.getWorldDirection(new a.Vector3);return new a.Raycaster(e.camera.position,t)}}),[e,o]);return i.useLayoutEffect((function(){if(n)return e.on("cameraUpdate",(function(){return u(Symbol())}))}),[e]),[f,o]}(u,e),j=O[0],M=O[1],_=function(e,t){var n=D("modelReadyState",t),r=i.useState(Symbol()),o=r[0],u=r[1],a=i.useMemo((function(){if(n)return e.model.empty?"Empty":"Loaded"}),[e,o]);return i.useLayoutEffect((function(){if(n)return e.on("modelLoaded",(function(){return u(Symbol())}))}),[e]),[a,o]}(u,e),W=_[0],T=_[1],ee=function(e,t){var n=D("shownFloor",t),r=i.useState(Symbol()),o=r[0],u=r[1],a=i.useMemo((function(){if(n)return e.model.shownFloor}),[e,o]);return i.useLayoutEffect((function(){if(n)return e.on("modelShownFloorChange",(function(){return u(Symbol())}))}),[e]),[a,o]}(u,e),te=ee[0],ne=ee[1],re=function(e,t){var n=D("totalFloorLength",t),r=i.useState(Symbol()),o=r[0],u=r[1],a=i.useMemo((function(){if(n)return e.model.hasFloors()}),[e,o]);return i.useLayoutEffect((function(){if(n)return e.on("modelLoaded",(function(){return u(Symbol())}))}),[e]),[a,o]}(u,e),oe=re[0],ue=re[1],ie=function(e,t){var n=D("helperVisible",t),r=i.useState(Symbol()),o=r[0],u=r[1],a=i.useMemo((function(){if(n)return e.helperVisible}),[e,o]);return i.useLayoutEffect((function(){if(n)return e.on("helpersVisibleChange",(function(){return u(Symbol())}))}),[e]),[a,o]}(u,e),ae=ie[0],fe=ie[1],ce=i.useMemo((function(){var t={};return N(t,{setState:I(u,e),loadWork:H(f,e),on:U(u,e),once:A(u,e),off:B(u,e),intersectRaycaster:K(u,e),project2d:G(u,e),updateCamera:$(u,e),initBasisLoader:z(u,e),getPixels:J(u,e),render:q(u,e),needsRender:Q(u,e),preloadPano:X(u,e),showFloor:Y(u,e),toggleHelperVisible:Z(u,e)}),t}),[u,f]),se=i.useMemo((function(){var e=o({},ce);return N(e,{unsafe__fiveInstance:c,state:v,currentState:y,currentObserver:w,work:C,model:L,scene:R,cameraDirection:P,cameraRaycaster:j,modelReadyState:W,shownFloor:te,totalFloorLength:oe,helperVisible:ae}),e}),[u,ce,p,m,g,E,F,V,M,T,ne,ue,fe]);return i.createElement(t,o({ref:r,$five:se},n))}))}}function te(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e}function ne(e,t){for(var n={},r=t.length,o=-1;++o<r;){var u=t[o];u in e&&(n[u]=e[u])}return n}function re(e,t){for(var n=0;n<e.length;n++)for(var r=0;r<t.length;r++)if(e[n]===t[r])return!0;return!1}var oe=function(){function e(e,t){this.values=e,this.listeners=[],this.onValuesChange=t}return e.prototype.on=function(e,t){var n=this,r=[e,t];return this.listeners.push(r),function(){var e=n.listeners.indexOf(r);e>=0&&n.listeners.splice(e,1)}},e.prototype.getValues=function(e){return ne(this.values,e)},e.prototype.setValues=function(e,t){var n,r,u=[];for(var i in t)e.indexOf(i)>=0&&(n=t[i],r=this.values[i],!("number"==typeof n&&"number"==typeof r&&isNaN(n)&&isNaN(r)||n===r))&&u.push(i);if(0!==u.length){for(var a=o({},this.values),f=0,c=u;f<c.length;f++){var s=c[f];this.values[s]=t[s]}this.onValuesChange&&this.onValuesChange(this.values,a);for(var l=0,d=this.listeners;l<d.length;l++){var v=d[l],p=v[0],h=v[1];if(re(p,u)){var y=ne(a,p);h(ne(this.values,p),y)}}}},e}();function ue(e){var n=i.createContext(null);return{useStore:function(e){var t=i.useContext(n);if(null===t)throw new Error("StoreProvider never found.");var r=i.useRef(!0),o=i.useState(t.getValues(e)),a=o[0],f=o[1],c=u([t],e,!0);return i.useLayoutEffect((function(){return r.current?r.current=!1:f(t.getValues(e)),t.on(e,(function(e){return f(e)}))}),c),[a,i.useCallback((function(n){return t.setValues(e,n)}),c)]},useStoreSetter:function(e){var t=i.useContext(n);if(null===t)throw new Error("StoreProvider never found.");return i.useCallback((function(n){return t.setValues(e,n)}),u([t],e,!0))},watchStore:function(e,t,r){var o=i.useContext(n);if(null===o)throw new Error("StoreProvider never found.");var a=u([o],e,!0);void 0!==r&&(a=a.concat(r)),i.useLayoutEffect((function(){return o.on(e,t)}),a)},useStoreAction:function(t){var r=i.useContext(n);if(null===r)throw new Error("StoreProvider never found.");return i.useCallback((function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var i=e[t],a=i[0],f=i.slice(1),c=function(){return r.getValues(f)},s=function(e){return r.setValues(f,e)};return a.apply(void 0,u([c,s],n,!1))}),[])},StoreProvider:function(e){function r(t){var n=e.call(this,t)||this;return n.store=new oe(t.initialValue,(function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];n.props.onValuesChange&&(e=n.props).onValuesChange.apply(e,t)})),n}return t(r,e),r.prototype.shouldComponentUpdate=function(e){return e.children!==this.props.children},r.prototype.render=function(){return i.createElement(n.Provider,{value:this.store},this.props.children)},r}(i.Component)}}})(),r})()}));
@@ -0,0 +1,14 @@
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
+ ***************************************************************************** */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see five-sticker.js.LICENSE.txt */
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.FiveSDK_Sticker=t():e.FiveSDK_Sticker=t()}(self,(function(){return(()=>{var e={438:e=>{if(!("THREE"in window))throw new Error('"THREE" is not available. Please include "three.js" in your HTML.');const t=Number(THREE.REVISION);if(t<115||t>117)throw new Error('"Five" needs "THREE.js" version between 125 - 117.');e.exports=window.THREE}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Sticker:()=>l});var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};Object.create,Object.create;var t=n(438),o=new Float32Array([-.5,-.5,0,.5,-.5,0,-.5,.5,0,.5,.5,0]),i=new Float32Array([0,0,1,0,0,1,1,1]),a=new Uint8Array([0,1,2,1,3,2]),s=new t.BufferGeometry;s.setAttribute("position",new t.BufferAttribute(o,3)),s.setAttribute("uv",new t.BufferAttribute(i,2)),s.setIndex(new t.BufferAttribute(a,1));var p=window,u=p.requestAnimationFrame||p.mozRequestAnimationFrame||p.webkitRequestAnimationFrame||p.msRequestAnimationFrame||function(e){return setTimeout(e,16)},c="undefined"!=typeof performance&&void 0!==performance.timing?performance.timing.navigationStart:Date.now(),f="undefined"!=typeof performance?function(){return c+performance.now()}:function(){return Date.now()};function d(e,t){var n=e.dispose;e.dispose=function(){t(),n.call(e)}}var l=function(n){function r(e,r,o){var i,a,p,c,l,m,v=this,y=new t.MeshBasicMaterial;if((v=n.call(this,s,y)||this)._needsRender=!1,v.scale.set(e,r,1),"string"==typeof o){y.transparent=/\.png$/.test(o);var w=new Image;w.src=o,w.crossOrigin="",o=w}if(o instanceof HTMLImageElement){var g=y.map=new t.Texture;g.wrapS=t.ClampToEdgeWrapping,g.wrapT=t.ClampToEdgeWrapping,g.minFilter=t.LinearFilter,g.encoding=t.sRGBEncoding,d(g,function(e,t){e.naturalWidth>0&&u((function(){return t()}));var n=function(){return t()};return e.addEventListener("load",n,!1),function(){return e.removeEventListener("load",n,!1)}}(o,(function(){g.image=o,g.needsUpdate=!0,v._needsRender=!0})))}else if(o instanceof HTMLCanvasElement)y.map=new t.CanvasTexture(o);else if(o instanceof HTMLVideoElement){var h=y.map=new t.VideoTexture(o);h.wrapS=t.ClampToEdgeWrapping,h.wrapT=t.ClampToEdgeWrapping,h.minFilter=t.LinearFilter,h.encoding=t.sRGBEncoding,d(h,(i=o,a=function(){v._needsRender=!0},p=f(),c=!1,l=function(){c=!0,a(),f()-p<3e3?u(l):c=!1},m=function(){p=f(),!1===c&&l()},i.addEventListener("timeupdate",m,!1),function(){i.removeEventListener("timeupdate",m,!1),c=!1}))}return v}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(r,n),Object.defineProperty(r.prototype,"needsRender",{get:function(){return this._needsRender},set:function(e){this._needsRender=e,!0===e&&this.material.map&&(this.material.map.needsUpdate=!0)},enumerable:!1,configurable:!0}),r.prototype.setSize=function(e,t){this.scale.set(e,t,1),this._needsRender=!0},r.prototype.setTransparent=function(e){this.material.transparent=e,this._needsRender=!0},r.prototype.locationWithIntersection=function(e,t){void 0===t&&(t=.005);var n=e.point,r=e.face;this.position.copy(n),r&&(this.position.add(r.normal.clone().setLength(t)),this.lookAt(n.clone().add(r.normal))),this._needsRender=!0},r.prototype.dispose=function(){var e;null===(e=this.material.map)||void 0===e||e.dispose(),this.material.dispose()},r}(t.Mesh)})(),r})()}));
@@ -0,0 +1,14 @@
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
+ ***************************************************************************** */