@realsee/five 6.6.0-alpha.2 → 6.6.0-alpha.20

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 (203) hide show
  1. package/docs/assets/hierarchy.js +1 -1
  2. package/docs/assets/navigation.js +1 -1
  3. package/docs/assets/search.js +1 -1
  4. package/docs/classes/five.Fetcher.html +2 -2
  5. package/docs/classes/five.Five.html +60 -58
  6. package/docs/classes/five.Model.html +33 -33
  7. package/docs/classes/five.ModelScene.html +17 -18
  8. package/docs/classes/five.NetworkSubscribe.html +1 -1
  9. package/docs/classes/five.PBMContainer.html +1 -1
  10. package/docs/classes/five.PBMGroup.html +1 -1
  11. package/docs/classes/five.PBMMesh.html +2 -2
  12. package/docs/classes/five.PBMMeshMaterial.html +6 -6
  13. package/docs/classes/five.PBMPointCloud.html +1 -1
  14. package/docs/classes/five.PBMPointCloudMaterial.html +5 -5
  15. package/docs/classes/five.PBMSkinnedMesh.html +2 -2
  16. package/docs/classes/five.PanoCircleMesh.html +1 -1
  17. package/docs/classes/five.PanoCircleMeshCustom.html +1 -1
  18. package/docs/classes/five.PanoCircleMeshSolid.html +1 -1
  19. package/docs/classes/five.Parameter.html +52 -52
  20. package/docs/classes/five.Tile3DModel.html +26 -26
  21. package/docs/classes/five.TileNode.html +2 -2
  22. package/docs/classes/five.TileRequestScheduler.html +1 -1
  23. package/docs/classes/five.Tileset.html +2 -2
  24. package/docs/classes/five.TrajectoryNode.html +1 -1
  25. package/docs/classes/five.Work.html +17 -17
  26. package/docs/classes/five.WorkResolvedObserver.html +18 -14
  27. package/docs/classes/gltf-loader.DDSLoader.html +1 -1
  28. package/docs/classes/gltf-loader.DRACOLoader.html +1 -1
  29. package/docs/classes/gltf-loader.GLTFObject.html +1 -1
  30. package/docs/classes/gltf-loader.THREEGLTFLoader.html +1 -1
  31. package/docs/classes/line.LineGeometry.html +1 -1
  32. package/docs/classes/line.LineMaterial.html +1 -1
  33. package/docs/classes/line.LineSegmentsGeometry.html +1 -1
  34. package/docs/classes/line.THREE_Line2.html +1 -1
  35. package/docs/classes/line.THREE_LineSegments2.html +1 -1
  36. package/docs/classes/plugins.BasePlugin.Controller.html +5 -5
  37. package/docs/classes/plugins.RoundedBoxGeometry.html +1 -1
  38. package/docs/classes/vfx.Airflow.html +1 -1
  39. package/docs/classes/vfx.Flame.html +1 -1
  40. package/docs/classes/vfx.Particle.html +1 -1
  41. package/docs/classes/vfx.ParticleGPU.html +19 -0
  42. package/docs/classes/vfx.SpotLight.html +1 -1
  43. package/docs/functions/five.createDebugBoundingMesh.html +1 -1
  44. package/docs/functions/five.defaultImageURLTransform.html +1 -1
  45. package/docs/functions/five.isBoundingVolume.html +1 -1
  46. package/docs/functions/five.makeBoundingVolume.html +1 -1
  47. package/docs/functions/five.parseWork.html +1 -1
  48. package/docs/functions/vue.useFiveWorks.html +2 -2
  49. package/docs/hierarchy.html +1 -1
  50. package/docs/interfaces/five.AddableObject.html +3 -3
  51. package/docs/interfaces/five.AjaxOptions.html +5 -5
  52. package/docs/interfaces/five.BaseEvent.html +1 -1
  53. package/docs/interfaces/five.BoundingVolume.html +2 -2
  54. package/docs/interfaces/five.BoxBoundingVolume.html +2 -2
  55. package/docs/interfaces/five.EventCallback.html +1 -1
  56. package/docs/interfaces/five.FiveInitArgs.html +2 -2
  57. package/docs/interfaces/five.FiveLoadOptions.html +1 -1
  58. package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +9 -9
  59. package/docs/interfaces/five.GestureEvent.html +1 -1
  60. package/docs/interfaces/five.ImageOptions.html +17 -12
  61. package/docs/interfaces/five.ImageURLOptions.html +7 -5
  62. package/docs/interfaces/five.IntersectEvent.html +1 -1
  63. package/docs/interfaces/five.IntersectMesh.html +1 -1
  64. package/docs/interfaces/five.IntersectMeshInterface.html +1 -1
  65. package/docs/interfaces/five.Intersection.html +6 -3
  66. package/docs/interfaces/five.KTX2.html +2 -2
  67. package/docs/interfaces/five.LoosePanoWork.html +2 -2
  68. package/docs/interfaces/five.LooseWork.html +2 -2
  69. package/docs/interfaces/five.LooseWorkInitial.html +2 -2
  70. package/docs/interfaces/five.LooseWorkModel.html +2 -2
  71. package/docs/interfaces/five.LooseWorkObserver.html +2 -2
  72. package/docs/interfaces/five.LooseWorkPanorama.html +4 -2
  73. package/docs/interfaces/five.LooseWorkWithExtrinsics.html +7 -7
  74. package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +9 -9
  75. package/docs/interfaces/five.ModeChangeEvent.html +1 -1
  76. package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
  77. package/docs/interfaces/five.ModelEvent.html +1 -1
  78. package/docs/interfaces/five.ModelLike.html +2 -2
  79. package/docs/interfaces/five.ModelSceneEvent.html +1 -1
  80. package/docs/interfaces/five.MovePanoOptions.html +1 -1
  81. package/docs/interfaces/five.NetworkAbortError.html +1 -1
  82. package/docs/interfaces/five.NetworkFirbiddenError.html +1 -1
  83. package/docs/interfaces/five.NetworkOptions.html +4 -4
  84. package/docs/interfaces/five.NetworkProxyError.html +1 -1
  85. package/docs/interfaces/five.NetworkResourceEvent.html +1 -1
  86. package/docs/interfaces/five.NetworkResponseError.html +2 -2
  87. package/docs/interfaces/five.NetworkTimeoutError.html +1 -1
  88. package/docs/interfaces/five.ObjectEvent.html +1 -1
  89. package/docs/interfaces/five.PBMMaterial.html +1 -1
  90. package/docs/interfaces/five.PBMMeshMaterialParameters.html +2 -2
  91. package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +2 -2
  92. package/docs/interfaces/five.PanoCircleMeshInterface.html +3 -3
  93. package/docs/interfaces/five.PanoEvent.html +1 -1
  94. package/docs/interfaces/five.PanoTextureEvent.html +1 -1
  95. package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +1 -1
  96. package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +1 -1
  97. package/docs/interfaces/five.ParameterMaterialValue.html +37 -37
  98. package/docs/interfaces/five.ParameterTilesetValue.html +15 -15
  99. package/docs/interfaces/five.ParameterValue.html +51 -51
  100. package/docs/interfaces/five.Pose.html +1 -1
  101. package/docs/interfaces/five.RegionBoundingVolume.html +2 -2
  102. package/docs/interfaces/five.RenderEvent.html +1 -1
  103. package/docs/interfaces/five.ResolvedParameterValue.html +51 -51
  104. package/docs/interfaces/five.SphereBoundingVolume.html +2 -2
  105. package/docs/interfaces/five.State.html +1 -1
  106. package/docs/interfaces/five.StateEvent.html +1 -1
  107. package/docs/interfaces/five.TextureOptions.html +13 -8
  108. package/docs/interfaces/five.Tile3DModelLoaderOptions.html +2 -2
  109. package/docs/interfaces/five.TilesetHeader.html +2 -2
  110. package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +5 -5
  111. package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +1 -1
  112. package/docs/interfaces/five.ViewLayer.html +26 -26
  113. package/docs/interfaces/five.WorkCubeImage.html +1 -1
  114. package/docs/interfaces/five.WorkImage.html +1 -1
  115. package/docs/interfaces/five.WorkModel.html +6 -6
  116. package/docs/interfaces/five.WorkModelLayer.html +2 -2
  117. package/docs/interfaces/five.WorkObserver.html +20 -15
  118. package/docs/interfaces/five.WorkTile.html +1 -1
  119. package/docs/interfaces/five.WorksEvent.html +1 -1
  120. package/docs/interfaces/five.XRControllerEvent.html +1 -1
  121. package/docs/interfaces/five.XRGestureEvent.html +1 -1
  122. package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +1 -1
  123. package/docs/interfaces/five.XRSessionEvent.html +1 -1
  124. package/docs/interfaces/plugins.BackgroundPluginController.html +4 -4
  125. package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +4 -4
  126. package/docs/interfaces/plugins.ItemMaskController.html +4 -4
  127. package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +1 -1
  128. package/docs/interfaces/plugins.ItemMaskPluginType.State.html +1 -1
  129. package/docs/interfaces/plugins.OrientationPluginController.html +3 -3
  130. package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +1 -1
  131. package/docs/interfaces/plugins.OrientationPluginType.State.html +1 -1
  132. package/docs/interfaces/plugins.PanoAnimeController.html +14 -10
  133. package/docs/interfaces/plugins.PanoAnimePluginType.Config.html +2 -1
  134. package/docs/interfaces/plugins.PanoAnimePluginType.ConfigChangeEvent.html +7 -0
  135. package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +6 -4
  136. package/docs/interfaces/plugins.PanoAnimePluginType.Params.html +2 -2
  137. package/docs/interfaces/plugins.PanoAnimePluginType.State.html +3 -3
  138. package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +1 -1
  139. package/docs/interfaces/plugins.PluginTemplateType.State.html +1 -1
  140. package/docs/interfaces/plugins.TrajectoryController.html +5 -5
  141. package/docs/interfaces/react.FiveInjectionTypes.html +14 -14
  142. package/docs/interfaces/vfx.ParticleGPUArgs.html +60 -0
  143. package/docs/interfaces/vfx.ParticleGPUTweenKeyframe.html +3 -0
  144. package/docs/modules/plugins.PanoAnimePluginType.html +1 -1
  145. package/docs/modules/vfx.html +1 -1
  146. package/docs/types/five.AjaxResponseType.html +1 -1
  147. package/docs/types/five.AjaxResponseTypeMapping.html +1 -1
  148. package/docs/types/five.EventTypes.html +1 -1
  149. package/docs/types/five.Mode.html +1 -1
  150. package/docs/types/five.Models.html +5 -5
  151. package/docs/types/five.NetWorkMeta.html +2 -2
  152. package/docs/types/five.NetworkError.html +1 -1
  153. package/docs/types/five.NetworkErrorCallback.html +1 -1
  154. package/docs/types/five.NetworkProgressCallback.html +1 -1
  155. package/docs/types/five.NetworkResponse.html +2 -2
  156. package/docs/types/five.NetworkState.html +1 -1
  157. package/docs/types/five.NetworkSuccessCallback.html +1 -1
  158. package/docs/types/five.NetworkType.html +1 -1
  159. package/docs/types/five.ParseOptions.html +6 -6
  160. package/docs/types/five.SubscribeEventMap.html +1 -1
  161. package/docs/types/plugins.PanoAnimePluginType.PluginData.html +1 -1
  162. package/docs/types/plugins.PanoAnimePluginType.ServerData.html +1 -1
  163. package/docs/types/react.StoreActionMapType.html +1 -1
  164. package/docs/types/vfx.ParticleGPUType.html +1 -0
  165. package/docs/types/vue.FiveModelIntersectRaycaster.html +1 -1
  166. package/docs/types/vue.Project2d.html +1 -1
  167. package/docs/variables/five.controllersDefaultInitArgs.html +1 -1
  168. package/docs/variables/five.ktx2.html +1 -1
  169. package/docs/variables/react.useFiveScene.html +1 -1
  170. package/five/declare.d.ts +34 -0
  171. package/five/index.d.ts +55 -26
  172. package/five/index.js +77 -77
  173. package/five/index.mjs +5095 -4807
  174. package/gltf-loader/index.js +3 -3
  175. package/gltf-loader/index.mjs +3 -3
  176. package/line/index.js +3 -3
  177. package/line/index.mjs +3 -3
  178. package/package.json +2 -2
  179. package/plugins/index.d.ts +26 -1
  180. package/plugins/index.js +10 -10
  181. package/plugins/index.mjs +53 -48
  182. package/react/index.js +2 -2
  183. package/react/index.mjs +2 -2
  184. package/shader-lib/index.js +2 -2
  185. package/shader-lib/index.mjs +2 -2
  186. package/sticker/index.js +3 -3
  187. package/sticker/index.mjs +3 -3
  188. package/umd/five-gltf-loader.js +3 -3
  189. package/umd/five-line.js +3 -3
  190. package/umd/five-plugins.js +9 -9
  191. package/umd/five-react.js +2 -2
  192. package/umd/five-shader-lib.js +2 -2
  193. package/umd/five-sticker.js +3 -3
  194. package/umd/five-vfx.js +126 -19
  195. package/umd/five-vue.js +2 -2
  196. package/umd/five.js +77 -77
  197. package/vfx/index.d.ts +99 -0
  198. package/vfx/index.js +126 -19
  199. package/vfx/index.mjs +325 -119
  200. package/vue/index.js +2 -2
  201. package/vue/index.mjs +2 -2
  202. package/work-downloader/index.js +3 -3
  203. package/work-downloader/index.mjs +108 -94
