@realsee/five 6.8.0-alpha.2 → 6.8.0-alpha.21

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 (715) hide show
  1. package/AGENTS_READ_ME.md +4 -0
  2. package/AI_CONTEXT.md +4 -0
  3. package/README.md +9 -6
  4. package/{guides → ai_guides}/README.md +12 -2
  5. package/ai_guides/ai-doc-guidelines.md +102 -0
  6. package/{guides → ai_guides}/api.md +24 -1
  7. package/ai_guides/features/3dtile.md +172 -0
  8. package/{guides → ai_guides}/features/camera-animation.md +24 -3
  9. package/{guides → ai_guides}/features/clipper.md +2 -0
  10. package/{guides/features/coordnate-system.md → ai_guides/features/coordinate-system.md} +2 -0
  11. package/{guides → ai_guides}/features/event.md +2 -0
  12. package/{guides → ai_guides}/features/five.md +4 -0
  13. package/ai_guides/features/flowing-light-2d-pass.md +438 -0
  14. package/ai_guides/features/flowing-light-3d-pass.md +420 -0
  15. package/ai_guides/features/gaussian-blur-pass.md +202 -0
  16. package/{guides → ai_guides}/features/gesture.md +3 -0
  17. package/{guides → ai_guides}/features/get-screen-pixels.md +2 -0
  18. package/{guides → ai_guides}/features/image-options.md +3 -0
  19. package/{guides → ai_guides}/features/load-external-model.md +21 -0
  20. package/ai_guides/features/load-progress.md +140 -0
  21. package/ai_guides/features/material.md +153 -0
  22. package/{guides → ai_guides}/features/mode.md +4 -0
  23. package/{guides → ai_guides}/features/model.md +4 -1
  24. package/{guides → ai_guides}/features/move-pano-effect.md +2 -0
  25. package/{guides → ai_guides}/features/multi-work.md +2 -0
  26. package/ai_guides/features/pano-filter.md +148 -0
  27. package/{guides → ai_guides}/features/pano-tile.md +7 -14
  28. package/ai_guides/features/pano-uv.md +131 -0
  29. package/ai_guides/features/parameter.md +153 -0
  30. package/ai_guides/features/plugin.md +210 -0
  31. package/{guides → ai_guides}/features/postprocessing.md +39 -4
  32. package/{guides → ai_guides}/features/raycast.md +11 -0
  33. package/{guides → ai_guides}/features/request-proxy.md +2 -0
  34. package/{guides → ai_guides}/features/screen-project.md +2 -0
  35. package/{guides → ai_guides}/features/state.md +2 -0
  36. package/ai_guides/features/view-layer.md +187 -0
  37. package/{guides → ai_guides}/features/work.md +63 -2
  38. package/{guides → ai_guides}/glossary.md +26 -5
  39. package/{guides → ai_guides}/intro.md +1 -1
  40. package/{guides → ai_guides}/quick-start.md +1 -0
  41. package/ai_guides/release_notes/6.8.md +208 -0
  42. package/{guides → ai_guides}/template.md +17 -3
  43. package/docs/00_FOR_AI_AGENTS.md +11 -0
  44. package/docs/README.md +4 -7
  45. package/docs/assets/hierarchy.js +1 -1
  46. package/docs/assets/navigation.js +1 -1
  47. package/docs/assets/search.js +1 -1
  48. package/docs/classes/five.AdaptiveLuminancePass.html +7 -6
  49. package/docs/classes/five.BoundingMesh.html +2 -2
  50. package/docs/classes/five.Camera.html +1 -1
  51. package/docs/classes/five.EyeDomeLightingPass.html +1 -1
  52. package/docs/classes/five.Five.html +73 -72
  53. package/docs/classes/five.FivePass.html +1 -1
  54. package/docs/classes/five.Histogram.html +19 -0
  55. package/docs/classes/five.InternalWebGLRenderer.html +1 -1
  56. package/docs/classes/five.Model.html +31 -31
  57. package/docs/classes/five.ModelScene.html +1 -1
  58. package/docs/classes/five.NetworkSubscribe.html +1 -1
  59. package/docs/classes/five.PBMContainer.html +1 -1
  60. package/docs/classes/five.PBMCustomShader.html +42 -3
  61. package/docs/classes/five.PBMGSObject.html +5 -3
  62. package/docs/classes/five.PBMGroup.html +1 -1
  63. package/docs/classes/five.PBMMesh.html +1 -1
  64. package/docs/classes/five.PBMMeshMaterial.html +16 -7
  65. package/docs/classes/five.PBMPanoFilter.html +61 -0
  66. package/docs/classes/five.PBMPointCloud.html +1 -1
  67. package/docs/classes/five.PBMPointCloudMaterial.html +5 -6
  68. package/docs/classes/five.PBMSkinnedMesh.html +1 -1
  69. package/docs/classes/five.PBMUpdateable.html +41 -0
  70. package/docs/classes/five.PanoCircleMesh.html +1 -1
  71. package/docs/classes/five.PanoCircleMeshCustom.html +1 -1
  72. package/docs/classes/five.PanoCircleMeshSolid.html +1 -1
  73. package/docs/classes/five.Parameter.html +57 -53
  74. package/docs/classes/five.Scene.html +1 -1
  75. package/docs/classes/five.Subscribe.html +1 -1
  76. package/docs/classes/five.Tile.html +1 -1
  77. package/docs/classes/five.Tile3D.html +30 -26
  78. package/docs/classes/five.TileNode.html +1 -1
  79. package/docs/classes/five.Trajectory.html +1 -1
  80. package/docs/classes/five.TrajectoryNode.html +1 -1
  81. package/docs/classes/five.Work.html +16 -16
  82. package/docs/classes/five.WorkResolvedObserver.html +27 -2
  83. package/docs/classes/gltf-loader.DDSLoader.html +1 -1
  84. package/docs/classes/gltf-loader.DRACOLoader.html +1 -1
  85. package/docs/classes/gltf-loader.GLTFLoader.html +1 -1
  86. package/docs/classes/gltf-loader.GLTFObject.html +1 -1
  87. package/docs/classes/gltf-loader.GLTFParser.html +1 -1
  88. package/docs/classes/gltf-loader.THREEGLTFLoader.html +1 -1
  89. package/docs/classes/line.Line.html +1 -1
  90. package/docs/classes/line.LineGeometry.html +1 -1
  91. package/docs/classes/line.LineMaterial.html +1 -1
  92. package/docs/classes/line.LineSegmentsGeometry.html +1 -1
  93. package/docs/classes/line.THREE_Line2.html +1 -1
  94. package/docs/classes/line.THREE_LineSegments2.html +1 -1
  95. package/docs/classes/plugins.BasePlugin.Controller.html +1 -1
  96. package/docs/classes/plugins.RoundedBoxGeometry.html +1 -1
  97. package/docs/classes/sticker.Sticker.html +1 -1
  98. package/docs/classes/vfx.Airflow.html +1 -1
  99. package/docs/classes/vfx.Flame.html +1 -1
  100. package/docs/classes/vfx.Particle.html +1 -1
  101. package/docs/classes/vfx.ParticleGPU.html +1 -1
  102. package/docs/classes/vfx.SpotLight.html +1 -1
  103. package/docs/documents/README.html +11 -2
  104. package/docs/documents/ai-doc-guidelines.html +60 -15
  105. package/docs/documents/api.html +40 -15
  106. package/docs/documents/features_3dtile.html +142 -45
  107. package/docs/documents/features_camera-animation.html +62 -5
  108. package/docs/documents/features_clipper.html +3 -0
  109. package/docs/documents/{features_coordnate-system.html → features_coordinate-system.html} +4 -1
  110. package/docs/documents/features_event.html +3 -0
  111. package/docs/documents/features_five.html +4 -0
  112. package/docs/documents/features_flowing-light-2d-pass.html +356 -0
  113. package/docs/documents/features_flowing-light-3d-pass.html +351 -0
  114. package/docs/documents/features_gaussian-blur-pass.html +182 -0
  115. package/docs/documents/features_gesture.html +4 -0
  116. package/docs/documents/features_get-screen-pixels.html +3 -0
  117. package/docs/documents/features_image-options.html +3 -0
  118. package/docs/documents/features_load-external-model.html +25 -2
  119. package/docs/documents/features_load-progress.html +110 -0
  120. package/docs/documents/features_material.html +341 -0
  121. package/docs/documents/features_mode.html +5 -0
  122. package/docs/documents/features_model.html +5 -1
  123. package/docs/documents/features_move-pano-effect.html +3 -0
  124. package/docs/documents/features_multi-work.html +3 -0
  125. package/docs/documents/features_pano-filter.html +122 -0
  126. package/docs/documents/features_pano-tile.html +34 -19
  127. package/docs/documents/features_pano-uv.html +82 -0
  128. package/docs/documents/features_parameter.html +76 -56
  129. package/docs/documents/features_plugin.html +105 -0
  130. package/docs/documents/features_postprocessing.html +22 -5
  131. package/docs/documents/features_raycast.html +4 -1
  132. package/docs/documents/features_request-proxy.html +3 -0
  133. package/docs/documents/features_screen-project.html +3 -0
  134. package/docs/documents/features_state.html +3 -0
  135. package/docs/documents/features_view-layer.html +158 -0
  136. package/docs/documents/features_work.html +63 -2
  137. package/docs/documents/glossary.html +31 -6
  138. package/docs/documents/intro.html +1 -1
  139. package/docs/documents/quick-start.html +1 -0
  140. package/docs/documents/release_notes_6.8.html +189 -0
  141. package/docs/documents/template.html +45 -4
  142. package/docs/functions/five.loadAt3d.html +1 -1
  143. package/docs/functions/five.loadB3dm.html +1 -1
  144. package/docs/functions/five.loadDome.html +1 -1
  145. package/docs/functions/five.loadDomez.html +1 -1
  146. package/docs/functions/five.loadFbx.html +1 -1
  147. package/docs/functions/five.loadGltf.html +1 -1
  148. package/docs/functions/five.loadPbm.html +1 -1
  149. package/docs/functions/five.loadPly.html +1 -1
  150. package/docs/functions/five.loadPnts.html +1 -1
  151. package/docs/functions/five.loadSplat.html +1 -1
  152. package/docs/functions/five.loadSpz.html +1 -1
  153. package/docs/functions/five.loadX3p.html +1 -1
  154. package/docs/functions/five.parseWork.html +1 -1
  155. package/docs/functions/vue.useFiveWorks.html +2 -2
  156. package/docs/hierarchy.html +1 -1
  157. package/docs/index.html +11 -2
  158. package/docs/interfaces/five.AddableObject.html +1 -1
  159. package/docs/interfaces/five.AjaxOptions.html +1 -1
  160. package/docs/interfaces/five.BaseEvent.html +2 -2
  161. package/docs/interfaces/five.EventCallback.html +53 -47
  162. package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +9 -9
  163. package/docs/interfaces/five.GestureEvent.html +2 -2
  164. package/docs/interfaces/five.ImageOptions.html +1 -1
  165. package/docs/interfaces/five.IntersectEvent.html +2 -2
  166. package/docs/interfaces/five.IntersectMesh.html +1 -1
  167. package/docs/interfaces/five.IntersectMeshInterface.html +1 -1
  168. package/docs/interfaces/five.Intersection.html +4 -3
  169. package/docs/interfaces/five.LooseWorkWithExtrinsics.html +6 -6
  170. package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +9 -9
  171. package/docs/interfaces/five.ModeChangeEvent.html +2 -2
  172. package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
  173. package/docs/interfaces/five.ModelEvent.html +2 -2
  174. package/docs/interfaces/five.ModelSceneEvent.html +2 -2
  175. package/docs/interfaces/five.ModelTileEvent.html +8 -0
  176. package/docs/interfaces/five.MovePanoOptions.html +7 -7
  177. package/docs/interfaces/five.NetworkAbortError.html +1 -1
  178. package/docs/interfaces/five.NetworkFirbiddenError.html +1 -1
  179. package/docs/interfaces/five.NetworkOptions.html +1 -1
  180. package/docs/interfaces/five.NetworkProxyError.html +1 -1
  181. package/docs/interfaces/five.NetworkResourceEvent.html +2 -2
  182. package/docs/interfaces/five.NetworkResponseError.html +1 -1
  183. package/docs/interfaces/five.NetworkTimeoutError.html +1 -1
  184. package/docs/interfaces/five.ObjectEvent.html +2 -2
  185. package/docs/interfaces/five.PBMClipperParameter.html +2 -2
  186. package/docs/interfaces/five.PBMCustomShaderInitArgs.html +2 -2
  187. package/docs/interfaces/five.PBMCustomShaderSlots.html +2 -2
  188. package/docs/interfaces/five.PBMMaterial.html +1 -1
  189. package/docs/interfaces/five.PBMMeshMaterialParameters.html +5 -3
  190. package/docs/interfaces/five.PBMPanoDepth.html +5 -5
  191. package/docs/interfaces/five.PBMPanoFilterValue.html +6 -0
  192. package/docs/interfaces/five.PBMPanoPicture.html +8 -6
  193. package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +2 -3
  194. package/docs/interfaces/five.PBMRefinedScreen.html +2 -2
  195. package/docs/interfaces/five.PanoCircleMeshInterface.html +1 -1
  196. package/docs/interfaces/five.PanoEvent.html +2 -2
  197. package/docs/interfaces/five.PanoTextureEvent.html +2 -2
  198. package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +1 -1
  199. package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +1 -1
  200. package/docs/interfaces/five.ParameterMaterialValue.html +42 -38
  201. package/docs/interfaces/five.ParameterTilesetValue.html +15 -15
  202. package/docs/interfaces/five.ParameterValue.html +56 -52
  203. package/docs/interfaces/five.Pose.html +1 -1
  204. package/docs/interfaces/five.RenderEvent.html +2 -2
  205. package/docs/interfaces/five.ResolvedParameterValue.html +56 -52
  206. package/docs/interfaces/five.RgbaData.html +7 -0
  207. package/docs/interfaces/five.SplatData.html +2 -2
  208. package/docs/interfaces/five.State.html +1 -1
  209. package/docs/interfaces/five.StateEvent.html +2 -2
  210. package/docs/interfaces/five.TextureOptions.html +1 -1
  211. package/docs/interfaces/five.Tile3DOptions.html +2 -2
  212. package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +7 -7
  213. package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +1 -1
  214. package/docs/interfaces/five.ViewLayer.html +30 -26
  215. package/docs/interfaces/five.WorkCubeImage.html +1 -1
  216. package/docs/interfaces/five.WorkImage.html +1 -1
  217. package/docs/interfaces/five.WorkModel.html +8 -8
  218. package/docs/interfaces/five.WorkModelLayer.html +6 -6
  219. package/docs/interfaces/five.WorkObserver.html +27 -2
  220. package/docs/interfaces/five.WorkTile.html +1 -1
  221. package/docs/interfaces/five.WorksEvent.html +2 -2
  222. package/docs/interfaces/five.XRControllerEvent.html +2 -2
  223. package/docs/interfaces/five.XRGestureEvent.html +2 -2
  224. package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +1 -1
  225. package/docs/interfaces/five.XRSessionEvent.html +2 -2
  226. package/docs/interfaces/plugins.BackgroundPluginController.html +1 -1
  227. package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +1 -1
  228. package/docs/interfaces/plugins.BasePlugin.State.html +1 -1
  229. package/docs/interfaces/plugins.DynamicPathLinePluginController.html +1 -1
  230. package/docs/interfaces/plugins.DynamicPathLinePluginType.EventMap.html +1 -1
  231. package/docs/interfaces/plugins.DynamicPathLinePluginType.State.html +1 -1
  232. package/docs/interfaces/plugins.ItemMaskController.html +1 -1
  233. package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +1 -1
  234. package/docs/interfaces/plugins.ItemMaskPluginType.State.html +1 -1
  235. package/docs/interfaces/plugins.OrientationPluginController.html +1 -1
  236. package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +1 -1
  237. package/docs/interfaces/plugins.OrientationPluginType.State.html +1 -1
  238. package/docs/interfaces/plugins.PanoAnimeController.html +1 -1
  239. package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +1 -1
  240. package/docs/interfaces/plugins.PanoAnimePluginType.State.html +1 -1
  241. package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +1 -1
  242. package/docs/interfaces/plugins.PluginTemplateType.State.html +1 -1
  243. package/docs/interfaces/plugins.TrajectoryController.html +1 -1
  244. package/docs/interfaces/react.FiveInjectionTypes.html +13 -13
  245. package/docs/modules/five.html +1 -1
  246. package/docs/modules.html +1 -1
  247. package/docs/types/five.ControllerEventTypes.html +27 -25
  248. package/docs/types/five.EasingFunction.html +1 -0
  249. package/docs/types/five.EventTypes.html +27 -25
  250. package/docs/types/five.FivePlugin.html +1 -1
  251. package/docs/types/five.FivePluginInit.html +1 -1
  252. package/docs/types/five.FivePluginInstance.html +1 -1
  253. package/docs/types/five.NetworkProgressCallback.html +1 -1
  254. package/docs/types/five.PBMAlphaMode.html +1 -1
  255. package/docs/types/five.PBMColorStyle.html +1 -1
  256. package/docs/types/five.PBMFloorStyle.html +1 -1
  257. package/docs/types/five.PBMMeshShaderType.html +1 -1
  258. package/docs/types/five.PBMPointBack.html +1 -1
  259. package/docs/types/five.PBMPointCloudShaderType.html +1 -1
  260. package/docs/types/five.PBMPointShape.html +1 -1
  261. package/docs/types/five.PBMPointSize.html +1 -1
  262. package/docs/types/five.PBMTransition.html +1 -1
  263. package/docs/types/five.ParseOptions.html +6 -6
  264. package/docs/types/plugins.BasePlugin.EventMap.html +1 -1
  265. package/docs/variables/five.PROXY_CONTROLLER_EVENT_NAMES.html +1 -1
  266. package/five/application/analysis.d.ts +40 -0
  267. package/five/application/controllers.d.ts +41 -0
  268. package/five/application/events-legacy.d.ts +454 -0
  269. package/five/application/events.d.ts +69 -0
  270. package/five/application/five.d.ts +519 -0
  271. package/five/application/fiveInitArgs.d.ts +176 -0
  272. package/five/application/fiveLoadOptions.d.ts +21 -0
  273. package/five/application/generateDefaultVideoElement.d.ts +2 -0
  274. package/five/application/getViewportScale.d.ts +2 -0
  275. package/five/application/initLights.d.ts +3 -0
  276. package/five/application/mode.d.ts +28 -0
  277. package/five/application/renderPoweredByRealsee.d.ts +3 -0
  278. package/five/assets/cardboard-png-data-url.d.ts +2 -0
  279. package/five/assets/gradient-png-data-url.d.ts +2 -0
  280. package/five/assets/loading-png-data-url.d.ts +2 -0
  281. package/five/assets/phone-png-data-url.d.ts +2 -0
  282. package/five/assets/realsee-png-data-url.d.ts +2 -0
  283. package/five/bvh/bvhMath.d.ts +33 -0
  284. package/five/bvh/bvhMesh.d.ts +7 -0
  285. package/five/bvh/bvhNode.d.ts +29 -0
  286. package/five/bvh/bvhObject.d.ts +18 -0
  287. package/five/bvh/bvhPoints.d.ts +6 -0
  288. package/five/bvh/index.d.ts +10 -0
  289. package/five/bvh/worker.d.ts +35 -0
  290. package/five/cardboard/helper.d.ts +2 -0
  291. package/five/cardboard/index.d.ts +13 -0
  292. package/five/cardboard/sensor.d.ts +158 -0
  293. package/five/certificates/hardware.d.ts +1 -0
  294. package/five/controllers/base.d.ts +167 -0
  295. package/five/controllers/events.d.ts +71 -0
  296. package/five/controllers/floorplan.d.ts +119 -0
  297. package/five/controllers/mapview.d.ts +139 -0
  298. package/five/controllers/model.d.ts +57 -0
  299. package/five/controllers/panorama.d.ts +143 -0
  300. package/five/controllers/panoramaLike.d.ts +87 -0
  301. package/five/controllers/topview.d.ts +42 -0
  302. package/five/controllers/vrPanorama.d.ts +56 -0
  303. package/five/controllers/xrPanorama.d.ts +81 -0
  304. package/five/core/camera.d.ts +65 -0
  305. package/five/core/internalWebGLRenderer.d.ts +14 -0
  306. package/five/core/panoVideo.d.ts +18 -0
  307. package/five/core/scene.d.ts +10 -0
  308. package/five/core/tiling.d.ts +43 -0
  309. package/five/declare.d.ts +2 -1
  310. package/five/gaussian-splatting/util/renderData.d.ts +52 -0
  311. package/five/gaussian-splatting/wasm/data.d.ts +20 -0
  312. package/five/gaussian-splatting/wasm/sort.d.ts +18 -0
  313. package/five/gaussian-splatting/worker/dataWorker.d.ts +1 -0
  314. package/five/gaussian-splatting/worker/sortWorker.d.ts +1 -0
  315. package/five/index.d.ts +60 -4637
  316. package/five/index.js +193 -341
  317. package/five/index.mjs +26455 -31011
  318. package/five/meshes/boundingMesh.d.ts +12 -0
  319. package/five/meshes/intersectMesh.d.ts +8 -0
  320. package/five/meshes/panoCircleMesh.d.ts +35 -0
  321. package/five/meshes/panoCircleMeshCustom.d.ts +40 -0
  322. package/five/meshes/panoCircleMeshSolid.d.ts +34 -0
  323. package/five/meshes/panoSphereMesh.d.ts +27 -0
  324. package/five/model/helpers/coordinate-transform.d.ts +3 -0
  325. package/five/model/helpers/ellipsoid-coordinates.d.ts +14 -0
  326. package/five/model/helpers/get-edges-by-sphere.d.ts +8 -0
  327. package/five/model/helpers/get-recommend-tile3d-parameters.d.ts +8 -0
  328. package/five/model/index.d.ts +70 -0
  329. package/five/model/intersection.d.ts +18 -0
  330. package/five/model/loaders/at3d.d.ts +12 -0
  331. package/five/model/loaders/b3dm.d.ts +9 -0
  332. package/five/model/loaders/dome.d.ts +22 -0
  333. package/five/model/loaders/domez.d.ts +11 -0
  334. package/five/model/loaders/fbx.d.ts +8 -0
  335. package/five/model/loaders/glTF-helpers/extensions/CESIUM_RTC.d.ts +9 -0
  336. package/five/model/loaders/glTF-helpers/extensions/EXT_meshopt_compression.d.ts +8 -0
  337. package/five/model/loaders/glTF-helpers/extensions/EXT_texture_webp.d.ts +11 -0
  338. package/five/model/loaders/glTF-helpers/extensions/KHR_animation_pointer.d.ts +6 -0
  339. package/five/model/loaders/glTF-helpers/extensions/KHR_binary_glTF.d.ts +25 -0
  340. package/five/model/loaders/glTF-helpers/extensions/KHR_draco_mesh_compression.d.ts +11 -0
  341. package/five/model/loaders/glTF-helpers/extensions/KHR_gaussian_splatting_compression_spz.d.ts +9 -0
  342. package/five/model/loaders/glTF-helpers/extensions/KHR_materials_clearcoat.d.ts +10 -0
  343. package/five/model/loaders/glTF-helpers/extensions/KHR_materials_emissive_strength.d.ts +10 -0
  344. package/five/model/loaders/glTF-helpers/extensions/KHR_materials_sheen.d.ts +10 -0
  345. package/five/model/loaders/glTF-helpers/extensions/KHR_materials_transmission.d.ts +10 -0
  346. package/five/model/loaders/glTF-helpers/extensions/KHR_materials_unlit.d.ts +10 -0
  347. package/five/model/loaders/glTF-helpers/extensions/KHR_mesh_quantization.d.ts +6 -0
  348. package/five/model/loaders/glTF-helpers/extensions/KHR_node_visibility.d.ts +10 -0
  349. package/five/model/loaders/glTF-helpers/extensions/KHR_texture_basisu.d.ts +9 -0
  350. package/five/model/loaders/glTF-helpers/extensions/KHR_texture_transform.d.ts +10 -0
  351. package/five/model/loaders/glTF-helpers/extensions/REALSEE_materials_lightmap.d.ts +7 -0
  352. package/five/model/loaders/glTF-helpers/extensions/base.d.ts +24 -0
  353. package/five/model/loaders/glTF-helpers/glTF.d.ts +713 -0
  354. package/five/model/loaders/glTF-helpers/index.d.ts +47 -0
  355. package/five/model/loaders/glTF-helpers/parser.d.ts +114 -0
  356. package/five/model/loaders/glTF-helpers/type.d.ts +14 -0
  357. package/five/model/loaders/gltf.d.ts +10 -0
  358. package/five/model/loaders/obj.d.ts +9 -0
  359. package/five/model/loaders/pbm.d.ts +26 -0
  360. package/five/model/loaders/ply.d.ts +24 -0
  361. package/five/model/loaders/pnts.d.ts +8 -0
  362. package/five/model/loaders/protobuf/dome.d.ts +540 -0
  363. package/five/model/loaders/protobuf/pbm.d.ts +203 -0
  364. package/five/model/loaders/shared.d.ts +16 -0
  365. package/five/model/loaders/splat.d.ts +8 -0
  366. package/five/model/loaders/spz.d.ts +14 -0
  367. package/five/model/loaders/tile3d-helpers/feature-table.d.ts +15 -0
  368. package/five/model/loaders/tile3d-helpers/gl-type.d.ts +20 -0
  369. package/five/model/loaders/tile3d-helpers/parse-gltf-array-buffer.d.ts +2 -0
  370. package/five/model/loaders/tile3d-helpers/parse-header.d.ts +2 -0
  371. package/five/model/loaders/tile3d-helpers/parse-point-cloud-attributes.d.ts +2 -0
  372. package/five/model/loaders/tile3d-helpers/parse-point-cloud-attributes.worker.d.ts +6 -0
  373. package/five/model/loaders/tile3d-helpers/parse-table.d.ts +3 -0
  374. package/five/model/loaders/tile3d-helpers/tile3d-type.d.ts +35 -0
  375. package/five/model/loaders/x3p.d.ts +22 -0
  376. package/five/model/materials/pbmMaterial.d.ts +137 -0
  377. package/five/model/materials/pbmMeshMaterial.d.ts +126 -0
  378. package/five/model/materials/pbmPointCloudMaterial.d.ts +70 -0
  379. package/five/model/model-scene.d.ts +172 -0
  380. package/five/model/model.d.ts +209 -0
  381. package/five/model/objects/pbmContainer.d.ts +28 -0
  382. package/five/model/objects/pbmGaussianSplattingObject.d.ts +43 -0
  383. package/five/model/objects/pbmGaussianSplattingRenderMesh.d.ts +55 -0
  384. package/five/model/objects/pbmGaussianSplattingTestMesh.d.ts +7 -0
  385. package/five/model/objects/pbmGroup.d.ts +8 -0
  386. package/five/model/objects/pbmMesh.d.ts +10 -0
  387. package/five/model/objects/pbmPointCloud.d.ts +7 -0
  388. package/five/model/parameter.d.ts +140 -0
  389. package/five/model/shaders/pbm_gaussian_splatting/fragment.d.ts +2 -0
  390. package/five/model/shaders/pbm_gaussian_splatting/vertex.d.ts +2 -0
  391. package/five/model/shaders/pbm_mesh_basic/fragment.d.ts +2 -0
  392. package/five/model/shaders/pbm_mesh_basic/vertex.d.ts +2 -0
  393. package/five/model/shaders/pbm_mesh_none/fragment.d.ts +2 -0
  394. package/five/model/shaders/pbm_mesh_none/vertex.d.ts +2 -0
  395. package/five/model/shaders/pbm_mesh_phong/fragment.d.ts +2 -0
  396. package/five/model/shaders/pbm_mesh_phong/vertex.d.ts +2 -0
  397. package/five/model/shaders/pbm_mesh_standard/fragment.d.ts +2 -0
  398. package/five/model/shaders/pbm_mesh_standard/vertex.d.ts +2 -0
  399. package/five/model/shaders/pbm_pointcloud/fragment.d.ts +2 -0
  400. package/five/model/shaders/pbm_pointcloud/vertex.d.ts +2 -0
  401. package/five/model/tile3d/header.d.ts +88 -0
  402. package/five/model/tile3d/index.d.ts +214 -0
  403. package/five/model/tile3d/tile-cache.d.ts +18 -0
  404. package/five/model/tile3d/tile-content.d.ts +10 -0
  405. package/five/model/tile3d/tile-node.d.ts +24 -0
  406. package/five/model/tile3d/tile-request-scheduler.d.ts +17 -0
  407. package/five/model/tile3d/tile.d.ts +79 -0
  408. package/five/model/tile3d/tileset-base-traverser.d.ts +59 -0
  409. package/five/model/tile3d/tileset-most-detail-traverser.d.ts +14 -0
  410. package/five/model/tile3d/tileset-normal-traverser.d.ts +15 -0
  411. package/five/model/tile3d/tileset-skip-traverser.d.ts +60 -0
  412. package/five/model/tile3d/tileset.d.ts +69 -0
  413. package/five/model/tile3d/trajectory-content.d.ts +9 -0
  414. package/five/model/tile3d/trajectory-node.d.ts +15 -0
  415. package/five/model/tile3d/trajectory.d.ts +30 -0
  416. package/five/model/tile3d/types.d.ts +33 -0
  417. package/five/model/view-layer.d.ts +20 -0
  418. package/five/renderer/five-renderer.d.ts +17 -0
  419. package/five/renderer/index.d.ts +3 -0
  420. package/five/renderer/postprocessing/composer.d.ts +37 -0
  421. package/five/renderer/postprocessing/index.d.ts +7 -0
  422. package/five/renderer/postprocessing/passes/adaptive-luminance-pass.d.ts +17 -0
  423. package/five/renderer/postprocessing/passes/eye-dome-lighting-pass.d.ts +14 -0
  424. package/five/renderer/postprocessing/passes/flowing-light-2d-pass.d.ts +36 -0
  425. package/five/renderer/postprocessing/passes/flowing-light-3d-pass.d.ts +36 -0
  426. package/five/renderer/postprocessing/passes/gaussian-blur-pass.d.ts +12 -0
  427. package/five/renderer/postprocessing/passes/pass.d.ts +38 -0
  428. package/five/renderer/scene-renderers/point-cloud-high-quality-scene-renderer.d.ts +11 -0
  429. package/five/renderer/scene-renderers/scene-renderer.d.ts +9 -0
  430. package/five/renderer/scene-renderers/ssaa-scene-renderer.d.ts +15 -0
  431. package/five/renderer/tools/full-screen-quad.d.ts +15 -0
  432. package/five/renderer/tools/render-cube-to-equirectangular.d.ts +7 -0
  433. package/five/renderer/tools/render-full-screen-depth.d.ts +2 -0
  434. package/five/renderer/tools/render-full-screen.d.ts +2 -0
  435. package/five/texture/histogram.d.ts +54 -0
  436. package/five/texture/imageBitmap.d.ts +13 -0
  437. package/five/texture/initTexture.d.ts +3 -0
  438. package/five/texture/loader.d.ts +39 -0
  439. package/five/texture/textureData.d.ts +11 -0
  440. package/five/thirdparty/fflate.d.ts +1407 -0
  441. package/five/thirdparty/hammer.d.ts +375 -0
  442. package/five/thirdparty/jsrsasign.d.ts +753 -0
  443. package/five/thirdparty/meshopt_decoder.d.ts +15 -0
  444. package/five/three-version-check.d.ts +1 -0
  445. package/five/types/addableObject.d.ts +12 -0
  446. package/five/types/cube.d.ts +1 -0
  447. package/five/types/gestureInput.d.ts +24 -0
  448. package/five/types/imageOptions.d.ts +20 -0
  449. package/five/types/intersectMeshInterface.d.ts +8 -0
  450. package/five/types/movePanoEffect.d.ts +13 -0
  451. package/five/types/movePanoOptions.d.ts +36 -0
  452. package/five/types/panoCircleMeshInterface.d.ts +34 -0
  453. package/five/types/plugin.d.ts +25 -0
  454. package/five/types/pose.d.ts +17 -0
  455. package/five/types/state.d.ts +20 -0
  456. package/five/types/viewport.d.ts +22 -0
  457. package/five/utils/ajax.d.ts +66 -0
  458. package/five/utils/animationFrameLoop.d.ts +45 -0
  459. package/five/utils/array.d.ts +31 -0
  460. package/five/utils/asyncTaskQueue.d.ts +8 -0
  461. package/five/utils/bufferGeometry.d.ts +33 -0
  462. package/five/utils/calculateProgress.d.ts +39 -0
  463. package/five/utils/calculateThreeMouse.d.ts +13 -0
  464. package/five/utils/canplayVideo.d.ts +2 -0
  465. package/five/utils/clamp.d.ts +2 -0
  466. package/five/utils/clock.d.ts +17 -0
  467. package/five/utils/createSymbol.d.ts +5 -0
  468. package/five/utils/decodeText.d.ts +2 -0
  469. package/five/utils/deepEqual.d.ts +2 -0
  470. package/five/utils/deepFreeze.d.ts +2 -0
  471. package/five/utils/defineProperty.d.ts +9 -0
  472. package/five/utils/detector.d.ts +14 -0
  473. package/five/utils/distance.d.ts +10 -0
  474. package/five/utils/draco.d.ts +26 -0
  475. package/five/utils/easing.d.ts +63 -0
  476. package/five/utils/event.d.ts +159 -0
  477. package/five/utils/formatRad.d.ts +7 -0
  478. package/five/utils/imageSupport.d.ts +6 -0
  479. package/five/utils/imageURL.d.ts +42 -0
  480. package/five/utils/isEmptyObject.d.ts +2 -0
  481. package/five/utils/isNil.d.ts +6 -0
  482. package/five/utils/isNumber.d.ts +2 -0
  483. package/five/utils/isPowerOfTwo.d.ts +2 -0
  484. package/five/utils/isPromise.d.ts +2 -0
  485. package/five/utils/isSimilar.d.ts +6 -0
  486. package/five/utils/json.d.ts +7 -0
  487. package/five/utils/ktx2.d.ts +30 -0
  488. package/five/utils/lzma/index.d.ts +2 -0
  489. package/five/utils/lzma/lzma.d.ts +3 -0
  490. package/five/utils/lzma/lzmaWASM.d.ts +2 -0
  491. package/five/utils/lzma/lzmaWorker.d.ts +14 -0
  492. package/five/utils/memoryUsage.d.ts +29 -0
  493. package/five/utils/motion.d.ts +38 -0
  494. package/five/utils/noop.d.ts +6 -0
  495. package/five/utils/now.d.ts +7 -0
  496. package/five/utils/pano.d.ts +9 -0
  497. package/five/utils/pick.d.ts +3 -0
  498. package/five/utils/poseUtils.d.ts +5 -0
  499. package/five/utils/renderCubeTextureToCubeRenderTarget.d.ts +3 -0
  500. package/five/utils/renderDepth.d.ts +2 -0
  501. package/five/utils/renderTexturesToCubeRenderTarget.d.ts +10 -0
  502. package/five/utils/requestPermission.d.ts +3 -0
  503. package/five/utils/shaderContentFix.d.ts +7 -0
  504. package/five/utils/shaderMaterial.d.ts +20 -0
  505. package/five/utils/stateUtils.d.ts +5 -0
  506. package/five/utils/string-pattern.d.ts +8 -0
  507. package/five/utils/subscribe.d.ts +67 -0
  508. package/five/utils/tileCube.d.ts +19 -0
  509. package/five/utils/toFastProperties.d.ts +1 -0
  510. package/five/utils/typedCache.d.ts +10 -0
  511. package/five/utils/uniform.d.ts +15 -0
  512. package/five/utils/url.d.ts +35 -0
  513. package/five/utils/uuid.d.ts +5 -0
  514. package/five/utils/values.d.ts +2 -0
  515. package/five/utils/vectorCoordinates.d.ts +29 -0
  516. package/five/utils/volume.d.ts +111 -0
  517. package/five/utils/webglError.d.ts +7 -0
  518. package/five/utils/worker.d.ts +26 -0
  519. package/five/webxr/XRControllerModelFactory.d.ts +28 -0
  520. package/five/webxr/motionHelper.d.ts +68 -0
  521. package/five/webxr/xrButton.d.ts +4 -0
  522. package/five/webxr/xrController.d.ts +24 -0
  523. package/five/webxr/xrManager.d.ts +84 -0
  524. package/five/work/_ALLOW_HOST.d.ts +2 -0
  525. package/five/work/index.d.ts +6 -0
  526. package/five/work/keychain.d.ts +5 -0
  527. package/five/work/looseWorkType.d.ts +121 -0
  528. package/five/work/verify.d.ts +7 -0
  529. package/five/work/work.d.ts +236 -0
  530. package/five/work/workFetcher.d.ts +4 -0
  531. package/five/work/workJson.d.ts +3 -0
  532. package/five/work/workJsonType.d.ts +73 -0
  533. package/five/work/workObserverUtils.d.ts +36 -0
  534. package/five/work/workParser.d.ts +6 -0
  535. package/five/work/workResolvedObserver.d.ts +12 -0
  536. package/five/work/workVerify.d.ts +2 -0
  537. package/five/work/works.d.ts +10 -0
  538. package/gltf-loader/gltf-object.d.ts +17 -0
  539. package/gltf-loader/index.d.ts +60 -160
  540. package/gltf-loader/index.js +9 -9
  541. package/gltf-loader/index.mjs +1351 -1451
  542. package/gltf-loader/thirdparty/DDSLoader.d.ts +23 -0
  543. package/gltf-loader/thirdparty/DRACOLoader.d.ts +18 -0
  544. package/gltf-loader/thirdparty/GLTFLoader.d.ts +59 -0
  545. package/line/circle_png.d.ts +1 -0
  546. package/line/index.d.ts +19 -69
  547. package/line/index.js +4 -4
  548. package/line/index.mjs +334 -513
  549. package/line/utils/Line2.d.ts +7 -0
  550. package/line/utils/LineGeometry.d.ts +10 -0
  551. package/line/utils/LineMaterial.d.ts +20 -0
  552. package/line/utils/LineSegments2.d.ts +11 -0
  553. package/line/utils/LineSegmentsGeometry.d.ts +15 -0
  554. package/llms.txt +43 -31
  555. package/package.json +11 -2
  556. package/plugins/BackgroundPlugin/Controller.d.ts +20 -0
  557. package/plugins/BackgroundPlugin/index.d.ts +5 -0
  558. package/plugins/BackgroundPlugin/typings.d.ts +44 -0
  559. package/plugins/BasePlugin/index.d.ts +119 -0
  560. package/plugins/DynamicPathLinePlugin/Controller.d.ts +167 -0
  561. package/plugins/DynamicPathLinePlugin/index.d.ts +5 -0
  562. package/plugins/DynamicPathLinePlugin/line2/Line2.d.ts +7 -0
  563. package/plugins/DynamicPathLinePlugin/line2/LineGeometry.d.ts +10 -0
  564. package/plugins/DynamicPathLinePlugin/line2/LineMaterial.d.ts +17 -0
  565. package/plugins/DynamicPathLinePlugin/line2/LineSegments2.d.ts +11 -0
  566. package/plugins/DynamicPathLinePlugin/line2/LineSegmentsGeometry.d.ts +15 -0
  567. package/plugins/DynamicPathLinePlugin/typing.d.ts +129 -0
  568. package/plugins/DynamicPathLinePlugin/typings.d.ts +72 -0
  569. package/plugins/ItemMaskPlugin/Controller.d.ts +48 -0
  570. package/plugins/ItemMaskPlugin/index.d.ts +5 -0
  571. package/plugins/ItemMaskPlugin/typing.d.ts +58 -0
  572. package/plugins/OrientationPlugin/Controller.d.ts +82 -0
  573. package/plugins/OrientationPlugin/RoundedBoxGeometry.d.ts +11 -0
  574. package/plugins/OrientationPlugin/index.d.ts +6 -0
  575. package/plugins/OrientationPlugin/typing.d.ts +25 -0
  576. package/plugins/PanoAnimePlugin/Controller.d.ts +46 -0
  577. package/plugins/PanoAnimePlugin/index.d.ts +5 -0
  578. package/plugins/PanoAnimePlugin/typing.d.ts +37 -0
  579. package/plugins/PluginTemplate/Controller.d.ts +27 -0
  580. package/plugins/PluginTemplate/index.d.ts +5 -0
  581. package/plugins/PluginTemplate/typing.d.ts +21 -0
  582. package/plugins/TrajectoryPlugin/Controller.d.ts +85 -0
  583. package/plugins/TrajectoryPlugin/index.d.ts +6 -0
  584. package/plugins/TrajectoryPlugin/typing.d.ts +25 -0
  585. package/plugins/index.d.ts +9 -1102
  586. package/plugins/index.js +17 -21
  587. package/plugins/index.mjs +3342 -4245
  588. package/plugins/thirdParty/CSS3DRenderer.d.ts +32 -0
  589. package/plugins/thirdParty/OrbitControls.d.ts +78 -0
  590. package/plugins/utils/absoluteUrl.d.ts +5 -0
  591. package/plugins/utils/clamp.d.ts +2 -0
  592. package/plugins/utils/loadImage.d.ts +1 -0
  593. package/plugins/utils/motion.d.ts +38 -0
  594. package/plugins/utils/now.d.ts +6 -0
  595. package/plugins/utils/uuid.d.ts +5 -0
  596. package/react/canvas.d.ts +19 -0
  597. package/react/context.d.ts +11 -0
  598. package/react/createProvider.d.ts +95 -0
  599. package/react/createStore.d.ts +144 -0
  600. package/react/hooks/unsafe__useFiveInstance.d.ts +9 -0
  601. package/react/hooks/useFiveAction.d.ts +147 -0
  602. package/react/hooks/useFiveCameraDirection.d.ts +7 -0
  603. package/react/hooks/useFiveCameraRaycaster.d.ts +7 -0
  604. package/react/hooks/useFiveCurrentObserver.d.ts +11 -0
  605. package/react/hooks/useFiveCurrentState.d.ts +15 -0
  606. package/react/hooks/useFiveEventCallback.d.ts +12 -0
  607. package/react/hooks/useFiveFloor.d.ts +15 -0
  608. package/react/hooks/useFiveHelper.d.ts +14 -0
  609. package/react/hooks/useFiveModelBounding.d.ts +5 -0
  610. package/react/hooks/useFiveModelEffect.d.ts +14 -0
  611. package/react/hooks/useFiveModelIntersectRaycaster.d.ts +22 -0
  612. package/react/hooks/useFiveModelReadyState.d.ts +8 -0
  613. package/react/hooks/useFiveProject2d.d.ts +20 -0
  614. package/react/hooks/useFiveSceneEffect.d.ts +21 -0
  615. package/react/hooks/useFiveState.d.ts +6 -0
  616. package/react/hooks/useFiveWork.d.ts +29 -0
  617. package/react/index.d.ts +24 -830
  618. package/react/index.js +3 -3
  619. package/react/index.mjs +572 -783
  620. package/react/rendererPool.d.ts +7 -0
  621. package/react/withFive.d.ts +213 -0
  622. package/shader-lib/EvenessPlane/index.d.ts +10 -0
  623. package/shader-lib/PointCloudExpand/index.d.ts +59 -0
  624. package/shader-lib/PolygonCuter/index.d.ts +52 -0
  625. package/shader-lib/PolygonCuter/worker.d.ts +14 -0
  626. package/shader-lib/ShineModel/index.d.ts +7 -0
  627. package/shader-lib/SweepModel/index.d.ts +7 -0
  628. package/shader-lib/index.d.ts +5 -86
  629. package/shader-lib/index.js +13 -14
  630. package/shader-lib/index.mjs +424 -824
  631. package/sticker/geometry.d.ts +3 -0
  632. package/sticker/index.d.ts +68 -71
  633. package/sticker/index.js +3 -3
  634. package/sticker/index.mjs +102 -142
  635. package/umd/five-gltf-loader.js +9 -9
  636. package/umd/five-line.js +4 -4
  637. package/umd/five-plugins.js +17 -21
  638. package/umd/five-react.js +3 -3
  639. package/umd/five-shader-lib.js +13 -14
  640. package/umd/five-sticker.js +3 -3
  641. package/umd/five-vfx.js +21 -21
  642. package/umd/five-vue.js +3 -3
  643. package/umd/five.js +188 -336
  644. package/vfx/airflow/airflow.d.ts +18 -0
  645. package/vfx/airflow/fragment-shader.d.ts +2 -0
  646. package/vfx/airflow/vertex-shader.d.ts +2 -0
  647. package/vfx/common/scale-shader.d.ts +2 -0
  648. package/vfx/common/simplex-noise-shader.d.ts +2 -0
  649. package/vfx/frame/fragment-shader.d.ts +2 -0
  650. package/vfx/frame/frame.d.ts +22 -0
  651. package/vfx/frame/vertex-shader.d.ts +2 -0
  652. package/vfx/index.d.ts +7 -363
  653. package/vfx/index.js +21 -21
  654. package/vfx/index.mjs +454 -910
  655. package/vfx/particle/fragment-shader.d.ts +2 -0
  656. package/vfx/particle/instance.d.ts +36 -0
  657. package/vfx/particle/particle.d.ts +205 -0
  658. package/vfx/particle/utils.d.ts +11 -0
  659. package/vfx/particle/vertex-shader.d.ts +2 -0
  660. package/vfx/particle-gpu/fragment-shader.d.ts +2 -0
  661. package/vfx/particle-gpu/instance.d.ts +36 -0
  662. package/vfx/particle-gpu/particle.d.ts +95 -0
  663. package/vfx/particle-gpu/utils.d.ts +11 -0
  664. package/vfx/particle-gpu/vertex-shader.d.ts +2 -0
  665. package/vfx/spotLight/fragment-shader.d.ts +2 -0
  666. package/vfx/spotLight/spotLight.d.ts +15 -0
  667. package/vfx/spotLight/vertex-shader.d.ts +2 -0
  668. package/vue/context.d.ts +7 -0
  669. package/vue/hooks/FiveCanvas.d.ts +36 -0
  670. package/vue/hooks/FiveProvider.d.ts +35 -0
  671. package/vue/hooks/unsafe__useFiveInject.d.ts +9 -0
  672. package/vue/hooks/useFiveAction.d.ts +178 -0
  673. package/vue/hooks/useFiveCameraDirection.d.ts +8 -0
  674. package/vue/hooks/useFiveCameraRaycaster.d.ts +8 -0
  675. package/vue/hooks/useFiveCurrentObserver.d.ts +12 -0
  676. package/vue/hooks/useFiveCurrentState.d.ts +16 -0
  677. package/vue/hooks/useFiveEventCallback.d.ts +11 -0
  678. package/vue/hooks/useFiveFloor.d.ts +16 -0
  679. package/vue/hooks/useFiveHelper.d.ts +15 -0
  680. package/vue/hooks/useFiveModel.d.ts +7 -0
  681. package/vue/hooks/useFiveModelBounding.d.ts +7 -0
  682. package/vue/hooks/useFiveModelIntersectRaycaster.d.ts +23 -0
  683. package/vue/hooks/useFiveModelReadyState.d.ts +9 -0
  684. package/vue/hooks/useFiveProject2d.d.ts +26 -0
  685. package/vue/hooks/useFiveScene.d.ts +6 -0
  686. package/vue/hooks/useFiveState.d.ts +16 -0
  687. package/vue/hooks/useFiveWork.d.ts +30 -0
  688. package/vue/index.d.ts +23 -467
  689. package/vue/index.js +3 -3
  690. package/vue/index.mjs +309 -301
  691. package/vue/rendererPool.d.ts +10 -0
  692. package/work-downloader/components/model-3d-tile.d.ts +2 -0
  693. package/work-downloader/components/model.d.ts +3 -0
  694. package/work-downloader/components/observer.d.ts +7 -0
  695. package/work-downloader/download.d.ts +16 -0
  696. package/work-downloader/index.d.ts +2 -33
  697. package/work-downloader/index.js +3 -3
  698. package/work-downloader/index.mjs +317 -556
  699. package/work-downloader/type.d.ts +28 -0
  700. package/work-downloader/utils/download-to-file.d.ts +1 -0
  701. package/work-downloader/utils/image-processing.d.ts +7 -0
  702. package/work-downloader/utils/join-url.d.ts +2 -0
  703. package/work-downloader/utils/log.d.ts +1 -0
  704. package/work-downloader/utils/relative-url.d.ts +1 -0
  705. package/docs/documents/five.FivePlugin.plugin.html +0 -60
  706. package/docs/documents/plugin.html +0 -60
  707. package/docs/media/five.ts +0 -2881
  708. package/docs/media/pass.ts +0 -64
  709. package/guides/ai-doc-guidelines.md +0 -72
  710. package/guides/features/3dtile.md +0 -264
  711. package/guides/features/parameter.md +0 -178
  712. package/guides/plugin.md +0 -206
  713. /package/{guides → ai_guides}/release_notes/6.6.md +0 -0
  714. /package/{guides → ai_guides}/release_notes/6.7.md +0 -0
  715. /package/{guides → ai_guides}/support.md +0 -0
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 2026/1/28
5
- * Version: 6.8.0-alpha.2
4
+ * Generated: 3/19/2026
5
+ * Version: 6.8.0-alpha.21
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,10 +252,10 @@
252
252
  * No amendment to or modification of this Agreement will be binding unless in
