@realsee/five 6.0.0-alpha.9 → 6.0.0-alpha.91

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 (386) hide show
  1. package/README.md +1 -1
  2. package/TERMS.txt +0 -2
  3. package/docs/assets/highlight.css +20 -20
  4. package/docs/assets/main.js +59 -52
  5. package/docs/assets/navigation.js +1 -0
  6. package/docs/assets/search.js +1 -1
  7. package/docs/assets/style.css +805 -825
  8. package/docs/classes/five.AnimationFrameLoop.html +16 -15
  9. package/docs/classes/five.BoxBoundingVolume.html +19 -1
  10. package/docs/classes/five.Camera.html +38 -11
  11. package/docs/classes/five.CullingVolume.html +13 -1
  12. package/docs/classes/five.Fetcher.html +5 -0
  13. package/docs/classes/five.Five.html +237 -290
  14. package/docs/classes/five.InternalWebGLRenderer.html +2 -1
  15. package/docs/classes/five.IntersectMesh.html +4 -1
  16. package/docs/classes/five.Model.html +70 -55
  17. package/docs/classes/five.ModelViewLayer.html +13 -0
  18. package/docs/classes/five.NetworkAbortError.html +2 -0
  19. package/docs/classes/five.NetworkFirbiddenError.html +2 -0
  20. package/docs/classes/five.NetworkResponseError.html +3 -0
  21. package/docs/classes/five.NetworkSubscribe.html +42 -56
  22. package/docs/classes/five.NetworkTimeoutError.html +2 -0
  23. package/docs/classes/five.PBMContainer.html +12 -13
  24. package/docs/classes/five.PBMGroup.html +3 -3
  25. package/docs/classes/five.PBMMesh.html +4 -5
  26. package/docs/classes/five.PBMMeshMaterial.html +50 -45
  27. package/docs/classes/five.PanoCircleMesh.html +30 -7
  28. package/docs/classes/five.PanoCircleMeshCustom.html +30 -7
  29. package/docs/classes/five.PanoCircleMeshSolid.html +30 -7
  30. package/docs/classes/five.RegionBoundingVolume.html +22 -1
  31. package/docs/classes/five.RequestScheduler.html +13 -12
  32. package/docs/classes/five.Scene.html +5 -3
  33. package/docs/classes/five.SphereBoundingVolume.html +18 -1
  34. package/docs/classes/five.Subscribe.html +43 -62
  35. package/docs/classes/five.TextureLoader.html +5 -1
  36. package/docs/classes/five.Tile.html +30 -1
  37. package/docs/classes/five.Tile3DModel.html +28 -1
  38. package/docs/classes/five.TileCubeTextureTarget.html +9 -1
  39. package/docs/classes/five.TileNode.html +5 -1
  40. package/docs/classes/five.Tileset.html +31 -5
  41. package/docs/classes/five.TilesetCache.html +8 -1
  42. package/docs/classes/five.TilesetTraverser.html +19 -1
  43. package/docs/classes/five.Work.html +33 -28
  44. package/docs/classes/five.XRButton.html +3 -1
  45. package/docs/classes/gltf_loader.DDSLoader.html +3 -1
  46. package/docs/classes/gltf_loader.DRACOLoader.html +8 -1
  47. package/docs/classes/gltf_loader.GLTFLoader.html +18 -17
  48. package/docs/classes/gltf_loader.GLTFObject.html +8 -6
  49. package/docs/classes/gltf_loader.GLTFParser.html +6 -1
  50. package/docs/classes/gltf_loader.THREEGLTFLoader.html +8 -1
  51. package/docs/classes/line.Line.html +10 -1
  52. package/docs/classes/line.LineGeometry.html +14 -1
  53. package/docs/classes/line.LineMaterial.html +8 -1
  54. package/docs/classes/line.LineSegmentsGeometry.html +12 -1
  55. package/docs/classes/line.THREE_Line2.html +4 -1
  56. package/docs/classes/line.THREE_LineSegments2.html +4 -1
  57. package/docs/classes/plugins.BasePlugin.Controller.html +38 -0
  58. package/docs/classes/plugins.ItemMaskController.html +37 -0
  59. package/docs/classes/react.Store.html +23 -29
  60. package/docs/classes/sticker.Sticker.html +25 -32
  61. package/docs/classes/vfx.Airflow.html +8 -1
  62. package/docs/classes/vfx.Flame.html +10 -1
  63. package/docs/classes/vfx.Particle.html +79 -82
  64. package/docs/classes/vfx.SpotLight.html +7 -1
  65. package/docs/enums/five.VolumePlaneIntersect.html +4 -1
  66. package/docs/functions/five.defaultImageURLTransform.html +5 -0
  67. package/docs/functions/five.getViewportScale.html +1 -0
  68. package/docs/functions/five.imageSupport.html +1 -0
  69. package/docs/functions/five.isPanoId.html +1 -0
  70. package/docs/functions/five.loadAt3d.html +1 -0
  71. package/docs/functions/five.loadB3dm.html +1 -0
  72. package/docs/functions/five.loadDome.html +1 -0
  73. package/docs/functions/five.loadDomez.html +1 -0
  74. package/docs/functions/five.loadPbm.html +1 -0
  75. package/docs/functions/five.loadPnts.html +1 -0
  76. package/docs/functions/five.panoEqual.html +1 -0
  77. package/docs/functions/five.panoParse.html +1 -0
  78. package/docs/functions/five.panoStringify.html +1 -0
  79. package/docs/functions/five.parseWork.html +7 -0
  80. package/docs/functions/plugins.ItemMaskPlugin.html +1 -0
  81. package/docs/functions/react.FiveCanvas-1.html +6 -0
  82. package/docs/functions/react.createFiveFeature.html +1 -0
  83. package/docs/functions/react.createFiveProvider.html +9 -0
  84. package/docs/functions/react.createStore.html +15 -0
  85. package/docs/functions/react.unsafe__useFiveInstance.html +5 -0
  86. package/docs/functions/react.useFiveAction.html +19 -0
  87. package/docs/functions/react.useFiveCameraDirection.html +3 -0
  88. package/docs/functions/react.useFiveCameraRaycaster.html +3 -0
  89. package/docs/functions/react.useFiveCurrentObserver.html +5 -0
  90. package/docs/functions/react.useFiveCurrentState.html +5 -0
  91. package/docs/functions/react.useFiveEventCallback.html +5 -0
  92. package/docs/functions/react.useFiveFloor.html +5 -0
  93. package/docs/functions/react.useFiveHelper.html +5 -0
  94. package/docs/functions/react.useFiveModelIntersectRaycaster.html +7 -0
  95. package/docs/functions/react.useFiveModelReadyState.html +4 -0
  96. package/docs/functions/react.useFiveProject2d.html +7 -0
  97. package/docs/functions/react.useFiveScene.html +2 -0
  98. package/docs/functions/react.useFiveSceneEffect.html +5 -0
  99. package/docs/functions/react.useFiveState.html +1 -0
  100. package/docs/functions/react.useFiveWork.html +8 -0
  101. package/docs/functions/react.withFive.html +1 -0
  102. package/docs/functions/vue.unsafe__useFiveInject.html +5 -0
  103. package/docs/functions/vue.useFiveAction.html +25 -0
  104. package/docs/functions/vue.useFiveCameraDirection.html +3 -0
  105. package/docs/functions/vue.useFiveCameraRaycaster.html +3 -0
  106. package/docs/functions/vue.useFiveCurrentObserver.html +5 -0
  107. package/docs/functions/vue.useFiveCurrentState.html +5 -0
  108. package/docs/functions/vue.useFiveEventCallback.html +5 -0
  109. package/docs/functions/vue.useFiveFloor.html +5 -0
  110. package/docs/functions/vue.useFiveHelper.html +5 -0
  111. package/docs/functions/vue.useFiveModel.html +2 -0
  112. package/docs/functions/vue.useFiveModelBounding.html +2 -0
  113. package/docs/functions/vue.useFiveModelIntersectRaycaster.html +7 -0
  114. package/docs/functions/vue.useFiveModelReadyState.html +4 -0
  115. package/docs/functions/vue.useFiveProject2d.html +7 -0
  116. package/docs/functions/vue.useFiveScene.html +2 -0
  117. package/docs/functions/vue.useFiveState.html +5 -0
  118. package/docs/functions/vue.useFiveWorks.html +8 -0
  119. package/docs/index.html +35 -79
  120. package/docs/interfaces/five.AddableObject.html +9 -9
  121. package/docs/interfaces/five.AjaxOptions.html +11 -0
  122. package/docs/interfaces/five.AnimationFrame.html +5 -1
  123. package/docs/interfaces/five.BaseEvent.html +5 -1
  124. package/docs/interfaces/five.BoundingVolume.html +15 -1
  125. package/docs/interfaces/five.CameraPose.html +6 -1
  126. package/docs/interfaces/five.ClipperParameter.html +3 -1
  127. package/docs/interfaces/five.EventCallback.html +355 -462
  128. package/docs/interfaces/five.FiveInitArgs.html +82 -86
  129. package/docs/interfaces/five.FiveLoadOptions.html +36 -0
  130. package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +17 -15
  131. package/docs/interfaces/five.GestureEvent.html +19 -1
  132. package/docs/interfaces/five.ImageOptions.html +16 -18
  133. package/docs/interfaces/five.ImageURLMappings.html +1 -1
  134. package/docs/interfaces/five.ImageURLOptions.html +15 -15
  135. package/docs/interfaces/five.IntersectEvent.html +8 -1
  136. package/docs/interfaces/five.IntersectMeshInterface.html +3 -3
  137. package/docs/interfaces/five.Intersection.html +3 -7
  138. package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +15 -11
  139. package/docs/interfaces/five.ModeChangeEvent.html +9 -1
  140. package/docs/interfaces/five.ModelControllerCustomInitArgs.html +18 -18
  141. package/docs/interfaces/five.ModelEvent.html +8 -1
  142. package/docs/interfaces/five.ModelsEvent.html +6 -1
  143. package/docs/interfaces/five.MotionKeyframe.html +4 -1
  144. package/docs/interfaces/five.MovePanoOptions.html +24 -35
  145. package/docs/interfaces/five.NetworkOptions.html +9 -9
  146. package/docs/interfaces/five.NetworkResourceEvent.html +9 -1
  147. package/docs/interfaces/five.ObjectEvent.html +6 -1
  148. package/docs/interfaces/five.PBMPanoPicture.html +7 -7
  149. package/docs/interfaces/five.PBMParameters.html +42 -43
  150. package/docs/interfaces/five.PanoCircleMeshCustomOptions.html +9 -1
  151. package/docs/interfaces/five.PanoCircleMeshInterface.html +21 -10
  152. package/docs/interfaces/five.PanoCircleMeshOptions.html +3 -1
  153. package/docs/interfaces/five.PanoCircleMeshSolidOptions.html +3 -1
  154. package/docs/interfaces/five.PanoEvent.html +11 -1
  155. package/docs/interfaces/five.PanoTextureEvent.html +9 -1
  156. package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +32 -32
  157. package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +18 -18
  158. package/docs/interfaces/five.Pose.html +15 -32
  159. package/docs/interfaces/five.RenderEvent.html +7 -1
  160. package/docs/interfaces/five.Scissor.html +11 -12
  161. package/docs/interfaces/five.State.html +20 -21
  162. package/docs/interfaces/five.StateEvent.html +7 -1
  163. package/docs/interfaces/five.SubscribeMixinType.emit.html +1 -1
  164. package/docs/interfaces/five.SubscribeMixinType.hasListener.html +1 -1
  165. package/docs/interfaces/five.SubscribeMixinType.off.html +1 -1
  166. package/docs/interfaces/five.SubscribeMixinType.on.html +1 -1
  167. package/docs/interfaces/five.SubscribeMixinType.once.html +1 -1
  168. package/docs/interfaces/five.SubscribeMixinType.waitUnitl.html +1 -1
  169. package/docs/interfaces/five.TextureOptions.html +18 -20
  170. package/docs/interfaces/five.Tile3DModelLoaderOptions.html +6 -3
  171. package/docs/interfaces/five.TileCubeNode.html +7 -1
  172. package/docs/interfaces/five.TileCubeTree.html +2 -1
  173. package/docs/interfaces/five.TileHeader.html +9 -1
  174. package/docs/interfaces/five.TilesetHeader.html +5 -1
  175. package/docs/interfaces/five.TilesetOptions.html +5 -1
  176. package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +9 -9
  177. package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +28 -28
  178. package/docs/interfaces/five.WebXRAxesParams.html +4 -1
  179. package/docs/interfaces/five.WebXRControllerParams.html +2 -1
  180. package/docs/interfaces/five.WorkCubeImage.html +15 -13
  181. package/docs/interfaces/five.WorkImage.html +20 -21
  182. package/docs/interfaces/five.WorkInitial.html +17 -17
  183. package/docs/interfaces/five.WorkModel.html +12 -13
  184. package/docs/interfaces/five.WorkObserver.html +40 -39
  185. package/docs/interfaces/five.WorkResolvedObserver.html +41 -37
  186. package/docs/interfaces/five.WorkTile.html +10 -1
  187. package/docs/interfaces/five.WorkVideo.html +8 -9
  188. package/docs/interfaces/five.WorksEvent.html +9 -1
  189. package/docs/interfaces/five.XRControllerEvent.html +8 -1
  190. package/docs/interfaces/five.XRGestureEvent.html +11 -1
  191. package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +28 -28
  192. package/docs/interfaces/five.XRSessionEvent.html +7 -1
  193. package/docs/interfaces/gltf_loader.DDS.html +7 -1
  194. package/docs/interfaces/gltf_loader.GLTF.html +10 -4
  195. package/docs/interfaces/gltf_loader.GLTFReference.html +3 -1
  196. package/docs/interfaces/gltf_loader.THREEGLTF.html +8 -1
  197. package/docs/interfaces/plugins.BasePlugin.BaseOptions.html +3 -0
  198. package/docs/interfaces/plugins.BasePlugin.Config.html +5 -0
  199. package/docs/interfaces/plugins.BasePlugin.State.html +8 -0
  200. package/docs/interfaces/plugins.ItemMaskPluginType.Config.html +2 -0
  201. package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +10 -0
  202. package/docs/interfaces/plugins.ItemMaskPluginType.ItemType.html +13 -0
  203. package/docs/interfaces/plugins.ItemMaskPluginType.MaskType.html +4 -0
  204. package/docs/interfaces/plugins.ItemMaskPluginType.Params.html +4 -0
  205. package/docs/interfaces/plugins.ItemMaskPluginType.State.html +14 -0
  206. package/docs/interfaces/react.FiveActionReactCallbacks.html +27 -37
  207. package/docs/interfaces/react.FiveInjectionTypes.html +112 -138
  208. package/docs/interfaces/react.PropTypeOfFiveFeatures.html +2 -1
  209. package/docs/interfaces/sticker.IntersectionLike.html +7 -8
  210. package/docs/interfaces/vfx.ParticleArgs.html +67 -68
  211. package/docs/interfaces/vfx.ParticleTweenKeyframe.html +3 -1
  212. package/docs/interfaces/vue.FiveActionVueCallbacks.html +31 -42
  213. package/docs/modules/five.SubscribeMixinType.html +7 -1
  214. package/docs/modules/five.html +171 -643
  215. package/docs/modules/gltf_loader.html +11 -1
  216. package/docs/modules/line.html +8 -1
  217. package/docs/modules/plugins.BasePlugin.html +6 -0
  218. package/docs/modules/plugins.ItemMaskPluginType.html +9 -0
  219. package/docs/modules/plugins.html +5 -0
  220. package/docs/modules/react.FiveCanvas.html +8 -0
  221. package/docs/modules/react.html +37 -130
  222. package/docs/modules/sticker.html +3 -1
  223. package/docs/modules/vfx.html +8 -1
  224. package/docs/modules/vue.html +24 -115
  225. package/docs/types/five.AjaxResponseType.html +1 -0
  226. package/docs/types/five.AjaxResponseTypeMapping.html +1 -0
  227. package/docs/types/five.BoundingVolumeJson.html +1 -0
  228. package/docs/types/five.BoxBoundingVolumeJson.html +1 -0
  229. package/docs/types/five.ControllerCustomInitTypes.html +1 -0
  230. package/docs/types/five.ControllerEventTypes.html +32 -0
  231. package/docs/types/five.CoordinatesSystemTransformer.html +1 -0
  232. package/docs/types/five.EventTypes.html +26 -0
  233. package/docs/types/five.FivePlugin.html +71 -0
  234. package/docs/types/five.FivePluginInit.html +3 -0
  235. package/docs/types/five.FivePluginInstance.html +3 -0
  236. package/docs/types/five.GestureTypes.html +1 -0
  237. package/docs/types/five.LegacyEventType.html +203 -0
  238. package/docs/types/five.LooseWork.html +1 -0
  239. package/docs/types/five.LooseWorkInitial.html +1 -0
  240. package/docs/types/five.LooseWorkModel.html +1 -0
  241. package/docs/types/five.LooseWorkObserver.html +1 -0
  242. package/docs/types/five.LooseWorkPanorama.html +1 -0
  243. package/docs/types/five.LooseWorkVideo.html +1 -0
  244. package/docs/types/five.LooseWorkWithExtrinsics.html +2 -0
  245. package/docs/types/five.Mirror.html +1 -0
  246. package/docs/types/five.Mode.html +10 -0
  247. package/docs/types/five.ModelMaterialValues.html +1 -0
  248. package/docs/types/five.Models.html +13 -0
  249. package/docs/types/five.MotionValue.html +1 -0
  250. package/docs/types/five.MovePanoEffect.html +9 -0
  251. package/docs/types/five.NetWorkMeta.html +1 -0
  252. package/docs/types/five.NetworkError.html +1 -0
  253. package/docs/types/five.NetworkErrorCallback.html +1 -0
  254. package/docs/types/five.NetworkProgressCallback.html +1 -0
  255. package/docs/types/five.NetworkResponse.html +1 -0
  256. package/docs/types/five.NetworkState.html +1 -0
  257. package/docs/types/five.NetworkSuccessCallback.html +1 -0
  258. package/docs/types/five.NetworkType.html +1 -0
  259. package/docs/types/five.Pano.html +1 -0
  260. package/docs/types/five.PanoId.html +1 -0
  261. package/docs/types/five.ParseWorkOptions.html +6 -0
  262. package/docs/types/five.ParsedResultType.html +1 -0
  263. package/docs/types/five.PostProcessingType.html +1 -0
  264. package/docs/types/five.RegionBoundingVolumeJson.html +1 -0
  265. package/docs/types/five.RequestResult.html +1 -0
  266. package/docs/types/five.SphereBoundingVolumeJson.html +1 -0
  267. package/docs/types/five.SubscribeEventMap.html +1 -0
  268. package/docs/types/five.TileContentData.html +1 -0
  269. package/docs/types/five.TilesetFrameState.html +1 -0
  270. package/docs/types/five.WebXRControllerKey.html +1 -0
  271. package/docs/types/five.WebXRControllerType.html +1 -0
  272. package/docs/types/five.Works.html +1 -0
  273. package/docs/types/line.LineMaterialParameters.html +1 -0
  274. package/docs/types/plugins.BasePlugin.EventMap.html +6 -0
  275. package/docs/types/plugins.ItemMaskPluginType.PluginData.html +1 -0
  276. package/docs/types/plugins.ItemMaskPluginType.ServerData.html +1 -0
  277. package/docs/types/react.FiveInjectionActionFeature.html +1 -0
  278. package/docs/types/react.FiveInjectionDataFeature.html +1 -0
  279. package/docs/types/react.FiveInjectionFeature.html +1 -0
  280. package/docs/types/react.FiveProviderPropTypes.html +1 -0
  281. package/docs/types/react.FiveProviderType.html +1 -0
  282. package/docs/types/react.StoreActionMapHanlder.html +1 -0
  283. package/docs/types/react.StoreActionMapType.html +1 -0
  284. package/docs/types/react.StoreProviderType.html +1 -0
  285. package/docs/types/react.StoreValueMapType.html +1 -0
  286. package/docs/types/vfx.ParticleType.html +1 -0
  287. package/docs/types/vue.FiveModelIntersectRaycaster.html +1 -0
  288. package/docs/types/vue.FiveProviderComponent.html +1 -0
  289. package/docs/types/vue.Project2d.html +1 -0
  290. package/docs/variables/five.PROXY_CONTROLLER_EVENT_NAMES.html +1 -0
  291. package/docs/variables/five.defaultPbmParameters.html +1 -0
  292. package/docs/variables/react.INJECTION_PROPNAME.html +1 -0
  293. package/docs/variables/vue.FiveCanvas.html +8 -0
  294. package/docs/variables/vue.FiveProvider.html +8 -0
  295. package/five/index.d.ts +481 -351
  296. package/five/index.js +1879 -218
  297. package/five/index.mjs +23126 -0
  298. package/gltf-loader/index.js +204 -203
  299. package/gltf-loader/index.mjs +1708 -0
  300. package/line/index.js +396 -202
  301. package/line/index.mjs +776 -0
  302. package/package.json +48 -12
  303. package/plugins/index.d.ts +253 -0
  304. package/plugins/index.js +350 -0
  305. package/plugins/index.mjs +796 -0
  306. package/react/index.d.ts +35 -44
  307. package/react/index.js +198 -203
  308. package/react/index.mjs +1072 -0
  309. package/scripts/five-staticify.js +183 -2
  310. package/sticker/index.js +198 -203
  311. package/sticker/index.mjs +399 -0
  312. package/umd/five-gltf-loader.js +261 -1
  313. package/umd/five-line.js +454 -1
  314. package/umd/five-plugins.js +350 -0
  315. package/umd/five-react.js +255 -1
  316. package/umd/five-sticker.js +255 -1
  317. package/umd/five-vfx.js +539 -1
  318. package/umd/five-vue.js +255 -1
  319. package/umd/five.js +2023 -2
  320. package/vfx/index.js +481 -202
  321. package/vfx/index.mjs +1032 -0
  322. package/vue/index.d.ts +1 -1
  323. package/vue/index.js +198 -203
  324. package/vue/index.mjs +574 -0
  325. package/docs/assets/icons.css +0 -1043
  326. package/docs/assets/icons.png +0 -0
  327. package/docs/assets/icons@2x.png +0 -0
  328. package/docs/assets/widgets.png +0 -0
  329. package/docs/assets/widgets@2x.png +0 -0
  330. package/docs/classes/five.BVH.html +0 -10
  331. package/docs/classes/five.BVHIntersect.html +0 -1
  332. package/docs/classes/five.BVHNode.html +0 -7
  333. package/docs/classes/five.BVHVector3.html +0 -1
  334. package/docs/classes/five.Clipper.html +0 -1
  335. package/docs/classes/five.PBMMaterialReferenceCache.html +0 -1
  336. package/docs/enums/five.PBMPointColorType.html +0 -1
  337. package/docs/enums/five.PBMPointShapeType.html +0 -1
  338. package/docs/enums/five.PBMPointSizeType.html +0 -1
  339. package/docs/interfaces/five.DepthPanoramaControllerCustomInitArgs.html +0 -26
  340. package/docs/interfaces/five.ModelLodOptions.html +0 -1
  341. package/docs/interfaces/five.WorkOptions.html +0 -15
  342. package/docs/modules.html +0 -1
  343. package/exporters/staticify.js +0 -210
  344. package/scripts/five-plugin-init.js +0 -83
  345. package/scripts/five-quick-start-init.js +0 -80
  346. package/scripts/five-react-component-init.js +0 -83
  347. package/templates/plugin/README.md +0 -38
  348. package/templates/plugin/devtools/external-five.js +0 -5
  349. package/templates/plugin/devtools/external-three.js +0 -5
  350. package/templates/plugin/devtools/tsconfig.build.json +0 -18
  351. package/templates/plugin/devtools/webpack.bundle.js +0 -44
  352. package/templates/plugin/devtools/webpack.example.js +0 -39
  353. package/templates/plugin/docs/.gitkeep +0 -0
  354. package/templates/plugin/examples/data.json +0 -507
  355. package/templates/plugin/examples/index.html +0 -28
  356. package/templates/plugin/examples/index.ts +0 -12
  357. package/templates/plugin/lib/index.ts +0 -30
  358. package/templates/plugin/package.json +0 -32
  359. package/templates/plugin/tsconfig.json +0 -26
  360. package/templates/quick-start/README.md +0 -47
  361. package/templates/quick-start/assets/work.json +0 -507
  362. package/templates/quick-start/index.html +0 -54
  363. package/templates/quick-start/index.tsx +0 -123
  364. package/templates/quick-start/package.json +0 -25
  365. package/templates/quick-start/tsconfig.json +0 -27
  366. package/templates/quick-start/webpack.config.js +0 -45
  367. package/templates/quick-start/webpack.production.js +0 -42
  368. package/templates/react-component/README.md +0 -32
  369. package/templates/react-component/devtools/external-five.js +0 -5
  370. package/templates/react-component/devtools/external-react.js +0 -5
  371. package/templates/react-component/devtools/external-three.js +0 -5
  372. package/templates/react-component/devtools/tsconfig.build.json +0 -19
  373. package/templates/react-component/devtools/webpack.bundle.js +0 -44
  374. package/templates/react-component/devtools/webpack.example.js +0 -39
  375. package/templates/react-component/docs/.gitkeep +0 -0
  376. package/templates/react-component/examples/data.json +0 -507
  377. package/templates/react-component/examples/index.html +0 -17
  378. package/templates/react-component/examples/index.tsx +0 -62
  379. package/templates/react-component/lib/index.tsx +0 -157
  380. package/templates/react-component/package.json +0 -38
  381. package/templates/react-component/tsconfig.json +0 -27
  382. package/umd/five-gltf-loader.js.LICENSE.txt +0 -14
  383. package/umd/five-line.js.LICENSE.txt +0 -14
  384. package/umd/five-react.js.LICENSE.txt +0 -14
  385. package/umd/five-sticker.js.LICENSE.txt +0 -14
  386. package/umd/five.js.LICENSE.txt +0 -100