package/umd/five-vfx.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 2025/8/15
5
- * Version: 6.6.0-alpha.2
4
+ * Generated: 9/23/2025
5
+ * Version: 6.6.0-alpha.20
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!="undefined"?x(exports,require("three")):typeof define=="function"&&define.amd?define(["exports","three"],x):(h=typeof globalThis!="undefined"?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=`
255
+ */(function(S,$){typeof exports=="object"&&typeof module!="undefined"?$(exports,require("three")):typeof define=="function"&&define.amd?define(["exports","three"],$):(S=typeof globalThis!="undefined"?globalThis:S||self,$(S.FiveSDK_VFX={},S.THREE))})(this,(function(S,$){"use strict";function Ee(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=Ee($);var re=function(r,i){return re=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])},re(r,i)};function Y(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");re(r,i);function e(){this.constructor=r}r.prototype=i===null?Object.create(i):(e.prototype=i.prototype,new e)}typeof SuppressedError=="function"&&SuppressedError;for(var ve=`
256
256
  uniform vec3 uColor1;
257
257
  uniform vec3 uColor2;
258
258
  uniform float uOpacity;
@@ -272,7 +272,7 @@ void main() {
272
272
  color.g = color.g * (1.0 + gradient * vNoise);
273
273
  gl_FragColor = vec4(color, alpha * uOpacity);
274
274
  }
275
- `,M=`
275
+ `,oe=`
276
276
  // Simplex 4D Noise
277
277
  // by Ian McEwan, Ashima Arts
278
278
  //
@@ -376,11 +376,11 @@ float simplexNoise(vec4 v) {
376
376
  + dot(m1*m1, vec2( dot( p3, x3 ), dot( p4, x4 ) ) ) ) ;
377
377
 
378
378
  }