253
253
  * writing and signed by Realsee. You and Realsee hereto confirm that this
254
254
  * Agreement and all related documents shall be drafted in English.
255
- */(function(V,l){typeof exports=="object"&&typeof module!="undefined"?l(exports,require("three")):typeof define=="function"&&define.amd?define(["exports","three"],l):(V=typeof globalThis!="undefined"?globalThis:V||self,l(V.FiveSDK_GLTFLoader={},V.THREE))})(this,(function(V,l){"use strict";function Ue(p){const g=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const u in p)if(u!=="default"){const A=Object.getOwnPropertyDescriptor(p,u);Object.defineProperty(g,u,A.get?A:{enumerable:!0,get:()=>p[u]})}}return g.default=p,Object.freeze(g)}const ye=Ue(l);var Le=function(p,g){return Le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,A){u.__proto__=A}||function(u,A){for(var m in A)Object.prototype.hasOwnProperty.call(A,m)&&(u[m]=A[m])},Le(p,g)};function Fe(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");Le(p,g);function u(){this.constructor=p}p.prototype=g===null?Object.create(g):(u.prototype=g.prototype,new u)}typeof SuppressedError=="function"&&SuppressedError;var De=(function(){function p(e){l.Loader.call(this,e),this.dracoLoader=null,this.ddsLoader=null}p.prototype=Object.assign(Object.create(l.Loader.prototype),{constructor:p,load:function(e,r,n,t){var a=this,i;this.resourcePath!==""?i=this.resourcePath:this.path!==""?i=this.path:i=l.LoaderUtils.extractUrlBase(e),a.manager.itemStart(e);var s=function(f){t?t(f):console.error(f),a.manager.itemError(e),a.manager.itemEnd(e)},o=new l.FileLoader(a.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),a.crossOrigin==="use-credentials"&&o.setWithCredentials(!0),o.load(e,function(f){try{a.parse(f,i,function(c){r(c),a.manager.itemEnd(e)},s)}catch(c){s(c)}},n,s)},setDRACOLoader:function(e){return this.dracoLoader=e,this},setDDSLoader:function(e){return this.ddsLoader=e,this},parse:function(e,r,n,t){var a,i={};if(typeof e=="string")a=e;else{var s=l.LoaderUtils.decodeText(new Uint8Array(e,0,4));if(s===P){try{i[u.KHR_BINARY_GLTF]=new G(e)}catch(h){t&&t(h);return}a=i[u.KHR_BINARY_GLTF].content}else a=l.LoaderUtils.decodeText(new Uint8Array(e))}var o=JSON.parse(a);if(o.asset===void 0||o.asset.version[0]<2){t&&t(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}if(o.extensionsUsed)for(var f=0;f<o.extensionsUsed.length;++f){var c=o.extensionsUsed[f],v=o.extensionsRequired||[];switch(c){case u.KHR_LIGHTS_PUNCTUAL:i[c]=new m(o);break;case u.KHR_MATERIALS_CLEARCOAT:i[c]=new _;break;case u.KHR_MATERIALS_TRANSMISSION:i[c]=new O;break;case u.KHR_MATERIALS_UNLIT:i[c]=new S;break;case u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:i[c]=new X;break;case u.KHR_DRACO_MESH_COMPRESSION:i[c]=new R(o,this.dracoLoader);break;case u.MSFT_TEXTURE_DDS:i[c]=new A(this.ddsLoader);break;case u.KHR_TEXTURE_TRANSFORM:i[c]=new I;break;case u.KHR_MESH_QUANTIZATION:i[c]=new ne;break;case u.REALSEE_MATERIALS_LIGHTMAP:i[c]=new Z;break;default:v.indexOf(c)>=0&&console.warn('THREE.GLTFLoader: Unknown extension "'+c+'".')}}var d=new F(o,i,{path:r||this.resourcePath||"",crossOrigin:this.crossOrigin,manager:this.manager});d.fileLoader.setRequestHeader(this.requestHeader),d.parse(n,t)}});function g(){var e={};return{get:function(r){return e[r]},add:function(r,n){e[r]=n},remove:function(r){delete e[r]},removeAll:function(){e={}}}}var u={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:"KHR_materials_pbrSpecularGlossiness",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",MSFT_TEXTURE_DDS:"MSFT_texture_dds",REALSEE_MATERIALS_LIGHTMAP:"REALSEE_materials_lightmap"};function A(e){if(!e)throw new Error("THREE.GLTFLoader: Attempting to load .dds texture without importing DDSLoader");this.name=u.MSFT_TEXTURE_DDS,this.ddsLoader=e}function m(e){this.name=u.KHR_LIGHTS_PUNCTUAL;var r=e.extensions&&e.extensions[u.KHR_LIGHTS_PUNCTUAL]||{};this.lightDefs=r.lights||[]}m.prototype.loadLight=function(e){var r=this.lightDefs[e],n,t=new l.Color(16777215);r.color!==void 0&&t.fromArray(r.color);var a=r.range!==void 0?r.range:0;switch(r.type){case"directional":n=new l.DirectionalLight(t),n.target.position.set(0,0,-1),n.add(n.target);break;case"point":n=new l.PointLight(t),n.distance=a;break;case"spot":n=new l.SpotLight(t),n.distance=a,r.spot=r.spot||{},r.spot.innerConeAngle=r.spot.innerConeAngle!==void 0?r.spot.innerConeAngle:0,r.spot.outerConeAngle=r.spot.outerConeAngle!==void 0?r.spot.outerConeAngle:Math.PI/4,n.angle=r.spot.outerConeAngle,n.penumbra=1-r.spot.innerConeAngle/r.spot.outerConeAngle,n.target.position.set(0,0,-1),n.add(n.target);break;default:throw new Error('THREE.GLTFLoader: Unexpected light type, "'+r.type+'".')}return n.position.set(0,0,0),n.decay=2,r.intensity!==void 0&&(n.intensity=r.intensity),n.name=r.name||"light_"+e,Promise.resolve(n)};function S(){this.name=u.KHR_MATERIALS_UNLIT}S.prototype.getMaterialType=function(){return l.MeshBasicMaterial},S.prototype.extendParams=function(e,r,n){var t=[];e.color=new l.Color(1,1,1),e.opacity=1;var a=r.pbrMetallicRoughness;if(a){if(Array.isArray(a.baseColorFactor)){var i=a.baseColorFactor;e.color.fromArray(i),e.opacity=i[3]}a.baseColorTexture!==void 0&&t.push(n.assignTexture(e,"map",a.baseColorTexture))}return Promise.all(t)};function _(){this.name=u.KHR_MATERIALS_CLEARCOAT}_.prototype.getMaterialType=function(){return l.MeshPhysicalMaterial},_.prototype.extendParams=function(e,r,n){var t=[],a=r.extensions[this.name];if(a.clearcoatFactor!==void 0&&(e.clearcoat=a.clearcoatFactor),a.clearcoatTexture!==void 0&&t.push(n.assignTexture(e,"clearcoatMap",a.clearcoatTexture)),a.clearcoatRoughnessFactor!==void 0&&(e.clearcoatRoughness=a.clearcoatRoughnessFactor),a.clearcoatRoughnessTexture!==void 0&&t.push(n.assignTexture(e,"clearcoatRoughnessMap",a.clearcoatRoughnessTexture)),a.clearcoatNormalTexture!==void 0&&(t.push(n.assignTexture(e,"clearcoatNormalMap",a.clearcoatNormalTexture)),a.clearcoatNormalTexture.scale!==void 0)){var i=a.clearcoatNormalTexture.scale;e.clearcoatNormalScale=new l.Vector2(i,i)}return Promise.all(t)};function O(){this.name=u.KHR_MATERIALS_TRANSMISSION}O.prototype.getMaterialType=function(){return l.MeshPhysicalMaterial},O.prototype.extendParams=function(e,r,n){var t=[],a=r.extensions[this.name];return a.transmissionFactor!==void 0&&(e.premultipliedAlpha=!0,e.transparent=!0,e.opacity=e.opacity!==void 0?e.opacity:.5),Promise.all(t)};var P="glTF",w=12,C={JSON:1313821514,BIN:5130562};function G(e){this.name=u.KHR_BINARY_GLTF,this.content=null,this.body=null;var r=new DataView(e,0,w);if(this.header={magic:l.LoaderUtils.decodeText(new Uint8Array(e.slice(0,4))),version:r.getUint32(4,!0),length:r.getUint32(8,!0)},this.header.magic!==P)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");for(var n=new DataView(e,w),t=0;t<n.byteLength;){var a=n.getUint32(t,!0);t+=4;var i=n.getUint32(t,!0);if(t+=4,i===C.JSON){var s=new Uint8Array(e,w+t,a);this.content=l.LoaderUtils.decodeText(s)}else if(i===C.BIN){var o=w+t;this.body=e.slice(o,o+a)}t+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}function R(e,r){if(!r)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=u.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=r,this.dracoLoader.preload()}R.prototype.decodePrimitive=function(e,r){var n=this.json,t=this.dracoLoader,a=e.extensions[this.name].bufferView,i=e.extensions[this.name].attributes,s={},o={},f={};for(var c in i){var v=fe[c]||c.toLowerCase();s[v]=i[c]}for(c in e.attributes){var v=fe[c]||c.toLowerCase();if(i[c]!==void 0){var d=n.accessors[e.attributes[c]],h=$[d.componentType];f[v]=h,o[v]=d.normalized===!0}}return r.getDependency("bufferView",a).then(function(y){return new Promise(function(M){t.decodeDracoFile(y,function(T){for(var L in T.attributes){var b=T.attributes[L],D=o[L];D!==void 0&&(b.normalized=D)}M(T)},s,f)})})};function I(){this.name=u.KHR_TEXTURE_TRANSFORM}I.prototype.extendTexture=function(e,r){return e=e.clone(),r.offset!==void 0&&e.offset.fromArray(r.offset),r.rotation!==void 0&&(e.rotation=r.rotation),r.scale!==void 0&&e.repeat.fromArray(r.scale),r.texCoord!==void 0&&console.warn('THREE.GLTFLoader: Custom UV sets in "'+this.name+'" extension not yet supported.'),e.needsUpdate=!0,e};function x(e){l.MeshStandardMaterial.call(this),this.isGLTFSpecularGlossinessMaterial=!0;var r=["#ifdef USE_SPECULARMAP"," uniform sampler2D specularMap;","#endif"].join(`
256
- `),n=["#ifdef USE_GLOSSINESSMAP"," uniform sampler2D glossinessMap;","#endif"].join(`
257
- `),t=["vec3 specularFactor = specular;","#ifdef USE_SPECULARMAP"," vec4 texelSpecular = texture2D( specularMap, vUv );"," texelSpecular = sRGBToLinear( texelSpecular );"," // reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture"," specularFactor *= texelSpecular.rgb;","#endif"].join(`
258
- `),a=["float glossinessFactor = glossiness;","#ifdef USE_GLOSSINESSMAP"," vec4 texelGlossiness = texture2D( glossinessMap, vUv );"," // reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture"," glossinessFactor *= texelGlossiness.a;","#endif"].join(`
259
- `),i=["PhysicalMaterial material;","material.diffuseColor = diffuseColor.rgb;","vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );","float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );","material.specularRoughness = max( 1.0 - glossinessFactor, 0.0525 );// 0.0525 corresponds to the base mip of a 256 cubemap.","material.specularRoughness += geometryRoughness;","material.specularRoughness = min( material.specularRoughness, 1.0 );","material.specularColor = specularFactor.rgb;"].join(`
260
- `),s={specular:{value:new l.Color().setHex(16777215)},glossiness:{value:1},specularMap:{value:null},glossinessMap:{value:null}};this._extraUniforms=s,this.onBeforeCompile=function(o){for(var f in s)o.uniforms[f]=s[f];o.fragmentShader=o.fragmentShader.replace("uniform float roughness;","uniform vec3 specular;"),o.fragmentShader=o.fragmentShader.replace("uniform float metalness;","uniform float glossiness;"),o.fragmentShader=o.fragmentShader.replace("#include <roughnessmap_pars_fragment>",r),o.fragmentShader=o.fragmentShader.replace("#include <metalnessmap_pars_fragment>",n),o.fragmentShader=o.fragmentShader.replace("#include <roughnessmap_fragment>",t),o.fragmentShader=o.fragmentShader.replace("#include <metalnessmap_fragment>",a),o.fragmentShader=o.fragmentShader.replace("#include <lights_physical_fragment>",i)},Object.defineProperties(this,{specular:{get:function(){return s.specular.value},set:function(o){s.specular.value=o}},specularMap:{get:function(){return s.specularMap.value},set:function(o){s.specularMap.value=o}},glossiness:{get:function(){return s.glossiness.value},set:function(o){s.glossiness.value=o}},glossinessMap:{get:function(){return s.glossinessMap.value},set:function(o){s.glossinessMap.value=o,o?(this.defines.USE_GLOSSINESSMAP="",this.defines.USE_ROUGHNESSMAP=""):(delete this.defines.USE_ROUGHNESSMAP,delete this.defines.USE_GLOSSINESSMAP)}}}),delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this.setValues(e)}x.prototype=Object.create(l.MeshStandardMaterial.prototype),x.prototype.constructor=x,x.prototype.copy=function(e){return l.MeshStandardMaterial.prototype.copy.call(this,e),this.specularMap=e.specularMap,this.specular.copy(e.specular),this.glossinessMap=e.glossinessMap,this.glossiness=e.glossiness,delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this};function X(){return{name:u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:["color","map","lightMap","lightMapIntensity","aoMap","aoMapIntensity","emissive","emissiveIntensity","emissiveMap","bumpMap","bumpScale","normalMap","normalMapType","displacementMap","displacementScale","displacementBias","specularMap","specular","glossinessMap","glossiness","alphaMap","envMap","envMapIntensity","refractionRatio"],getMaterialType:function(){return x},extendParams:function(e,r,n){var t=r.extensions[this.name];e.color=new l.Color(1,1,1),e.opacity=1;var a=[];if(Array.isArray(t.diffuseFactor)){var i=t.diffuseFactor;e.color.fromArray(i),e.opacity=i[3]}if(t.diffuseTexture!==void 0&&a.push(n.assignTexture(e,"map",t.diffuseTexture)),e.emissive=new l.Color(0,0,0),e.glossiness=t.glossinessFactor!==void 0?t.glossinessFactor:1,e.specular=new l.Color(1,1,1),Array.isArray(t.specularFactor)&&e.specular.fromArray(t.specularFactor),t.specularGlossinessTexture!==void 0){var s=t.specularGlossinessTexture;a.push(n.assignTexture(e,"glossinessMap",s)),a.push(n.assignTexture(e,"specularMap",s))}return Promise.all(a)},createMaterial:function(e){var r=new x(e);return r.fog=!0,r.color=e.color,r.map=e.map===void 0?null:e.map,r.lightMap=null,r.lightMapIntensity=1,r.aoMap=e.aoMap===void 0?null:e.aoMap,r.aoMapIntensity=1,r.emissive=e.emissive,r.emissiveIntensity=1,r.emissiveMap=e.emissiveMap===void 0?null:e.emissiveMap,r.bumpMap=e.bumpMap===void 0?null:e.bumpMap,r.bumpScale=1,r.normalMap=e.normalMap===void 0?null:e.normalMap,r.normalMapType=l.TangentSpaceNormalMap,e.normalScale&&(r.normalScale=e.normalScale),r.displacementMap=null,r.displacementScale=1,r.displacementBias=0,r.specularMap=e.specularMap===void 0?null:e.specularMap,r.specular=e.specular,r.glossinessMap=e.glossinessMap===void 0?null:e.glossinessMap,r.glossiness=e.glossiness,r.alphaMap=null,r.envMap=e.envMap===void 0?null:e.envMap,r.envMapIntensity=1,r.refractionRatio=.98,r}}}function ne(){this.name=u.KHR_MESH_QUANTIZATION}function U(e,r,n,t){l.Interpolant.call(this,e,r,n,t)}U.prototype=Object.create(l.Interpolant.prototype),U.prototype.constructor=U,U.prototype.copySampleValue_=function(e){for(var r=this.resultBuffer,n=this.sampleValues,t=this.valueSize,a=e*t*3+t,i=0;i!==t;i++)r[i]=n[a+i];return r},U.prototype.beforeStart_=U.prototype.copySampleValue_,U.prototype.afterEnd_=U.prototype.copySampleValue_,U.prototype.interpolate_=function(e,r,n,t){for(var a=this.resultBuffer,i=this.sampleValues,s=this.valueSize,o=s*2,f=s*3,c=t-r,v=(n-r)/c,d=v*v,h=d*v,y=e*f,M=y-f,T=-2*h+3*d,L=h-d,b=1-T,D=L-d+v,k=0;k!==s;k++){var ae=i[M+k+s],se=i[M+k+o]*c,re=i[y+k+s],j=i[y+k]*c;a[k]=b*ae+D*se+T*re+L*j}return a};function Z(e){this.parser=e,this.name=u.REALSEE_MATERIALS_LIGHTMAP}Z.prototype.getMaterialType=function(e){return l.MeshPhongMaterial},Z.prototype.extendParams=function(e,r,n){if(!r.extensions||!r.extensions[this.name])return Promise.resolve();var t=[],a=r.extensions[this.name];return a.lightMapTexture!==void 0&&t.push(n.assignTexture(e,"lightMap",a.lightMapTexture)),a.lightMapIntensity!==void 0&&(e.lightMapIntensity=a.lightMapIntensity),Promise.all(t)};var K={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},$={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},ee={9728:l.NearestFilter,9729:l.LinearFilter,9984:l.NearestMipmapNearestFilter,9985:l.LinearMipmapNearestFilter,9986:l.NearestMipmapLinearFilter,9987:l.LinearMipmapLinearFilter},H={33071:l.ClampToEdgeWrapping,33648:l.MirroredRepeatWrapping,10497:l.RepeatWrapping},Y={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},fe={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},z={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Me={CUBICSPLINE:void 0,LINEAR:l.InterpolateLinear,STEP:l.InterpolateDiscrete},ce={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"},ve={"image/png":l.RGBAFormat,"image/jpeg":l.RGBFormat};function ge(e,r){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(r)&&/^\//.test(e)&&(r=r.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:r+e)}function _e(e){return e.DefaultMaterial===void 0&&(e.DefaultMaterial=new l.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:l.FrontSide})),e.DefaultMaterial}function ie(e,r,n){for(var t in n.extensions)e[t]===void 0&&(r.userData.gltfExtensions=r.userData.gltfExtensions||{},r.userData.gltfExtensions[t]=n.extensions[t])}function q(e,r){r.extras!==void 0&&(typeof r.extras=="object"?Object.assign(e.userData,r.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+r.extras))}function we(e,r,n){for(var t=!1,a=!1,i=0,s=r.length;i<s;i++){var o=r[i];if(o.POSITION!==void 0&&(t=!0),o.NORMAL!==void 0&&(a=!0),t&&a)break}if(!t&&!a)return Promise.resolve(e);for(var f=[],c=[],i=0,s=r.length;i<s;i++){var o=r[i];if(t){var v=o.POSITION!==void 0?n.getDependency("accessor",o.POSITION):e.attributes.position;f.push(v)}if(a){var v=o.NORMAL!==void 0?n.getDependency("accessor",o.NORMAL):e.attributes.normal;c.push(v)}}return Promise.all([Promise.all(f),Promise.all(c)]).then(function(d){var h=d[0],y=d[1];return t&&(e.morphAttributes.position=h),a&&(e.morphAttributes.normal=y),e.morphTargetsRelative=!0,e})}function be(e,r){if(e.updateMorphTargets(),r.weights!==void 0)for(var n=0,t=r.weights.length;n<t;n++)e.morphTargetInfluences[n]=r.weights[n];if(r.extras&&Array.isArray(r.extras.targetNames)){var a=r.extras.targetNames;if(e.morphTargetInfluences.length===a.length){e.morphTargetDictionary={};for(var n=0,t=a.length;n<t;n++)e.morphTargetDictionary[a[n]]=n}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function N(e){var r=e.extensions&&e.extensions[u.KHR_DRACO_MESH_COMPRESSION],n;return r?n="draco:"+r.bufferView+":"+r.indices+":"+J(r.attributes):n=e.indices+":"+J(e.attributes)+":"+e.mode,n}function J(e){for(var r="",n=Object.keys(e).sort(),t=0,a=n.length;t<a;t++)r+=n[t]+":"+e[n[t]]+";";return r}function F(e,r,n){this.json=e||{},this.extensions=r||{},this.options=n||{},this.cache=new g,this.associations=new Map,this.primitiveCache={},this.textureLoader=new l.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new l.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}F.prototype.parse=function(e,r){var n=this,t=this.json,a=this.extensions;this.cache.removeAll(),this.markDefs(),Promise.all([this.getDependencies("scene"),this.getDependencies("animation"),this.getDependencies("camera")]).then(function(i){var s={scene:i[0][t.scene||0],scenes:i[0],animations:i[1],cameras:i[2],asset:t.asset,parser:n,userData:{}};ie(a,s,t),q(s,t),e(s)}).catch(r)},F.prototype.markDefs=function(){for(var e=this.json.nodes||[],r=this.json.skins||[],n=this.json.meshes||[],t={},a={},i=0,s=r.length;i<s;i++)for(var o=r[i].joints,f=0,c=o.length;f<c;f++)e[o[f]].isBone=!0;for(var v=0,d=e.length;v<d;v++){var h=e[v];h.mesh!==void 0&&(t[h.mesh]===void 0&&(t[h.mesh]=a[h.mesh]=0),t[h.mesh]++,h.skin!==void 0&&(n[h.mesh].isSkinnedMesh=!0))}this.json.meshReferences=t,this.json.meshUses=a},F.prototype.getDependency=function(e,r){var n=e+":"+r,t=this.cache.get(n);if(!t){switch(e){case"scene":t=this.loadScene(r);break;case"node":t=this.loadNode(r);break;case"mesh":t=this.loadMesh(r);break;case"accessor":t=this.loadAccessor(r);break;case"bufferView":t=this.loadBufferView(r);break;case"buffer":t=this.loadBuffer(r);break;case"material":t=this.loadMaterial(r);break;case"texture":t=this.loadTexture(r);break;case"skin":t=this.loadSkin(r);break;case"animation":t=this.loadAnimation(r);break;case"camera":t=this.loadCamera(r);break;case"light":t=this.extensions[u.KHR_LIGHTS_PUNCTUAL].loadLight(r);break;default:throw new Error("Unknown type: "+e)}this.cache.add(n,t)}return t},F.prototype.getDependencies=function(e){var r=this.cache.get(e);if(!r){var n=this,t=this.json[e+(e==="mesh"?"es":"s")]||[];r=Promise.all(t.map(function(a,i){return n.getDependency(e,i)})),this.cache.add(e,r)}return r},F.prototype.loadBuffer=function(e){var r=this.json.buffers[e],n=this.fileLoader;if(r.type&&r.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+r.type+" buffer type is not supported.");if(r.uri===void 0&&e===0)return Promise.resolve(this.extensions[u.KHR_BINARY_GLTF].body);var t=this.options;return new Promise(function(a,i){n.load(ge(r.uri,t.path),a,void 0,function(){i(new Error('THREE.GLTFLoader: Failed to load buffer "'+r.uri+'".'))})})},F.prototype.loadBufferView=function(e){var r=this.json.bufferViews[e];return this.getDependency("buffer",r.buffer).then(function(n){var t=r.byteLength||0,a=r.byteOffset||0;return n.slice(a,a+t)})},F.prototype.loadAccessor=function(e){var r=this,n=this.json,t=this.json.accessors[e];if(t.bufferView===void 0&&t.sparse===void 0)return Promise.resolve(null);var a=[];return t.bufferView!==void 0?a.push(this.getDependency("bufferView",t.bufferView)):a.push(null),t.sparse!==void 0&&(a.push(this.getDependency("bufferView",t.sparse.indices.bufferView)),a.push(this.getDependency("bufferView",t.sparse.values.bufferView))),Promise.all(a).then(function(i){var s=i[0],o=Y[t.type],f=$[t.componentType],c=f.BYTES_PER_ELEMENT,v=c*o,d=t.byteOffset||0,h=t.bufferView!==void 0?n.bufferViews[t.bufferView].byteStride:void 0,y=t.normalized===!0,M,T;if(h&&h!==v){var L=Math.floor(d/h),b="InterleavedBuffer:"+t.bufferView+":"+t.componentType+":"+L+":"+t.count,D=r.cache.get(b);D||(M=new f(s,L*h,t.count*h/c),D=new l.InterleavedBuffer(M,h/c),r.cache.add(b,D)),T=new l.InterleavedBufferAttribute(D,o,d%h/c,y)}else s===null?M=new f(t.count*o):M=new f(s,d,t.count*o),T=new l.BufferAttribute(M,o,y);if(t.sparse!==void 0){var k=Y.SCALAR,ae=$[t.sparse.indices.componentType],se=t.sparse.indices.byteOffset||0,re=t.sparse.values.byteOffset||0,j=new ae(i[1],se,t.sparse.count*k),le=new f(i[2],re,t.sparse.count*o);s!==null&&(T=new l.BufferAttribute(T.array.slice(),T.itemSize,T.normalized));for(var B=0,Ie=j.length;B<Ie;B++){var oe=j[B];if(T.setX(oe,le[B*o]),o>=2&&T.setY(oe,le[B*o+1]),o>=3&&T.setZ(oe,le[B*o+2]),o>=4&&T.setW(oe,le[B*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return T})},F.prototype.loadTexture=function(e){var r=this,n=this.json,t=this.options,a=this.textureLoader,i=self.URL||self.webkitURL,s=n.textures[e],o=s.extensions||{},f;o[u.MSFT_TEXTURE_DDS]?f=n.images[o[u.MSFT_TEXTURE_DDS].source]:f=n.images[s.source];var c=f.uri,v=!1;return f.bufferView!==void 0&&(c=r.getDependency("bufferView",f.bufferView).then(function(d){v=!0;var h=new Blob([d],{type:f.mimeType});return c=i.createObjectURL(h),c})),Promise.resolve(c).then(function(d){var h=t.manager.getHandler(d);return h||(h=o[u.MSFT_TEXTURE_DDS]?r.extensions[u.MSFT_TEXTURE_DDS].ddsLoader:a),new Promise(function(y,M){h.load(ge(d,t.path),y,void 0,M)})}).then(function(d){v===!0&&i.revokeObjectURL(c),d.flipY=!1,s.name&&(d.name=s.name),f.mimeType in ve&&(d.format=ve[f.mimeType]);var h=n.samplers||{},y=h[s.sampler]||{};return d.magFilter=ee[y.magFilter]||l.LinearFilter,d.minFilter=ee[y.minFilter]||l.LinearMipmapLinearFilter,d.wrapS=H[y.wrapS]||l.RepeatWrapping,d.wrapT=H[y.wrapT]||l.RepeatWrapping,r.associations.set(d,{type:"textures",index:e}),d})},F.prototype.assignTexture=function(e,r,n){var t=this;return this.getDependency("texture",n.index).then(function(a){if(!a.isCompressedTexture)switch(r){case"aoMap":case"emissiveMap":case"metalnessMap":case"normalMap":case"roughnessMap":a.format=l.RGBFormat;break}if(n.texCoord!==void 0&&n.texCoord!=0&&!(r==="aoMap"&&n.texCoord==1)&&console.warn("THREE.GLTFLoader: Custom UV set "+n.texCoord+" for texture "+r+" not yet supported."),t.extensions[u.KHR_TEXTURE_TRANSFORM]){var i=n.extensions!==void 0?n.extensions[u.KHR_TEXTURE_TRANSFORM]:void 0;if(i){var s=t.associations.get(a);a=t.extensions[u.KHR_TEXTURE_TRANSFORM].extendTexture(a,i),t.associations.set(a,s)}}e[r]=a})},F.prototype.assignFinalMaterial=function(e){var r=e.geometry,n=e.material,t=r.attributes.tangent!==void 0,a=r.attributes.color!==void 0,i=r.attributes.normal===void 0,s=e.isSkinnedMesh===!0,o=Object.keys(r.morphAttributes).length>0,f=o&&r.morphAttributes.normal!==void 0;if(e.isPoints){var c="PointsMaterial:"+n.uuid,v=this.cache.get(c);v||(v=new l.PointsMaterial,l.Material.prototype.copy.call(v,n),v.color.copy(n.color),v.map=n.map,v.sizeAttenuation=!1,this.cache.add(c,v)),n=v}else if(e.isLine){var c="LineBasicMaterial:"+n.uuid,d=this.cache.get(c);d||(d=new l.LineBasicMaterial,l.Material.prototype.copy.call(d,n),d.color.copy(n.color),this.cache.add(c,d)),n=d}if(t||a||i||s||o){var c="ClonedMaterial:"+n.uuid+":";n.isGLTFSpecularGlossinessMaterial&&(c+="specular-glossiness:"),s&&(c+="skinning:"),t&&(c+="vertex-tangents:"),a&&(c+="vertex-colors:"),i&&(c+="flat-shading:"),o&&(c+="morph-targets:"),f&&(c+="morph-normals:");var h=this.cache.get(c);h||(h=n.clone(),s&&(h.skinning=!0),t&&(h.vertexTangents=!0),a&&(h.vertexColors=!0),i&&(h.flatShading=!0),o&&(h.morphTargets=!0),f&&(h.morphNormals=!0),this.cache.add(c,h),this.associations.set(h,this.associations.get(n))),n=h}n.aoMap&&r.attributes.uv2===void 0&&r.attributes.uv!==void 0&&r.setAttribute("uv2",r.attributes.uv),n.normalScale&&!t&&(n.normalScale.y=-n.normalScale.y),n.clearcoatNormalScale&&!t&&(n.clearcoatNormalScale.y=-n.clearcoatNormalScale.y),e.material=n},F.prototype.loadMaterial=function(e){var r=this,n=this.json,t=this.extensions,a=n.materials[e],i,s={},o=a.extensions||{},f=[];if(o[u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var c=t[u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];i=c.getMaterialType(),f.push(c.extendParams(s,a,r))}else if(o[u.KHR_MATERIALS_UNLIT]){var v=t[u.KHR_MATERIALS_UNLIT];i=v.getMaterialType(),f.push(v.extendParams(s,a,r))}else{i=l.MeshStandardMaterial;var d=a.pbrMetallicRoughness||{};if(s.color=new l.Color(1,1,1),s.opacity=1,Array.isArray(d.baseColorFactor)){var h=d.baseColorFactor;s.color.fromArray(h),s.opacity=h[3]}d.baseColorTexture!==void 0&&f.push(r.assignTexture(s,"map",d.baseColorTexture)),s.metalness=d.metallicFactor!==void 0?d.metallicFactor:1,s.roughness=d.roughnessFactor!==void 0?d.roughnessFactor:1,d.metallicRoughnessTexture!==void 0&&(f.push(r.assignTexture(s,"metalnessMap",d.metallicRoughnessTexture)),f.push(r.assignTexture(s,"roughnessMap",d.metallicRoughnessTexture)))}a.doubleSided===!0&&(s.side=l.DoubleSide);var y=a.alphaMode||ce.OPAQUE;if(y===ce.BLEND?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,y===ce.MASK&&(s.alphaTest=a.alphaCutoff!==void 0?a.alphaCutoff:.5)),a.normalTexture!==void 0&&i!==l.MeshBasicMaterial&&(f.push(r.assignTexture(s,"normalMap",a.normalTexture)),s.normalScale=new l.Vector2(1,1),a.normalTexture.scale!==void 0&&s.normalScale.set(a.normalTexture.scale,a.normalTexture.scale)),a.occlusionTexture!==void 0&&i!==l.MeshBasicMaterial&&(f.push(r.assignTexture(s,"aoMap",a.occlusionTexture)),a.occlusionTexture.strength!==void 0&&(s.aoMapIntensity=a.occlusionTexture.strength)),a.emissiveFactor!==void 0&&i!==l.MeshBasicMaterial&&(s.emissive=new l.Color().fromArray(a.emissiveFactor)),a.emissiveTexture!==void 0&&i!==l.MeshBasicMaterial&&f.push(r.assignTexture(s,"emissiveMap",a.emissiveTexture)),o[u.KHR_MATERIALS_CLEARCOAT]){var M=t[u.KHR_MATERIALS_CLEARCOAT];i=M.getMaterialType(),f.push(M.extendParams(s,{extensions:o},r))}if(o[u.KHR_MATERIALS_TRANSMISSION]){var M=t[u.KHR_MATERIALS_TRANSMISSION];i=M.getMaterialType(),f.push(M.extendParams(s,{extensions:o},r))}if(o[u.REALSEE_MATERIALS_LIGHTMAP]){var T=t[u.REALSEE_MATERIALS_LIGHTMAP];i=T.getMaterialType(),f.push(T.extendParams(s,{extensions:o},r))}return Promise.all(f).then(function(){var L;return i===x?L=t[u.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(s):L=new i(s),a.name&&(L.name=a.name),L.map&&(L.map.encoding=l.sRGBEncoding),L.emissiveMap&&(L.emissiveMap.encoding=l.sRGBEncoding),q(L,a),r.associations.set(L,{type:"materials",index:e}),a.extensions&&ie(t,L,a),L})};function me(e,r,n){var t=r.attributes,a=new l.Box3;if(t.POSITION!==void 0){var i=n.json.accessors[t.POSITION],s=i.min,o=i.max;if(s!==void 0&&o!==void 0)a.set(new l.Vector3(s[0],s[1],s[2]),new l.Vector3(o[0],o[1],o[2]));else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;var f=r.targets;if(f!==void 0){for(var c=new l.Vector3,v=new l.Vector3,d=0,h=f.length;d<h;d++){var y=f[d];if(y.POSITION!==void 0){var i=n.json.accessors[y.POSITION],s=i.min,o=i.max;s!==void 0&&o!==void 0?(v.setX(Math.max(Math.abs(s[0]),Math.abs(o[0]))),v.setY(Math.max(Math.abs(s[1]),Math.abs(o[1]))),v.setZ(Math.max(Math.abs(s[2]),Math.abs(o[2]))),c.max(v)):console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}a.expandByVector(c)}e.boundingBox=a;var M=new l.Sphere;a.getCenter(M.center),M.radius=a.min.distanceTo(a.max)/2,e.boundingSphere=M}function W(e,r,n){var t=r.attributes,a=[];function i(c,v){return n.getDependency("accessor",c).then(function(d){e.setAttribute(v,d)})}for(var s in t){var o=fe[s]||s.toLowerCase();o in e.attributes||a.push(i(t[s],o))}if(r.indices!==void 0&&!e.index){var f=n.getDependency("accessor",r.indices).then(function(c){e.setIndex(c)});a.push(f)}return q(e,r),me(e,r,n),Promise.all(a).then(function(){return r.targets!==void 0?we(e,r.targets,n):e})}function ue(e,r){var n=e.getIndex();if(n===null){var t=[],a=e.getAttribute("position");if(a!==void 0){for(var i=0;i<a.count;i++)t.push(i);e.setIndex(t),n=e.getIndex()}else return console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e}var s=n.count-2,o=[];if(r===l.TriangleFanDrawMode)for(var i=1;i<=s;i++)o.push(n.getX(0)),o.push(n.getX(i)),o.push(n.getX(i+1));else for(var i=0;i<s;i++)i%2===0?(o.push(n.getX(i)),o.push(n.getX(i+1)),o.push(n.getX(i+2))):(o.push(n.getX(i+2)),o.push(n.getX(i+1)),o.push(n.getX(i)));o.length/3!==s&&console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");var f=e.clone();return f.setIndex(o),f}return F.prototype.loadGeometries=function(e){var r=this,n=this.extensions,t=this.primitiveCache;function a(h){return n[u.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(h,r).then(function(y){return W(y,h,r)})}for(var i=[],s=0,o=e.length;s<o;s++){var f=e[s],c=N(f),v=t[c];if(v)i.push(v.promise);else{var d;f.extensions&&f.extensions[u.KHR_DRACO_MESH_COMPRESSION]?d=a(f):d=W(new l.BufferGeometry,f,r),t[c]={primitive:f,promise:d},i.push(d)}}return Promise.all(i)},F.prototype.loadMesh=function(e){for(var r=this,n=this.json,t=n.meshes[e],a=t.primitives,i=[],s=0,o=a.length;s<o;s++){var f=a[s].material===void 0?_e(this.cache):this.getDependency("material",a[s].material);i.push(f)}return i.push(r.loadGeometries(a)),Promise.all(i).then(function(c){for(var v=c.slice(0,c.length-1),d=c[c.length-1],h=[],y=0,M=d.length;y<M;y++){var T=d[y],L=a[y],b,D=v[y];if(L.mode===K.TRIANGLES||L.mode===K.TRIANGLE_STRIP||L.mode===K.TRIANGLE_FAN||L.mode===void 0)b=t.isSkinnedMesh===!0?new l.SkinnedMesh(T,D):new l.Mesh(T,D),b.isSkinnedMesh===!0&&!b.geometry.attributes.skinWeight.normalized&&b.normalizeSkinWeights(),L.mode===K.TRIANGLE_STRIP?b.geometry=ue(b.geometry,l.TriangleStripDrawMode):L.mode===K.TRIANGLE_FAN&&(b.geometry=ue(b.geometry,l.TriangleFanDrawMode));else if(L.mode===K.LINES)b=new l.LineSegments(T,D);else if(L.mode===K.LINE_STRIP)b=new l.Line(T,D);else if(L.mode===K.LINE_LOOP)b=new l.LineLoop(T,D);else if(L.mode===K.POINTS)b=new l.Points(T,D);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+L.mode);Object.keys(b.geometry.morphAttributes).length>0&&be(b,t),b.name=t.name||"mesh_"+e,d.length>1&&(b.name+="_"+y),q(b,t),r.assignFinalMaterial(b),h.push(b)}if(h.length===1)return h[0];for(var k=new l.Group,y=0,M=h.length;y<M;y++)k.add(h[y]);return k})},F.prototype.loadCamera=function(e){var r,n=this.json.cameras[e],t=n[n.type];if(!t){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return n.type==="perspective"?r=new l.PerspectiveCamera(l.MathUtils.radToDeg(t.yfov),t.aspectRatio||1,t.znear||1,t.zfar||2e6):n.type==="orthographic"&&(r=new l.OrthographicCamera(-t.xmag,t.xmag,t.ymag,-t.ymag,t.znear,t.zfar)),n.name&&(r.name=n.name),q(r,n),Promise.resolve(r)},F.prototype.loadSkin=function(e){var r=this.json.skins[e],n={joints:r.joints};return r.inverseBindMatrices===void 0?Promise.resolve(n):this.getDependency("accessor",r.inverseBindMatrices).then(function(t){return n.inverseBindMatrices=t,n})},F.prototype.loadAnimation=function(e){for(var r=this.json,n=r.animations[e],t=[],a=[],i=[],s=[],o=[],f=0,c=n.channels.length;f<c;f++){var v=n.channels[f],d=n.samplers[v.sampler],h=v.target,y=h.node!==void 0?h.node:h.id,M=n.parameters!==void 0?n.parameters[d.input]:d.input,T=n.parameters!==void 0?n.parameters[d.output]:d.output;t.push(this.getDependency("node",y)),a.push(this.getDependency("accessor",M)),i.push(this.getDependency("accessor",T)),s.push(d),o.push(h)}return Promise.all([Promise.all(t),Promise.all(a),Promise.all(i),Promise.all(s),Promise.all(o)]).then(function(L){for(var b=L[0],D=L[1],k=L[2],ae=L[3],se=L[4],re=[],j=0,le=b.length;j<le;j++){var B=b[j],Ie=D[j],oe=k[j],xe=ae[j],Ce=se[j];if(B!==void 0){B.updateMatrix(),B.matrixAutoUpdate=!0;var Ae;switch(z[Ce.path]){case z.weights:Ae=l.NumberKeyframeTrack;break;case z.rotation:Ae=l.QuaternionKeyframeTrack;break;case z.position:case z.scale:default:Ae=l.VectorKeyframeTrack;break}var ke=B.name?B.name:B.uuid,Be=xe.interpolation!==void 0?Me[xe.interpolation]:l.InterpolateLinear,Se=[];z[Ce.path]===z.weights?B.traverse(function(pe){pe.isMesh===!0&&pe.morphTargetInfluences&&Se.push(pe.name?pe.name:pe.uuid)}):Se.push(ke);var Q=oe.array;if(oe.normalized){var de;if(Q.constructor===Int8Array)de=1/127;else if(Q.constructor===Uint8Array)de=1/255;else if(Q.constructor==Int16Array)de=1/32767;else if(Q.constructor===Uint16Array)de=1/65535;else throw new Error("THREE.GLTFLoader: Unsupported output accessor component type.");for(var Pe=new Float32Array(Q.length),te=0,Re=Q.length;te<Re;te++)Pe[te]=Q[te]*de;Q=Pe}for(var te=0,Re=Se.length;te<Re;te++){var Oe=new Ae(Se[te]+"."+z[Ce.path],Ie.array,Q,Be);xe.interpolation==="CUBICSPLINE"&&(Oe.createInterpolant=function(Ke){return new U(this.times,this.values,this.getValueSize()/3,Ke)},Oe.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),re.push(Oe)}}}var Ee=n.name?n.name:"animation_"+e;return new l.AnimationClip(Ee,void 0,re)})},F.prototype.loadNode=function(e){var r=this.json,n=this.extensions,t=this,a=r.meshReferences,i=r.meshUses,s=r.nodes[e];return(function(){var o=[];return s.mesh!==void 0&&o.push(t.getDependency("mesh",s.mesh).then(function(f){var c;if(a[s.mesh]>1){var v=i[s.mesh]++;c=f.clone(),c.name+="_instance_"+v}else c=f;return s.weights!==void 0&&c.traverse(function(d){if(d.isMesh)for(var h=0,y=s.weights.length;h<y;h++)d.morphTargetInfluences[h]=s.weights[h]}),c})),s.camera!==void 0&&o.push(t.getDependency("camera",s.camera)),s.extensions&&s.extensions[u.KHR_LIGHTS_PUNCTUAL]&&s.extensions[u.KHR_LIGHTS_PUNCTUAL].light!==void 0&&o.push(t.getDependency("light",s.extensions[u.KHR_LIGHTS_PUNCTUAL].light)),Promise.all(o)})().then(function(o){var f;if(s.isBone===!0?f=new l.Bone:o.length>1?f=new l.Group:o.length===1?f=o[0]:f=new l.Object3D,f!==o[0])for(var c=0,v=o.length;c<v;c++)f.add(o[c]);if(s.name&&(f.userData.name=s.name,f.name=l.PropertyBinding.sanitizeNodeName(s.name)),q(f,s),s.extensions&&ie(n,f,s),s.matrix!==void 0){var d=new l.Matrix4;d.fromArray(s.matrix),f.applyMatrix4(d)}else s.translation!==void 0&&f.position.fromArray(s.translation),s.rotation!==void 0&&f.quaternion.fromArray(s.rotation),s.scale!==void 0&&f.scale.fromArray(s.scale);return t.associations.set(f,{type:"nodes",index:e}),f})},F.prototype.loadScene=(function(){function e(r,n,t,a){var i=t.nodes[r];return a.getDependency("node",r).then(function(s){if(i.skin===void 0)return s;var o;return a.getDependency("skin",i.skin).then(function(f){o=f;for(var c=[],v=0,d=o.joints.length;v<d;v++)c.push(a.getDependency("node",o.joints[v]));return Promise.all(c)}).then(function(f){return s.traverse(function(c){if(c.isMesh){for(var v=[],d=[],h=0,y=f.length;h<y;h++){var M=f[h];if(M){v.push(M);var T=new l.Matrix4;o.inverseBindMatrices!==void 0&&T.fromArray(o.inverseBindMatrices.array,h*16),d.push(T)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',o.joints[h])}c.bind(new l.Skeleton(v,d),c.matrixWorld)}}),s})}).then(function(s){n.add(s);var o=[];if(i.children)for(var f=i.children,c=0,v=f.length;c<v;c++){var d=f[c];o.push(e(d,s,t,a))}return Promise.all(o)})}return function(n){var t=this.json,a=this.extensions,i=this.json.scenes[n],s=this,o=new l.Group;i.name&&(o.name=i.name),q(o,i),i.extensions&&ie(a,o,i);for(var f=i.nodes||[],c=[],v=0,d=f.length;v<d;v++)c.push(e(f[v],o,t,s));return Promise.all(c).then(function(){return o})}})(),p})(),E=function(p){l.Loader.call(this,p),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}};E.prototype=Object.assign(Object.create(l.Loader.prototype),{constructor:E,setDecoderPath:function(p){return this.decoderPath=p,this},setDecoderConfig:function(p){return this.decoderConfig=p,this},setWorkerLimit:function(p){return this.workerLimit=p,this},setVerbosity:function(){console.warn("THREE.DRACOLoader: The .setVerbosity() method has been removed.")},setDrawMode:function(){console.warn("THREE.DRACOLoader: The .setDrawMode() method has been removed.")},setSkipDequantization:function(){console.warn("THREE.DRACOLoader: The .setSkipDequantization() method has been removed.")},load:function(p,g,u,A){var m=new l.FileLoader(this.manager);m.setPath(this.path),m.setResponseType("arraybuffer"),this.crossOrigin==="use-credentials"&&m.setWithCredentials(!0),m.load(p,S=>{var _={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(S,_).then(g).catch(A)},u,A)},decodeDracoFile:function(p,g,u,A){var m={attributeIDs:u||this.defaultAttributeIDs,attributeTypes:A||this.defaultAttributeTypes,useUniqueIDs:!!u};this.decodeGeometry(p,m).then(g)},decodeGeometry:function(p,g){for(var u in g.attributeTypes){var A=g.attributeTypes[u];A.BYTES_PER_ELEMENT!==void 0&&(g.attributeTypes[u]=A.name)}var m=JSON.stringify(g);if(E.taskCache.has(p)){var S=E.taskCache.get(p);if(S.key===m)return S.promise;if(p.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}var _,O=this.workerNextTaskID++,P=p.byteLength,w=this._getWorker(O,P).then(C=>(_=C,new Promise((G,R)=>{_._callbacks[O]={resolve:G,reject:R},_.postMessage({type:"decode",id:O,taskConfig:g,buffer:p},[p])}))).then(C=>this._createGeometry(C.geometry));return w.catch(()=>!0).then(()=>{_&&O&&this._releaseTask(_,O)}),E.taskCache.set(p,{key:m,promise:w}),w},_createGeometry:function(p){var g=new l.BufferGeometry;p.index&&g.setIndex(new l.BufferAttribute(p.index.array,1));for(var u=0;u<p.attributes.length;u++){var A=p.attributes[u],m=A.name,S=A.array,_=A.itemSize;g.setAttribute(m,new l.BufferAttribute(S,_))}return g},_loadLibrary:function(p,g){var u=new l.FileLoader(this.manager);return u.setPath(this.decoderPath),u.setResponseType(g),new Promise((A,m)=>{u.load(p,A,void 0,m)})},preload:function(){return this._initDecoder(),this},_initDecoder:function(){if(this.decoderPending)return this.decoderPending;var p=typeof WebAssembly!="object"||this.decoderConfig.type==="js",g=[];return p?g.push(this._loadLibrary("draco_decoder.js","text")):(g.push(this._loadLibrary("draco_wasm_wrapper.js","text")),g.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(g).then(u=>{var A=u[0];p||(this.decoderConfig.wasmBinary=u[1]);var m=E.DRACOWorker.toString(),S=["/* draco decoder */",A,"","/* worker */",m.substring(m.indexOf("{")+1,m.lastIndexOf("}"))].join(`
261
- `);this.workerSourceURL=URL.createObjectURL(new Blob([S]))}),this.decoderPending},_getWorker:function(p,g){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){var u=new Worker(this.workerSourceURL);u._callbacks={},u._taskCosts={},u._taskLoad=0,u.postMessage({type:"init",decoderConfig:this.decoderConfig}),u.onmessage=function(m){var S=m.data;switch(S.type){case"decode":u._callbacks[S.id].resolve(S);break;case"error":u._callbacks[S.id].reject(S);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+S.type+'"')}},this.workerPool.push(u)}else this.workerPool.sort(function(A,m){return A._taskLoad>m._taskLoad?-1:1});var u=this.workerPool[this.workerPool.length-1];return u._taskCosts[p]=g,u._taskLoad+=g,u})},_releaseTask:function(p,g){p._taskLoad-=p._taskCosts[g],delete p._callbacks[g],delete p._taskCosts[g]},debug:function(){console.log("Task load: ",this.workerPool.map(p=>p._taskLoad))},dispose:function(){for(var p=0;p<this.workerPool.length;++p)this.workerPool[p].terminate();return this.workerPool.length=0,this}}),E.DRACOWorker=function(){var p,g;onmessage=function(m){var S=m.data;switch(S.type){case"init":p=S.decoderConfig,g=new Promise(function(P){p.onModuleLoaded=function(w){P({draco:w})},DracoDecoderModule(p)});break;case"decode":var _=S.buffer,O=S.taskConfig;g.then(P=>{var w=P.draco,C=new w.Decoder,G=new w.DecoderBuffer;G.Init(new Int8Array(_),_.byteLength);try{var R=u(w,C,G,O),I=R.attributes.map(x=>x.array.buffer);R.index&&I.push(R.index.array.buffer),self.postMessage({type:"decode",id:S.id,geometry:R},I)}catch(x){console.error(x),self.postMessage({type:"error",id:S.id,error:x.message})}finally{w.destroy(G),w.destroy(C)}});break}};function u(m,S,_,O){var P=O.attributeIDs,w=O.attributeTypes,C,G,R=S.GetEncodedGeometryType(_);if(R===m.TRIANGULAR_MESH)C=new m.Mesh,G=S.DecodeBufferToMesh(_,C);else if(R===m.POINT_CLOUD)C=new m.PointCloud,G=S.DecodeBufferToPointCloud(_,C);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!G.ok()||C.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+G.error_msg());var I={index:null,attributes:[]};for(var x in P){var X=self[w[x]],ne,U;if(O.useUniqueIDs)U=P[x],ne=S.GetAttributeByUniqueId(C,U);else{if(U=S.GetAttributeId(C,m[P[x]]),U===-1)continue;ne=S.GetAttribute(C,U)}I.attributes.push(A(m,S,C,x,X,ne))}if(R===m.TRIANGULAR_MESH){for(var Z=C.num_faces(),K=Z*3,$=new Uint32Array(K),ee=new m.DracoInt32Array,H=0;H<Z;++H){S.GetFaceFromMesh(C,H,ee);for(var Y=0;Y<3;++Y)$[H*3+Y]=ee.GetValue(Y)}I.index={array:$,itemSize:1},m.destroy(ee)}return m.destroy(C),I}function A(m,S,_,O,P,w){var C=w.num_components(),G=_.num_points(),R=G*C,I,x;switch(P){case Float32Array:I=new m.DracoFloat32Array,S.GetAttributeFloatForAllPoints(_,w,I),x=new Float32Array(R);break;case Int8Array:I=new m.DracoInt8Array,S.GetAttributeInt8ForAllPoints(_,w,I),x=new Int8Array(R);break;case Int16Array:I=new m.DracoInt16Array,S.GetAttributeInt16ForAllPoints(_,w,I),x=new Int16Array(R);break;case Int32Array:I=new m.DracoInt32Array,S.GetAttributeInt32ForAllPoints(_,w,I),x=new Int32Array(R);break;case Uint8Array:I=new m.DracoUInt8Array,S.GetAttributeUInt8ForAllPoints(_,w,I),x=new Uint8Array(R);break;case Uint16Array:I=new m.DracoUInt16Array,S.GetAttributeUInt16ForAllPoints(_,w,I),x=new Uint16Array(R);break;case Uint32Array:I=new m.DracoUInt32Array,S.GetAttributeUInt32ForAllPoints(_,w,I),x=new Uint32Array(R);break;default:throw new Error("THREE.DRACOLoader: Unexpected attribute type.")}for(var X=0;X<R;X++)x[X]=I.GetValue(X);return m.destroy(I),{name:O,array:x,itemSize:C}}},E.taskCache=new WeakMap,E.setDecoderPath=function(){console.warn("THREE.DRACOLoader: The .setDecoderPath() method has been removed. Use instance methods.")},E.setDecoderConfig=function(){console.warn("THREE.DRACOLoader: The .setDecoderConfig() method has been removed. Use instance methods.")},E.releaseDecoderModule=function(){console.warn("THREE.DRACOLoader: The .releaseDecoderModule() method has been removed. Use instance methods.")},E.getDecoderModule=function(){console.warn("THREE.DRACOLoader: The .getDecoderModule() method has been removed. Use instance methods.")};var he=function(p){l.CompressedTextureLoader.call(this,p)};he.prototype=Object.assign(Object.create(l.CompressedTextureLoader.prototype),{constructor:he,parse:function(p,g){var u={mipmaps:[],width:0,height:0,format:null,mipmapCount:1},A=542327876,m=131072,S=512,_=1024,O=2048,P=4096,w=8192,C=16384,G=32768,R=4;function I(f){return f.charCodeAt(0)+(f.charCodeAt(1)<<8)+(f.charCodeAt(2)<<16)+(f.charCodeAt(3)<<24)}function x(f){return String.fromCharCode(f&255,f>>8&255,f>>16&255,f>>24&255)}function X(f,c,v,d){for(var h=v*d*4,y=new Uint8Array(f,c,h),M=new Uint8Array(h),T=0,L=0,b=0;b<d;b++)for(var D=0;D<v;D++){var k=y[L];L++;var ae=y[L];L++;var se=y[L];L++;var re=y[L];L++,M[T]=se,T++,M[T]=ae,T++,M[T]=k,T++,M[T]=re,T++}return M}var ne=I("DXT1"),U=I("DXT3"),Z=I("DXT5"),K=I("ETC1"),$=31,ee=0,H=1,Y=2,fe=3,z=4,Me=7,ce=20,ve=21,ge=22,_e=23,ie=24,q=25,we=26,be=28,N=new Int32Array(p,0,$);if(N[ee]!==A)return console.error("THREE.DDSLoader.parse: Invalid magic number in DDS header."),u;if(!N[ce]&R)return console.error("THREE.DDSLoader.parse: Unsupported format, must contain a FourCC code."),u;var J,F=N[ve],me=!1;switch(F){case ne:J=8,u.format=l.RGB_S3TC_DXT1_Format;break;case U:J=16,u.format=l.RGBA_S3TC_DXT3_Format;break;case Z:J=16,u.format=l.RGBA_S3TC_DXT5_Format;break;case K:J=8,u.format=l.RGB_ETC1_Format;break;default:if(N[ge]===32&&N[_e]&16711680&&N[ie]&65280&&N[q]&255&&N[we]&4278190080)me=!0,J=64,u.format=l.RGBAFormat;else return console.error("THREE.DDSLoader.parse: Unsupported FourCC code ",x(F)),u}u.mipmapCount=1,N[Y]&m&&g!==!1&&(u.mipmapCount=Math.max(1,N[Me]));var W=N[be];if(u.isCubemap=!!(W&S),u.isCubemap&&(!(W&_)||!(W&O)||!(W&P)||!(W&w)||!(W&C)||!(W&G)))return console.error("THREE.DDSLoader.parse: Incomplete cubemap faces"),u;u.width=N[z],u.height=N[fe];for(var ue=N[H]+4,e=u.isCubemap?6:1,r=0;r<e;r++)for(var n=u.width,t=u.height,a=0;a<u.mipmapCount;a++){if(me)var i=X(p,ue,n,t),s=i.length;else var s=Math.max(4,n)/4*Math.max(4,t)/4*J,i=new Uint8Array(p,ue,s);var o={data:i,width:n,height:t};u.mipmaps.push(o),ue+=s,n=Math.max(n>>1,1),t=Math.max(t>>1,1)}return u}});var Te=(function(p){Fe(g,p);function g(u){var A=p.call(this)||this;return A.needsRender=!0,u&&u.children.length&&A.add.apply(A,u.children),A.mixer=new ye.AnimationMixer(A),A}return g.prototype.clone=function(){var u=p.prototype.clone.call(this,!0),A=new ye.AnimationMixer(u);return u.mixer=A,u.needsRender=!0,u},g})(ye.Group),Ge="https://vr-public.realsee-cdn.cn/release/static/image/release/five/resource/draco/1.5.6/",Ne=(function(p){Fe(g,p);function g(u){var A=p.call(this,u)||this;return A.ddsLoader=new he(u),A.dracoLoader=new E(u),A.dracoLoader.setDecoderPath(Ge),A}return Object.defineProperty(g,"version",{get:function(){return"6.8.0-alpha.2"},enumerable:!1,configurable:!0}),g.prototype.load=function(u,A,m,S){return p.prototype.load.call(this,u,A,m,S)},g.prototype.parse=function(u,A,m,S){return p.prototype.parse.call(this,u,A,function(_){var O=new Te(_.scene),P=_.scenes.map(function(w){return w===_.scene?O:new Te(w)});m(Object.assign(_,{scene:O,scenes:P}))},S)},g})(De);V.DDSLoader=he,V.DRACOLoader=E,V.GLTFLoader=Ne,V.GLTFObject=Te,V.THREEGLTFLoader=De,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})}));
255
+ */(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`three`)):typeof define==`function`&&define.amd?define([`exports`,`three`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.FiveSDK_GLTFLoader={},e.THREE))})(this,function(e,t){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=a(t),l=0,u=c.length,d;l<u;l++)d=c[l],!s.call(e,d)&&d!==n&&r(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(o=i(t,d))||o.enumerable});return e};t=((e,t,i)=>(i=e==null?{}:n(o(e)),c(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)))(t);var l=(function(){function e(e){t.Loader.call(this,e),this.dracoLoader=null,this.ddsLoader=null}e.prototype=Object.assign(Object.create(t.Loader.prototype),{constructor:e,load:function(e,n,r,i){var a=this,o=this.resourcePath===``?this.path===``?t.LoaderUtils.extractUrlBase(e):this.path:this.resourcePath;a.manager.itemStart(e);var s=function(t){i?i(t):console.error(t),a.manager.itemError(e),a.manager.itemEnd(e)},c=new t.FileLoader(a.manager);c.setPath(this.path),c.setResponseType(`arraybuffer`),c.setRequestHeader(this.requestHeader),a.crossOrigin===`use-credentials`&&c.setWithCredentials(!0),c.load(e,function(t){try{a.parse(t,o,function(t){n(t),a.manager.itemEnd(e)},s)}catch(e){s(e)}},r,s)},setDRACOLoader:function(e){return this.dracoLoader=e,this},setDDSLoader:function(e){return this.ddsLoader=e,this},parse:function(e,n,u,d){var h,v={};if(typeof e==`string`)h=e;else if(t.LoaderUtils.decodeText(new Uint8Array(e,0,4))===l){try{v[r.KHR_BINARY_GLTF]=new f(e)}catch(e){d&&d(e);return}h=v[r.KHR_BINARY_GLTF].content}else h=t.LoaderUtils.decodeText(new Uint8Array(e));var b=JSON.parse(h);if(b.asset===void 0||b.asset.version[0]<2){d&&d(Error(`THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.`));return}if(b.extensionsUsed)for(var x=0;x<b.extensionsUsed.length;++x){var S=b.extensionsUsed[x],C=b.extensionsRequired||[];switch(S){case r.KHR_LIGHTS_PUNCTUAL:v[S]=new a(b);break;case r.KHR_MATERIALS_CLEARCOAT:v[S]=new s;break;case r.KHR_MATERIALS_TRANSMISSION:v[S]=new c;break;case r.KHR_MATERIALS_UNLIT:v[S]=new o;break;case r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:v[S]=new g;break;case r.KHR_DRACO_MESH_COMPRESSION:v[S]=new p(b,this.dracoLoader);break;case r.MSFT_TEXTURE_DDS:v[S]=new i(this.ddsLoader);break;case r.KHR_TEXTURE_TRANSFORM:v[S]=new m;break;case r.KHR_MESH_QUANTIZATION:v[S]=new _;break;case r.REALSEE_MATERIALS_LIGHTMAP:v[S]=new y;break;default:C.indexOf(S)>=0&&console.warn(`THREE.GLTFLoader: Unknown extension "`+S+`".`)}}var w=new R(b,v,{path:n||this.resourcePath||``,crossOrigin:this.crossOrigin,manager:this.manager});w.fileLoader.setRequestHeader(this.requestHeader),w.parse(u,d)}});function n(){var e={};return{get:function(t){return e[t]},add:function(t,n){e[t]=n},remove:function(t){delete e[t]},removeAll:function(){e={}}}}var r={KHR_BINARY_GLTF:`KHR_binary_glTF`,KHR_DRACO_MESH_COMPRESSION:`KHR_draco_mesh_compression`,KHR_LIGHTS_PUNCTUAL:`KHR_lights_punctual`,KHR_MATERIALS_CLEARCOAT:`KHR_materials_clearcoat`,KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS:`KHR_materials_pbrSpecularGlossiness`,KHR_MATERIALS_TRANSMISSION:`KHR_materials_transmission`,KHR_MATERIALS_UNLIT:`KHR_materials_unlit`,KHR_TEXTURE_TRANSFORM:`KHR_texture_transform`,KHR_MESH_QUANTIZATION:`KHR_mesh_quantization`,MSFT_TEXTURE_DDS:`MSFT_texture_dds`,REALSEE_MATERIALS_LIGHTMAP:`REALSEE_materials_lightmap`};function i(e){if(!e)throw Error(`THREE.GLTFLoader: Attempting to load .dds texture without importing DDSLoader`);this.name=r.MSFT_TEXTURE_DDS,this.ddsLoader=e}function a(e){this.name=r.KHR_LIGHTS_PUNCTUAL,this.lightDefs=(e.extensions&&e.extensions[r.KHR_LIGHTS_PUNCTUAL]||{}).lights||[]}a.prototype.loadLight=function(e){var n=this.lightDefs[e],r,i=new t.Color(16777215);n.color!==void 0&&i.fromArray(n.color);var a=n.range===void 0?0:n.range;switch(n.type){case`directional`:r=new t.DirectionalLight(i),r.target.position.set(0,0,-1),r.add(r.target);break;case`point`:r=new t.PointLight(i),r.distance=a;break;case`spot`:r=new t.SpotLight(i),r.distance=a,n.spot=n.spot||{},n.spot.innerConeAngle=n.spot.innerConeAngle===void 0?0:n.spot.innerConeAngle,n.spot.outerConeAngle=n.spot.outerConeAngle===void 0?Math.PI/4:n.spot.outerConeAngle,r.angle=n.spot.outerConeAngle,r.penumbra=1-n.spot.innerConeAngle/n.spot.outerConeAngle,r.target.position.set(0,0,-1),r.add(r.target);break;default:throw Error(`THREE.GLTFLoader: Unexpected light type, "`+n.type+`".`)}return r.position.set(0,0,0),r.decay=2,n.intensity!==void 0&&(r.intensity=n.intensity),r.name=n.name||`light_`+e,Promise.resolve(r)};function o(){this.name=r.KHR_MATERIALS_UNLIT}o.prototype.getMaterialType=function(){return t.MeshBasicMaterial},o.prototype.extendParams=function(e,n,r){var i=[];e.color=new t.Color(1,1,1),e.opacity=1;var a=n.pbrMetallicRoughness;if(a){if(Array.isArray(a.baseColorFactor)){var o=a.baseColorFactor;e.color.fromArray(o),e.opacity=o[3]}a.baseColorTexture!==void 0&&i.push(r.assignTexture(e,`map`,a.baseColorTexture))}return Promise.all(i)};function s(){this.name=r.KHR_MATERIALS_CLEARCOAT}s.prototype.getMaterialType=function(){return t.MeshPhysicalMaterial},s.prototype.extendParams=function(e,n,r){var i=[],a=n.extensions[this.name];if(a.clearcoatFactor!==void 0&&(e.clearcoat=a.clearcoatFactor),a.clearcoatTexture!==void 0&&i.push(r.assignTexture(e,`clearcoatMap`,a.clearcoatTexture)),a.clearcoatRoughnessFactor!==void 0&&(e.clearcoatRoughness=a.clearcoatRoughnessFactor),a.clearcoatRoughnessTexture!==void 0&&i.push(r.assignTexture(e,`clearcoatRoughnessMap`,a.clearcoatRoughnessTexture)),a.clearcoatNormalTexture!==void 0&&(i.push(r.assignTexture(e,`clearcoatNormalMap`,a.clearcoatNormalTexture)),a.clearcoatNormalTexture.scale!==void 0)){var o=a.clearcoatNormalTexture.scale;e.clearcoatNormalScale=new t.Vector2(o,o)}return Promise.all(i)};function c(){this.name=r.KHR_MATERIALS_TRANSMISSION}c.prototype.getMaterialType=function(){return t.MeshPhysicalMaterial},c.prototype.extendParams=function(e,t,n){return t.extensions[this.name].transmissionFactor!==void 0&&(e.premultipliedAlpha=!0,e.transparent=!0,e.opacity=e.opacity===void 0?.5:e.opacity),Promise.all([])};var l=`glTF`,u=12,d={JSON:1313821514,BIN:5130562};function f(e){this.name=r.KHR_BINARY_GLTF,this.content=null,this.body=null;var n=new DataView(e,0,u);if(this.header={magic:t.LoaderUtils.decodeText(new Uint8Array(e.slice(0,4))),version:n.getUint32(4,!0),length:n.getUint32(8,!0)},this.header.magic!==l)throw Error(`THREE.GLTFLoader: Unsupported glTF-Binary header.`);if(this.header.version<2)throw Error(`THREE.GLTFLoader: Legacy binary file detected.`);for(var i=new DataView(e,u),a=0;a<i.byteLength;){var o=i.getUint32(a,!0);a+=4;var s=i.getUint32(a,!0);if(a+=4,s===d.JSON){var c=new Uint8Array(e,u+a,o);this.content=t.LoaderUtils.decodeText(c)}else if(s===d.BIN){var f=u+a;this.body=e.slice(f,f+o)}a+=o}if(this.content===null)throw Error(`THREE.GLTFLoader: JSON content not found.`)}function p(e,t){if(!t)throw Error(`THREE.GLTFLoader: No DRACOLoader instance provided.`);this.name=r.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}p.prototype.decodePrimitive=function(e,t){var n=this.json,r=this.dracoLoader,i=e.extensions[this.name].bufferView,a=e.extensions[this.name].attributes,o={},s={},c={};for(var l in a){var u=T[l]||l.toLowerCase();o[u]=a[l]}for(l in e.attributes){var u=T[l]||l.toLowerCase();if(a[l]!==void 0){var d=n.accessors[e.attributes[l]];c[u]=x[d.componentType],s[u]=d.normalized===!0}}return t.getDependency(`bufferView`,i).then(function(e){return new Promise(function(t){r.decodeDracoFile(e,function(e){for(var n in e.attributes){var r=e.attributes[n],i=s[n];i!==void 0&&(r.normalized=i)}t(e)},o,c)})})};function m(){this.name=r.KHR_TEXTURE_TRANSFORM}m.prototype.extendTexture=function(e,t){return e=e.clone(),t.offset!==void 0&&e.offset.fromArray(t.offset),t.rotation!==void 0&&(e.rotation=t.rotation),t.scale!==void 0&&e.repeat.fromArray(t.scale),t.texCoord!==void 0&&console.warn(`THREE.GLTFLoader: Custom UV sets in "`+this.name+`" extension not yet supported.`),e.needsUpdate=!0,e};function h(e){t.MeshStandardMaterial.call(this),this.isGLTFSpecularGlossinessMaterial=!0;var n=[`#ifdef USE_SPECULARMAP`,` uniform sampler2D specularMap;`,`#endif`].join(`
256
+ `),r=[`#ifdef USE_GLOSSINESSMAP`,` uniform sampler2D glossinessMap;`,`#endif`].join(`
257
+ `),i=[`vec3 specularFactor = specular;`,`#ifdef USE_SPECULARMAP`,` vec4 texelSpecular = texture2D( specularMap, vUv );`,` texelSpecular = sRGBToLinear( texelSpecular );`,` // reads channel RGB, compatible with a glTF Specular-Glossiness (RGBA) texture`,` specularFactor *= texelSpecular.rgb;`,`#endif`].join(`
258
+ `),a=[`float glossinessFactor = glossiness;`,`#ifdef USE_GLOSSINESSMAP`,` vec4 texelGlossiness = texture2D( glossinessMap, vUv );`,` // reads channel A, compatible with a glTF Specular-Glossiness (RGBA) texture`,` glossinessFactor *= texelGlossiness.a;`,`#endif`].join(`
259
+ `),o=[`PhysicalMaterial material;`,`material.diffuseColor = diffuseColor.rgb;`,`vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );`,`float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );`,`material.specularRoughness = max( 1.0 - glossinessFactor, 0.0525 );// 0.0525 corresponds to the base mip of a 256 cubemap.`,`material.specularRoughness += geometryRoughness;`,`material.specularRoughness = min( material.specularRoughness, 1.0 );`,`material.specularColor = specularFactor.rgb;`].join(`
260
+ `),s={specular:{value:new t.Color().setHex(16777215)},glossiness:{value:1},specularMap:{value:null},glossinessMap:{value:null}};this._extraUniforms=s,this.onBeforeCompile=function(e){for(var t in s)e.uniforms[t]=s[t];e.fragmentShader=e.fragmentShader.replace(`uniform float roughness;`,`uniform vec3 specular;`),e.fragmentShader=e.fragmentShader.replace(`uniform float metalness;`,`uniform float glossiness;`),e.fragmentShader=e.fragmentShader.replace(`#include <roughnessmap_pars_fragment>`,n),e.fragmentShader=e.fragmentShader.replace(`#include <metalnessmap_pars_fragment>`,r),e.fragmentShader=e.fragmentShader.replace(`#include <roughnessmap_fragment>`,i),e.fragmentShader=e.fragmentShader.replace(`#include <metalnessmap_fragment>`,a),e.fragmentShader=e.fragmentShader.replace(`#include <lights_physical_fragment>`,o)},Object.defineProperties(this,{specular:{get:function(){return s.specular.value},set:function(e){s.specular.value=e}},specularMap:{get:function(){return s.specularMap.value},set:function(e){s.specularMap.value=e}},glossiness:{get:function(){return s.glossiness.value},set:function(e){s.glossiness.value=e}},glossinessMap:{get:function(){return s.glossinessMap.value},set:function(e){s.glossinessMap.value=e,e?(this.defines.USE_GLOSSINESSMAP=``,this.defines.USE_ROUGHNESSMAP=``):(delete this.defines.USE_ROUGHNESSMAP,delete this.defines.USE_GLOSSINESSMAP)}}}),delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this.setValues(e)}h.prototype=Object.create(t.MeshStandardMaterial.prototype),h.prototype.constructor=h,h.prototype.copy=function(e){return t.MeshStandardMaterial.prototype.copy.call(this,e),this.specularMap=e.specularMap,this.specular.copy(e.specular),this.glossinessMap=e.glossinessMap,this.glossiness=e.glossiness,delete this.metalness,delete this.roughness,delete this.metalnessMap,delete this.roughnessMap,this};function g(){return{name:r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS,specularGlossinessParams:[`color`,`map`,`lightMap`,`lightMapIntensity`,`aoMap`,`aoMapIntensity`,`emissive`,`emissiveIntensity`,`emissiveMap`,`bumpMap`,`bumpScale`,`normalMap`,`normalMapType`,`displacementMap`,`displacementScale`,`displacementBias`,`specularMap`,`specular`,`glossinessMap`,`glossiness`,`alphaMap`,`envMap`,`envMapIntensity`,`refractionRatio`],getMaterialType:function(){return h},extendParams:function(e,n,r){var i=n.extensions[this.name];e.color=new t.Color(1,1,1),e.opacity=1;var a=[];if(Array.isArray(i.diffuseFactor)){var o=i.diffuseFactor;e.color.fromArray(o),e.opacity=o[3]}if(i.diffuseTexture!==void 0&&a.push(r.assignTexture(e,`map`,i.diffuseTexture)),e.emissive=new t.Color(0,0,0),e.glossiness=i.glossinessFactor===void 0?1:i.glossinessFactor,e.specular=new t.Color(1,1,1),Array.isArray(i.specularFactor)&&e.specular.fromArray(i.specularFactor),i.specularGlossinessTexture!==void 0){var s=i.specularGlossinessTexture;a.push(r.assignTexture(e,`glossinessMap`,s)),a.push(r.assignTexture(e,`specularMap`,s))}return Promise.all(a)},createMaterial:function(e){var n=new h(e);return n.fog=!0,n.color=e.color,n.map=e.map===void 0?null:e.map,n.lightMap=null,n.lightMapIntensity=1,n.aoMap=e.aoMap===void 0?null:e.aoMap,n.aoMapIntensity=1,n.emissive=e.emissive,n.emissiveIntensity=1,n.emissiveMap=e.emissiveMap===void 0?null:e.emissiveMap,n.bumpMap=e.bumpMap===void 0?null:e.bumpMap,n.bumpScale=1,n.normalMap=e.normalMap===void 0?null:e.normalMap,n.normalMapType=t.TangentSpaceNormalMap,e.normalScale&&(n.normalScale=e.normalScale),n.displacementMap=null,n.displacementScale=1,n.displacementBias=0,n.specularMap=e.specularMap===void 0?null:e.specularMap,n.specular=e.specular,n.glossinessMap=e.glossinessMap===void 0?null:e.glossinessMap,n.glossiness=e.glossiness,n.alphaMap=null,n.envMap=e.envMap===void 0?null:e.envMap,n.envMapIntensity=1,n.refractionRatio=.98,n}}}function _(){this.name=r.KHR_MESH_QUANTIZATION}function v(e,n,r,i){t.Interpolant.call(this,e,n,r,i)}v.prototype=Object.create(t.Interpolant.prototype),v.prototype.constructor=v,v.prototype.copySampleValue_=function(e){for(var t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r*3+r,a=0;a!==r;a++)t[a]=n[i+a];return t},v.prototype.beforeStart_=v.prototype.copySampleValue_,v.prototype.afterEnd_=v.prototype.copySampleValue_,v.prototype.interpolate_=function(e,t,n,r){for(var i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=o*2,c=o*3,l=r-t,u=(n-t)/l,d=u*u,f=d*u,p=e*c,m=p-c,h=-2*f+3*d,g=f-d,_=1-h,v=g-d+u,y=0;y!==o;y++){var b=a[m+y+o],x=a[m+y+s]*l,S=a[p+y+o],C=a[p+y]*l;i[y]=_*b+v*x+h*S+g*C}return i};function y(e){this.parser=e,this.name=r.REALSEE_MATERIALS_LIGHTMAP}y.prototype.getMaterialType=function(e){return t.MeshPhongMaterial},y.prototype.extendParams=function(e,t,n){if(!t.extensions||!t.extensions[this.name])return Promise.resolve();var r=[],i=t.extensions[this.name];return i.lightMapTexture!==void 0&&r.push(n.assignTexture(e,`lightMap`,i.lightMapTexture)),i.lightMapIntensity!==void 0&&(e.lightMapIntensity=i.lightMapIntensity),Promise.all(r)};var b={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},x={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},S={9728:t.NearestFilter,9729:t.LinearFilter,9984:t.NearestMipmapNearestFilter,9985:t.LinearMipmapNearestFilter,9986:t.NearestMipmapLinearFilter,9987:t.LinearMipmapLinearFilter},C={33071:t.ClampToEdgeWrapping,33648:t.MirroredRepeatWrapping,10497:t.RepeatWrapping},w={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},T={POSITION:`position`,NORMAL:`normal`,TANGENT:`tangent`,TEXCOORD_0:`uv`,TEXCOORD_1:`uv2`,COLOR_0:`color`,WEIGHTS_0:`skinWeight`,JOINTS_0:`skinIndex`},E={scale:`scale`,translation:`position`,rotation:`quaternion`,weights:`morphTargetInfluences`},D={CUBICSPLINE:void 0,LINEAR:t.InterpolateLinear,STEP:t.InterpolateDiscrete},O={OPAQUE:`OPAQUE`,MASK:`MASK`,BLEND:`BLEND`},k={"image/png":t.RGBAFormat,"image/jpeg":t.RGBFormat};function A(e,t){return typeof e!=`string`||e===``?``:(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,`$1`)),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}function j(e){return e.DefaultMaterial===void 0&&(e.DefaultMaterial=new t.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:t.FrontSide})),e.DefaultMaterial}function M(e,t,n){for(var r in n.extensions)e[r]===void 0&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[r]=n.extensions[r])}function N(e,t){t.extras!==void 0&&(typeof t.extras==`object`?Object.assign(e.userData,t.extras):console.warn(`THREE.GLTFLoader: Ignoring primitive type .extras, `+t.extras))}function P(e,t,n){for(var r=!1,i=!1,a=0,o=t.length;a<o;a++){var s=t[a];if(s.POSITION!==void 0&&(r=!0),s.NORMAL!==void 0&&(i=!0),r&&i)break}if(!r&&!i)return Promise.resolve(e);for(var c=[],l=[],a=0,o=t.length;a<o;a++){var s=t[a];if(r){var u=s.POSITION===void 0?e.attributes.position:n.getDependency(`accessor`,s.POSITION);c.push(u)}if(i){var u=s.NORMAL===void 0?e.attributes.normal:n.getDependency(`accessor`,s.NORMAL);l.push(u)}}return Promise.all([Promise.all(c),Promise.all(l)]).then(function(t){var n=t[0],a=t[1];return r&&(e.morphAttributes.position=n),i&&(e.morphAttributes.normal=a),e.morphTargetsRelative=!0,e})}function F(e,t){if(e.updateMorphTargets(),t.weights!==void 0)for(var n=0,r=t.weights.length;n<r;n++)e.morphTargetInfluences[n]=t.weights[n];if(t.extras&&Array.isArray(t.extras.targetNames)){var i=t.extras.targetNames;if(e.morphTargetInfluences.length===i.length){e.morphTargetDictionary={};for(var n=0,r=i.length;n<r;n++)e.morphTargetDictionary[i[n]]=n}else console.warn(`THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.`)}}function I(e){var t=e.extensions&&e.extensions[r.KHR_DRACO_MESH_COMPRESSION];return t?`draco:`+t.bufferView+`:`+t.indices+`:`+L(t.attributes):e.indices+`:`+L(e.attributes)+`:`+e.mode}function L(e){for(var t=``,n=Object.keys(e).sort(),r=0,i=n.length;r<i;r++)t+=n[r]+`:`+e[n[r]]+`;`;return t}function R(e,r,i){this.json=e||{},this.extensions=r||{},this.options=i||{},this.cache=new n,this.associations=new Map,this.primitiveCache={},this.textureLoader=new t.TextureLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.fileLoader=new t.FileLoader(this.options.manager),this.fileLoader.setResponseType(`arraybuffer`),this.options.crossOrigin===`use-credentials`&&this.fileLoader.setWithCredentials(!0)}R.prototype.parse=function(e,t){var n=this,r=this.json,i=this.extensions;this.cache.removeAll(),this.markDefs(),Promise.all([this.getDependencies(`scene`),this.getDependencies(`animation`),this.getDependencies(`camera`)]).then(function(t){var a={scene:t[0][r.scene||0],scenes:t[0],animations:t[1],cameras:t[2],asset:r.asset,parser:n,userData:{}};M(i,a,r),N(a,r),e(a)}).catch(t)},R.prototype.markDefs=function(){for(var e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[],r={},i={},a=0,o=t.length;a<o;a++)for(var s=t[a].joints,c=0,l=s.length;c<l;c++)e[s[c]].isBone=!0;for(var u=0,d=e.length;u<d;u++){var f=e[u];f.mesh!==void 0&&(r[f.mesh]===void 0&&(r[f.mesh]=i[f.mesh]=0),r[f.mesh]++,f.skin!==void 0&&(n[f.mesh].isSkinnedMesh=!0))}this.json.meshReferences=r,this.json.meshUses=i},R.prototype.getDependency=function(e,t){var n=e+`:`+t,i=this.cache.get(n);if(!i){switch(e){case`scene`:i=this.loadScene(t);break;case`node`:i=this.loadNode(t);break;case`mesh`:i=this.loadMesh(t);break;case`accessor`:i=this.loadAccessor(t);break;case`bufferView`:i=this.loadBufferView(t);break;case`buffer`:i=this.loadBuffer(t);break;case`material`:i=this.loadMaterial(t);break;case`texture`:i=this.loadTexture(t);break;case`skin`:i=this.loadSkin(t);break;case`animation`:i=this.loadAnimation(t);break;case`camera`:i=this.loadCamera(t);break;case`light`:i=this.extensions[r.KHR_LIGHTS_PUNCTUAL].loadLight(t);break;default:throw Error(`Unknown type: `+e)}this.cache.add(n,i)}return i},R.prototype.getDependencies=function(e){var t=this.cache.get(e);if(!t){var n=this,r=this.json[e+(e===`mesh`?`es`:`s`)]||[];t=Promise.all(r.map(function(t,r){return n.getDependency(e,r)})),this.cache.add(e,t)}return t},R.prototype.loadBuffer=function(e){var t=this.json.buffers[e],n=this.fileLoader;if(t.type&&t.type!==`arraybuffer`)throw Error(`THREE.GLTFLoader: `+t.type+` buffer type is not supported.`);if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[r.KHR_BINARY_GLTF].body);var i=this.options;return new Promise(function(e,r){n.load(A(t.uri,i.path),e,void 0,function(){r(Error(`THREE.GLTFLoader: Failed to load buffer "`+t.uri+`".`))})})},R.prototype.loadBufferView=function(e){var t=this.json.bufferViews[e];return this.getDependency(`buffer`,t.buffer).then(function(e){var n=t.byteLength||0,r=t.byteOffset||0;return e.slice(r,r+n)})},R.prototype.loadAccessor=function(e){var n=this,r=this.json,i=this.json.accessors[e];if(i.bufferView===void 0&&i.sparse===void 0)return Promise.resolve(null);var a=[];return i.bufferView===void 0?a.push(null):a.push(this.getDependency(`bufferView`,i.bufferView)),i.sparse!==void 0&&(a.push(this.getDependency(`bufferView`,i.sparse.indices.bufferView)),a.push(this.getDependency(`bufferView`,i.sparse.values.bufferView))),Promise.all(a).then(function(e){var a=e[0],o=w[i.type],s=x[i.componentType],c=s.BYTES_PER_ELEMENT,l=c*o,u=i.byteOffset||0,d=i.bufferView===void 0?void 0:r.bufferViews[i.bufferView].byteStride,f=i.normalized===!0,p,m;if(d&&d!==l){var h=Math.floor(u/d),g=`InterleavedBuffer:`+i.bufferView+`:`+i.componentType+`:`+h+`:`+i.count,_=n.cache.get(g);_||(p=new s(a,h*d,i.count*d/c),_=new t.InterleavedBuffer(p,d/c),n.cache.add(g,_)),m=new t.InterleavedBufferAttribute(_,o,u%d/c,f)}else p=a===null?new s(i.count*o):new s(a,u,i.count*o),m=new t.BufferAttribute(p,o,f);if(i.sparse!==void 0){var v=w.SCALAR,y=x[i.sparse.indices.componentType],b=i.sparse.indices.byteOffset||0,S=i.sparse.values.byteOffset||0,C=new y(e[1],b,i.sparse.count*v),T=new s(e[2],S,i.sparse.count*o);a!==null&&(m=new t.BufferAttribute(m.array.slice(),m.itemSize,m.normalized));for(var E=0,D=C.length;E<D;E++){var O=C[E];if(m.setX(O,T[E*o]),o>=2&&m.setY(O,T[E*o+1]),o>=3&&m.setZ(O,T[E*o+2]),o>=4&&m.setW(O,T[E*o+3]),o>=5)throw Error(`THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.`)}}return m})},R.prototype.loadTexture=function(e){var n=this,i=this.json,a=this.options,o=this.textureLoader,s=self.URL||self.webkitURL,c=i.textures[e],l=c.extensions||{},u=l[r.MSFT_TEXTURE_DDS]?i.images[l[r.MSFT_TEXTURE_DDS].source]:i.images[c.source],d=u.uri,f=!1;return u.bufferView!==void 0&&(d=n.getDependency(`bufferView`,u.bufferView).then(function(e){f=!0;var t=new Blob([e],{type:u.mimeType});return d=s.createObjectURL(t),d})),Promise.resolve(d).then(function(e){var t=a.manager.getHandler(e);return t||(t=l[r.MSFT_TEXTURE_DDS]?n.extensions[r.MSFT_TEXTURE_DDS].ddsLoader:o),new Promise(function(n,r){t.load(A(e,a.path),n,void 0,r)})}).then(function(r){f===!0&&s.revokeObjectURL(d),r.flipY=!1,c.name&&(r.name=c.name),u.mimeType in k&&(r.format=k[u.mimeType]);var a=(i.samplers||{})[c.sampler]||{};return r.magFilter=S[a.magFilter]||t.LinearFilter,r.minFilter=S[a.minFilter]||t.LinearMipmapLinearFilter,r.wrapS=C[a.wrapS]||t.RepeatWrapping,r.wrapT=C[a.wrapT]||t.RepeatWrapping,n.associations.set(r,{type:`textures`,index:e}),r})},R.prototype.assignTexture=function(e,n,i){var a=this;return this.getDependency(`texture`,i.index).then(function(o){if(!o.isCompressedTexture)switch(n){case`aoMap`:case`emissiveMap`:case`metalnessMap`:case`normalMap`:case`roughnessMap`:o.format=t.RGBFormat;break}if(i.texCoord!==void 0&&i.texCoord!=0&&!(n===`aoMap`&&i.texCoord==1)&&console.warn(`THREE.GLTFLoader: Custom UV set `+i.texCoord+` for texture `+n+` not yet supported.`),a.extensions[r.KHR_TEXTURE_TRANSFORM]){var s=i.extensions===void 0?void 0:i.extensions[r.KHR_TEXTURE_TRANSFORM];if(s){var c=a.associations.get(o);o=a.extensions[r.KHR_TEXTURE_TRANSFORM].extendTexture(o,s),a.associations.set(o,c)}}e[n]=o})},R.prototype.assignFinalMaterial=function(e){var n=e.geometry,r=e.material,i=n.attributes.tangent!==void 0,a=n.attributes.color!==void 0,o=n.attributes.normal===void 0,s=e.isSkinnedMesh===!0,c=Object.keys(n.morphAttributes).length>0,l=c&&n.morphAttributes.normal!==void 0;if(e.isPoints){var u=`PointsMaterial:`+r.uuid,d=this.cache.get(u);d||(d=new t.PointsMaterial,t.Material.prototype.copy.call(d,r),d.color.copy(r.color),d.map=r.map,d.sizeAttenuation=!1,this.cache.add(u,d)),r=d}else if(e.isLine){var u=`LineBasicMaterial:`+r.uuid,f=this.cache.get(u);f||(f=new t.LineBasicMaterial,t.Material.prototype.copy.call(f,r),f.color.copy(r.color),this.cache.add(u,f)),r=f}if(i||a||o||s||c){var u=`ClonedMaterial:`+r.uuid+`:`;r.isGLTFSpecularGlossinessMaterial&&(u+=`specular-glossiness:`),s&&(u+=`skinning:`),i&&(u+=`vertex-tangents:`),a&&(u+=`vertex-colors:`),o&&(u+=`flat-shading:`),c&&(u+=`morph-targets:`),l&&(u+=`morph-normals:`);var p=this.cache.get(u);p||(p=r.clone(),s&&(p.skinning=!0),i&&(p.vertexTangents=!0),a&&(p.vertexColors=!0),o&&(p.flatShading=!0),c&&(p.morphTargets=!0),l&&(p.morphNormals=!0),this.cache.add(u,p),this.associations.set(p,this.associations.get(r))),r=p}r.aoMap&&n.attributes.uv2===void 0&&n.attributes.uv!==void 0&&n.setAttribute(`uv2`,n.attributes.uv),r.normalScale&&!i&&(r.normalScale.y=-r.normalScale.y),r.clearcoatNormalScale&&!i&&(r.clearcoatNormalScale.y=-r.clearcoatNormalScale.y),e.material=r},R.prototype.loadMaterial=function(e){var n=this,i=this.json,a=this.extensions,o=i.materials[e],s,c={},l=o.extensions||{},u=[];if(l[r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS]){var d=a[r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS];s=d.getMaterialType(),u.push(d.extendParams(c,o,n))}else if(l[r.KHR_MATERIALS_UNLIT]){var f=a[r.KHR_MATERIALS_UNLIT];s=f.getMaterialType(),u.push(f.extendParams(c,o,n))}else{s=t.MeshStandardMaterial;var p=o.pbrMetallicRoughness||{};if(c.color=new t.Color(1,1,1),c.opacity=1,Array.isArray(p.baseColorFactor)){var m=p.baseColorFactor;c.color.fromArray(m),c.opacity=m[3]}p.baseColorTexture!==void 0&&u.push(n.assignTexture(c,`map`,p.baseColorTexture)),c.metalness=p.metallicFactor===void 0?1:p.metallicFactor,c.roughness=p.roughnessFactor===void 0?1:p.roughnessFactor,p.metallicRoughnessTexture!==void 0&&(u.push(n.assignTexture(c,`metalnessMap`,p.metallicRoughnessTexture)),u.push(n.assignTexture(c,`roughnessMap`,p.metallicRoughnessTexture)))}o.doubleSided===!0&&(c.side=t.DoubleSide);var g=o.alphaMode||O.OPAQUE;if(g===O.BLEND?(c.transparent=!0,c.depthWrite=!1):(c.transparent=!1,g===O.MASK&&(c.alphaTest=o.alphaCutoff===void 0?.5:o.alphaCutoff)),o.normalTexture!==void 0&&s!==t.MeshBasicMaterial&&(u.push(n.assignTexture(c,`normalMap`,o.normalTexture)),c.normalScale=new t.Vector2(1,1),o.normalTexture.scale!==void 0&&c.normalScale.set(o.normalTexture.scale,o.normalTexture.scale)),o.occlusionTexture!==void 0&&s!==t.MeshBasicMaterial&&(u.push(n.assignTexture(c,`aoMap`,o.occlusionTexture)),o.occlusionTexture.strength!==void 0&&(c.aoMapIntensity=o.occlusionTexture.strength)),o.emissiveFactor!==void 0&&s!==t.MeshBasicMaterial&&(c.emissive=new t.Color().fromArray(o.emissiveFactor)),o.emissiveTexture!==void 0&&s!==t.MeshBasicMaterial&&u.push(n.assignTexture(c,`emissiveMap`,o.emissiveTexture)),l[r.KHR_MATERIALS_CLEARCOAT]){var _=a[r.KHR_MATERIALS_CLEARCOAT];s=_.getMaterialType(),u.push(_.extendParams(c,{extensions:l},n))}if(l[r.KHR_MATERIALS_TRANSMISSION]){var _=a[r.KHR_MATERIALS_TRANSMISSION];s=_.getMaterialType(),u.push(_.extendParams(c,{extensions:l},n))}if(l[r.REALSEE_MATERIALS_LIGHTMAP]){var v=a[r.REALSEE_MATERIALS_LIGHTMAP];s=v.getMaterialType(),u.push(v.extendParams(c,{extensions:l},n))}return Promise.all(u).then(function(){var i=s===h?a[r.KHR_MATERIALS_PBR_SPECULAR_GLOSSINESS].createMaterial(c):new s(c);return o.name&&(i.name=o.name),i.map&&(i.map.encoding=t.sRGBEncoding),i.emissiveMap&&(i.emissiveMap.encoding=t.sRGBEncoding),N(i,o),n.associations.set(i,{type:`materials`,index:e}),o.extensions&&M(a,i,o),i})};function z(e,n,r){var i=n.attributes,a=new t.Box3;if(i.POSITION!==void 0){var o=r.json.accessors[i.POSITION],s=o.min,c=o.max;if(s!==void 0&&c!==void 0)a.set(new t.Vector3(s[0],s[1],s[2]),new t.Vector3(c[0],c[1],c[2]));else{console.warn(`THREE.GLTFLoader: Missing min/max properties for accessor POSITION.`);return}}else return;var l=n.targets;if(l!==void 0){for(var u=new t.Vector3,d=new t.Vector3,f=0,p=l.length;f<p;f++){var m=l[f];if(m.POSITION!==void 0){var o=r.json.accessors[m.POSITION],s=o.min,c=o.max;s!==void 0&&c!==void 0?(d.setX(Math.max(Math.abs(s[0]),Math.abs(c[0]))),d.setY(Math.max(Math.abs(s[1]),Math.abs(c[1]))),d.setZ(Math.max(Math.abs(s[2]),Math.abs(c[2]))),u.max(d)):console.warn(`THREE.GLTFLoader: Missing min/max properties for accessor POSITION.`)}}a.expandByVector(u)}e.boundingBox=a;var h=new t.Sphere;a.getCenter(h.center),h.radius=a.min.distanceTo(a.max)/2,e.boundingSphere=h}function B(e,t,n){var r=t.attributes,i=[];function a(t,r){return n.getDependency(`accessor`,t).then(function(t){e.setAttribute(r,t)})}for(var o in r){var s=T[o]||o.toLowerCase();s in e.attributes||i.push(a(r[o],s))}if(t.indices!==void 0&&!e.index){var c=n.getDependency(`accessor`,t.indices).then(function(t){e.setIndex(t)});i.push(c)}return N(e,t),z(e,t,n),Promise.all(i).then(function(){return t.targets===void 0?e:P(e,t.targets,n)})}function V(e,n){var r=e.getIndex();if(r===null){var i=[],a=e.getAttribute(`position`);if(a!==void 0){for(var o=0;o<a.count;o++)i.push(o);e.setIndex(i),r=e.getIndex()}else return console.error(`THREE.GLTFLoader.toTrianglesDrawMode(): Undefined position attribute. Processing not possible.`),e}var s=r.count-2,c=[];if(n===t.TriangleFanDrawMode)for(var o=1;o<=s;o++)c.push(r.getX(0)),c.push(r.getX(o)),c.push(r.getX(o+1));else for(var o=0;o<s;o++)o%2==0?(c.push(r.getX(o)),c.push(r.getX(o+1)),c.push(r.getX(o+2))):(c.push(r.getX(o+2)),c.push(r.getX(o+1)),c.push(r.getX(o)));c.length/3!==s&&console.error(`THREE.GLTFLoader.toTrianglesDrawMode(): Unable to generate correct amount of triangles.`);var l=e.clone();return l.setIndex(c),l}return R.prototype.loadGeometries=function(e){var n=this,i=this.extensions,a=this.primitiveCache;function o(e){return i[r.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e,n).then(function(t){return B(t,e,n)})}for(var s=[],c=0,l=e.length;c<l;c++){var u=e[c],d=I(u),f=a[d];if(f)s.push(f.promise);else{var p=u.extensions&&u.extensions[r.KHR_DRACO_MESH_COMPRESSION]?o(u):B(new t.BufferGeometry,u,n);a[d]={primitive:u,promise:p},s.push(p)}}return Promise.all(s)},R.prototype.loadMesh=function(e){for(var n=this,r=this.json.meshes[e],i=r.primitives,a=[],o=0,s=i.length;o<s;o++){var c=i[o].material===void 0?j(this.cache):this.getDependency(`material`,i[o].material);a.push(c)}return a.push(n.loadGeometries(i)),Promise.all(a).then(function(a){for(var o=a.slice(0,a.length-1),s=a[a.length-1],c=[],l=0,u=s.length;l<u;l++){var d=s[l],f=i[l],p,m=o[l];if(f.mode===b.TRIANGLES||f.mode===b.TRIANGLE_STRIP||f.mode===b.TRIANGLE_FAN||f.mode===void 0)p=r.isSkinnedMesh===!0?new t.SkinnedMesh(d,m):new t.Mesh(d,m),p.isSkinnedMesh===!0&&!p.geometry.attributes.skinWeight.normalized&&p.normalizeSkinWeights(),f.mode===b.TRIANGLE_STRIP?p.geometry=V(p.geometry,t.TriangleStripDrawMode):f.mode===b.TRIANGLE_FAN&&(p.geometry=V(p.geometry,t.TriangleFanDrawMode));else if(f.mode===b.LINES)p=new t.LineSegments(d,m);else if(f.mode===b.LINE_STRIP)p=new t.Line(d,m);else if(f.mode===b.LINE_LOOP)p=new t.LineLoop(d,m);else if(f.mode===b.POINTS)p=new t.Points(d,m);else throw Error(`THREE.GLTFLoader: Primitive mode unsupported: `+f.mode);Object.keys(p.geometry.morphAttributes).length>0&&F(p,r),p.name=r.name||`mesh_`+e,s.length>1&&(p.name+=`_`+l),N(p,r),n.assignFinalMaterial(p),c.push(p)}if(c.length===1)return c[0];for(var h=new t.Group,l=0,u=c.length;l<u;l++)h.add(c[l]);return h})},R.prototype.loadCamera=function(e){var n,r=this.json.cameras[e],i=r[r.type];if(!i){console.warn(`THREE.GLTFLoader: Missing camera parameters.`);return}return r.type===`perspective`?n=new t.PerspectiveCamera(t.MathUtils.radToDeg(i.yfov),i.aspectRatio||1,i.znear||1,i.zfar||2e6):r.type===`orthographic`&&(n=new t.OrthographicCamera(-i.xmag,i.xmag,i.ymag,-i.ymag,i.znear,i.zfar)),r.name&&(n.name=r.name),N(n,r),Promise.resolve(n)},R.prototype.loadSkin=function(e){var t=this.json.skins[e],n={joints:t.joints};return t.inverseBindMatrices===void 0?Promise.resolve(n):this.getDependency(`accessor`,t.inverseBindMatrices).then(function(e){return n.inverseBindMatrices=e,n})},R.prototype.loadAnimation=function(e){for(var n=this.json.animations[e],r=[],i=[],a=[],o=[],s=[],c=0,l=n.channels.length;c<l;c++){var u=n.channels[c],d=n.samplers[u.sampler],f=u.target,p=f.node===void 0?f.id:f.node,m=n.parameters===void 0?d.input:n.parameters[d.input],h=n.parameters===void 0?d.output:n.parameters[d.output];r.push(this.getDependency(`node`,p)),i.push(this.getDependency(`accessor`,m)),a.push(this.getDependency(`accessor`,h)),o.push(d),s.push(f)}return Promise.all([Promise.all(r),Promise.all(i),Promise.all(a),Promise.all(o),Promise.all(s)]).then(function(r){for(var i=r[0],a=r[1],o=r[2],s=r[3],c=r[4],l=[],u=0,d=i.length;u<d;u++){var f=i[u],p=a[u],m=o[u],h=s[u],g=c[u];if(f!==void 0){f.updateMatrix(),f.matrixAutoUpdate=!0;var _;switch(E[g.path]){case E.weights:_=t.NumberKeyframeTrack;break;case E.rotation:_=t.QuaternionKeyframeTrack;break;case E.position:case E.scale:default:_=t.VectorKeyframeTrack;break}var y=f.name?f.name:f.uuid,b=h.interpolation===void 0?t.InterpolateLinear:D[h.interpolation],x=[];E[g.path]===E.weights?f.traverse(function(e){e.isMesh===!0&&e.morphTargetInfluences&&x.push(e.name?e.name:e.uuid)}):x.push(y);var S=m.array;if(m.normalized){var C;if(S.constructor===Int8Array)C=1/127;else if(S.constructor===Uint8Array)C=1/255;else if(S.constructor==Int16Array)C=1/32767;else if(S.constructor===Uint16Array)C=1/65535;else throw Error(`THREE.GLTFLoader: Unsupported output accessor component type.`);for(var w=new Float32Array(S.length),T=0,O=S.length;T<O;T++)w[T]=S[T]*C;S=w}for(var T=0,O=x.length;T<O;T++){var k=new _(x[T]+`.`+E[g.path],p.array,S,b);h.interpolation===`CUBICSPLINE`&&(k.createInterpolant=function(e){return new v(this.times,this.values,this.getValueSize()/3,e)},k.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),l.push(k)}}}return new t.AnimationClip(n.name?n.name:`animation_`+e,void 0,l)})},R.prototype.loadNode=function(e){var n=this.json,i=this.extensions,a=this,o=n.meshReferences,s=n.meshUses,c=n.nodes[e];return function(){var e=[];return c.mesh!==void 0&&e.push(a.getDependency(`mesh`,c.mesh).then(function(e){var t;if(o[c.mesh]>1){var n=s[c.mesh]++;t=e.clone(),t.name+=`_instance_`+n}else t=e;return c.weights!==void 0&&t.traverse(function(e){if(e.isMesh)for(var t=0,n=c.weights.length;t<n;t++)e.morphTargetInfluences[t]=c.weights[t]}),t})),c.camera!==void 0&&e.push(a.getDependency(`camera`,c.camera)),c.extensions&&c.extensions[r.KHR_LIGHTS_PUNCTUAL]&&c.extensions[r.KHR_LIGHTS_PUNCTUAL].light!==void 0&&e.push(a.getDependency(`light`,c.extensions[r.KHR_LIGHTS_PUNCTUAL].light)),Promise.all(e)}().then(function(n){var r=c.isBone===!0?new t.Bone:n.length>1?new t.Group:n.length===1?n[0]:new t.Object3D;if(r!==n[0])for(var o=0,s=n.length;o<s;o++)r.add(n[o]);if(c.name&&(r.userData.name=c.name,r.name=t.PropertyBinding.sanitizeNodeName(c.name)),N(r,c),c.extensions&&M(i,r,c),c.matrix!==void 0){var l=new t.Matrix4;l.fromArray(c.matrix),r.applyMatrix4(l)}else c.translation!==void 0&&r.position.fromArray(c.translation),c.rotation!==void 0&&r.quaternion.fromArray(c.rotation),c.scale!==void 0&&r.scale.fromArray(c.scale);return a.associations.set(r,{type:`nodes`,index:e}),r})},R.prototype.loadScene=function(){function e(n,r,i,a){var o=i.nodes[n];return a.getDependency(`node`,n).then(function(e){if(o.skin===void 0)return e;var n;return a.getDependency(`skin`,o.skin).then(function(e){n=e;for(var t=[],r=0,i=n.joints.length;r<i;r++)t.push(a.getDependency(`node`,n.joints[r]));return Promise.all(t)}).then(function(r){return e.traverse(function(e){if(e.isMesh){for(var i=[],a=[],o=0,s=r.length;o<s;o++){var c=r[o];if(c){i.push(c);var l=new t.Matrix4;n.inverseBindMatrices!==void 0&&l.fromArray(n.inverseBindMatrices.array,o*16),a.push(l)}else console.warn(`THREE.GLTFLoader: Joint "%s" could not be found.`,n.joints[o])}e.bind(new t.Skeleton(i,a),e.matrixWorld)}}),e})}).then(function(t){r.add(t);var n=[];if(o.children)for(var s=o.children,c=0,l=s.length;c<l;c++){var u=s[c];n.push(e(u,t,i,a))}return Promise.all(n)})}return function(n){var r=this.json,i=this.extensions,a=this.json.scenes[n],o=this,s=new t.Group;a.name&&(s.name=a.name),N(s,a),a.extensions&&M(i,s,a);for(var c=a.nodes||[],l=[],u=0,d=c.length;u<d;u++)l.push(e(c[u],s,r,o));return Promise.all(l).then(function(){return s})}}(),e})(),u=function(e){t.Loader.call(this,e),this.decoderPath=``,this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL=``,this.defaultAttributeIDs={position:`POSITION`,normal:`NORMAL`,color:`COLOR`,uv:`TEX_COORD`},this.defaultAttributeTypes={position:`Float32Array`,normal:`Float32Array`,color:`Float32Array`,uv:`Float32Array`}};u.prototype=Object.assign(Object.create(t.Loader.prototype),{constructor:u,setDecoderPath:function(e){return this.decoderPath=e,this},setDecoderConfig:function(e){return this.decoderConfig=e,this},setWorkerLimit:function(e){return this.workerLimit=e,this},setVerbosity:function(){console.warn(`THREE.DRACOLoader: The .setVerbosity() method has been removed.`)},setDrawMode:function(){console.warn(`THREE.DRACOLoader: The .setDrawMode() method has been removed.`)},setSkipDequantization:function(){console.warn(`THREE.DRACOLoader: The .setSkipDequantization() method has been removed.`)},load:function(e,n,r,i){var a=new t.FileLoader(this.manager);a.setPath(this.path),a.setResponseType(`arraybuffer`),this.crossOrigin===`use-credentials`&&a.setWithCredentials(!0),a.load(e,e=>{var t={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(e,t).then(n).catch(i)},r,i)},decodeDracoFile:function(e,t,n,r){var i={attributeIDs:n||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!n};this.decodeGeometry(e,i).then(t)},decodeGeometry:function(e,t){for(var n in t.attributeTypes){var r=t.attributeTypes[n];r.BYTES_PER_ELEMENT!==void 0&&(t.attributeTypes[n]=r.name)}var i=JSON.stringify(t);if(u.taskCache.has(e)){var a=u.taskCache.get(e);if(a.key===i)return a.promise;if(e.byteLength===0)throw Error(`THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.`)}var o,s=this.workerNextTaskID++,c=e.byteLength,l=this._getWorker(s,c).then(n=>(o=n,new Promise((n,r)=>{o._callbacks[s]={resolve:n,reject:r},o.postMessage({type:`decode`,id:s,taskConfig:t,buffer:e},[e])}))).then(e=>this._createGeometry(e.geometry));return l.catch(()=>!0).then(()=>{o&&s&&this._releaseTask(o,s)}),u.taskCache.set(e,{key:i,promise:l}),l},_createGeometry:function(e){var n=new t.BufferGeometry;e.index&&n.setIndex(new t.BufferAttribute(e.index.array,1));for(var r=0;r<e.attributes.length;r++){var i=e.attributes[r],a=i.name,o=i.array,s=i.itemSize;n.setAttribute(a,new t.BufferAttribute(o,s))}return n},_loadLibrary:function(e,n){var r=new t.FileLoader(this.manager);return r.setPath(this.decoderPath),r.setResponseType(n),new Promise((t,n)=>{r.load(e,t,void 0,n)})},preload:function(){return this._initDecoder(),this},_initDecoder:function(){if(this.decoderPending)return this.decoderPending;var e=typeof WebAssembly!=`object`||this.decoderConfig.type===`js`,t=[];return e?t.push(this._loadLibrary(`draco_decoder.js`,`text`)):(t.push(this._loadLibrary(`draco_wasm_wrapper.js`,`text`)),t.push(this._loadLibrary(`draco_decoder.wasm`,`arraybuffer`))),this.decoderPending=Promise.all(t).then(t=>{var n=t[0];e||(this.decoderConfig.wasmBinary=t[1]);var r=u.DRACOWorker.toString(),i=[`/* draco decoder */`,n,``,`/* worker */`,r.substring(r.indexOf(`{`)+1,r.lastIndexOf(`}`))].join(`
261
+ `);this.workerSourceURL=URL.createObjectURL(new Blob([i]))}),this.decoderPending},_getWorker:function(e,t){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){var n=new Worker(this.workerSourceURL);n._callbacks={},n._taskCosts={},n._taskLoad=0,n.postMessage({type:`init`,decoderConfig:this.decoderConfig}),n.onmessage=function(e){var t=e.data;switch(t.type){case`decode`:n._callbacks[t.id].resolve(t);break;case`error`:n._callbacks[t.id].reject(t);break;default:console.error(`THREE.DRACOLoader: Unexpected message, "`+t.type+`"`)}},this.workerPool.push(n)}else this.workerPool.sort(function(e,t){return e._taskLoad>t._taskLoad?-1:1});var n=this.workerPool[this.workerPool.length-1];return n._taskCosts[e]=t,n._taskLoad+=t,n})},_releaseTask:function(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]},debug:function(){console.log(`Task load: `,this.workerPool.map(e=>e._taskLoad))},dispose:function(){for(var e=0;e<this.workerPool.length;++e)this.workerPool[e].terminate();return this.workerPool.length=0,this}}),u.DRACOWorker=function(){var e,t;onmessage=function(r){var i=r.data;switch(i.type){case`init`:e=i.decoderConfig,t=new Promise(function(t){e.onModuleLoaded=function(e){t({draco:e})},DracoDecoderModule(e)});break;case`decode`:var a=i.buffer,o=i.taskConfig;t.then(e=>{var t=e.draco,r=new t.Decoder,s=new t.DecoderBuffer;s.Init(new Int8Array(a),a.byteLength);try{var c=n(t,r,s,o),l=c.attributes.map(e=>e.array.buffer);c.index&&l.push(c.index.array.buffer),self.postMessage({type:`decode`,id:i.id,geometry:c},l)}catch(e){console.error(e),self.postMessage({type:`error`,id:i.id,error:e.message})}finally{t.destroy(s),t.destroy(r)}});break}};function n(e,t,n,i){var a=i.attributeIDs,o=i.attributeTypes,s,c,l=t.GetEncodedGeometryType(n);if(l===e.TRIANGULAR_MESH)s=new e.Mesh,c=t.DecodeBufferToMesh(n,s);else if(l===e.POINT_CLOUD)s=new e.PointCloud,c=t.DecodeBufferToPointCloud(n,s);else throw Error(`THREE.DRACOLoader: Unexpected geometry type.`);if(!c.ok()||s.ptr===0)throw Error(`THREE.DRACOLoader: Decoding failed: `+c.error_msg());var u={index:null,attributes:[]};for(var d in a){var f=self[o[d]],p,m;if(i.useUniqueIDs)m=a[d],p=t.GetAttributeByUniqueId(s,m);else{if(m=t.GetAttributeId(s,e[a[d]]),m===-1)continue;p=t.GetAttribute(s,m)}u.attributes.push(r(e,t,s,d,f,p))}if(l===e.TRIANGULAR_MESH){for(var h=s.num_faces(),g=h*3,_=new Uint32Array(g),v=new e.DracoInt32Array,y=0;y<h;++y){t.GetFaceFromMesh(s,y,v);for(var b=0;b<3;++b)_[y*3+b]=v.GetValue(b)}u.index={array:_,itemSize:1},e.destroy(v)}return e.destroy(s),u}function r(e,t,n,r,i,a){var o=a.num_components(),s=n.num_points()*o,c,l;switch(i){case Float32Array:c=new e.DracoFloat32Array,t.GetAttributeFloatForAllPoints(n,a,c),l=new Float32Array(s);break;case Int8Array:c=new e.DracoInt8Array,t.GetAttributeInt8ForAllPoints(n,a,c),l=new Int8Array(s);break;case Int16Array:c=new e.DracoInt16Array,t.GetAttributeInt16ForAllPoints(n,a,c),l=new Int16Array(s);break;case Int32Array:c=new e.DracoInt32Array,t.GetAttributeInt32ForAllPoints(n,a,c),l=new Int32Array(s);break;case Uint8Array:c=new e.DracoUInt8Array,t.GetAttributeUInt8ForAllPoints(n,a,c),l=new Uint8Array(s);break;case Uint16Array:c=new e.DracoUInt16Array,t.GetAttributeUInt16ForAllPoints(n,a,c),l=new Uint16Array(s);break;case Uint32Array:c=new e.DracoUInt32Array,t.GetAttributeUInt32ForAllPoints(n,a,c),l=new Uint32Array(s);break;default:throw Error(`THREE.DRACOLoader: Unexpected attribute type.`)}for(var u=0;u<s;u++)l[u]=c.GetValue(u);return e.destroy(c),{name:r,array:l,itemSize:o}}},u.taskCache=new WeakMap,u.setDecoderPath=function(){console.warn(`THREE.DRACOLoader: The .setDecoderPath() method has been removed. Use instance methods.`)},u.setDecoderConfig=function(){console.warn(`THREE.DRACOLoader: The .setDecoderConfig() method has been removed. Use instance methods.`)},u.releaseDecoderModule=function(){console.warn(`THREE.DRACOLoader: The .releaseDecoderModule() method has been removed. Use instance methods.`)},u.getDecoderModule=function(){console.warn(`THREE.DRACOLoader: The .getDecoderModule() method has been removed. Use instance methods.`)};var d=function(e){t.CompressedTextureLoader.call(this,e)};d.prototype=Object.assign(Object.create(t.CompressedTextureLoader.prototype),{constructor:d,parse:function(e,n){var r={mipmaps:[],width:0,height:0,format:null,mipmapCount:1},i=542327876,a=131072,o=512,s=1024,c=2048,l=4096,u=8192,d=16384,f=32768,p=4;function m(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}function h(e){return String.fromCharCode(e&255,e>>8&255,e>>16&255,e>>24&255)}function g(e,t,n,r){for(var i=n*r*4,a=new Uint8Array(e,t,i),o=new Uint8Array(i),s=0,c=0,l=0;l<r;l++)for(var u=0;u<n;u++){var d=a[c];c++;var f=a[c];c++;var p=a[c];c++;var m=a[c];c++,o[s]=p,s++,o[s]=f,s++,o[s]=d,s++,o[s]=m,s++}return o}var _=m(`DXT1`),v=m(`DXT3`),y=m(`DXT5`),b=m(`ETC1`),x=31,S=0,C=1,w=2,T=3,E=4,D=7,O=20,k=21,A=22,j=23,M=24,N=25,P=26,F=28,I=new Int32Array(e,0,x);if(I[S]!==i)return console.error(`THREE.DDSLoader.parse: Invalid magic number in DDS header.`),r;if(!I[O]&p)return console.error(`THREE.DDSLoader.parse: Unsupported format, must contain a FourCC code.`),r;var L,R=I[k],z=!1;switch(R){case _:L=8,r.format=t.RGB_S3TC_DXT1_Format;break;case v:L=16,r.format=t.RGBA_S3TC_DXT3_Format;break;case y:L=16,r.format=t.RGBA_S3TC_DXT5_Format;break;case b:L=8,r.format=t.RGB_ETC1_Format;break;default:if(I[A]===32&&I[j]&16711680&&I[M]&65280&&I[N]&255&&I[P]&4278190080)z=!0,L=64,r.format=t.RGBAFormat;else return console.error(`THREE.DDSLoader.parse: Unsupported FourCC code `,h(R)),r}r.mipmapCount=1,I[w]&a&&n!==!1&&(r.mipmapCount=Math.max(1,I[D]));var B=I[F];if(r.isCubemap=!!(B&o),r.isCubemap&&(!(B&s)||!(B&c)||!(B&l)||!(B&u)||!(B&d)||!(B&f)))return console.error(`THREE.DDSLoader.parse: Incomplete cubemap faces`),r;r.width=I[E],r.height=I[T];for(var V=I[C]+4,H=r.isCubemap?6:1,U=0;U<H;U++)for(var W=r.width,G=r.height,K=0;K<r.mipmapCount;K++){if(z)var q=g(e,V,W,G),J=q.length;else var J=Math.max(4,W)/4*Math.max(4,G)/4*L,q=new Uint8Array(e,V,J);var Y={data:q,width:W,height:G};r.mipmaps.push(Y),V+=J,W=Math.max(W>>1,1),G=Math.max(G>>1,1)}return r}});var f=class extends t.Group{constructor(e){super(),this.needsRender=!0,e&&e.children.length&&this.add(...e.children),this.mixer=new t.AnimationMixer(this)}clone(){let e=super.clone(!0);return e.mixer=new t.AnimationMixer(e),e.needsRender=!0,e}},p=`https://vr-public.realsee-cdn.cn/release/static/image/release/five/resource/draco/1.5.6/`,m=class extends l{static get version(){return`6.8.0-alpha.21`}constructor(e){super(e),this.ddsLoader=new d(e),this.dracoLoader=new u(e),this.dracoLoader.setDecoderPath(p)}load(e,t,n,r){return super.load(e,t,n,r)}parse(e,t,n,r){return super.parse(e,t,e=>{let t=new f(e.scene),r=e.scenes.map(n=>n===e.scene?t:new f(n));n(Object.assign(e,{scene:t,scenes:r}))},r)}};e.DDSLoader=d,e.DRACOLoader=u,e.GLTFLoader=m,e.GLTFObject=f,e.THREEGLTFLoader=l});
package/umd/five-line.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 2026/1/28
5
- * Version: 6.8.0-alpha.2
4
+ * Generated: 3/19/2026
5
+ * Version: 6.8.0-alpha.21
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,7 +252,7 @@
252
252
  * No amendment to or modification of this Agreement will be binding unless in
