@realsee/five 6.0.0-alpha.63 → 6.0.0-alpha.65

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 (305) hide show
  1. package/docs/assets/highlight.css +20 -20
  2. package/docs/assets/main.js +59 -52
  3. package/docs/assets/navigation.js +1 -0
  4. package/docs/assets/search.js +1 -1
  5. package/docs/assets/style.css +805 -825
  6. package/docs/classes/five.AnimationFrameLoop.html +16 -15
  7. package/docs/classes/five.BoxBoundingVolume.html +18 -1
  8. package/docs/classes/five.Camera.html +37 -11
  9. package/docs/classes/five.CullingVolume.html +10 -1
  10. package/docs/classes/five.Fetcher.html +5 -1
  11. package/docs/classes/five.Five.html +237 -288
  12. package/docs/classes/five.InternalWebGLRenderer.html +2 -1
  13. package/docs/classes/five.IntersectMesh.html +4 -1
  14. package/docs/classes/five.Model.html +62 -65
  15. package/docs/classes/five.NetworkAbortError.html +2 -1
  16. package/docs/classes/five.NetworkFirbiddenError.html +2 -1
  17. package/docs/classes/five.NetworkResponseError.html +3 -1
  18. package/docs/classes/five.NetworkSubscribe.html +42 -56
  19. package/docs/classes/five.NetworkTimeoutError.html +2 -1
  20. package/docs/classes/five.PBMContainer.html +12 -11
  21. package/docs/classes/five.PBMGroup.html +3 -3
  22. package/docs/classes/five.PBMMesh.html +4 -3
  23. package/docs/classes/five.PBMMeshMaterial.html +50 -47
  24. package/docs/classes/five.PanoCircleMesh.html +30 -7
  25. package/docs/classes/five.PanoCircleMeshCustom.html +30 -7
  26. package/docs/classes/five.PanoCircleMeshSolid.html +30 -7
  27. package/docs/classes/five.RegionBoundingVolume.html +21 -1
  28. package/docs/classes/five.RequestScheduler.html +13 -12
  29. package/docs/classes/five.Scene.html +5 -3
  30. package/docs/classes/five.SphereBoundingVolume.html +17 -1
  31. package/docs/classes/five.Subscribe.html +43 -62
  32. package/docs/classes/five.TextureLoader.html +5 -1
  33. package/docs/classes/five.Tile.html +30 -1
  34. package/docs/classes/five.Tile3DModel.html +28 -1
  35. package/docs/classes/five.TileCubeTextureTarget.html +9 -1
  36. package/docs/classes/five.TileNode.html +4 -1
  37. package/docs/classes/five.Tileset.html +31 -5
  38. package/docs/classes/five.TilesetCache.html +8 -1
  39. package/docs/classes/five.TilesetTraverser.html +19 -1
  40. package/docs/classes/five.Work.html +28 -28
  41. package/docs/classes/five.XRButton.html +3 -1
  42. package/docs/classes/gltf_loader.DDSLoader.html +3 -1
  43. package/docs/classes/gltf_loader.DRACOLoader.html +8 -1
  44. package/docs/classes/gltf_loader.GLTFLoader.html +18 -17
  45. package/docs/classes/gltf_loader.GLTFObject.html +8 -6
  46. package/docs/classes/gltf_loader.GLTFParser.html +6 -1
  47. package/docs/classes/gltf_loader.THREEGLTFLoader.html +8 -1
  48. package/docs/classes/line.Line.html +10 -1
  49. package/docs/classes/line.LineGeometry.html +14 -1
  50. package/docs/classes/line.LineMaterial.html +8 -1
  51. package/docs/classes/line.LineSegmentsGeometry.html +12 -1
  52. package/docs/classes/line.THREE_Line2.html +4 -1
  53. package/docs/classes/line.THREE_LineSegments2.html +4 -1
  54. package/docs/classes/react.Store.html +23 -29
  55. package/docs/classes/sticker.Sticker.html +25 -32
  56. package/docs/classes/vfx.Airflow.html +8 -1
  57. package/docs/classes/vfx.Flame.html +10 -1
  58. package/docs/classes/vfx.Particle.html +79 -82
  59. package/docs/classes/vfx.SpotLight.html +7 -1
  60. package/docs/enums/five.VolumePlaneIntersect.html +4 -1
  61. package/docs/functions/five.defaultImageURLTransform.html +5 -0
  62. package/docs/functions/five.getViewportScale.html +1 -0
  63. package/docs/functions/five.imageSupport.html +1 -0
  64. package/docs/functions/five.isPanoId.html +1 -0
  65. package/docs/functions/five.loadAt3d.html +1 -0
  66. package/docs/functions/five.loadB3dm.html +1 -0
  67. package/docs/functions/five.loadDome.html +1 -0
  68. package/docs/functions/five.loadDomez.html +1 -0
  69. package/docs/functions/five.loadPbm.html +1 -0
  70. package/docs/functions/five.loadPnts.html +1 -0
  71. package/docs/functions/five.panoEqual.html +1 -0
  72. package/docs/functions/five.panoParse.html +1 -0
  73. package/docs/functions/five.panoStringify.html +1 -0
  74. package/docs/functions/five.parseWork.html +7 -0
  75. package/docs/functions/react.FiveCanvas-1.html +6 -0
  76. package/docs/functions/react.createFiveFeature.html +1 -0
  77. package/docs/functions/react.createFiveProvider.html +9 -0
  78. package/docs/functions/react.createStore.html +15 -0
  79. package/docs/functions/react.unsafe__useFiveInstance.html +5 -0
  80. package/docs/functions/react.useFiveAction.html +19 -0
  81. package/docs/functions/react.useFiveCameraDirection.html +3 -0
  82. package/docs/functions/react.useFiveCameraRaycaster.html +3 -0
  83. package/docs/functions/react.useFiveCurrentObserver.html +5 -0
  84. package/docs/functions/react.useFiveCurrentState.html +5 -0
  85. package/docs/functions/react.useFiveEventCallback.html +5 -0
  86. package/docs/functions/react.useFiveFloor.html +5 -0
  87. package/docs/functions/react.useFiveHelper.html +5 -0
  88. package/docs/functions/react.useFiveModelIntersectRaycaster.html +7 -0
  89. package/docs/functions/react.useFiveModelReadyState.html +4 -0
  90. package/docs/functions/react.useFiveProject2d.html +7 -0
  91. package/docs/functions/react.useFiveScene.html +2 -0
  92. package/docs/functions/react.useFiveSceneEffect.html +5 -0
  93. package/docs/functions/react.useFiveState.html +1 -0
  94. package/docs/functions/react.useFiveWork.html +8 -0
  95. package/docs/functions/react.withFive.html +1 -0
  96. package/docs/functions/vue.unsafe__useFiveInject.html +5 -0
  97. package/docs/functions/vue.useFiveAction.html +25 -0
  98. package/docs/functions/vue.useFiveCameraDirection.html +3 -0
  99. package/docs/functions/vue.useFiveCameraRaycaster.html +3 -0
  100. package/docs/functions/vue.useFiveCurrentObserver.html +5 -0
  101. package/docs/functions/vue.useFiveCurrentState.html +5 -0
  102. package/docs/functions/vue.useFiveEventCallback.html +5 -0
  103. package/docs/functions/vue.useFiveFloor.html +5 -0
  104. package/docs/functions/vue.useFiveHelper.html +5 -0
  105. package/docs/functions/vue.useFiveModel.html +2 -0
  106. package/docs/functions/vue.useFiveModelBounding.html +2 -0
  107. package/docs/functions/vue.useFiveModelIntersectRaycaster.html +7 -0
  108. package/docs/functions/vue.useFiveModelReadyState.html +4 -0
  109. package/docs/functions/vue.useFiveProject2d.html +7 -0
  110. package/docs/functions/vue.useFiveScene.html +2 -0
  111. package/docs/functions/vue.useFiveState.html +5 -0
  112. package/docs/functions/vue.useFiveWorks.html +8 -0
  113. package/docs/index.html +35 -79
  114. package/docs/interfaces/five.AddableObject.html +9 -9
  115. package/docs/interfaces/five.AjaxOptions.html +11 -11
  116. package/docs/interfaces/five.AnimationFrame.html +5 -1
  117. package/docs/interfaces/five.BaseEvent.html +5 -1
  118. package/docs/interfaces/five.BoundingVolume.html +14 -1
  119. package/docs/interfaces/five.CameraPose.html +6 -1
  120. package/docs/interfaces/five.ClipperParameter.html +3 -1
  121. package/docs/interfaces/five.DepthPanoramaControllerCustomInitArgs.html +25 -25
  122. package/docs/interfaces/five.EventCallback.html +355 -466
  123. package/docs/interfaces/five.FiveInitArgs.html +84 -86
  124. package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +17 -17
  125. package/docs/interfaces/five.GestureEvent.html +19 -1
  126. package/docs/interfaces/five.ImageOptions.html +16 -18
  127. package/docs/interfaces/five.ImageURLMappings.html +1 -1
  128. package/docs/interfaces/five.ImageURLOptions.html +15 -15
  129. package/docs/interfaces/five.IntersectEvent.html +8 -1
  130. package/docs/interfaces/five.IntersectMeshInterface.html +3 -3
  131. package/docs/interfaces/five.Intersection.html +3 -3
  132. package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +13 -13
  133. package/docs/interfaces/five.ModeChangeEvent.html +9 -1
  134. package/docs/interfaces/five.ModelControllerCustomInitArgs.html +18 -18
  135. package/docs/interfaces/five.ModelEvent.html +8 -1
  136. package/docs/interfaces/five.ModelLodOptions.html +2 -1
  137. package/docs/interfaces/five.ModelsEvent.html +6 -1
  138. package/docs/interfaces/five.MotionKeyframe.html +4 -1
  139. package/docs/interfaces/five.MovePanoOptions.html +29 -30
  140. package/docs/interfaces/five.NetworkOptions.html +9 -9
  141. package/docs/interfaces/five.NetworkResourceEvent.html +9 -1
  142. package/docs/interfaces/five.ObjectEvent.html +6 -1
  143. package/docs/interfaces/five.PBMPanoPicture.html +7 -7
  144. package/docs/interfaces/five.PBMParameters.html +42 -43
  145. package/docs/interfaces/five.PanoCircleMeshCustomOptions.html +9 -1
  146. package/docs/interfaces/five.PanoCircleMeshInterface.html +21 -10
  147. package/docs/interfaces/five.PanoCircleMeshOptions.html +3 -1
  148. package/docs/interfaces/five.PanoCircleMeshSolidOptions.html +3 -1
  149. package/docs/interfaces/five.PanoEvent.html +11 -1
  150. package/docs/interfaces/five.PanoTextureEvent.html +9 -1
  151. package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +32 -32
  152. package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +18 -18
  153. package/docs/interfaces/five.Pose.html +15 -32
  154. package/docs/interfaces/five.RenderEvent.html +7 -1
  155. package/docs/interfaces/five.Scissor.html +11 -12
  156. package/docs/interfaces/five.State.html +20 -21
  157. package/docs/interfaces/five.StateEvent.html +7 -1
  158. package/docs/interfaces/five.SubscribeMixinType.emit.html +1 -1
  159. package/docs/interfaces/five.SubscribeMixinType.hasListener.html +1 -1
  160. package/docs/interfaces/five.SubscribeMixinType.off.html +1 -1
  161. package/docs/interfaces/five.SubscribeMixinType.on.html +1 -1
  162. package/docs/interfaces/five.SubscribeMixinType.once.html +1 -1
  163. package/docs/interfaces/five.SubscribeMixinType.waitUnitl.html +1 -1
  164. package/docs/interfaces/five.TextureOptions.html +18 -20
  165. package/docs/interfaces/five.Tile3DModelLoaderOptions.html +6 -3
  166. package/docs/interfaces/five.TileCubeNode.html +7 -1
  167. package/docs/interfaces/five.TileCubeTree.html +2 -1
  168. package/docs/interfaces/five.TileHeader.html +9 -1
  169. package/docs/interfaces/five.TilesetHeader.html +5 -1
  170. package/docs/interfaces/five.TilesetOptions.html +5 -1
  171. package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +9 -9
  172. package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +28 -28
  173. package/docs/interfaces/five.WebXRAxesParams.html +4 -1
  174. package/docs/interfaces/five.WebXRControllerParams.html +2 -1
  175. package/docs/interfaces/five.WorkCubeImage.html +13 -13
  176. package/docs/interfaces/five.WorkImage.html +20 -21
  177. package/docs/interfaces/five.WorkInitial.html +17 -17
  178. package/docs/interfaces/five.WorkModel.html +12 -13
  179. package/docs/interfaces/five.WorkObserver.html +40 -41
  180. package/docs/interfaces/five.WorkOptions.html +17 -17
  181. package/docs/interfaces/five.WorkResolvedObserver.html +41 -39
  182. package/docs/interfaces/five.WorkTile.html +9 -1
  183. package/docs/interfaces/five.WorkVideo.html +8 -9
  184. package/docs/interfaces/five.WorksEvent.html +9 -1
  185. package/docs/interfaces/five.XRControllerEvent.html +8 -1
  186. package/docs/interfaces/five.XRGestureEvent.html +11 -1
  187. package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +29 -28
  188. package/docs/interfaces/five.XRSessionEvent.html +7 -1
  189. package/docs/interfaces/gltf_loader.DDS.html +7 -1
  190. package/docs/interfaces/gltf_loader.GLTF.html +10 -4
  191. package/docs/interfaces/gltf_loader.GLTFReference.html +3 -1
  192. package/docs/interfaces/gltf_loader.THREEGLTF.html +8 -1
  193. package/docs/interfaces/react.FiveActionReactCallbacks.html +27 -37
  194. package/docs/interfaces/react.FiveInjectionTypes.html +113 -138
  195. package/docs/interfaces/react.PropTypeOfFiveFeatures.html +2 -1
  196. package/docs/interfaces/sticker.IntersectionLike.html +7 -8
  197. package/docs/interfaces/vfx.ParticleArgs.html +67 -68
  198. package/docs/interfaces/vfx.ParticleTweenKeyframe.html +3 -1
  199. package/docs/interfaces/vue.FiveActionVueCallbacks.html +31 -42
  200. package/docs/modules/five.SubscribeMixinType.html +7 -1
  201. package/docs/modules/five.html +171 -647
  202. package/docs/modules/gltf_loader.html +11 -1
  203. package/docs/modules/line.html +8 -1
  204. package/docs/modules/react.FiveCanvas.html +8 -0
  205. package/docs/modules/react.html +37 -130
  206. package/docs/modules/sticker.html +3 -1
  207. package/docs/modules/vfx.html +8 -1
  208. package/docs/modules/vue.html +24 -115
  209. package/docs/types/five.AjaxResponseType.html +1 -0
  210. package/docs/types/five.AjaxResponseTypeMapping.html +1 -0
  211. package/docs/types/five.BoundingVolumeJson.html +1 -0
  212. package/docs/types/five.BoxBoundingVolumeJson.html +1 -0
  213. package/docs/types/five.ControllerCustomInitTypes.html +1 -0
  214. package/docs/types/five.ControllerEventTypes.html +32 -0
  215. package/docs/types/five.CoordinatesSystemTransformer.html +1 -0
  216. package/docs/types/five.EventTypes.html +26 -0
  217. package/docs/types/five.FivePlugin.html +71 -0
  218. package/docs/types/five.FivePluginInit.html +3 -0
  219. package/docs/types/five.FivePluginInstance.html +3 -0
  220. package/docs/types/five.GestureTypes.html +1 -0
  221. package/docs/types/five.LegacyEventType.html +203 -0
  222. package/docs/types/five.LooseWork.html +1 -0
  223. package/docs/types/five.LooseWorkInitial.html +1 -0
  224. package/docs/types/five.LooseWorkModel.html +1 -0
  225. package/docs/types/five.LooseWorkObserver.html +1 -0
  226. package/docs/types/five.LooseWorkPanorama.html +1 -0
  227. package/docs/types/five.LooseWorkVideo.html +1 -0
  228. package/docs/types/five.LooseWorkWithExtrinsics.html +8 -0
  229. package/docs/types/five.Mirror.html +1 -0
  230. package/docs/types/five.Mode.html +11 -0
  231. package/docs/types/five.ModelMaterialValues.html +1 -0
  232. package/docs/types/five.Models.html +12 -0
  233. package/docs/types/five.MotionValue.html +1 -0
  234. package/docs/types/five.NetWorkMeta.html +1 -0
  235. package/docs/types/five.NetworkError.html +1 -0
  236. package/docs/types/five.NetworkErrorCallback.html +1 -0
  237. package/docs/types/five.NetworkProgressCallback.html +1 -0
  238. package/docs/types/five.NetworkResponse.html +1 -0
  239. package/docs/types/five.NetworkState.html +1 -0
  240. package/docs/types/five.NetworkSuccessCallback.html +1 -0
  241. package/docs/types/five.NetworkType.html +1 -0
  242. package/docs/types/five.Pano.html +1 -0
  243. package/docs/types/five.PanoId.html +1 -0
  244. package/docs/types/five.ParseWorkOptions.html +13 -0
  245. package/docs/types/five.ParsedResultType.html +1 -0
  246. package/docs/types/five.PostProcessingType.html +1 -0
  247. package/docs/types/five.RegionBoundingVolumeJson.html +1 -0
  248. package/docs/types/five.RequestResult.html +1 -0
  249. package/docs/types/five.SphereBoundingVolumeJson.html +1 -0
  250. package/docs/types/five.SubscribeEventMap.html +1 -0
  251. package/docs/types/five.TileContentData.html +1 -0
  252. package/docs/types/five.TilesetFrameState.html +1 -0
  253. package/docs/types/five.WebXRControllerKey.html +1 -0
  254. package/docs/types/five.WebXRControllerType.html +1 -0
  255. package/docs/types/five.Works.html +1 -0
  256. package/docs/types/line.LineMaterialParameters.html +1 -0
  257. package/docs/types/react.FiveInjectionActionFeature.html +1 -0
  258. package/docs/types/react.FiveInjectionDataFeature.html +1 -0
  259. package/docs/types/react.FiveInjectionFeature.html +1 -0
  260. package/docs/types/react.FiveProviderPropTypes.html +1 -0
  261. package/docs/types/react.FiveProviderType.html +1 -0
  262. package/docs/types/react.StoreActionMapHanlder.html +1 -0
  263. package/docs/types/react.StoreActionMapType.html +1 -0
  264. package/docs/types/react.StoreProviderType.html +1 -0
  265. package/docs/types/react.StoreValueMapType.html +1 -0
  266. package/docs/types/vfx.ParticleType.html +1 -0
  267. package/docs/types/vue.FiveModelIntersectRaycaster.html +1 -0
  268. package/docs/types/vue.FiveProviderComponent.html +1 -0
  269. package/docs/types/vue.Project2d.html +1 -0
  270. package/docs/variables/five.PROXY_CONTROLLER_EVENT_NAMES.html +1 -0
  271. package/docs/variables/five.defaultPbmParameters.html +1 -0
  272. package/docs/variables/react.INJECTION_PROPNAME.html +1 -0
  273. package/docs/variables/vue.FiveCanvas.html +8 -0
  274. package/docs/variables/vue.FiveProvider.html +8 -0
  275. package/five/index.d.ts +15 -1
  276. package/five/index.js +85 -85
  277. package/five/index.mjs +3515 -3525
  278. package/gltf-loader/index.js +5 -5
  279. package/gltf-loader/index.mjs +70 -70
  280. package/line/index.js +3 -3
  281. package/line/index.mjs +66 -65
  282. package/package.json +3 -3
  283. package/react/index.js +3 -3
  284. package/react/index.mjs +2 -2
  285. package/sticker/index.js +3 -3
  286. package/sticker/index.mjs +49 -49
  287. package/umd/five-gltf-loader.js +4 -4
  288. package/umd/five-line.js +4 -4
  289. package/umd/five-react.js +3 -3
  290. package/umd/five-sticker.js +3 -3
  291. package/umd/five-vfx.js +8 -8
  292. package/umd/five-vue.js +3 -3
  293. package/umd/five.js +40 -40
  294. package/vfx/index.js +2 -2
  295. package/vfx/index.mjs +2 -2
  296. package/vue/index.d.ts +1 -1
  297. package/vue/index.js +3 -3
  298. package/vue/index.mjs +93 -92
  299. package/docs/assets/icons.css +0 -1043
  300. package/docs/assets/icons.png +0 -0
  301. package/docs/assets/icons@2x.png +0 -0
  302. package/docs/assets/widgets.png +0 -0
  303. package/docs/assets/widgets@2x.png +0 -0
  304. package/docs/modules.html +0 -1
  305. package/umd/five.js.LICENSE.txt +0 -100