package/umd/five-line.js CHANGED
@@ -1 +1,454 @@
1
- !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,(()=>(()=>{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])},t(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),P=B>=-1&&B<=1,M=v.distanceTo(A)<.5*c;if(P&&M){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),Object.defineProperty(n,"version",{get:function(){return"6.0.0-alpha.9"},enumerable:!1,configurable:!0}),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})()));
1
+ /**
2
+ * @license
3
+ * @realsee/five
4
+ * Generated: 2024/4/24
5
+ * Version: 6.0.0-alpha.91
6
+ * Terms:
7
+ * Realsee SDK License Agreement
8
+ * Update: July 28, 2021
9
+ * THIS LICENSE AGREEMENT BETWEEN YOU AND 【BEIKE REALSEE TECHNOLOGY (HK)
10
+ * LIMITED】(“Realsee”) FORMS A LEGALLY BINDING CONTRACT BETWEEN YOU AND REALSEE IN
11
+ * RELATION TO YOUR USE OF THE SDK. This License Agreement accompanies the Realsee
12
+ * Software Development Kit(s) for the software and related explanatory materials
13
+ * (the "SDK") and includes any upgrades, modified versions, updates, additions,
14
+ * and copies of the SDK licensed to You by Realsee.
15
+ * BY DOWNLOADING, INSTALLING, OR OTHERWISE ACCESSING OR USING THE SDK, YOU AGREE
16
+ * THAT YOU HAVE READ, UNDERSTOOD, AND AGREE TO BE BOUND BY THIS AGREEMENT. YOU ARE
17
+ * AGREEING ON YOUR OWN BEHALF AND/OR ON BEHALF OF YOUR COMPANY OR ORGANIZATION TO
18
+ * THE TERMS AND CONDITIONS STATED BELOW.
19
+ * This Agreement applies to Your use of the SDK in the country in which You
20
+ * legally install it (“Territory”) and is subject to the laws of such Territory
21
+ * and further subject to Section 12 below. Different terms, conditions, and
22
+ * limitations may apply to the use of the SDK in any additional countries.
23
+ * 1. DEFINITIONS.
24
+ * “Agreement” means this Realsee SDK License Agreement.
25
+ * “Developer”, “You” and “Your” means the person(s) or entity acquiring or using
26
+ * the SDK or otherwise exercising rights under the terms of this Agreement.
27
+ * “Documentation” means the technical or other specifications or documentation
28
+ * that Realsee may provide to You for use in connection with the SDK.
29
+ * “Integrated Product” means any software, website, or on-line service developed
30
+ * by You based on or using the SDK (collectively, the “Integrated Product”).
31
+ * “Intellectual Property” means any patents, patent rights, trademarks, service
32
+ * marks, registered and unregistered designs, applications for any of the
33
+ * foregoing, copyright, and any other similar protected rights in any country and
34
+ * to the extent recognised by any relevant jurisdiction as intellectual property,
35
+ * trade secrets, know-how and confidential information. Realsee reserves all
36
+ * rights not expressly granted to You.
37
+ * “Realsee” means [Beike Realsee Technology (HK) Limited, a company incorporated
38
+ * and validly existing under the laws of Hong Kong].
39
+ * “SDK” means the Realsee-proprietary Software Development Kits (SDK) provided
40
+ * hereunder, includes all development tools (including any compiler and debugger),
41
+ * application programming interfaces (“APIs”), libraries, binary utilities, header
42
+ * files, Documentation, content, data, code samples, and other materials provided
43
+ * to You in connection with this Agreement, whether delivered through a download,
44
+ * or any other media or form, and is licensed, not sold, to You by Realsee for use
45
+ * only under the terms of this Agreement. The terms of this Agreement will govern
46
+ * any updates provided by Realsee that replace and/or supplement the original SDK
47
+ * delivered to You, unless such update is accompanied by a separate license, in
48
+ * which case the terms of such license will govern.
49
+ * 2. LICENSED USES AND RESTRICTIONS.
50
+ * 2.1 Subject to the restrictions contained in this Section 2, Realsee grants to
51
+ * You during the term, a limited, non-exclusive, revocable, non-sublicensable,
52
+ * non-transferable license to install and use the SDK within the Territory only
53
+ * for the purpose of internal development.
54
+ * 2.2 Restrictions. You acknowledge and agree that, You shall not, and shall
55
+ * ensure that Your affiliates, employees, agents, representatives, officers,
56
+ * representatives, and subcontractors do not (directly or indirectly):
57
+ * 2.2.1 decompile, reverse engineer, disassemble or attempt to derive the source
58
+ * code of, those components of the SDK provided in object code form, or any part
59
+ * thereof;
60
+ * 2.2.2 remove, alter, or obscure any copyright notice or other proprietary rights
61
+ * notice on any part of the SDK;
62
+ * 2.2.3 sell, assign, pledge, rent, lease, lend, upload to or host on any website
63
+ * or server for use by any third party except You, redistribute, or sublicense the
64
+ * SDK (or any part thereof), or operate the SDK (or any part thereof) in the
65
+ * capacity of a service bureau or other hosted services provider, in whole or in
66
+ * part, nor may You enable others to do so;
67
+ * 2.2.4 or alter, modify, customize or improve the SDK, or any part thereof;
68
+ * 2.2.5 use the SDK (or any part thereof) for any illegal purpose, in any manner
69
+ * that is inconsistent with the terms of this Agreement, or to engage in any
70
+ * illegal activity;
71
+ * 2.2.6 use the SDK (or any part thereof) in any manner that may damage the
72
+ * operation of Realsee’s products or services; or
73
+ * 2.2.7 use the SDK or any information contained therein or otherwise provided by
74
+ * Realsee for the purpose of developing, or having developed, any product
75
+ * competitive with any Realsee product or service, as determined by Realsee in its
76
+ * sole discretion;
77
+ * 2.2.8 include any portion of the SDK in Your Developer products.
78
+ * 2.3 Realsee has the right to impose reasonable conditions such as a reasonable
79
+ * fee for use of the SDK in Integrated Product in the future.
80
+ * 2.4 You may make a limited number of copies of the SDK to be used by Your
81
+ * employees or consultants as provided herein, and not for general business
82
+ * purposes, and such employees or consultants shall be subject to the obligations
83
+ * and restrictions in this Agreement.
84
+ * 2.5 All licenses not expressly granted in this Agreement are reserved and no
85
+ * other licenses, immunity, or rights, express or implied, are granted by Realsee,
86
+ * by implication, estoppel, or otherwise.
87
+ * 3. CONFIDENTIALITY.
88
+ * The SDK and all source code, Documentation, specifications, engineering details,
89
+ * and related information pertaining to the SDK, whether in oral, written,
90
+ * graphic, or electronic form, are and shall remain the confidential and
91
+ * proprietary information of Realsee or its licensors (collectively, the
92
+ * “Confidential Information”). You shall (i) disclose Confidential Information to
93
+ * only those directors and employees (collectively, “Affiliates”) whose duties
94
+ * justify their need to know such information and who have been clearly informed
95
+ * of their obligation to maintain the confidential, proprietary, and/or trade
96
+ * secret status of such Confidential Information; and (ii) use Confidential
97
+ * Information solely in accordance with the license granted hereunder. In any
98
+ * event, You and Your Affiliates shall treat Confidential Information as strictly
99
+ * confidential and shall use the same care to prevent disclosure of such
100
+ * information as You use with respect to Your own similar confidential and/or
101
+ * proprietary information, which shall not be less than the care a reasonable
102
+ * person would use under similar circumstances. All Confidential Information, and
103
+ * any copies thereof, shall be returned promptly to Realsee upon request. You
104
+ * shall ensure that Your Affiliates comply with the provisions of this Section 3,
105
+ * and You shall be liable for any breach of this Section 3 resulting from the act
106
+ * or omission of any of Your Affiliates. You shall not disclose Confidential
107
+ * Information to any third party, including, without limitation, any of Your
108
+ * subcontractors.
109
+ * 4. PROPRIETARY RIGHTS.
110
+ * 4.1 As between You and Realsee, Realsee and/or its licensors retain ownership of
111
+ * all right, title, and interest in, to, and under the SDK, including, without
112
+ * limitation, all patents, copyrights, trade secrets, trademarks and other
113
+ * intellectual property and other proprietary rights therein, and reserve all
114
+ * rights not expressly granted to You.
115
+ * 4.2 The items contained in the SDK are the intellectual property of Realsee and
116
+ * its licensors and are protected by PRC copyright and patent law, international
117
+ * treaty provisions and applicable laws of the country in which it is being used.
118
+ * You agree to protect all copyright and other ownership interests of Realsee
119
+ * and/or its licensors in all items in the SDK supplied under this License
120
+ * Agreement. You agree that all copies of the items in the SDK, reproduced for any
121
+ * reason by You, contain the same copyright notices, and other proprietary notices
122
+ * as appropriate, as appear on or in the original items delivered by Realsee in
123
+ * the SDK. Realsee and/or its licensors retain title and ownership of the items in
124
+ * the SDK, the media on which it is loaded, and all subsequent copies, regardless
125
+ * of the form or media in or on which the original and other copies may exist.
126
+ * Except as stated above, this Agreement does not grant You any rights to patents,
127
+ * copyrights, trade secrets, trademarks or any other rights in respect to the
128
+ * items in the SDK.
129
+ * 5. TERM AND TERMINATION.
130
+ * 5.1 This Agreement is effective until terminated. Realsee has the right to
131
+ * terminate this Agreement immediately, without judicial intervention, if You fail
132
+ * to comply with any term herein. Upon any such termination You must remove all
133
+ * full and partial copies of the items in the SDK from Your computer and
134
+ * discontinue the use of the items in the SDK.
135
+ * 5.2 Realsee may at any time, terminate the Agreement with You if: (A) You have
136
+ * breached any provision of the Agreement; or (B) Realsee is required to do so by
137
+ * law; or (C) Realsee decides to no longer provide the SDK or certain parts of the
138
+ * SDK to users in the country in which You are resident or from which You use the
139
+ * service, or the provision of the SDK or certain SDK services to You by Realsee
140
+ * is, in Realsee's sole discretion, no longer legally or commercially viable.
141
+ * 5.3 When the Agreement comes to an end, all of the legal rights, obligations and
142
+ * liabilities that You and Realsee have benefited from, been subject to (or which
143
+ * have accrued over time whilst the Agreement has been in force) or which are
144
+ * expressed to continue indefinitely, shall be unaffected by this cessation, and
145
+ * the provisions of Section 3, 4, 6, 7 and 8 shall continue to apply to such
146
+ * rights, obligations and liabilities indefinitely.
147
+ * 6. DISCLAIMER OF WARRANTY.
148
+ * YOU EXPRESSLY ACKNOWLEDGE AND AGREE THAT, TO THE EXTENT PERMITTED BY APPLICABLE
149
+ * LAW, USE OF THE SDK (OR ANY PART THEREOF) IS AT YOUR SOLE RISK AND THAT THE
150
+ * ENTIRE RISK AS TO SATISFACTORY QUALITY, PERFORMANCE, ACCURACY, AND EFFORT IS
151
+ * WITH YOU. REALSEE LICENSES THE SDK TO YOU ONLY ON AN "AS-IS" BASIS. REALSEE
152
+ * MAKES NO REPRESENTATION WITH RESPECT TO THE ADEQUACY OF ANY ITEMS IN THE SDK,
153
+ * WHETHER OR NOT USED BY YOU IN THE DEVELOPMENT OF INTEGRATED PRODUCT, FOR ANY
154
+ * PARTICULAR PURPOSE OR WITH RESPECT TO THEIR ADEQUACY TO PRODUCE ANY PARTICULAR
155
+ * RESULT. REALSEE AND ITS LICENSORS SHALL NOT BE LIABLE FOR LOSS OR DAMAGE ARISING
156
+ * OUT OF THIS AGREEMENT OR FROM THE DISTRIBUTION OR USE OF INTEGRATED PRODUCT
157
+ * CONTAINING PORTIONS OF THE SDK. REALSEE AND ITS LICENSORS DISCLAIM ALL
158
+ * WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED
159
+ * CONDITIONS OR WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
160
+ * OR NONINFRINGEMENT OF ANY THIRD PARTY RIGHT IN RESPECT OF THE ITEMS IN THE SDK
161
+ * OR ANY SERVICES RELATED TO THE SDK.
162
+ * REALSEE IS UNDER NO OBLIGATION TO PROVIDE ANY SUPPORT UNDER THIS LICENSE
163
+ * AGREEMENT, INCLUDING UPGRADES OR FUTURE VERSIONS OF THE SDK OR ANY PORTIONS
164
+ * THEREOF, TO YOU, END USER OR TO ANY OTHER PARTY.
165
+ * 7. LIMITATION OF LIABILITY.
166
+ * TO THE EXTENT NOT PROHIBITED BY APPLICABLE LAW, IN NO EVENT WILL REALSEE OR ITS
167
+ * LICENSORS BE LIABLE FOR ANY DIRECT, INCIDENTAL, SPECIAL, INDIRECT, OR
168
+ * CONSEQUENTIAL DAMAGES, INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF USE,
169
+ * LOSS OF BUSINESS, REVENUE, OR PROFITS, LOSS OF OPPORTUNITY (WHETHER DIRECT OR
170
+ * INDIRECT), CORRUPTION OR LOSS OF DATA, LOSS OF REPUTATION OR SAVINGS, DOWNTIME,
171
+ * OR DAMAGE TO, LOSS OF OR REPLACEMENT OF DATA OR TRANSACTIONS, COST OF
172
+ * PROCUREMENT OF SUBSTITUTE SERVICES, BUSINESS INTERRUPTION, OR ANY OTHER
173
+ * COMMERCIAL DAMAGES OR LOSSES, ARISING OUT OF OR RELATED TO YOUR USE OR INABILITY
174
+ * TO USE THE SDK (OR ANY PART THEREOF), ANY INTEGRATED PRODUCT, OR ANY THIRD PARTY
175
+ * SOFTWARE, APPLICATIONS, OR SERVICES IN CONJUNCTION WITH THE SDK (OR ANY PART
176
+ * THEREOF), HOWEVER CAUSED, REGARDLESS OF THE THEORY OF LIABILITY (CONTRACT, TORT,
177
+ * OR OTHERWISE) AND EVEN IF REALSEE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
178
+ * DAMAGES. IN NO EVENT WILL REALSEE’S TOTAL LIABILITY TO YOU FOR ALL DAMAGES
179
+ * EXCEED ONE HUNDRED DOLLARS ($100.00). THE FOREGOING LIMITATIONS WILL APPLY EVEN
180
+ * IF THE ABOVE STATED REMEDY FAILS OF ITS ESSENTIAL PURPOSE. THE LIMITATIONS
181
+ * CONTAINED IN SECTIONS 6 AND THIS SECTION 7 ARE A FUNDAMENTAL PART OF THE BASIS
182
+ * OF REALSEE’S BARGAIN HEREUNDER, AND REALSEE WOULD NOT ENTER INTO THIS AGREEMENT
183
+ * OR PROVIDE YOU WITH ACCESS TO THE SDK ABSENT SUCH LIMITATIONS.
184
+ * 8. INDEMNIFICATION.
185
+ * To the extent permitted by applicable law, You agree to indemnify, defend and
186
+ * hold harmless Realsee, its affiliates and each of their directors, officers,
187
+ * employees, independent contractors, and agents (each a “Realsee Indemnified
188
+ * Party”) from any and all claims, losses, liabilities, damages, expenses, and
189
+ * costs (including without limitation attorneys’ fees and court costs) incurred by
190
+ * a Realsee Indemnified Party as a result of: (i) Your non-compliance with any
191
+ * terms of this Agreement; (ii) Your use of the SDK (or any part thereof); or
192
+ * (iii) Your use of any Integrated Product, including any claim that Integrated
193
+ * Product infringes the copyright, trademark, trade secret or other intellectual
194
+ * property right of a third party.
195
+ * 9. ACKNOWLEDGEMENTS.
196
+ * Portions of the SDK may utilize or include third party software and other
197
+ * copyrighted material. Acknowledgments, licensing terms, and disclaimers for such
198
+ * material are contained in Documentation for the SDK or may otherwise accompany
199
+ * such material, and Your use of such materials governed by their respective
200
+ * terms. In the event of conflict between the terms of this Agreement and an
201
+ * applicable open source or third party agreement, the open source or third party
202
+ * agreement will control solely with respect to the open source software or third
203
+ * party software. Moreover, You shall not subject any items (including not limited
204
+ * to source code, object code, and any software) included in the SDK to any open
205
+ * source license.
206
+ * 10. NON-BLOCKING OF REALSEE DEVELOPMENT.
207
+ * You acknowledge that Realsee is currently developing or may develop technologies
208
+ * and products in the future that have or may have design and/or functionality
209
+ * similar to Integrated Product that You may develop based on Your license herein.
210
+ * Nothing in this Agreement shall impair, limit or curtail Realsee's right to
211
+ * continue with its development, maintenance and/or distribution of Realsee's
212
+ * technology or products.
213
+ * 11. GENERAL.
214
+ * 11.1 Export Control. You may not use or otherwise export or re-export the SDK
215
+ * (or any part thereof) except as authorized by United States law and the laws of
216
+ * the jurisdiction(s) in which the SDK (or any part thereof) was obtained. In
217
+ * particular, but without limitation, the SDK may not be exported or re-exported
218
+ * (i) into any U.S. embargoed countries or (ii) to anyone on the U.S. Treasury
219
+ * Department's list of Specially Designated Nationals or the U.S. Department of
220
+ * Commerce Denied Person's List or Entity List. By using the SDK (or any part
221
+ * thereof), You represent and warrant that You are not located in any such country
222
+ * or on any such list.
223
+ * 11.2 Governing Law. This Agreement and the rights of the parties hereunder shall
224
+ * be governed by and construed in accordance with the laws of People’s Republic of
225
+ * China (for purpose of this Agreement, excluding Hong Kong, Taiwan, and Macau),
226
+ * without reference to its conflict of laws principles. Any dispute, controversy
227
+ * or claim arising from or in connection with this Agreement, or the breach,
228
+ * termination or invalidity thereof, shall be submitted to China International
229
+ * Economic and Trade Arbitration Commission (“CIETAC”) for arbitration in Beijing
230
+ * which shall be conducted in accordance with the CIETAC's arbitration rules in
231
+ * effect at the time of applying for arbitration. The arbitral award is final and
232
+ * binding upon both parties.
233
+ * 11.3 Severability. If any provision of this Agreement is held by a court of
234
+ * competent jurisdiction to be unenforceable for any reason, the remaining
235
+ * provisions hereof will be unaffected and remain in full force and effect.
236
+ * 11.4. Modifications. Realsee reserves the right, from time to time, with or
237
+ * without notice to You, to make revisions to this Agreement in our sole and
238
+ * absolute discretion. The most current version of this Agreement will supersede
239
+ * all previous versions and shall be made available on the website where the SDK
240
+ * is made available, or by such other means as Realsee may determine in its
241
+ * discretion. Any modified versions of this Agreement hereto shall take effect
242
+ * from the time that it is made available. You shall be responsible for regularly
243
+ * checking for notice of any such modifications. You agree that Your continued use
244
+ * of the SDK constitutes Your agreement to the modified Agreement.
245
+ * 11.5 Relationship of the Parties. This Agreement will not be construed as
246
+ * creating an agency, partnership, joint venture, fiduciary duty, or any other
247
+ * form of legal association between You and Realsee, and You will not represent to
248
+ * the contrary, whether expressly, by implication, appearance, or otherwise.
249
+ * 11.6 Entire Agreement; Governing Language. This Agreement constitutes the entire
250
+ * agreement between You and Realsee with respect to the use of the SDK licensed
251
+ * hereunder and supersedes all prior understandings regarding such subject matter.
252
+ * No amendment to or modification of this Agreement will be binding unless in
253
+ * writing and signed by Realsee. You and Realsee hereto confirm that this
254
+ * Agreement and all related documents shall be drafted in English.
255
+ */(function(c,g){typeof exports=="object"&&typeof module!="undefined"?g(exports,require("three")):typeof define=="function"&&define.amd?define(["exports","three"],g):(c=typeof globalThis!="undefined"?globalThis:c||self,g(c.FiveSDK_Line={},c.THREE))})(this,function(c,g){"use strict";function G(a){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>a[t]})}}return r.default=a,Object.freeze(r)}const i=G(g);var w=function(a,r){return w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},w(a,r)};function y(a,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");w(a,r);function t(){this.constructor=a}a.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}typeof SuppressedError=="function"&&SuppressedError;var S=function(a){y(r,a);function r(){var t=a.call(this)||this;t.type="LineSegmentsGeometry";var n=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],e=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],o=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];return t.setIndex(o),t.setAttribute("position",new i.Float32BufferAttribute(n,3)),t.setAttribute("uv",new i.Float32BufferAttribute(e,2)),t}return r.prototype.applyMatrix4=function(t){var n=this.attributes.instanceStart,e=this.attributes.instanceEnd;return n!==void 0&&(n.applyMatrix4(t),e.applyMatrix4(t),n.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this},r.prototype.setPositions=function(t){var n;t instanceof Float32Array?n=t:Array.isArray(t)?n=new Float32Array(t):n=new Float32Array;var e=new i.InstancedInterleavedBuffer(n,6,1);return this.setAttribute("instanceStart",new i.InterleavedBufferAttribute(e,3,0)),this.setAttribute("instanceEnd",new i.InterleavedBufferAttribute(e,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this},r.prototype.setColors=function(t){var n;t instanceof Float32Array?n=t:Array.isArray(t)?n=new Float32Array(t):n=new Float32Array;var e=new i.InstancedInterleavedBuffer(n,6,1);return this.setAttribute("instanceColorStart",new i.InterleavedBufferAttribute(e,3,0)),this.setAttribute("instanceColorEnd",new i.InterleavedBufferAttribute(e,3,3)),this},r.prototype.fromWireframeGeometry=function(t){return this.setPositions(t.attributes.position.array),this},r.prototype.fromEdgesGeometry=function(t){return this.setPositions(t.attributes.position.array),this},r.prototype.fromMesh=function(t){return this.fromWireframeGeometry(new i.WireframeGeometry(t.geometry)),this},r.prototype.fromLineSegments=function(t){var n=t.geometry;if(n instanceof i.Geometry){var e=new i.BufferGeometry().fromGeometry(n);this.setPositions(e.attributes.position.array)}else n instanceof i.BufferGeometry&&this.setPositions(n.attributes.position.array);return this},r.prototype.computeBoundingBox=function(){this.boundingBox===null&&(this.boundingBox=new i.Box3);var t=this.attributes.instanceStart,n=this.attributes.instanceEnd;if(t!==void 0&&n!==void 0){var e=new i.Box3;this.boundingBox.setFromBufferAttribute(t),e.setFromBufferAttribute(n),this.boundingBox.union(e)}},r.prototype.computeBoundingSphere=function(){this.boundingSphere===null&&(this.boundingSphere=new i.Sphere),this.boundingBox===null&&this.computeBoundingBox();var t=this.attributes.instanceStart,n=this.attributes.instanceEnd;if(t!==void 0&&n!==void 0){var e=this.boundingSphere.center;this.boundingBox.getCenter(e);for(var o=0,s=new i.Vector3,f=0,v=t.count;f<v;f++)s.fromBufferAttribute(t,f),o=Math.max(o,e.distanceToSquared(s)),s.fromBufferAttribute(n,f),o=Math.max(o,e.distanceToSquared(s));this.boundingSphere.radius=Math.sqrt(o),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}},r.prototype.toJSON=function(){},r}(i.InstancedBufferGeometry);Object.assign(S.prototype,{isLineSegmentsGeometry:!0});var x={uniforms:i.UniformsUtils.merge([i.UniformsLib.common,i.UniformsLib.fog,{linewidth:{value:1},resolution:{value:new i.Vector2(1,1)},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1},opacity:{value:1}}]),vertexShader:`
256
+ #include <common>
257
+ #include <color_pars_vertex>
258
+ #include <fog_pars_vertex>
259
+ #include <logdepthbuf_pars_vertex>
260
+ #include <clipping_planes_pars_vertex>
261
+
262
+ uniform float linewidth;
263
+ uniform vec2 resolution;
264
+
265
+ attribute vec3 instanceStart;
266
+ attribute vec3 instanceEnd;
267
+
268
+ attribute vec3 instanceColorStart;
269
+ attribute vec3 instanceColorEnd;
270
+
271
+ varying vec2 vUv;
272
+
273
+ #ifdef USE_DASH
274
+
275
+ uniform float dashScale;
276
+ attribute float instanceDistanceStart;
277
+ attribute float instanceDistanceEnd;
278
+ varying float vLineDistance;
279
+
280
+ #endif
281
+
282
+ void trimSegment( const in vec4 start, inout vec4 end ) {
283
+
284
+ // trim end segment so it terminates between the camera plane and the near plane
285
+
286
+ // conservative estimate of the near plane
287
+ float a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column
288
+ float b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column
289
+ float nearEstimate = - 0.5 * b / a;
290
+
291
+ float alpha = ( nearEstimate - start.z ) / ( end.z - start.z );
292
+
293
+ end.xyz = mix( start.xyz, end.xyz, alpha );
294
+
295
+ }
296
+
297
+ void main() {
298
+
299
+ #ifdef USE_COLOR
300
+
301
+ vColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;
302
+
303
+ #endif
304
+
305
+ #ifdef USE_DASH
306
+
307
+ vLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;
308
+
309
+ #endif
310
+
311
+ float aspect = resolution.x / resolution.y;
312
+
313
+ vUv = uv;
314
+
315
+ // camera space
316
+ vec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );
317
+ vec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );
318
+
319
+ // special case for perspective projection, and segments that terminate either in, or behind, the camera plane
320
+ // clearly the gpu firmware has a way of addressing this issue when projecting into ndc space
321
+ // but we need to perform ndc-space calculations in the shader, so we must address this issue directly
322
+ // perhaps there is a more elegant solution -- WestLangley
323
+
324
+ bool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column
325
+
326
+ if ( perspective ) {
327
+
328
+ if ( start.z < 0.0 && end.z >= 0.0 ) {
329
+
330
+ trimSegment( start, end );
331
+
332
+ } else if ( end.z < 0.0 && start.z >= 0.0 ) {
333
+
334
+ trimSegment( end, start );
335
+
336
+ }
337
+
338
+ }
339
+
340
+ // clip space
341
+ vec4 clipStart = projectionMatrix * start;
342
+ vec4 clipEnd = projectionMatrix * end;
343
+
344
+ // ndc space
345
+ vec2 ndcStart = clipStart.xy / clipStart.w;
346
+ vec2 ndcEnd = clipEnd.xy / clipEnd.w;
347
+
348
+ // direction
349
+ vec2 dir = ndcEnd - ndcStart;
350
+
351
+ // account for clip-space aspect ratio
352
+ dir.x *= aspect;
353
+ dir = normalize( dir );
354
+
355
+ // perpendicular to dir
356
+ vec2 offset = vec2( dir.y, - dir.x );
357
+
358
+ // undo aspect ratio adjustment
359
+ dir.x /= aspect;
360
+ offset.x /= aspect;
361
+
362
+ // sign flip
363
+ if ( position.x < 0.0 ) offset *= - 1.0;
364
+
365
+ // endcaps
366
+ if ( position.y < 0.0 ) {
367
+
368
+ offset += - dir;
369
+
370
+ } else if ( position.y > 1.0 ) {
371
+
372
+ offset += dir;
373
+
374
+ }
375
+
376
+ // adjust for linewidth
377
+ offset *= linewidth;
378
+
379
+ // adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ...
380
+ offset /= resolution.y;
381
+
382
+ // select end
383
+ vec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;
384
+
385
+ // back to clip space
386
+ offset *= clip.w;
387
+
388
+ clip.xy += offset;
389
+
390
+ gl_Position = clip;
391
+
392
+ vec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation
393
+
394
+ #include <logdepthbuf_vertex>
395
+ #include <clipping_planes_vertex>
396
+ #include <fog_vertex>
397
+
398
+ }
399
+ `,fragmentShader:`
400
+ uniform vec3 diffuse;
401
+ uniform float opacity;
402
+
403
+ #ifdef USE_DASH
404
+
405
+ uniform float dashSize;
406
+ uniform float gapSize;
407
+
408
+ #endif
409
+
410
+ varying float vLineDistance;
411
+
412
+ #include <common>
413
+ #include <color_pars_fragment>
414
+ #include <fog_pars_fragment>
415
+ #include <logdepthbuf_pars_fragment>
416
+ #include <clipping_planes_pars_fragment>
417
+
418
+ varying vec2 vUv;
419
+
420
+ void main() {
421
+
422
+ #include <clipping_planes_fragment>
423
+
424
+ #ifdef USE_DASH
425
+
426
+ if ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps
427
+
428
+ if ( mod( vLineDistance, dashSize + gapSize ) > dashSize ) discard; // todo - FIX
429
+
430
+ #endif
431
+
432
+ if ( abs( vUv.y ) > 1.0 ) {
433
+
434
+ float a = vUv.x;
435
+ float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;
436
+ float len2 = a * a + b * b;
437
+
438
+ if ( len2 > 1.0 ) discard;
439
+
440
+ }
441
+
442
+ vec4 diffuseColor = vec4( diffuse, opacity );
443
+
444
+ #include <logdepthbuf_fragment>
445
+ #include <color_fragment>
446
+
447
+ gl_FragColor = vec4( diffuseColor.rgb, diffuseColor.a );
448
+
449
+ #include <tonemapping_fragment>
450
+ #include <fog_fragment>
451
+ #include <premultiplied_alpha_fragment>
452
+
453
+ }
454
+ `},b=function(a){y(r,a);function r(t){var n=a.call(this,{uniforms:i.UniformsUtils.clone(x.uniforms),vertexShader:x.vertexShader,fragmentShader:x.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(e){this.uniforms.diffuse.value=e}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(e){this.uniforms.linewidth.value=e}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(e){this.uniforms.dashSize.value=e}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(e){this.uniforms.gapSize.value=e}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(e){this.uniforms.opacity.value=e}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(e){this.uniforms.resolution.value.copy(e)}}}),n.setValues(t),n}return r}(i.ShaderMaterial);Object.assign(b.prototype,{isLineMaterial:!0});var E=function(a){y(r,a);function r(t,n){var e=a.call(this)||this;return e.type="LineSegments2",e.geometry=t!==void 0?t:new S,e.material=n!==void 0?n:new b({color:Math.random()*16777215}),e}return r.prototype.computeLineDistances=function(){for(var t=this.geometry,n=t.attributes.instanceStart,e=t.attributes.instanceEnd,o=new Float32Array(2*n.count),s=new i.Vector3,f=new i.Vector3,v=0,u=0,M=n.count;v<M;v++,u+=2)s.fromBufferAttribute(n,v),f.fromBufferAttribute(e,v),o[u]=u===0?0:o[u-1],o[u+1]=o[u]+s.distanceTo(f);var A=new i.InstancedInterleavedBuffer(o,2,1);return t.setAttribute("instanceDistanceStart",new i.InterleavedBufferAttribute(A,1,0)),t.setAttribute("instanceDistanceEnd",new i.InterleavedBufferAttribute(A,1,1)),this},r.prototype.raycast=function(t,n){t.camera===null&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2.');var e=t.ray,o=t.camera,s=o.projectionMatrix,f=this.geometry,v=this.material,u=v.resolution,M=v.linewidth,A=f.attributes.instanceStart,F=f.attributes.instanceEnd,l=new i.Vector4,d=new i.Vector4,m=new i.Vector4,C=new i.Vector3,P=new i.Matrix4,p=new i.Line3,I=new i.Vector3;e.at(1,m),m.w=1,m.applyMatrix4(o.matrixWorldInverse),m.applyMatrix4(s),m.multiplyScalar(1/m.w),m.x*=u.x/2,m.y*=u.y/2,m.z=0,C.copy(m);var U=this.matrixWorld;P.multiplyMatrices(o.matrixWorldInverse,U);for(var h=0,k=A.count;h<k;h++){l.fromBufferAttribute(A,h),d.fromBufferAttribute(F,h),l.w=1,d.w=1,l.applyMatrix4(P),d.applyMatrix4(P),l.applyMatrix4(s),d.applyMatrix4(s),l.multiplyScalar(1/l.w),d.multiplyScalar(1/d.w);var Q=l.z<-1&&d.z<-1,Z=l.z>1&&d.z>1;if(!(Q||Z)){l.x*=u.x/2,l.y*=u.y/2,d.x*=u.x/2,d.y*=u.y/2,p.start.copy(l),p.start.z=0,p.end.copy(d),p.end.z=0;var _=p.closestPointToPointParameter(C,!0);p.at(_,I);var N=i.MathUtils.lerp(l.z,d.z,_),X=N>=-1&&N<=1,J=C.distanceTo(I)<M*.5;if(X&&J){p.start.fromBufferAttribute(A,h),p.end.fromBufferAttribute(F,h),p.start.applyMatrix4(U),p.end.applyMatrix4(U);var j=new i.Vector3,z=new i.Vector3;e.distanceSqToSegment(p.start,p.end,z,j),n.push({point:z,pointOnLine:j,distance:e.origin.distanceTo(z),object:this,faceIndex:h})}}}},r}(i.Mesh);Object.assign(E.prototype,{isLineSegments2:!0});var B=function(a){y(r,a);function r(t,n){var e=a.call(this,t,n)||this;return e.type="Line2",e}return r}(E);Object.assign(B.prototype,{isLine2:!0});var L=function(a){y(r,a);function r(){var t=a.call(this)||this;return t.type="LineGeometry",t}return r.prototype.setPositions=function(t){for(var n=t.length-3,e=new Float32Array(2*n),o=0;o<n;o+=3)e[2*o]=t[o],e[2*o+1]=t[o+1],e[2*o+2]=t[o+2],e[2*o+3]=t[o+3],e[2*o+4]=t[o+4],e[2*o+5]=t[o+5];return a.prototype.setPositions.call(this,e),this},r.prototype.setColors=function(t){for(var n=t.length-3,e=new Float32Array(2*n),o=0;o<n;o+=3)e[2*o]=t[o],e[2*o+1]=t[o+1],e[2*o+2]=t[o+2],e[2*o+3]=t[o+3],e[2*o+4]=t[o+4],e[2*o+5]=t[o+5];return a.prototype.setColors.call(this,e),this},r.prototype.fromLine=function(t){var n=t.geometry;if(n instanceof i.Geometry){var e=new i.BufferGeometry().fromGeometry(n);this.setPositions(e.attributes.position.array)}else n instanceof i.BufferGeometry&&this.setPositions(n.attributes.position.array);return this},r.prototype.copy=function(){return this},r}(S);Object.assign(L.prototype,{isLineGeometry:!0});var W="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==",D=14467195,T=8,H=2,R=20,O=null,V=function(a){y(r,a);function r(t,n){t===void 0&&(t=new i.Vector3),n===void 0&&(n=new i.Vector3);var e=a.call(this)||this;e.type="FiveLine",e.needsRender=!0;var o=new L,s=new b({color:D,linewidth:H,dashScale:R,dashed:!1});e.line=new B(o,s);var f=new i.BufferGeometry,v=new i.PointsMaterial({color:D,size:T,map:O||(O=new i.TextureLoader().load(W)),sizeAttenuation:!1,transparent:!0});return e.points=new i.Points(f,v),e.points.renderOrder=11,e.points.frustumCulled=!1,e.setPoints(t,n),e.add(e.line,e.points),e}return Object.defineProperty(r,"version",{get:function(){return"6.0.0-alpha.91"},enumerable:!1,configurable:!0}),r.prototype.setPoints=function(t,n){var e=[].concat(t.toArray(),n.toArray());this.points.geometry.setAttribute("position",new i.BufferAttribute(new Float32Array(e),3)),this.line.geometry.setPositions(e),this.line.computeLineDistances(),this.needsRender=!0},r.prototype.getPoints=function(){var t=this.points.geometry.attributes.position.array;return[new i.Vector3(t[0],t[1],t[2]),new i.Vector3(t[3],t[4],t[5])]},r.prototype.setMaterial=function(t){var n=this.line.material;for(var e in t)if(t.hasOwnProperty(e)){var o=t[e];e==="dashed"?(n.dashed=o,o?n.defines.USE_DASH="":delete n.defines.USE_DASH,n.needsUpdate=!0):n[e]=t[e]}this.needsRender=!0},r.prototype.setResolution=function(t,n){var e=this.line.material.resolution;(e.x!==t||e.y!==n)&&(e.set(t,n),this.needsRender=!0)},r}(i.Object3D);Object.assign(V.prototype,{isFiveLine:!0}),c.Line=V,c.LineGeometry=L,c.LineMaterial=b,c.LineSegmentsGeometry=S,c.THREE_Line2=B,c.THREE_LineSegments2=E,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});