253
253
  * writing and signed by Realsee. You and Realsee hereto confirm that this
254
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:`
255
+ */(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`three`)):typeof define==`function`&&define.amd?define([`exports`,`three`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.FiveSDK_Line={},e.THREE))})(this,function(e,t){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=a(t),l=0,u=c.length,d;l<u;l++)d=c[l],!s.call(e,d)&&d!==n&&r(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(o=i(t,d))||o.enumerable});return e};t=((e,t,i)=>(i=e==null?{}:n(o(e)),c(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)))(t);var l=class extends t.InstancedBufferGeometry{constructor(){super(),this.type=`LineSegmentsGeometry`,this.setIndex([0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5]),this.setAttribute(`position`,new t.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)),this.setAttribute(`uv`,new t.Float32BufferAttribute([-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],2))}applyMatrix4(e){let t=this.attributes.instanceStart,n=this.attributes.instanceEnd;return t!==void 0&&(t.applyMatrix4(e),n.applyMatrix4(e),t.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let n;n=e instanceof Float32Array?e:Array.isArray(e)?new Float32Array(e):new Float32Array;let r=new t.InstancedInterleavedBuffer(n,6,1);return this.setAttribute(`instanceStart`,new t.InterleavedBufferAttribute(r,3,0)),this.setAttribute(`instanceEnd`,new t.InterleavedBufferAttribute(r,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let n;n=e instanceof Float32Array?e:Array.isArray(e)?new Float32Array(e):new Float32Array;let r=new t.InstancedInterleavedBuffer(n,6,1);return this.setAttribute(`instanceColorStart`,new t.InterleavedBufferAttribute(r,3,0)),this.setAttribute(`instanceColorEnd`,new t.InterleavedBufferAttribute(r,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new t.WireframeGeometry(e.geometry)),this}fromLineSegments(e){var n=e.geometry;if(n instanceof t.Geometry){let e=new t.BufferGeometry().fromGeometry(n);this.setPositions(e.attributes.position.array)}else n instanceof t.BufferGeometry&&this.setPositions(n.attributes.position.array);return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new t.Box3);let e=this.attributes.instanceStart,n=this.attributes.instanceEnd;if(e!==void 0&&n!==void 0){let r=new t.Box3;this.boundingBox.setFromBufferAttribute(e),r.setFromBufferAttribute(n),this.boundingBox.union(r)}}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new t.Sphere),this.boundingBox===null&&this.computeBoundingBox();let e=this.attributes.instanceStart,n=this.attributes.instanceEnd;if(e!==void 0&&n!==void 0){let r=this.boundingSphere.center;this.boundingBox.getCenter(r);let i=0,a=new t.Vector3;for(let t=0,o=e.count;t<o;t++)a.fromBufferAttribute(e,t),i=Math.max(i,r.distanceToSquared(a)),a.fromBufferAttribute(n,t),i=Math.max(i,r.distanceToSquared(a));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)}}toJSON(){}};Object.assign(l.prototype,{isLineSegmentsGeometry:!0});var u={uniforms:t.UniformsUtils.merge([t.UniformsLib.common,t.UniformsLib.fog,{linewidth:{value:1},resolution:{value:new t.Vector2(1,1)},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1},opacity:{value:1}}]),vertexShader:`
256
256
  #include <common>