package/umd/five-vfx.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 12/12/2023
5
- * Version: 6.0.0-alpha.63
4
+ * Generated: 12/14/2023
5
+ * Version: 6.0.0-alpha.65
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(h,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("three")):typeof define=="function"&&define.amd?define(["exports","three"],x):(h=typeof globalThis<"u"?globalThis:h||self,x(h.FiveSDK_VFX={},h.THREE))})(this,function(h,x){"use strict";function se(r){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(i,e,t.get?t:{enumerable:!0,get:()=>r[e]})}}return i.default=r,Object.freeze(i)}const n=se(x);var T=function(r,i){return T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},T(r,i)};function w(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");T(r,i);function e(){this.constructor=r}r.prototype=i===null?Object.create(i):(e.prototype=i.prototype,new e)}for(var ne=`
255
+ */(function(h,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("three")):typeof define=="function"&&define.amd?define(["exports","three"],x):(h=typeof globalThis<"u"?globalThis:h||self,x(h.FiveSDK_VFX={},h.THREE))})(this,function(h,x){"use strict";function se(r){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(n,e,t.get?t:{enumerable:!0,get:()=>r[e]})}}return n.default=r,Object.freeze(n)}const i=se(x);var T=function(r,n){return T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])},T(r,n)};function w(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");T(r,n);function e(){this.constructor=r}r.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}typeof SuppressedError=="function"&&SuppressedError;for(var ne=`
256
256
  uniform vec3 uColor1;
257
257
  uniform vec3 uColor2;
258
258
  uniform float uOpacity;
@@ -412,7 +412,7 @@ void main() {
412
412
 
413
413
  gl_Position = projectionMatrix * modelViewMatrix * vec4(vPosition, 1.0);
414
414
  }
415
- `),le=new n.SphereBufferGeometry(1,300,300),re=[],A=0;A<2;A++)re.push(new n.Vector2(Math.sin(A)/2+1,A*2-.8));var ue=new n.LatheBufferGeometry(re,300),ce=function(r){w(i,r);function i(e){var t=r.call(this)||this;t.needsRender=!0;var o;if(e instanceof n.BufferGeometry)o=e;else switch(e){case"ring":o=ue;break;case"circle":default:o=le;break}t.uniforms={uTime:{value:0},uColor1:{value:new n.Color("rgb(255, 177, 20)")},uColor2:{value:new n.Color("rgb(255, 0, 0)")},uNoise:{value:1.2},uSpeed:{value:1},uOpacity:{value:1}},t.defines={FRAGMENTATION_DEGREE:2};var s=new n.Mesh(o,new n.ShaderMaterial({uniforms:t.uniforms,defines:t.defines,vertexShader:ie,fragmentShader:ne,transparent:!0,depthWrite:!1,side:n.BackSide})),a=new n.Mesh(o,new n.ShaderMaterial({uniforms:t.uniforms,defines:t.defines,vertexShader:ie,fragmentShader:ne,transparent:!0,depthWrite:!1,side:n.FrontSide}));return s.scale.setScalar(.1),a.scale.setScalar(.1),t.add(s),t.add(a),t}return i.prototype.setTime=function(e){this.startTime===void 0&&(this.startTime=e),this.uniforms.uTime.value=(e-this.startTime)/1e3,this.needsRender=!0},Object.defineProperty(i.prototype,"color1",{get:function(){return this.uniforms.uColor1.value},set:function(e){this.uniforms.uColor1.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"color2",{get:function(){return this.uniforms.uColor2.value},set:function(e){this.uniforms.uColor2.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"speed",{get:function(){return this.uniforms.uSpeed.value},set:function(e){this.uniforms.uSpeed.value=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"noise",{get:function(){return this.uniforms.uSpeed.value},set:function(e){this.uniforms.uSpeed.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"opacity",{get:function(){return this.uniforms.opacity.value},set:function(e){this.uniforms.uOpacity.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"fragmentationDegree",{get:function(){return this.defines.FRAGMENTATION_DEGREE},set:function(e){this.defines.FRAGMENTATION_DEGREE=e,this.traverse(function(t){t instanceof n.Mesh&&t.material instanceof n.ShaderMaterial&&(t.material.needsUpdate=!0)}),this.needsRender=!0},enumerable:!1,configurable:!0}),i}(n.Group),ve=`
415
+ `),le=new i.SphereBufferGeometry(1,300,300),re=[],A=0;A<2;A++)re.push(new i.Vector2(Math.sin(A)/2+1,A*2-.8));var ue=new i.LatheBufferGeometry(re,300),ce=function(r){w(n,r);function n(e){var t=r.call(this)||this;t.needsRender=!0;var o;if(e instanceof i.BufferGeometry)o=e;else switch(e){case"ring":o=ue;break;case"circle":default:o=le;break}t.uniforms={uTime:{value:0},uColor1:{value:new i.Color("rgb(255, 177, 20)")},uColor2:{value:new i.Color("rgb(255, 0, 0)")},uNoise:{value:1.2},uSpeed:{value:1},uOpacity:{value:1}},t.defines={FRAGMENTATION_DEGREE:2};var s=new i.Mesh(o,new i.ShaderMaterial({uniforms:t.uniforms,defines:t.defines,vertexShader:ie,fragmentShader:ne,transparent:!0,depthWrite:!1,side:i.BackSide})),a=new i.Mesh(o,new i.ShaderMaterial({uniforms:t.uniforms,defines:t.defines,vertexShader:ie,fragmentShader:ne,transparent:!0,depthWrite:!1,side:i.FrontSide}));return s.scale.setScalar(.1),a.scale.setScalar(.1),t.add(s),t.add(a),t}return n.prototype.setTime=function(e){this.startTime===void 0&&(this.startTime=e),this.uniforms.uTime.value=(e-this.startTime)/1e3,this.needsRender=!0},Object.defineProperty(n.prototype,"color1",{get:function(){return this.uniforms.uColor1.value},set:function(e){this.uniforms.uColor1.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"color2",{get:function(){return this.uniforms.uColor2.value},set:function(e){this.uniforms.uColor2.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"speed",{get:function(){return this.uniforms.uSpeed.value},set:function(e){this.uniforms.uSpeed.value=e},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"noise",{get:function(){return this.uniforms.uSpeed.value},set:function(e){this.uniforms.uSpeed.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"opacity",{get:function(){return this.uniforms.opacity.value},set:function(e){this.uniforms.uOpacity.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"fragmentationDegree",{get:function(){return this.defines.FRAGMENTATION_DEGREE},set:function(e){this.defines.FRAGMENTATION_DEGREE=e,this.traverse(function(t){t instanceof i.Mesh&&t.material instanceof i.ShaderMaterial&&(t.material.needsUpdate=!0)}),this.needsRender=!0},enumerable:!1,configurable:!0}),n}(i.Group),de=`
416
416
  uniform vec3 uLightColor;
417
417
  uniform vec3 uSpotPosition;
418
418
  uniform float uAttenuation;
@@ -432,7 +432,7 @@ void main() {
432
432
  intensity = intensity * angleIntensity * vNoise;
433
433
  gl_FragColor = vec4( uLightColor, intensity );
434
434
  }
435
- `,de=`
435
+ `,ve=`
436
436
 
437
437
  uniform float uTime;
438
438
 
@@ -453,7 +453,7 @@ void main(){
453
453
 
454
454
  gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
455
455
  }
456
- `),fe=function(r){w(i,r);function i(e,t,o){e===void 0&&(e=1),t===void 0&&(t=.1),o===void 0&&(o=.2);var s=r.call(this)||this;s.needsRender=!0,s.uniforms={uTime:{value:0},uAttenuation:{value:e*.9},uAnglePower:{value:2},uSpotPosition:{value:s.position},uLightColor:{value:new n.Color(16777215)}};var a=new n.CylinderBufferGeometry(t,o,e,64,20,!0);a.applyMatrix4(new n.Matrix4().makeTranslation(0,-e/2,0)),a.applyMatrix4(new n.Matrix4().makeRotationX(-Math.PI/2));var l=new n.Mesh(a,new n.ShaderMaterial({uniforms:s.uniforms,vertexShader:de,fragmentShader:ve,transparent:!0,side:n.FrontSide,depthWrite:!1}));return s.add(l),s}return i.prototype.setTime=function(e){this.startTime===void 0&&(this.startTime=e),this.uniforms.uTime.value=(e-this.startTime)/1e3,this.needsRender=!0},Object.defineProperty(i.prototype,"attenuation",{get:function(){return this.uniforms.uAttenuation.value},set:function(e){this.uniforms.uAttenuation.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"anglePower",{get:function(){return this.uniforms.uAnglePower.value},set:function(e){this.uniforms.uAnglePower.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"color",{get:function(){return this.uniforms.uLightColor.value},set:function(e){this.uniforms.uLightColor.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),i}(n.Group),oe=`
456
+ `),pe=function(r){w(n,r);function n(e,t,o){e===void 0&&(e=1),t===void 0&&(t=.1),o===void 0&&(o=.2);var s=r.call(this)||this;s.needsRender=!0,s.uniforms={uTime:{value:0},uAttenuation:{value:e*.9},uAnglePower:{value:2},uSpotPosition:{value:s.position},uLightColor:{value:new i.Color(16777215)}};var a=new i.CylinderBufferGeometry(t,o,e,64,20,!0);a.applyMatrix4(new i.Matrix4().makeTranslation(0,-e/2,0)),a.applyMatrix4(new i.Matrix4().makeRotationX(-Math.PI/2));var l=new i.Mesh(a,new i.ShaderMaterial({uniforms:s.uniforms,vertexShader:ve,fragmentShader:de,transparent:!0,side:i.FrontSide,depthWrite:!1}));return s.add(l),s}return n.prototype.setTime=function(e){this.startTime===void 0&&(this.startTime=e),this.uniforms.uTime.value=(e-this.startTime)/1e3,this.needsRender=!0},Object.defineProperty(n.prototype,"attenuation",{get:function(){return this.uniforms.uAttenuation.value},set:function(e){this.uniforms.uAttenuation.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"anglePower",{get:function(){return this.uniforms.uAnglePower.value},set:function(e){this.uniforms.uAnglePower.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"color",{get:function(){return this.uniforms.uLightColor.value},set:function(e){this.uniforms.uLightColor.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),n}(i.Group),oe=`
457
457
  uniform vec3 uColor;
458
458
  uniform float uOpacity;
459
459
  varying vec3 vPosition;
@@ -486,7 +486,7 @@ void main(){
486
486
 
487
487
  gl_Position = projectionMatrix * modelViewMatrix * transformed;
488
488
  }
489
- `),C=new n.PlaneBufferGeometry(1,1,200,200);C.translate(0,-.5,0);var pe=function(r){w(i,r);function i(){var e=r.call(this)||this;e.needsRender=!0;var t=e.outer=new n.Mesh(C,new n.ShaderMaterial({uniforms:{uTime:{value:0},uSpeed:{value:.75},uScale:{value:2},uExpand:{value:1.2},uColor:{value:new n.Color(.5,.5,.9)},uOpacity:{value:1}},vertexShader:ae,fragmentShader:oe,transparent:!0,side:n.DoubleSide,depthWrite:!1})),o=e.inner=new n.Mesh(C,new n.ShaderMaterial({uniforms:{uTime:{value:0},uSpeed:{value:2},uScale:{value:20},uExpand:{value:1.2},uColor:{value:new n.Color(1,1,1)},uOpacity:{value:.1}},vertexShader:ae,fragmentShader:oe,transparent:!0,side:n.DoubleSide,depthWrite:!1}));return t.rotateX(-Math.PI/2),o.rotateX(-Math.PI/2),e.add(t),e.add(o),e}return i.prototype.setTime=function(e){this.startTime===void 0&&(this.startTime=e);var t=(e-this.startTime)/1e3;this.inner.material.uniforms.uTime.value=t,this.outer.material.uniforms.uTime.value=t,this.needsRender=!0},Object.defineProperty(i.prototype,"expand",{get:function(){return this.outer.material.uniforms.uExpand.value},set:function(e){this.outer.material.uniforms.uExpand.value=e,this.inner.material.uniforms.uExpand.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"speed",{get:function(){return this.inner.material.uniforms.speed.value},set:function(e){this.inner.material.uniforms.speed.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"color",{get:function(){return this.outer.material.uniforms.color.value},set:function(e){this.outer.material.uniforms.color.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"flowColor",{get:function(){return this.inner.material.uniforms.color.value},set:function(e){this.inner.material.uniforms.color.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),i}(n.Group);function b(r,i){return r+i*(Math.random()-.5)}function _(r,i){var e=new n.Vector3(Math.random()-.5,Math.random()-.5,Math.random()-.5);return new n.Vector3().addVectors(r,new n.Vector3().multiplyVectors(i,e))}function P(r,i,e){return r*e+i*e*e/2}function he(r,i,e){return new n.Vector3(P(r.x,i.x,e),P(r.y,i.y,e),P(r.z,i.z,e))}function z(r,i){for(var e=r.times.length,t=0;t<e&&i>r.times[t];)t++;if(t==0)return r.values[0];if(t==e)return r.values[e-1];var o=(i-r.times[t-1])/(r.times[t]-r.times[t-1]),s=r.values[t-1],a=r.values[t];return typeof r.values[0]=="number"?s+o*(a-s):s.clone().lerp(a,o)}var me=function(){function r(i,e,t,o,s,a,l,u,v,d,f,c,p,y){this.birthTime=i,this.deathAge=e,this.position=t.clone(),this.velocity=o.clone(),this.acceleration=s.clone(),this.angle=a,this.angleVelocity=l,this.angleAcceleration=u,this.color=v,this.colorTween=d,this.size=f,this.sizeTween=c,this.opacity=p,this.opacityTween=y}return r.prototype.getAlive=function(i){return this.deathAge>i-this.birthTime},r.prototype.getState=function(i){var e=this.getAlive(i),t=Math.min(this.deathAge,i-this.birthTime),o=he(this.velocity,this.acceleration,t).add(this.position),s=P(this.angleVelocity,this.angleAcceleration,t)+this.angle,a=(this.sizeTween?z(this.sizeTween,t):0)+this.size,l=(this.colorTween?z(this.colorTween,t):new n.Vector3).add(this.color),u=new n.Color().setHSL(l.x,l.y,l.z),v=(this.opacityTween?z(this.opacityTween,t):0)+this.opacity;return{alive:e,age:t,position:o,angle:s,size:a,color:u,opacity:v}},r}(),ye=`
489
+ `),C=new i.PlaneBufferGeometry(1,1,200,200);C.translate(0,-.5,0);var fe=function(r){w(n,r);function n(){var e=r.call(this)||this;e.needsRender=!0;var t=e.outer=new i.Mesh(C,new i.ShaderMaterial({uniforms:{uTime:{value:0},uSpeed:{value:.75},uScale:{value:2},uExpand:{value:1.2},uColor:{value:new i.Color(.5,.5,.9)},uOpacity:{value:1}},vertexShader:ae,fragmentShader:oe,transparent:!0,side:i.DoubleSide,depthWrite:!1})),o=e.inner=new i.Mesh(C,new i.ShaderMaterial({uniforms:{uTime:{value:0},uSpeed:{value:2},uScale:{value:20},uExpand:{value:1.2},uColor:{value:new i.Color(1,1,1)},uOpacity:{value:.1}},vertexShader:ae,fragmentShader:oe,transparent:!0,side:i.DoubleSide,depthWrite:!1}));return t.rotateX(-Math.PI/2),o.rotateX(-Math.PI/2),e.add(t),e.add(o),e}return n.prototype.setTime=function(e){this.startTime===void 0&&(this.startTime=e);var t=(e-this.startTime)/1e3;this.inner.material.uniforms.uTime.value=t,this.outer.material.uniforms.uTime.value=t,this.needsRender=!0},Object.defineProperty(n.prototype,"expand",{get:function(){return this.outer.material.uniforms.uExpand.value},set:function(e){this.outer.material.uniforms.uExpand.value=e,this.inner.material.uniforms.uExpand.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"speed",{get:function(){return this.inner.material.uniforms.speed.value},set:function(e){this.inner.material.uniforms.speed.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"color",{get:function(){return this.outer.material.uniforms.color.value},set:function(e){this.outer.material.uniforms.color.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"flowColor",{get:function(){return this.inner.material.uniforms.color.value},set:function(e){this.inner.material.uniforms.color.value=e,this.needsRender=!0},enumerable:!1,configurable:!0}),n}(i.Group);function b(r,n){return r+n*(Math.random()-.5)}function _(r,n){var e=new i.Vector3(Math.random()-.5,Math.random()-.5,Math.random()-.5);return new i.Vector3().addVectors(r,new i.Vector3().multiplyVectors(n,e))}function P(r,n,e){return r*e+n*e*e/2}function he(r,n,e){return new i.Vector3(P(r.x,n.x,e),P(r.y,n.y,e),P(r.z,n.z,e))}function z(r,n){for(var e=r.times.length,t=0;t<e&&n>r.times[t];)t++;if(t==0)return r.values[0];if(t==e)return r.values[e-1];var o=(n-r.times[t-1])/(r.times[t]-r.times[t-1]),s=r.values[t-1],a=r.values[t];return typeof r.values[0]=="number"?s+o*(a-s):s.clone().lerp(a,o)}var me=function(){function r(n,e,t,o,s,a,l,u,d,v,p,c,f,y){this.birthTime=n,this.deathAge=e,this.position=t.clone(),this.velocity=o.clone(),this.acceleration=s.clone(),this.angle=a,this.angleVelocity=l,this.angleAcceleration=u,this.color=d,this.colorTween=v,this.size=p,this.sizeTween=c,this.opacity=f,this.opacityTween=y}return r.prototype.getAlive=function(n){return this.deathAge>n-this.birthTime},r.prototype.getState=function(n){var e=this.getAlive(n),t=Math.min(this.deathAge,n-this.birthTime),o=he(this.velocity,this.acceleration,t).add(this.position),s=P(this.angleVelocity,this.angleAcceleration,t)+this.angle,a=(this.sizeTween?z(this.sizeTween,t):0)+this.size,l=(this.colorTween?z(this.colorTween,t):new i.Vector3).add(this.color),u=new i.Color().setHSL(l.x,l.y,l.z),d=(this.opacityTween?z(this.opacityTween,t):0)+this.opacity;return{alive:e,age:t,position:o,angle:s,size:a,color:u,opacity:d}},r}(),ye=`
490
490
  attribute vec3 color;
491
491
  attribute float opacity;
492
492
  attribute float size;
@@ -536,4 +536,4 @@ void main() {
536
536
  gl_FragColor = vColor * rotatedTexture;
537
537
  #endif
538
538
  }
539
- `,be=function(r){w(i,r);function i(e){var t=this,o,s,a,l,u,v,d,f,c,p,y,S,m,B,R,N,V,O,j,F,D,U,G,I,X,H,k,L,q,W,Y,Z,$,J,Q,K,ee,te,g=new n.BufferGeometry;g.setAttribute("position",new n.BufferAttribute(new Float32Array,3)),g.setAttribute("alive",new n.BufferAttribute(new Float32Array,1)),g.setAttribute("color",new n.BufferAttribute(new Float32Array,3)),g.setAttribute("opacity",new n.BufferAttribute(new Float32Array,1)),g.setAttribute("size",new n.BufferAttribute(new Float32Array,1)),g.setAttribute("angle",new n.BufferAttribute(new Float32Array,1));var xe=new n.ShaderMaterial({uniforms:{map:{value:(o=e.texture)!==null&&o!==void 0?o:null}},defines:{USE_MAP:!!e.texture},vertexShader:ye,fragmentShader:ge,transparent:!0,blending:(s=e.blending)!==null&&s!==void 0?s:n.NormalBlending,depthWrite:!1});return t=r.call(this,g,xe)||this,t.instances=[],t.needsRender=!0,t.birthTime=Date.now()/1e3,t.disposed=!1,t.paused=!1,t.positionBase=(l=(a=e.positionBase)===null||a===void 0?void 0:a.clone())!==null&&l!==void 0?l:new n.Vector3,t.positionStyle=(u=e.positionStyle)!==null&&u!==void 0?u:"CUBE",t.positionCubeSpread=(d=(v=e.positionCubeSpread)===null||v===void 0?void 0:v.clone())!==null&&d!==void 0?d:new n.Vector3,t.positionSphereSpread=(f=e.positionSphereSpread)!==null&&f!==void 0?f:0,t.velocityStyle=(c=e.velocityStyle)!==null&&c!==void 0?c:"CUBE",t.velocityCubeBase=(y=(p=e.velocityCubeBase)===null||p===void 0?void 0:p.clone())!==null&&y!==void 0?y:new n.Vector3,t.velocityCubeSpread=(m=(S=e.velocityCubeSpread)===null||S===void 0?void 0:S.clone())!==null&&m!==void 0?m:new n.Vector3,t.velocitySphereBase=(B=e.velocitySphereBase)!==null&&B!==void 0?B:0,t.velocitySphereSpread=(R=e.velocitySphereSpread)!==null&&R!==void 0?R:0,t.accelerationBase=(V=(N=e.accelerationBase)===null||N===void 0?void 0:N.clone())!==null&&V!==void 0?V:new n.Vector3,t.accelerationSpread=(j=(O=e.accelerationSpread)===null||O===void 0?void 0:O.clone())!==null&&j!==void 0?j:new n.Vector3,t.angleBase=(F=e.angleBase)!==null&&F!==void 0?F:0,t.angleSpread=(D=e.angleSpread)!==null&&D!==void 0?D:0,t.angleVelocityBase=(U=e.angleVelocityBase)!==null&&U!==void 0?U:0,t.angleVelocitySpread=(G=e.angleVelocitySpread)!==null&&G!==void 0?G:0,t.angleAccelerationBase=(I=e.angleAccelerationBase)!==null&&I!==void 0?I:0,t.angleAccelerationSpread=(X=e.angleAccelerationSpread)!==null&&X!==void 0?X:0,t.sizeBase=(H=e.sizeBase)!==null&&H!==void 0?H:.1,t.sizeSpread=(k=e.sizeSpread)!==null&&k!==void 0?k:0,t.sizeTween=(L=e.sizeTween)!==null&&L!==void 0?L:null,t.colorBase=(W=(q=e.colorBase)===null||q===void 0?void 0:q.clone())!==null&&W!==void 0?W:new n.Vector3,t.colorSpread=(Z=(Y=e.colorSpread)===null||Y===void 0?void 0:Y.clone())!==null&&Z!==void 0?Z:new n.Vector3,t.colorTween=($=e.colorTween)!==null&&$!==void 0?$:null,t.opacityBase=((J=e.opacityBase)!==null&&J!==void 0?J:e.opacityTween)?0:1,t.opacitySpread=(Q=e.opacitySpread)!==null&&Q!==void 0?Q:0,t.opacityTween=(K=e.opacityTween)!==null&&K!==void 0?K:null,t.particlesPerSecond=(ee=e.particlesPerSecond)!==null&&ee!==void 0?ee:60,t.particleDeathAge=(te=e.particleDeathAge)!==null&&te!==void 0?te:1,t}return Object.defineProperty(i.prototype,"texture",{get:function(){return this.material.uniforms.map.value},set:function(e){this.material.uniforms.map.value=e,e===null?this.material.defines.USE_MAP!==!1&&(this.material.defines.USE_MAP=!1,this.material.needsUpdate=!0):this.material.defines.USE_MAP!==!0&&(this.material.defines.USE_MAP=!0,this.material.needsUpdate=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"blending",{get:function(){return this.material.blending},set:function(e){this.material.blending=e},enumerable:!1,configurable:!0}),i.prototype.createInstance=function(e){var t=this.positionBase.clone();switch(this.positionStyle){case"CUBE":{t=_(this.positionBase,this.positionCubeSpread);break}case"SPHERE":{var o=2*Math.random()-1,s=Math.PI*2*Math.random(),a=Math.sqrt(1-o*o),l=new n.Vector3(a*Math.cos(s),a*Math.sin(s),o);t=new n.Vector3().addVectors(this.positionBase,l.multiplyScalar(this.positionSphereSpread));break}}var u=new n.Vector3;switch(this.velocityStyle){case"CUBE":{u=_(this.velocityCubeBase,this.velocityCubeSpread);break}case"SPHERE":{var v=new n.Vector3().subVectors(t,this.positionBase),d=b(this.velocitySphereBase,this.velocitySphereSpread);u=v.normalize().multiplyScalar(d);break}}var f=new me(e,this.particleDeathAge,t,u,_(this.accelerationBase,this.accelerationSpread),b(this.angleBase,this.angleSpread),b(this.angleVelocityBase,this.angleVelocitySpread),b(this.angleAccelerationBase,this.angleAccelerationSpread),_(this.colorBase,this.colorSpread),this.colorTween,b(this.sizeBase,this.sizeSpread),this.sizeTween,b(this.opacityBase,this.opacitySpread),this.opacityTween);return f},i.prototype.pause=function(){this.paused!==!0&&(this.paused=!0,this.birthTime=Date.now()/1e3)},i.prototype.play=function(){this.paused!==!1&&(this.paused=!1,this.birthTime=Date.now()/1e3)},i.prototype.setTime=function(e){if(!this.disposed){e/=1e3;var t=e-this.birthTime,o=Math.ceil(this.particlesPerSecond*this.particleDeathAge);if(this.geometry.attributes.position.count<o){var s=new Float32Array(o*3);s.set(this.geometry.attributes.position.array,0);var a=new n.BufferAttribute(s,3);a.needsUpdate=!0,this.geometry.setAttribute("position",a)}if(this.geometry.attributes.alive.count<o){var l=new Float32Array(o);l.set(this.geometry.attributes.alive.array,0);var a=new n.BufferAttribute(l,1);a.needsUpdate=!0,this.geometry.setAttribute("alive",a)}if(this.geometry.attributes.color.count<o){var u=new Float32Array(o*3);u.set(this.geometry.attributes.color.array,0);var a=new n.BufferAttribute(u,3);a.needsUpdate=!0,this.geometry.setAttribute("color",a)}if(this.geometry.attributes.opacity.count<o){var v=new Float32Array(o);v.set(this.geometry.attributes.opacity.array,0);var a=new n.BufferAttribute(v,1);a.needsUpdate=!0,this.geometry.setAttribute("opacity",a)}if(this.geometry.attributes.size.count<o){var d=new Float32Array(o);d.set(this.geometry.attributes.size.array,0);var a=new n.BufferAttribute(d,1);a.needsUpdate=!0,this.geometry.setAttribute("size",a)}if(this.geometry.attributes.angle.count<o){var f=new Float32Array(o);f.set(this.geometry.attributes.angle.array,0);var a=new n.BufferAttribute(f,1);a.needsUpdate=!0,this.geometry.setAttribute("angle",a)}this.instances.length<o&&(this.instances.length=o);for(var c=0;c<this.instances.length;c++){var p=this.instances[c];if(c<o&&this.paused===!1&&(p===void 0||p.getAlive(e)===!1)){var y=this.particleDeathAge/o*c;if(t>y){var S=e-(t-y)%this.particleDeathAge;this.instances[c]=p=this.createInstance(S)}}if(p){var m=p.getState(e),s=m.position,l=m.alive,u=m.color,v=m.opacity,d=m.size,f=m.angle;this.geometry.attributes.position.setXYZ(c,s.x,s.y,s.z),this.geometry.attributes.position.needsUpdate=!0,this.geometry.attributes.alive.setX(c,l?1:0),this.geometry.attributes.alive.needsUpdate=!0,this.geometry.attributes.color.setXYZ(c,u.r,u.g,u.b),this.geometry.attributes.color.needsUpdate=!0,this.geometry.attributes.opacity.setX(c,v),this.geometry.attributes.opacity.needsUpdate=!0,this.geometry.attributes.size.setX(c,d),this.geometry.attributes.size.needsUpdate=!0,this.geometry.attributes.angle.setX(c,f),this.geometry.attributes.angle.needsUpdate=!0}}this.geometry.computeBoundingBox(),this.geometry.boundingSphere||(this.geometry.boundingSphere=new n.Sphere),this.geometry.boundingBox.getBoundingSphere(this.geometry.boundingSphere),this.needsRender=!0}},i.prototype.dispose=function(){var e;this.disposed=!0,this.geometry.dispose(),(e=this.texture)===null||e===void 0||e.dispose(),this.material.dispose()},i}(n.Points);h.Airflow=pe,h.Flame=ce,h.Particle=be,h.SpotLight=fe,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
539
+ `,be=function(r){w(n,r);function n(e){var t=this,o,s,a,l,u,d,v,p,c,f,y,S,m,B,R,N,V,O,j,F,D,U,G,I,X,H,k,L,q,W,Y,Z,$,J,Q,K,ee,te,g=new i.BufferGeometry;g.setAttribute("position",new i.BufferAttribute(new Float32Array,3)),g.setAttribute("alive",new i.BufferAttribute(new Float32Array,1)),g.setAttribute("color",new i.BufferAttribute(new Float32Array,3)),g.setAttribute("opacity",new i.BufferAttribute(new Float32Array,1)),g.setAttribute("size",new i.BufferAttribute(new Float32Array,1)),g.setAttribute("angle",new i.BufferAttribute(new Float32Array,1));var xe=new i.ShaderMaterial({uniforms:{map:{value:(o=e.texture)!==null&&o!==void 0?o:null}},defines:{USE_MAP:!!e.texture},vertexShader:ye,fragmentShader:ge,transparent:!0,blending:(s=e.blending)!==null&&s!==void 0?s:i.NormalBlending,depthWrite:!1});return t=r.call(this,g,xe)||this,t.instances=[],t.needsRender=!0,t.birthTime=Date.now()/1e3,t.disposed=!1,t.paused=!1,t.positionBase=(l=(a=e.positionBase)===null||a===void 0?void 0:a.clone())!==null&&l!==void 0?l:new i.Vector3,t.positionStyle=(u=e.positionStyle)!==null&&u!==void 0?u:"CUBE",t.positionCubeSpread=(v=(d=e.positionCubeSpread)===null||d===void 0?void 0:d.clone())!==null&&v!==void 0?v:new i.Vector3,t.positionSphereSpread=(p=e.positionSphereSpread)!==null&&p!==void 0?p:0,t.velocityStyle=(c=e.velocityStyle)!==null&&c!==void 0?c:"CUBE",t.velocityCubeBase=(y=(f=e.velocityCubeBase)===null||f===void 0?void 0:f.clone())!==null&&y!==void 0?y:new i.Vector3,t.velocityCubeSpread=(m=(S=e.velocityCubeSpread)===null||S===void 0?void 0:S.clone())!==null&&m!==void 0?m:new i.Vector3,t.velocitySphereBase=(B=e.velocitySphereBase)!==null&&B!==void 0?B:0,t.velocitySphereSpread=(R=e.velocitySphereSpread)!==null&&R!==void 0?R:0,t.accelerationBase=(V=(N=e.accelerationBase)===null||N===void 0?void 0:N.clone())!==null&&V!==void 0?V:new i.Vector3,t.accelerationSpread=(j=(O=e.accelerationSpread)===null||O===void 0?void 0:O.clone())!==null&&j!==void 0?j:new i.Vector3,t.angleBase=(F=e.angleBase)!==null&&F!==void 0?F:0,t.angleSpread=(D=e.angleSpread)!==null&&D!==void 0?D:0,t.angleVelocityBase=(U=e.angleVelocityBase)!==null&&U!==void 0?U:0,t.angleVelocitySpread=(G=e.angleVelocitySpread)!==null&&G!==void 0?G:0,t.angleAccelerationBase=(I=e.angleAccelerationBase)!==null&&I!==void 0?I:0,t.angleAccelerationSpread=(X=e.angleAccelerationSpread)!==null&&X!==void 0?X:0,t.sizeBase=(H=e.sizeBase)!==null&&H!==void 0?H:.1,t.sizeSpread=(k=e.sizeSpread)!==null&&k!==void 0?k:0,t.sizeTween=(L=e.sizeTween)!==null&&L!==void 0?L:null,t.colorBase=(W=(q=e.colorBase)===null||q===void 0?void 0:q.clone())!==null&&W!==void 0?W:new i.Vector3,t.colorSpread=(Z=(Y=e.colorSpread)===null||Y===void 0?void 0:Y.clone())!==null&&Z!==void 0?Z:new i.Vector3,t.colorTween=($=e.colorTween)!==null&&$!==void 0?$:null,t.opacityBase=((J=e.opacityBase)!==null&&J!==void 0?J:e.opacityTween)?0:1,t.opacitySpread=(Q=e.opacitySpread)!==null&&Q!==void 0?Q:0,t.opacityTween=(K=e.opacityTween)!==null&&K!==void 0?K:null,t.particlesPerSecond=(ee=e.particlesPerSecond)!==null&&ee!==void 0?ee:60,t.particleDeathAge=(te=e.particleDeathAge)!==null&&te!==void 0?te:1,t}return Object.defineProperty(n.prototype,"texture",{get:function(){return this.material.uniforms.map.value},set:function(e){this.material.uniforms.map.value=e,e===null?this.material.defines.USE_MAP!==!1&&(this.material.defines.USE_MAP=!1,this.material.needsUpdate=!0):this.material.defines.USE_MAP!==!0&&(this.material.defines.USE_MAP=!0,this.material.needsUpdate=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"blending",{get:function(){return this.material.blending},set:function(e){this.material.blending=e},enumerable:!1,configurable:!0}),n.prototype.createInstance=function(e){var t=this.positionBase.clone();switch(this.positionStyle){case"CUBE":{t=_(this.positionBase,this.positionCubeSpread);break}case"SPHERE":{var o=2*Math.random()-1,s=Math.PI*2*Math.random(),a=Math.sqrt(1-o*o),l=new i.Vector3(a*Math.cos(s),a*Math.sin(s),o);t=new i.Vector3().addVectors(this.positionBase,l.multiplyScalar(this.positionSphereSpread));break}}var u=new i.Vector3;switch(this.velocityStyle){case"CUBE":{u=_(this.velocityCubeBase,this.velocityCubeSpread);break}case"SPHERE":{var d=new i.Vector3().subVectors(t,this.positionBase),v=b(this.velocitySphereBase,this.velocitySphereSpread);u=d.normalize().multiplyScalar(v);break}}var p=new me(e,this.particleDeathAge,t,u,_(this.accelerationBase,this.accelerationSpread),b(this.angleBase,this.angleSpread),b(this.angleVelocityBase,this.angleVelocitySpread),b(this.angleAccelerationBase,this.angleAccelerationSpread),_(this.colorBase,this.colorSpread),this.colorTween,b(this.sizeBase,this.sizeSpread),this.sizeTween,b(this.opacityBase,this.opacitySpread),this.opacityTween);return p},n.prototype.pause=function(){this.paused!==!0&&(this.paused=!0,this.birthTime=Date.now()/1e3)},n.prototype.play=function(){this.paused!==!1&&(this.paused=!1,this.birthTime=Date.now()/1e3)},n.prototype.setTime=function(e){if(!this.disposed){e/=1e3;var t=e-this.birthTime,o=Math.ceil(this.particlesPerSecond*this.particleDeathAge);if(this.geometry.attributes.position.count<o){var s=new Float32Array(o*3);s.set(this.geometry.attributes.position.array,0);var a=new i.BufferAttribute(s,3);a.needsUpdate=!0,this.geometry.setAttribute("position",a)}if(this.geometry.attributes.alive.count<o){var l=new Float32Array(o);l.set(this.geometry.attributes.alive.array,0);var a=new i.BufferAttribute(l,1);a.needsUpdate=!0,this.geometry.setAttribute("alive",a)}if(this.geometry.attributes.color.count<o){var u=new Float32Array(o*3);u.set(this.geometry.attributes.color.array,0);var a=new i.BufferAttribute(u,3);a.needsUpdate=!0,this.geometry.setAttribute("color",a)}if(this.geometry.attributes.opacity.count<o){var d=new Float32Array(o);d.set(this.geometry.attributes.opacity.array,0);var a=new i.BufferAttribute(d,1);a.needsUpdate=!0,this.geometry.setAttribute("opacity",a)}if(this.geometry.attributes.size.count<o){var v=new Float32Array(o);v.set(this.geometry.attributes.size.array,0);var a=new i.BufferAttribute(v,1);a.needsUpdate=!0,this.geometry.setAttribute("size",a)}if(this.geometry.attributes.angle.count<o){var p=new Float32Array(o);p.set(this.geometry.attributes.angle.array,0);var a=new i.BufferAttribute(p,1);a.needsUpdate=!0,this.geometry.setAttribute("angle",a)}this.instances.length<o&&(this.instances.length=o);for(var c=0;c<this.instances.length;c++){var f=this.instances[c];if(c<o&&this.paused===!1&&(f===void 0||f.getAlive(e)===!1)){var y=this.particleDeathAge/o*c;if(t>y){var S=e-(t-y)%this.particleDeathAge;this.instances[c]=f=this.createInstance(S)}}if(f){var m=f.getState(e),s=m.position,l=m.alive,u=m.color,d=m.opacity,v=m.size,p=m.angle;this.geometry.attributes.position.setXYZ(c,s.x,s.y,s.z),this.geometry.attributes.position.needsUpdate=!0,this.geometry.attributes.alive.setX(c,l?1:0),this.geometry.attributes.alive.needsUpdate=!0,this.geometry.attributes.color.setXYZ(c,u.r,u.g,u.b),this.geometry.attributes.color.needsUpdate=!0,this.geometry.attributes.opacity.setX(c,d),this.geometry.attributes.opacity.needsUpdate=!0,this.geometry.attributes.size.setX(c,v),this.geometry.attributes.size.needsUpdate=!0,this.geometry.attributes.angle.setX(c,p),this.geometry.attributes.angle.needsUpdate=!0}}this.geometry.computeBoundingBox(),this.geometry.boundingSphere||(this.geometry.boundingSphere=new i.Sphere),this.geometry.boundingBox.getBoundingSphere(this.geometry.boundingSphere),this.needsRender=!0}},n.prototype.dispose=function(){var e;this.disposed=!0,this.geometry.dispose(),(e=this.texture)===null||e===void 0||e.dispose(),this.material.dispose()},n}(i.Points);h.Airflow=fe,h.Flame=ce,h.Particle=be,h.SpotLight=pe,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
package/umd/five-vue.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 12/12/2023
5
- * Version: 6.0.0-alpha.63
4
+ * Generated: 12/14/2023
5
+ * Version: 6.0.0-alpha.65
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,4 +252,4 @@
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(f,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@realsee/five"),require("three")):typeof define=="function"&&define.amd?define(["exports","vue","@realsee/five","three"],t):(f=typeof globalThis<"u"?globalThis:f||self,t(f.FiveSDK_Vue={},f.Vue,f.FiveSDK,f.THREE))})(this,function(f,t,m,p){"use strict";function R(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const h=R(p);var v=function(){return v=Object.assign||function(n){for(var r,a=1,o=arguments.length;a<o;a++){r=arguments[a];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(n[l]=r[l])}return n},v.apply(this,arguments)},w=!1;function k(e){w=e}var F=Symbol();function d(){var e=t.inject(F);if(!e)throw new Error("Inject five error!");return e}var j={display:"inline-block",overflow:"hidden"},O=t.defineComponent({props:{width:{type:Number,required:!0},height:{type:Number,required:!0}},setup:function(e){var n=t.toRef(e,"width"),r=t.toRef(e,"height"),a=d(),o=t.ref(null);return t.watch([n,r,o],function(){if(a.renderer&&o.value){if(a.renderer.domElement.parentNode!==null&&a.renderer.domElement.parentNode!==o.value)throw new Error("There are more than 2 fiveCanvas in this context.");a.renderer.domElement.parentNode!==o.value&&o.value.appendChild(a.renderer.domElement),a.camera.aspect=n.value/r.value,a.camera.updateProjectionMatrix(),a.renderer.setSize(n.value,r.value),a.needsRender=!0}}),function(){return t.h("div",{id:"five",style:v({width:"".concat(n.value,"px"),height:"".concat(r.value,"px")},j),ref:o})}}}),g=[];function E(e){var n=e===void 0?{}:e,r=n.backgroundColor,a=r===void 0?1579548:r,o=n.backgroundAlpha,l=o===void 0?1:o,u=n.pixelRatio,c=u===void 0?1:u;if(!(typeof window>"u")){var i=g.shift();return i||(i=new h.WebGLRenderer({antialias:!1,alpha:!0}),i.outputEncoding=h.sRGBEncoding),i.setPixelRatio(c),i.setClearColor(a,l),i.autoClear=!0,i}}function P(e){e&&g.indexOf(e)===-1&&g.push(e)}function B(e,n){var r=Array.isArray(e)?e:[e],a=Array.isArray(n)?n:[n];if(r.length!==a.length)return!1;for(var o=0;o<r.length;o++)if(r[o]!==a[o])return!1;return!0}var U=t.defineComponent({props:{works:Object,initialWorks:Object,initialState:Object,initialUserAction:Boolean,onWorksChange:Function,onStateChange:Function,onCurrentStateChange:Function,onError:Function,fiveInitArgs:{type:Object,default:function(){return{}}},style:Object},setup:function(e){var n,r=t.toRefs(e).works,a=m.getViewportScale(),o=a===1?window.devicePixelRatio:1,l=E({pixelRatio:o}),u=new m.Five(v({renderer:l},e.fiveInitArgs)),c=e.works||e.initialWorks;return c&&u.load(c,e.initialState,void 0,(n=e.initialUserAction)!==null&&n!==void 0?n:!0),k(!!e.works),r&&t.watch(r,function(i,s){i&&!B(i,u.works)&&u.load(i,e.initialState)}),t.onBeforeUnmount(function(){u&&(u.dispose(),P(u.renderer))}),u.on("load",function(){e.onWorksChange&&u.works&&e.onWorksChange(u==null?void 0:u.works)}),u.on("stateChange",function(i,s){e.onStateChange&&e.onStateChange(i,s)}),u.on("currentStateChange",function(i,s){e.onCurrentStateChange&&e.onCurrentStateChange(i,s)}),u.on("error",function(i){e.onError?e.onError(i):console.warn(i.message)}),t.provide(F,u),{five:t.shallowReadonly(u)}},render:function(){return t.h("div",{style:this.$props.style},this.$slots)}});function W(){var e=d(),n=t.ref(e.works),r=t.readonly(n),a=function(l,u,c,i){if(w)throw new Error("props 'work' is set in fiveProvider, if you need modify work internal, use 'initialWork' instead.");return e.load(l,u,c,i)},o=e.on("load",function(){n.value=e.works});return t.onBeforeUnmount(function(){o()}),[r,a]}function _(){var e=d(),n=t.ref(v({},e.state)),r=e.on("stateChange",function(o){Object.assign(n.value,v({},o))});t.onBeforeUnmount(function(){r()});var a=function(o,l,u){l===void 0&&(l=!1),u===void 0&&(u=!0);var c=typeof o=="function"?o(e.getCurrentState()):o;e.setState(c,l,u)};return[n,a]}function A(){var e=d(),n=t.ref(e.getCurrentState()),r=e.on("currentStateChange",function(){Object.assign(n.value,e.getCurrentState())});t.onBeforeUnmount(function(){r()});var a=function(o,l,u){var c=typeof o=="function"?o(e.getCurrentState()):o;e.setState(c,l,u)};return[n,a]}function I(){var e=d(),n=t.reactive(e.getCurrentState()),r=t.ref(e.works.getResolvedObserver(e.pano)),a=e.on("currentStateChange",function(){Object.assign(n,e.getCurrentState()),r.value=e.works.getResolvedObserver({workCode:n.workCode,panoIndex:n.panoIndex})});return t.onBeforeUnmount(function(){a()}),r}function V(e,n){var r=d(),a=r.on(e,n);t.onBeforeUnmount(function(){a()})}function D(){var e=d(),n=function(c,i){return e.updateCamera(c,i)},r=function(c,i,s,X,Y){return e.getPixels(c,i,s,X,Y)},a=function(c){return e.render(c)},o=function(){return e.needsRender=!0},l=function(c,i){return e.preloadPano(c,i)},u=function(c,i){return i===void 0&&(i=!1),e.project2d(c,i)};return{updateCamera:n,getPixels:r,render:a,needsRender:o,preloadPano:l,project2d:u}}function L(e,n){n===void 0&&(n=!1);var r=d(),a=t.ref(Symbol()),o=t.shallowRef(e?r.project2d(t.isRef(e)?e.value:e,n):null),l=r.on("cameraUpdate",function(){a.value=Symbol()});return t.onBeforeUnmount(function(){l()}),t.watch([a,e],function(){o.value=r.project2d(t.isRef(e)?e.value:e,n)}),o}function H(){return L}function C(e){var n=e.camera.getWorldDirection(new h.Vector3),r=new h.Raycaster(e.camera.position,n);return r}function M(){var e=d(),n=t.shallowRef(C(e)),r=e.on("cameraUpdate",function(){n.value=C(e)});return t.onBeforeUnmount(function(){r()}),n}function y(e){return e.camera.getWorldDirection(new h.Vector3)}function T(){var e=d(),n=t.shallowRef(y(e)),r=e.on("cameraUpdate",function(){n.value=y(e)});return t.onBeforeUnmount(function(){r()}),n}function q(e){var n=d(),r=t.shallowRef([]);return t.watch(e,function(){r.value=n.model.intersectRaycaster(t.isRef(e)?e.value:e)}),r}function N(){return q}function S(e){return e.model.empty?"Empty":"Loaded"}function K(){var e=d(),n=t.ref(S(e)),r=e.on("modelLoaded",function(){n.value=S(e)});return t.onBeforeUnmount(function(){r()}),n}function $(){var e=d(),n=t.ref(e.model.shownFloor),r=t.ref(e.model.floorLength),a=function(l){typeof l=="number"?e.model.show(l):e.model.show()},o=[];return o.push(e.on("modelShownFloorChange",function(){n.value=e.model.shownFloor})),o.push(e.on("modelLoaded",function(){r.value=e.model.floorLength})),t.onBeforeUnmount(function(){for(var l;l=o.shift();)l()}),[n,r,a]}function x(){var e=d(),n=t.ref(e.helperVisible),r=function(o){e.helperVisible=o},a=e.on("helpersVisibleChange",function(o){n.value=o});return t.onBeforeUnmount(function(){a()}),[n,r]}function z(){return d()}function b(e){return e.model.bounding.clone()}function G(){var e=d(),n=t.shallowRef(b(e)),r=e.on("modelLoaded",function(){n.value=b(e)});return t.onBeforeUnmount(function(){r()}),n}function J(){var e=d();return e.scene}function Q(){var e=d(),n=t.shallowRef(e.model),r=e.on("modelLoaded",function(){n.value=e.model});return t.onBeforeUnmount(function(){r()}),n}f.FiveCanvas=O,f.FiveProvider=U,f.unsafe__useFiveInject=z,f.useFiveAction=D,f.useFiveCameraDirection=T,f.useFiveCameraRaycaster=M,f.useFiveCurrentObserver=I,f.useFiveCurrentState=A,f.useFiveEventCallback=V,f.useFiveFloor=$,f.useFiveHelper=x,f.useFiveModel=Q,f.useFiveModelBounding=G,f.useFiveModelIntersectRaycaster=N,f.useFiveModelReadyState=K,f.useFiveProject2d=H,f.useFiveScene=J,f.useFiveState=_,f.useFiveWorks=W,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
255
+ */(function(f,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("@realsee/five"),require("three")):typeof define=="function"&&define.amd?define(["exports","vue","@realsee/five","three"],t):(f=typeof globalThis<"u"?globalThis:f||self,t(f.FiveSDK_Vue={},f.Vue,f.FiveSDK,f.THREE))})(this,function(f,t,m,b){"use strict";function R(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const h=R(b);var d=function(){return d=Object.assign||function(n){for(var r,o=1,a=arguments.length;o<a;o++){r=arguments[o];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(n[l]=r[l])}return n},d.apply(this,arguments)};typeof SuppressedError=="function"&&SuppressedError;var w=!1;function k(e){w=e}var F=Symbol();function s(){var e=t.inject(F);if(!e)throw new Error("Inject five error!");return e}var j={display:"inline-block",overflow:"hidden"},E=t.defineComponent({props:{width:{type:Number,required:!0},height:{type:Number,required:!0}},setup:function(e){var n=t.toRef(e,"width"),r=t.toRef(e,"height"),o=s(),a=t.ref(null);return t.watch([n,r,a],function(){if(o.renderer&&a.value){if(o.renderer.domElement.parentNode!==null&&o.renderer.domElement.parentNode!==a.value)throw new Error("There are more than 2 fiveCanvas in this context.");o.renderer.domElement.parentNode!==a.value&&a.value.appendChild(o.renderer.domElement),o.camera.aspect=n.value/r.value,o.camera.updateProjectionMatrix(),o.renderer.setSize(n.value,r.value),o.needsRender=!0}}),function(){return t.h("div",{id:"five",style:d({width:"".concat(n.value,"px"),height:"".concat(r.value,"px")},j),ref:a})}}}),g=[];function O(e){var n=e===void 0?{}:e,r=n.backgroundColor,o=r===void 0?1579548:r,a=n.backgroundAlpha,l=a===void 0?1:a,u=n.pixelRatio,c=u===void 0?1:u;if(!(typeof window>"u")){var i=g.shift();return i||(i=new h.WebGLRenderer({antialias:!1,alpha:!0}),i.outputEncoding=h.sRGBEncoding),i.setPixelRatio(c),i.setClearColor(o,l),i.autoClear=!0,i}}function P(e){e&&g.indexOf(e)===-1&&g.push(e)}function B(e,n){var r=Array.isArray(e)?e:[e],o=Array.isArray(n)?n:[n];if(r.length!==o.length)return!1;for(var a=0;a<r.length;a++)if(r[a]!==o[a])return!1;return!0}var U=t.defineComponent({props:{works:Object,initialWorks:Object,initialState:Object,initialUserAction:Boolean,onWorksChange:Function,onStateChange:Function,onCurrentStateChange:Function,onError:Function,fiveInitArgs:{type:Object,default:function(){return{}}},style:Object},setup:function(e){var n,r=t.toRefs(e).works,o=m.getViewportScale(),a=o===1?window.devicePixelRatio:1,l=O({pixelRatio:a}),u=new m.Five(d({renderer:l},e.fiveInitArgs)),c=e.works||e.initialWorks;return c&&u.load(c,e.initialState,void 0,(n=e.initialUserAction)!==null&&n!==void 0?n:!0),k(!!e.works),r&&t.watch(r,function(i,v){i&&!B(i,u.works)&&u.load(i,e.initialState)}),t.onBeforeUnmount(function(){u&&(u.dispose(),P(u.renderer))}),u.on("load",function(){e.onWorksChange&&u.works&&e.onWorksChange(u==null?void 0:u.works)}),u.on("stateChange",function(i,v){e.onStateChange&&e.onStateChange(i,v)}),u.on("currentStateChange",function(i,v){e.onCurrentStateChange&&e.onCurrentStateChange(i,v)}),u.on("error",function(i){e.onError?e.onError(i):console.warn(i.message)}),t.provide(F,u),{five:t.shallowReadonly(u)}},render:function(){return t.h("div",{style:this.$props.style},this.$slots)}});function W(){var e=s(),n=t.ref(e.works),r=t.readonly(n),o=function(l,u,c,i){if(w)throw new Error("props 'work' is set in fiveProvider, if you need modify work internal, use 'initialWork' instead.");return e.load(l,u,c,i)},a=e.on("load",function(){n.value=e.works});return t.onBeforeUnmount(function(){a()}),[r,o]}function _(){var e=s(),n=t.ref(d({},e.state)),r=e.on("stateChange",function(a){Object.assign(n.value,d({},a))});t.onBeforeUnmount(function(){r()});var o=function(a,l,u){l===void 0&&(l=!1),u===void 0&&(u=!0);var c=typeof a=="function"?a(e.getCurrentState()):a;e.setState(c,l,u)};return[n,o]}function A(){var e=s(),n=t.ref(e.getCurrentState()),r=e.on("currentStateChange",function(){Object.assign(n.value,e.getCurrentState())});t.onBeforeUnmount(function(){r()});var o=function(a,l,u){var c=typeof a=="function"?a(e.getCurrentState()):a;e.setState(c,l,u)};return[n,o]}function I(){var e=s(),n=t.reactive(e.getCurrentState()),r=t.ref(e.works.getResolvedObserver(e.pano)),o=e.on("currentStateChange",function(){Object.assign(n,e.getCurrentState()),r.value=e.works.getResolvedObserver({workCode:n.workCode,panoIndex:n.panoIndex})});return t.onBeforeUnmount(function(){o()}),r}function V(e,n){var r=s(),o=r.on(e,n);t.onBeforeUnmount(function(){o()})}function D(){var e=s(),n=function(c,i){return e.updateCamera(c,i)},r=function(c,i,v,X,Y){return e.getPixels(c,i,v,X,Y)},o=function(c){return e.render(c)},a=function(){return e.needsRender=!0},l=function(c,i){return e.preloadPano(c,i)},u=function(c,i){return i===void 0&&(i=!1),e.project2d(c,i)};return{updateCamera:n,getPixels:r,render:o,needsRender:a,preloadPano:l,project2d:u}}function L(e,n){n===void 0&&(n=!1);var r=s(),o=t.ref(Symbol()),a=t.shallowRef(e?r.project2d(t.isRef(e)?e.value:e,n):null),l=r.on("cameraUpdate",function(){o.value=Symbol()});return t.onBeforeUnmount(function(){l()}),t.watch([o,e],function(){a.value=r.project2d(t.isRef(e)?e.value:e,n)}),a}function H(){return L}function p(e){var n=e.camera.getWorldDirection(new h.Vector3),r=new h.Raycaster(e.camera.position,n);return r}function M(){var e=s(),n=t.shallowRef(p(e)),r=e.on("cameraUpdate",function(){n.value=p(e)});return t.onBeforeUnmount(function(){r()}),n}function C(e){return e.camera.getWorldDirection(new h.Vector3)}function T(){var e=s(),n=t.shallowRef(C(e)),r=e.on("cameraUpdate",function(){n.value=C(e)});return t.onBeforeUnmount(function(){r()}),n}function q(e){var n=s(),r=t.shallowRef([]);return t.watch(e,function(){r.value=n.model.intersectRaycaster(t.isRef(e)?e.value:e)}),r}function N(){return q}function y(e){return e.model.empty?"Empty":"Loaded"}function K(){var e=s(),n=t.ref(y(e)),r=e.on("modelLoaded",function(){n.value=y(e)});return t.onBeforeUnmount(function(){r()}),n}function $(){var e=s(),n=t.ref(e.model.shownFloor),r=t.ref(e.model.floorLength),o=function(l){typeof l=="number"?e.model.show(l):e.model.show()},a=[];return a.push(e.on("modelShownFloorChange",function(){n.value=e.model.shownFloor})),a.push(e.on("modelLoaded",function(){r.value=e.model.floorLength})),t.onBeforeUnmount(function(){for(var l;l=a.shift();)l()}),[n,r,o]}function x(){var e=s(),n=t.ref(e.helperVisible),r=function(a){e.helperVisible=a},o=e.on("helpersVisibleChange",function(a){n.value=a});return t.onBeforeUnmount(function(){o()}),[n,r]}function z(){return s()}function S(e){return e.model.bounding.clone()}function G(){var e=s(),n=t.shallowRef(S(e)),r=e.on("modelLoaded",function(){n.value=S(e)});return t.onBeforeUnmount(function(){r()}),n}function J(){var e=s();return e.scene}function Q(){var e=s(),n=t.shallowRef(e.model),r=e.on("modelLoaded",function(){n.value=e.model});return t.onBeforeUnmount(function(){r()}),n}f.FiveCanvas=E,f.FiveProvider=U,f.unsafe__useFiveInject=z,f.useFiveAction=D,f.useFiveCameraDirection=T,f.useFiveCameraRaycaster=M,f.useFiveCurrentObserver=I,f.useFiveCurrentState=A,f.useFiveEventCallback=V,f.useFiveFloor=$,f.useFiveHelper=x,f.useFiveModel=Q,f.useFiveModelBounding=G,f.useFiveModelIntersectRaycaster=N,f.useFiveModelReadyState=K,f.useFiveProject2d=H,f.useFiveScene=J,f.useFiveState=_,f.useFiveWorks=W,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});