379
- `,E=`
379
+ `,ae=`
380
380
  float scale(float value, float fromMin, float fromMax, float toMin, float toMax) {
381
381
  return toMin + (value - fromMin) * (toMax - toMin) / (fromMax - fromMin);
382
382
  }
383
- `,ie=`
383
+ `,fe=`
384
384
  uniform float uTime;
385
385
  uniform float uNoise;
386
386
  uniform float uSpeed;
@@ -388,8 +388,8 @@ uniform float uSpeed;
388
388
  varying vec3 vPosition;
389
389
  varying float vNoise;
390
390
 
391
- `.concat(M,`
392
- `).concat(E,`
391
+ `.concat(oe,`
392
+ `).concat(ae,`
393
393
 
394
394
  float fbm(vec4 x) {
395
395
  float v = 0.0;
@@ -412,7 +412,7 @@ void main() {
412
412
 
413
413
  gl_Position = projectionMatrix * modelViewMatrix * vec4(vPosition, 1.0);
414
414
  }
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=`
415
+ `),Be=new n.SphereBufferGeometry(1,300,300),pe=[],Q=0;Q<2;Q++)pe.push(new n.Vector2(Math.sin(Q)/2+1,Q*2-.8));var Fe=new n.LatheBufferGeometry(pe,300),Pe=(function(r){Y(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=Fe;break;case"circle":default:o=Be;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 u=new n.Mesh(o,new n.ShaderMaterial({uniforms:t.uniforms,defines:t.defines,vertexShader:fe,fragmentShader:ve,transparent:!0,depthWrite:!1,side:n.BackSide})),a=new n.Mesh(o,new n.ShaderMaterial({uniforms:t.uniforms,defines:t.defines,vertexShader:fe,fragmentShader:ve,transparent:!0,depthWrite:!1,side:n.FrontSide}));return u.scale.setScalar(.1),a.scale.setScalar(.1),t.add(u),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),Te=`
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
- `,ve=`
435
+ `,Me=`
436
436
 
437
437
  uniform float uTime;
438
438
 
@@ -440,8 +440,8 @@ varying vec3 vNormal;
440
440
  varying vec3 vWorldPosition;
441
441
  varying float vNoise;
442
442
 
443
- `.concat(M,`
444
- `).concat(E,`
443
+ `.concat(oe,`
444
+ `).concat(ae,`
445
445
 
446
446
  void main(){
447
447
 
@@ -453,7 +453,7 @@ void main(){
453
453
 
454
454
  gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
455
455
  }
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=`
456
+ `),ze=(function(r){Y(i,r);function i(e,t,o){e===void 0&&(e=1),t===void 0&&(t=.1),o===void 0&&(o=.2);var u=r.call(this)||this;u.needsRender=!0,u.uniforms={uTime:{value:0},uAttenuation:{value:e*.9},uAnglePower:{value:2},uSpotPosition:{value:u.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 s=new n.Mesh(a,new n.ShaderMaterial({uniforms:u.uniforms,vertexShader:Me,fragmentShader:Te,transparent:!0,side:n.FrontSide,depthWrite:!1}));return u.add(s),u}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),me=`
457
457
  uniform vec3 uColor;
458
458
  uniform float uOpacity;
459
459
  varying vec3 vPosition;
@@ -463,7 +463,7 @@ void main() {
463
463
  float gradient = mix(0.0, 1.0, 1.0 + vPosition.y);
464
464
  gl_FragColor = vec4(uColor, vNoise * gradient * uOpacity);
465
465
  }
466
- `,ae=`
466
+ `,he=`
467
467
 
468
468
  uniform float uTime;
469
469
  uniform float uSpeed;
@@ -472,8 +472,8 @@ uniform float uExpand;
472
472
  varying float vNoise;
473
473
  varying vec3 vPosition;
474
474
 
475
- `.concat(M,`
476
- `).concat(E,`
475
+ `.concat(oe,`
476
+ `).concat(ae,`
477
477
 
478
478
  void main(){
479
479
 
@@ -486,7 +486,7 @@ void main(){
486
486
 
487
487
  gl_Position = projectionMatrix * modelViewMatrix * transformed;
488
488
  }
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=`
489
+ `),ue=new n.PlaneBufferGeometry(1,1,200,200);ue.translate(0,-.5,0);var Ve=(function(r){Y(i,r);function i(){var e=r.call(this)||this;e.needsRender=!0;var t=e.outer=new n.Mesh(ue,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:he,fragmentShader:me,transparent:!0,side:n.DoubleSide,depthWrite:!1})),o=e.inner=new n.Mesh(ue,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:he,fragmentShader:me,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 q(r,i){return r+i*(Math.random()-.5)}function K(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 ee(r,i,e){return r*e+i*e*e/2}function De(r,i,e){return new n.Vector3(ee(r.x,i.x,e),ee(r.y,i.y,e),ee(r.z,i.z,e))}function le(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]),u=r.values[t-1],a=r.values[t];return typeof r.values[0]=="number"?u+o*(a-u):u.clone().lerp(a,o)}var Re=(function(){function r(i,e,t,o,u,a,s,c,f,m,h,d,y,b){this.birthTime=i,this.deathAge=e,this.position=t.clone(),this.velocity=o.clone(),this.acceleration=u.clone(),this.angle=a,this.angleVelocity=s,this.angleAcceleration=c,this.color=f,this.colorTween=m,this.size=h,this.sizeTween=d,this.opacity=y,this.opacityTween=b}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=De(this.velocity,this.acceleration,t).add(this.position),u=ee(this.angleVelocity,this.angleAcceleration,t)+this.angle,a=(this.sizeTween?le(this.sizeTween,t):0)+this.size,s=(this.colorTween?le(this.colorTween,t):new n.Vector3).add(this.color),c=new n.Color().setHSL(s.x,s.y,s.z),f=(this.opacityTween?le(this.opacityTween,t):0)+this.opacity;return{alive:e,age:t,position:o,angle:u,size:a,color:c,opacity:f}},r})(),Ne=`
490
490
  attribute vec3 color;
491
491
  attribute float opacity;
492
492
  attribute float size;
@@ -512,7 +512,7 @@ void main() {
512
512
  gl_PointSize = size * ( 300.0 / length( mvPosition.xyz ) );
513
513
  gl_Position = projectionMatrix * mvPosition;
514
514
  }
515
- `,ge=`
515
+ `,Oe=`
516
516
  varying vec4 vColor;
517
517
 
518
518
  #if defined(USE_MAP)
@@ -536,4 +536,111 @@ void main() {
536
536
  gl_FragColor = vColor * rotatedTexture;
537
537
  #endif
538
538
  }
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"})}));
539
+ `,Ue=(function(r){Y(i,r);function i(e){var t=this,o,u,a,s,c,f,m,h,d,y,b,w,g,C,E,B,F,P,T,M,z,V,D,R,N,O,U,j,G,I,X,H,k,L,v,p,x,_,A=new n.BufferGeometry;A.setAttribute("position",new n.BufferAttribute(new Float32Array,3)),A.setAttribute("alive",new n.BufferAttribute(new Float32Array,1)),A.setAttribute("color",new n.BufferAttribute(new Float32Array,3)),A.setAttribute("opacity",new n.BufferAttribute(new Float32Array,1)),A.setAttribute("size",new n.BufferAttribute(new Float32Array,1)),A.setAttribute("angle",new n.BufferAttribute(new Float32Array,1));var ne=new n.ShaderMaterial({uniforms:{map:{value:(o=e.texture)!==null&&o!==void 0?o:null}},defines:{USE_MAP:!!e.texture},vertexShader:Ne,fragmentShader:Oe,transparent:!0,blending:(u=e.blending)!==null&&u!==void 0?u:n.NormalBlending,depthWrite:!1});return t=r.call(this,A,ne)||this,t.instances=[],t.needsRender=!0,t.birthTime=Date.now()/1e3,t.disposed=!1,t.paused=!1,t.positionBase=(s=(a=e.positionBase)===null||a===void 0?void 0:a.clone())!==null&&s!==void 0?s:new n.Vector3,t.positionStyle=(c=e.positionStyle)!==null&&c!==void 0?c:"CUBE",t.positionCubeSpread=(m=(f=e.positionCubeSpread)===null||f===void 0?void 0:f.clone())!==null&&m!==void 0?m:new n.Vector3,t.positionSphereSpread=(h=e.positionSphereSpread)!==null&&h!==void 0?h:0,t.velocityStyle=(d=e.velocityStyle)!==null&&d!==void 0?d:"CUBE",t.velocityCubeBase=(b=(y=e.velocityCubeBase)===null||y===void 0?void 0:y.clone())!==null&&b!==void 0?b:new n.Vector3,t.velocityCubeSpread=(g=(w=e.velocityCubeSpread)===null||w===void 0?void 0:w.clone())!==null&&g!==void 0?g:new n.Vector3,t.velocitySphereBase=(C=e.velocitySphereBase)!==null&&C!==void 0?C:0,t.velocitySphereSpread=(E=e.velocitySphereSpread)!==null&&E!==void 0?E:0,t.accelerationBase=(F=(B=e.accelerationBase)===null||B===void 0?void 0:B.clone())!==null&&F!==void 0?F:new n.Vector3,t.accelerationSpread=(T=(P=e.accelerationSpread)===null||P===void 0?void 0:P.clone())!==null&&T!==void 0?T:new n.Vector3,t.angleBase=(M=e.angleBase)!==null&&M!==void 0?M:0,t.angleSpread=(z=e.angleSpread)!==null&&z!==void 0?z:0,t.angleVelocityBase=(V=e.angleVelocityBase)!==null&&V!==void 0?V:0,t.angleVelocitySpread=(D=e.angleVelocitySpread)!==null&&D!==void 0?D:0,t.angleAccelerationBase=(R=e.angleAccelerationBase)!==null&&R!==void 0?R:0,t.angleAccelerationSpread=(N=e.angleAccelerationSpread)!==null&&N!==void 0?N:0,t.sizeBase=(O=e.sizeBase)!==null&&O!==void 0?O:.1,t.sizeSpread=(U=e.sizeSpread)!==null&&U!==void 0?U:0,t.sizeTween=(j=e.sizeTween)!==null&&j!==void 0?j:null,t.colorBase=(I=(G=e.colorBase)===null||G===void 0?void 0:G.clone())!==null&&I!==void 0?I:new n.Vector3,t.colorSpread=(H=(X=e.colorSpread)===null||X===void 0?void 0:X.clone())!==null&&H!==void 0?H:new n.Vector3,t.colorTween=(k=e.colorTween)!==null&&k!==void 0?k:null,t.opacityBase=((L=e.opacityBase)!==null&&L!==void 0?L:e.opacityTween)?0:1,t.opacitySpread=(v=e.opacitySpread)!==null&&v!==void 0?v:0,t.opacityTween=(p=e.opacityTween)!==null&&p!==void 0?p:null,t.particlesPerSecond=(x=e.particlesPerSecond)!==null&&x!==void 0?x:60,t.particleDeathAge=(_=e.particleDeathAge)!==null&&_!==void 0?_: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=K(this.positionBase,this.positionCubeSpread);break}case"SPHERE":{var o=2*Math.random()-1,u=Math.PI*2*Math.random(),a=Math.sqrt(1-o*o),s=new n.Vector3(a*Math.cos(u),a*Math.sin(u),o);t=new n.Vector3().addVectors(this.positionBase,s.multiplyScalar(this.positionSphereSpread));break}}var c=new n.Vector3;switch(this.velocityStyle){case"CUBE":{c=K(this.velocityCubeBase,this.velocityCubeSpread);break}case"SPHERE":{var f=new n.Vector3().subVectors(t,this.positionBase),m=q(this.velocitySphereBase,this.velocitySphereSpread);c=f.normalize().multiplyScalar(m);break}}var h=new Re(e,this.particleDeathAge,t,c,K(this.accelerationBase,this.accelerationSpread),q(this.angleBase,this.angleSpread),q(this.angleVelocityBase,this.angleVelocitySpread),q(this.angleAccelerationBase,this.angleAccelerationSpread),K(this.colorBase,this.colorSpread),this.colorTween,q(this.sizeBase,this.sizeSpread),this.sizeTween,q(this.opacityBase,this.opacitySpread),this.opacityTween);return h},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 u=new Float32Array(o*3);u.set(this.geometry.attributes.position.array,0);var a=new n.BufferAttribute(u,3);a.needsUpdate=!0,this.geometry.setAttribute("position",a)}if(this.geometry.attributes.alive.count<o){var s=new Float32Array(o);s.set(this.geometry.attributes.alive.array,0);var a=new n.BufferAttribute(s,1);a.needsUpdate=!0,this.geometry.setAttribute("alive",a)}if(this.geometry.attributes.color.count<o){var c=new Float32Array(o*3);c.set(this.geometry.attributes.color.array,0);var a=new n.BufferAttribute(c,3);a.needsUpdate=!0,this.geometry.setAttribute("color",a)}if(this.geometry.attributes.opacity.count<o){var f=new Float32Array(o);f.set(this.geometry.attributes.opacity.array,0);var a=new n.BufferAttribute(f,1);a.needsUpdate=!0,this.geometry.setAttribute("opacity",a)}if(this.geometry.attributes.size.count<o){var m=new Float32Array(o);m.set(this.geometry.attributes.size.array,0);var a=new n.BufferAttribute(m,1);a.needsUpdate=!0,this.geometry.setAttribute("size",a)}if(this.geometry.attributes.angle.count<o){var h=new Float32Array(o);h.set(this.geometry.attributes.angle.array,0);var a=new n.BufferAttribute(h,1);a.needsUpdate=!0,this.geometry.setAttribute("angle",a)}this.instances.length<o&&(this.instances.length=o);for(var d=0;d<this.instances.length;d++){var y=this.instances[d];if(d<o&&this.paused===!1&&(y===void 0||y.getAlive(e)===!1)){var b=this.particleDeathAge/o*d;if(t>b){var w=e-(t-b)%this.particleDeathAge;this.instances[d]=y=this.createInstance(w)}}if(y){var g=y.getState(e),u=g.position,s=g.alive,c=g.color,f=g.opacity,m=g.size,h=g.angle;this.geometry.attributes.position.setXYZ(d,u.x,u.y,u.z),this.geometry.attributes.position.needsUpdate=!0,this.geometry.attributes.alive.setX(d,s?1:0),this.geometry.attributes.alive.needsUpdate=!0,this.geometry.attributes.color.setXYZ(d,c.r,c.g,c.b),this.geometry.attributes.color.needsUpdate=!0,this.geometry.attributes.opacity.setX(d,f),this.geometry.attributes.opacity.needsUpdate=!0,this.geometry.attributes.size.setX(d,m),this.geometry.attributes.size.needsUpdate=!0,this.geometry.attributes.angle.setX(d,h),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);function Z(r,i){return r+i*(Math.random()-.5)}function te(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))}var je=`
540
+ // 粒子初始属性
541
+ attribute vec3 initialVelocity;
542
+ attribute vec3 acceleration;
543
+ attribute float birthTime;
544
+ attribute float lifeTime;
545
+ attribute float initialSize;
546
+ attribute float sizeGrowth;
547
+ attribute vec3 initialColor;
548
+ attribute float initialOpacity;
549
+ attribute float initialAngle;
550
+ attribute float angleVelocity;
551
+ attribute float particleIndex;
552
+
553
+ // 全局uniform参数
554
+ uniform float uTime;
555
+
556
+ // 传递给fragment shader的变量
557
+ varying vec4 vColor;
558
+ varying float vAngle;
559
+
560
+ // 简单噪声函数
561
+ float random(vec2 st) {
562
+ return fract(sin(dot(st.xy, vec2(12.9898,78.233))) * 43758.5453123);
563
+ }
564
+
565
+ // HSL转RGB函数
566
+ vec3 hsl2rgb(vec3 c) {
567
+ vec3 rgb = clamp(abs(mod(c.x*6.0+vec3(0.0,4.0,2.0), 6.0)-3.0)-1.0, 0.0, 1.0);
568
+ return c.z + c.y * (rgb-0.5)*(1.0-abs(2.0*c.z-1.0));
569
+ }
570
+
571
+ void main() {
572
+ // 计算粒子的实际年龄,考虑循环重生
573
+ float totalCycleTime = lifeTime;
574
+ float adjustedTime = uTime + birthTime;
575
+ float cycleTime = mod(adjustedTime, totalCycleTime);
576
+ float age = cycleTime;
577
+ float normalizedAge = clamp(age / lifeTime, 0.0, 1.0);
578
+
579
+ // 如果粒子年龄超过生命周期,让它重新开始
580
+ if (age > lifeTime) {
581
+ age = 0.0;
582
+ normalizedAge = 0.0;
583
+ }
584
+
585
+ // 计算当前位置(物理模拟)
586
+ vec3 currentVelocity = initialVelocity + acceleration * age;
587
+
588
+ vec3 currentPosition = position + currentVelocity * age;
589
+
590
+ // 计算当前大小(随时间变化)
591
+ float currentSize = initialSize + sizeGrowth * normalizedAge;
592
+
593
+ // 计算当前角度
594
+ vAngle = initialAngle + angleVelocity * age;
595
+
596
+ // 计算当前颜色和透明度(生命周期渐变)
597
+ vec3 currentColor = initialColor;
598
+ float currentOpacity = initialOpacity;
599
+
600
+ // 生命周期透明度渐变(出生和死亡时渐变)
601
+ if (normalizedAge < 0.1) {
602
+ currentOpacity *= normalizedAge / 0.1; // 淡入
603
+ } else if (normalizedAge > 0.8) {
604
+ currentOpacity *= (1.0 - normalizedAge) / 0.2; // 淡出
605
+ }
606
+
607
+ // 将HSL颜色转换为RGB
608
+ vec3 rgbColor = hsl2rgb(currentColor);
609
+ vColor = vec4(rgbColor, currentOpacity);
610
+
611
+ // 计算最终位置和大小
612
+ vec4 mvPosition = modelViewMatrix * vec4(currentPosition, 1.0);
613
+ gl_PointSize = currentSize * (300.0 / length(mvPosition.xyz));
614
+ gl_Position = projectionMatrix * mvPosition;
615
+ }
616
+ `,Ge=`
617
+ varying vec4 vColor;
618
+ varying float vAngle;
619
+
620
+ #if defined(USE_MAP)
621
+ uniform sampler2D map;
622
+ #endif
623
+
624
+ void main() {
625
+ // 如果粒子透明度为0,直接丢弃
626
+ if (vColor.a <= 0.0) {
627
+ discard;
628
+ }
629
+
630
+ gl_FragColor = vColor;
631
+
632
+ #if defined(USE_MAP)
633
+ float c = cos(vAngle);
634
+ float s = sin(vAngle);
635
+
636
+ // 旋转UV坐标以旋转纹理
637
+ vec2 rotatedUV = vec2(
638
+ c * (gl_PointCoord.x - 0.5) + s * (gl_PointCoord.y - 0.5) + 0.5,
639
+ c * (gl_PointCoord.y - 0.5) - s * (gl_PointCoord.x - 0.5) + 0.5
640
+ );
641
+
642
+ vec4 textureColor = texture2D(map, rotatedUV);
643
+ gl_FragColor = vColor * textureColor;
644
+ #endif
645
+ }
646
+ `,Ie=(function(r){Y(i,r);function i(e){for(var t=this,o,u,a,s,c,f,m,h,d,y,b,w,g,C,E,B,F,P,T,M,z,V,D,R,N,O,U,j,G,I,X,H,k,L,v=Math.ceil(((o=e.particlesPerSecond)!==null&&o!==void 0?o:60)*((u=e.particleDeathAge)!==null&&u!==void 0?u:1)),p=new n.BufferGeometry,x=new Float32Array(v*3),_=new Float32Array(v*3),A=new Float32Array(v*3),ne=new Float32Array(v),ye=new Float32Array(v),ge=new Float32Array(v),be=new Float32Array(v),ie=new Float32Array(v*3),Ae=new Float32Array(v),Se=new Float32Array(v),we=new Float32Array(v),xe=new Float32Array(v),l=0;l<v;l++){var Xe=((a=e.particleDeathAge)!==null&&a!==void 0?a:1)/v*l;ne[l]=Xe,ye[l]=(s=e.particleDeathAge)!==null&&s!==void 0?s:1,xe[l]=l;var W=(f=(c=e.positionBase)===null||c===void 0?void 0:c.clone())!==null&&f!==void 0?f:new n.Vector3;switch((m=e.positionStyle)!==null&&m!==void 0?m:"CUBE"){case"CUBE":{W=te((h=e.positionBase)!==null&&h!==void 0?h:new n.Vector3,(d=e.positionCubeSpread)!==null&&d!==void 0?d:new n.Vector3);break}case"SPHERE":{var se=2*Math.random()-1,_e=Math.PI*2*Math.random(),Ce=Math.sqrt(1-se*se),He=new n.Vector3(Ce*Math.cos(_e),Ce*Math.sin(_e),se);W=new n.Vector3().addVectors((y=e.positionBase)!==null&&y!==void 0?y:new n.Vector3,He.multiplyScalar((b=e.positionSphereSpread)!==null&&b!==void 0?b:0));break}}x[l*3]=W.x,x[l*3+1]=W.y,x[l*3+2]=W.z;var J=new n.Vector3;switch((w=e.velocityStyle)!==null&&w!==void 0?w:"CUBE"){case"CUBE":{J=te((g=e.velocityCubeBase)!==null&&g!==void 0?g:new n.Vector3,(C=e.velocityCubeSpread)!==null&&C!==void 0?C:new n.Vector3);break}case"SPHERE":{var ke=new n.Vector3().subVectors(W,(E=e.positionBase)!==null&&E!==void 0?E:new n.Vector3),Le=Z((B=e.velocitySphereBase)!==null&&B!==void 0?B:0,(F=e.velocitySphereSpread)!==null&&F!==void 0?F:0);J=ke.normalize().multiplyScalar(Le);break}}_[l*3]=J.x,_[l*3+1]=J.y,_[l*3+2]=J.z;var ce=te((P=e.accelerationBase)!==null&&P!==void 0?P:new n.Vector3,(T=e.accelerationSpread)!==null&&T!==void 0?T:new n.Vector3);A[l*3]=ce.x,A[l*3+1]=ce.y,A[l*3+2]=ce.z,ge[l]=Z((M=e.sizeBase)!==null&&M!==void 0?M:.1,(z=e.sizeSpread)!==null&&z!==void 0?z:0),be[l]=(V=e.sizeGrowth)!==null&&V!==void 0?V:0;var de=te((D=e.colorBase)!==null&&D!==void 0?D:new n.Vector3,(R=e.colorSpread)!==null&&R!==void 0?R:new n.Vector3);ie[l*3]=de.x,ie[l*3+1]=de.y,ie[l*3+2]=de.z,Ae[l]=Z((N=e.opacityBase)!==null&&N!==void 0?N:1,(O=e.opacitySpread)!==null&&O!==void 0?O:0),Se[l]=Z((U=e.angleBase)!==null&&U!==void 0?U:0,(j=e.angleSpread)!==null&&j!==void 0?j:0),we[l]=Z((G=e.angleVelocityBase)!==null&&G!==void 0?G:0,(I=e.angleVelocitySpread)!==null&&I!==void 0?I:0)}p.setAttribute("position",new n.BufferAttribute(x,3)),p.setAttribute("initialVelocity",new n.BufferAttribute(_,3)),p.setAttribute("acceleration",new n.BufferAttribute(A,3)),p.setAttribute("birthTime",new n.BufferAttribute(ne,1)),p.setAttribute("lifeTime",new n.BufferAttribute(ye,1)),p.setAttribute("initialSize",new n.BufferAttribute(ge,1)),p.setAttribute("sizeGrowth",new n.BufferAttribute(be,1)),p.setAttribute("initialColor",new n.BufferAttribute(ie,3)),p.setAttribute("initialOpacity",new n.BufferAttribute(Ae,1)),p.setAttribute("initialAngle",new n.BufferAttribute(Se,1)),p.setAttribute("angleVelocity",new n.BufferAttribute(we,1)),p.setAttribute("particleIndex",new n.BufferAttribute(xe,1));var qe=new n.ShaderMaterial({uniforms:{map:{value:(X=e.texture)!==null&&X!==void 0?X:null},uTime:{value:0}},defines:{USE_MAP:!!e.texture},vertexShader:je,fragmentShader:Ge,transparent:!0,blending:(H=e.blending)!==null&&H!==void 0?H:n.NormalBlending,depthWrite:!1});return t=r.call(this,p,qe)||this,t.needsRender=!0,t.startTime=Date.now()/1e3,t.disposed=!1,t.paused=!1,t.particleCount=v,t.particlesPerSecond=(k=e.particlesPerSecond)!==null&&k!==void 0?k:60,t.particleDeathAge=(L=e.particleDeathAge)!==null&&L!==void 0?L: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.pause=function(){this.paused!==!0&&(this.paused=!0,this.startTime=Date.now()/1e3)},i.prototype.play=function(){this.paused!==!1&&(this.paused=!1,this.startTime=Date.now()/1e3)},i.prototype.setTime=function(e){if(!(this.disposed||this.paused)){var t=e/1e3,o=t-this.startTime;this.material.uniforms.uTime.value=o,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);S.Airflow=Ve,S.Flame=Pe,S.Particle=Ue,S.ParticleGPU=Ie,S.SpotLight=ze,Object.defineProperty(S,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: 2025/8/15
5
- * Version: 6.6.0-alpha.2
4
+ * Generated: 9/23/2025
5
+ * Version: 6.6.0-alpha.20
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021