257
257
  #include <color_pars_vertex>
258
258
  #include <fog_pars_vertex>
@@ -451,4 +451,4 @@
451
451
  #include <premultiplied_alpha_fragment>
452
452
 
453
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.8.0-alpha.2"},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"})}));
454
+ `},d=class extends t.ShaderMaterial{constructor(e){super({uniforms:t.UniformsUtils.clone(u.uniforms),vertexShader:u.vertexShader,fragmentShader:u.fragmentShader,clipping:!0}),this.type=`LineMaterial`,this.dashed=!1,Object.defineProperties(this,{color:{enumerable:!0,get(){return this.uniforms.diffuse.value},set(e){this.uniforms.diffuse.value=e}},linewidth:{enumerable:!0,get(){return this.uniforms.linewidth.value},set(e){this.uniforms.linewidth.value=e}},dashScale:{enumerable:!0,get(){return this.uniforms.dashScale.value},set(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get(){return this.uniforms.dashSize.value},set(e){this.uniforms.dashSize.value=e}},gapSize:{enumerable:!0,get(){return this.uniforms.gapSize.value},set(e){this.uniforms.gapSize.value=e}},opacity:{enumerable:!0,get(){return this.uniforms.opacity.value},set(e){this.uniforms.opacity.value=e}},resolution:{enumerable:!0,get(){return this.uniforms.resolution.value},set(e){this.uniforms.resolution.value.copy(e)}}}),this.setValues(e)}};Object.assign(d.prototype,{isLineMaterial:!0});var f=class extends t.Mesh{constructor(e,t){super(),this.type=`LineSegments2`,this.geometry=e===void 0?new l:e,this.material=t===void 0?new d({color:Math.random()*16777215}):t}computeLineDistances(){let e=this.geometry,n=e.attributes.instanceStart,r=e.attributes.instanceEnd,i=new Float32Array(2*n.count),a=new t.Vector3,o=new t.Vector3;for(var s=0,c=0,l=n.count;s<l;s++,c+=2)a.fromBufferAttribute(n,s),o.fromBufferAttribute(r,s),i[c]=c===0?0:i[c-1],i[c+1]=i[c]+a.distanceTo(o);let u=new t.InstancedInterleavedBuffer(i,2,1);return e.setAttribute(`instanceDistanceStart`,new t.InterleavedBufferAttribute(u,1,0)),e.setAttribute(`instanceDistanceEnd`,new t.InterleavedBufferAttribute(u,1,1)),this}raycast(e,n){e.camera===null&&console.error(`LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2.`);let r=e.ray,i=e.camera,a=i.projectionMatrix,o=this.geometry,s=this.material,c=s.resolution,l=s.linewidth,u=o.attributes.instanceStart,d=o.attributes.instanceEnd,f=new t.Vector4,p=new t.Vector4,m=new t.Vector4,h=new t.Vector3,g=new t.Matrix4,_=new t.Line3,v=new t.Vector3;r.at(1,m),m.w=1,m.applyMatrix4(i.matrixWorldInverse),m.applyMatrix4(a),m.multiplyScalar(1/m.w),m.x*=c.x/2,m.y*=c.y/2,m.z=0,h.copy(m);let y=this.matrixWorld;g.multiplyMatrices(i.matrixWorldInverse,y);for(var b=0,x=u.count;b<x;b++){f.fromBufferAttribute(u,b),p.fromBufferAttribute(d,b),f.w=1,p.w=1,f.applyMatrix4(g),p.applyMatrix4(g),f.applyMatrix4(a),p.applyMatrix4(a),f.multiplyScalar(1/f.w),p.multiplyScalar(1/p.w);var S=f.z<-1&&p.z<-1,C=f.z>1&&p.z>1;if(S||C)continue;f.x*=c.x/2,f.y*=c.y/2,p.x*=c.x/2,p.y*=c.y/2,_.start.copy(f),_.start.z=0,_.end.copy(p),_.end.z=0;let e=_.closestPointToPointParameter(h,!0);_.at(e,v);let i=t.MathUtils.lerp(f.z,p.z,e),o=i>=-1&&i<=1;var w=h.distanceTo(v)<l*.5;if(o&&w){_.start.fromBufferAttribute(u,b),_.end.fromBufferAttribute(d,b),_.start.applyMatrix4(y),_.end.applyMatrix4(y);var T=new t.Vector3,E=new t.Vector3;r.distanceSqToSegment(_.start,_.end,E,T),n.push({point:E,pointOnLine:T,distance:r.origin.distanceTo(E),object:this,faceIndex:b})}}}};Object.assign(f.prototype,{isLineSegments2:!0});var p=class extends f{constructor(e,t){super(e,t),this.type=`Line2`}};Object.assign(p.prototype,{isLine2:!0});var m=class extends l{constructor(){super(),this.type=`LineGeometry`}setPositions(e){let t=e.length-3,n=new Float32Array(2*t);for(let r=0;r<t;r+=3)n[2*r]=e[r],n[2*r+1]=e[r+1],n[2*r+2]=e[r+2],n[2*r+3]=e[r+3],n[2*r+4]=e[r+4],n[2*r+5]=e[r+5];return super.setPositions(n),this}setColors(e){let t=e.length-3,n=new Float32Array(2*t);for(let r=0;r<t;r+=3)n[2*r]=e[r],n[2*r+1]=e[r+1],n[2*r+2]=e[r+2],n[2*r+3]=e[r+3],n[2*r+4]=e[r+4],n[2*r+5]=e[r+5];return super.setColors(n),this}fromLine(e){let n=e.geometry;if(n instanceof t.Geometry){let e=new t.BufferGeometry().fromGeometry(n);this.setPositions(e.attributes.position.array)}else n instanceof t.BufferGeometry&&this.setPositions(n.attributes.position.array);return this}copy(){return this}};Object.assign(m.prototype,{isLineGeometry:!0});var h=14467195,g=8,_=2,v=20,y=null,b=class extends t.Object3D{static get version(){return`6.8.0-alpha.21`}constructor(e=new t.Vector3,n=new t.Vector3){super(),this.type=`FiveLine`,this.needsRender=!0,this.line=new p(new m,new d({color:h,linewidth:_,dashScale:v,dashed:!1}));let r=new t.BufferGeometry,i=new t.PointsMaterial({color:h,size:g,map:y||(y=new t.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});this.points=new t.Points(r,i),this.points.renderOrder=11,this.points.frustumCulled=!1,this.setPoints(e,n),this.add(this.line,this.points)}setPoints(e,n){let r=[].concat(e.toArray(),n.toArray());this.points.geometry.setAttribute(`position`,new t.BufferAttribute(new Float32Array(r),3)),this.line.geometry.setPositions(r),this.line.computeLineDistances(),this.needsRender=!0}getPoints(){let e=this.points.geometry.attributes.position.array;return[new t.Vector3(e[0],e[1],e[2]),new t.Vector3(e[3],e[4],e[5])]}setMaterial(e){let t=this.line.material;for(let n in e){if(!e.hasOwnProperty(n))continue;let r=e[n];n===`dashed`?(t.dashed=r,r?t.defines.USE_DASH=``:delete t.defines.USE_DASH,t.needsUpdate=!0):t[n]=e[n]}this.needsRender=!0}setResolution(e,t){let n=this.line.material.resolution;(n.x!==e||n.y!==t)&&(n.set(e,t),this.needsRender=!0)}};Object.assign(b.prototype,{isFiveLine:!0}),e.Line=b,e.LineGeometry=m,e.LineMaterial=d,e.LineSegmentsGeometry=l,e.THREE_Line2=p,e.THREE_LineSegments2=f});