IParticleSystem.ts 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636
  1. import { Nullable } from "../types";
  2. import { Vector2, Vector3 } from "../Maths/math.vector";
  3. import { Color3, Color4 } from '../Maths/math.color';
  4. import { AbstractMesh } from "../Meshes/abstractMesh";
  5. import { BaseTexture } from "../Materials/Textures/baseTexture";
  6. import { Texture } from "../Materials/Textures/texture";
  7. import { BoxParticleEmitter, IParticleEmitterType, PointParticleEmitter, HemisphericParticleEmitter, SphereParticleEmitter, SphereDirectedParticleEmitter, CylinderParticleEmitter, ConeParticleEmitter } from "../Particles/EmitterTypes/index";
  8. import { Scene } from "../scene";
  9. import { ColorGradient, FactorGradient, Color3Gradient } from "../Misc/gradients";
  10. declare type Animation = import("../Animations/animation").Animation;
  11. /**
  12. * Interface representing a particle system in Babylon.js.
  13. * This groups the common functionalities that needs to be implemented in order to create a particle system.
  14. * A particle system represents a way to manage particles from their emission to their animation and rendering.
  15. */
  16. export interface IParticleSystem {
  17. /**
  18. * List of animations used by the particle system.
  19. */
  20. animations: Animation[];
  21. /**
  22. * The id of the Particle system.
  23. */
  24. id: string;
  25. /**
  26. * The name of the Particle system.
  27. */
  28. name: string;
  29. /**
  30. * The emitter represents the Mesh or position we are attaching the particle system to.
  31. */
  32. emitter: Nullable<AbstractMesh | Vector3>;
  33. /**
  34. * Gets or sets a boolean indicating if the particles must be rendered as billboard or aligned with the direction
  35. */
  36. isBillboardBased: boolean;
  37. /**
  38. * The rendering group used by the Particle system to chose when to render.
  39. */
  40. renderingGroupId: number;
  41. /**
  42. * The layer mask we are rendering the particles through.
  43. */
  44. layerMask: number;
  45. /**
  46. * The overall motion speed (0.01 is default update speed, faster updates = faster animation)
  47. */
  48. updateSpeed: number;
  49. /**
  50. * The amount of time the particle system is running (depends of the overall update speed).
  51. */
  52. targetStopDuration: number;
  53. /**
  54. * The texture used to render each particle. (this can be a spritesheet)
  55. */
  56. particleTexture: Nullable<Texture>;
  57. /**
  58. * Blend mode use to render the particle, it can be either ParticleSystem.BLENDMODE_ONEONE, ParticleSystem.BLENDMODE_STANDARD or ParticleSystem.BLENDMODE_ADD.
  59. */
  60. blendMode: number;
  61. /**
  62. * Minimum life time of emitting particles.
  63. */
  64. minLifeTime: number;
  65. /**
  66. * Maximum life time of emitting particles.
  67. */
  68. maxLifeTime: number;
  69. /**
  70. * Minimum Size of emitting particles.
  71. */
  72. minSize: number;
  73. /**
  74. * Maximum Size of emitting particles.
  75. */
  76. maxSize: number;
  77. /**
  78. * Minimum scale of emitting particles on X axis.
  79. */
  80. minScaleX: number;
  81. /**
  82. * Maximum scale of emitting particles on X axis.
  83. */
  84. maxScaleX: number;
  85. /**
  86. * Minimum scale of emitting particles on Y axis.
  87. */
  88. minScaleY: number;
  89. /**
  90. * Maximum scale of emitting particles on Y axis.
  91. */
  92. maxScaleY: number;
  93. /**
  94. * Random color of each particle after it has been emitted, between color1 and color2 vectors.
  95. */
  96. color1: Color4;
  97. /**
  98. * Random color of each particle after it has been emitted, between color1 and color2 vectors.
  99. */
  100. color2: Color4;
  101. /**
  102. * Color the particle will have at the end of its lifetime.
  103. */
  104. colorDead: Color4;
  105. /**
  106. * The maximum number of particles to emit per frame until we reach the activeParticleCount value
  107. */
  108. emitRate: number;
  109. /**
  110. * You can use gravity if you want to give an orientation to your particles.
  111. */
  112. gravity: Vector3;
  113. /**
  114. * Minimum power of emitting particles.
  115. */
  116. minEmitPower: number;
  117. /**
  118. * Maximum power of emitting particles.
  119. */
  120. maxEmitPower: number;
  121. /**
  122. * Minimum angular speed of emitting particles (Z-axis rotation for each particle).
  123. */
  124. minAngularSpeed: number;
  125. /**
  126. * Maximum angular speed of emitting particles (Z-axis rotation for each particle).
  127. */
  128. maxAngularSpeed: number;
  129. /**
  130. * Gets or sets the minimal initial rotation in radians.
  131. */
  132. minInitialRotation: number;
  133. /**
  134. * Gets or sets the maximal initial rotation in radians.
  135. */
  136. maxInitialRotation: number;
  137. /**
  138. * The particle emitter type defines the emitter used by the particle system.
  139. * It can be for example box, sphere, or cone...
  140. */
  141. particleEmitterType: Nullable<IParticleEmitterType>;
  142. /**
  143. * Defines the delay in milliseconds before starting the system (0 by default)
  144. */
  145. startDelay: number;
  146. /**
  147. * Gets or sets a value indicating how many cycles (or frames) must be executed before first rendering (this value has to be set before starting the system). Default is 0
  148. */
  149. preWarmCycles: number;
  150. /**
  151. * Gets or sets a value indicating the time step multiplier to use in pre-warm mode (default is 1)
  152. */
  153. preWarmStepOffset: number;
  154. /**
  155. * If using a spritesheet (isAnimationSheetEnabled) defines the speed of the sprite loop (default is 1 meaning the animation will play once during the entire particle lifetime)
  156. */
  157. spriteCellChangeSpeed: number;
  158. /**
  159. * If using a spritesheet (isAnimationSheetEnabled) defines the first sprite cell to display
  160. */
  161. startSpriteCellID: number;
  162. /**
  163. * If using a spritesheet (isAnimationSheetEnabled) defines the last sprite cell to display
  164. */
  165. endSpriteCellID: number;
  166. /**
  167. * If using a spritesheet (isAnimationSheetEnabled), defines the sprite cell width to use
  168. */
  169. spriteCellWidth: number;
  170. /**
  171. * If using a spritesheet (isAnimationSheetEnabled), defines the sprite cell height to use
  172. */
  173. spriteCellHeight: number;
  174. /**
  175. * This allows the system to random pick the start cell ID between startSpriteCellID and endSpriteCellID
  176. */
  177. spriteRandomStartCell: boolean;
  178. /**
  179. * Gets or sets a boolean indicating if a spritesheet is used to animate the particles texture
  180. */
  181. isAnimationSheetEnabled: boolean;
  182. /** Gets or sets a Vector2 used to move the pivot (by default (0,0)) */
  183. translationPivot: Vector2;
  184. /**
  185. * Gets or sets a texture used to add random noise to particle positions
  186. */
  187. noiseTexture: Nullable<BaseTexture>;
  188. /** Gets or sets the strength to apply to the noise value (default is (10, 10, 10)) */
  189. noiseStrength: Vector3;
  190. /**
  191. * Gets or sets the billboard mode to use when isBillboardBased = true.
  192. * Value can be: ParticleSystem.BILLBOARDMODE_ALL, ParticleSystem.BILLBOARDMODE_Y, ParticleSystem.BILLBOARDMODE_STRETCHED
  193. */
  194. billboardMode: number;
  195. /** Gets or sets a value indicating the damping to apply if the limit velocity factor is reached */
  196. limitVelocityDamping: number;
  197. /**
  198. * Gets or sets a boolean indicating that hosted animations (in the system.animations array) must be started when system.start() is called
  199. */
  200. beginAnimationOnStart: boolean;
  201. /**
  202. * Gets or sets the frame to start the animation from when beginAnimationOnStart is true
  203. */
  204. beginAnimationFrom: number;
  205. /**
  206. * Gets or sets the frame to end the animation on when beginAnimationOnStart is true
  207. */
  208. beginAnimationTo: number;
  209. /**
  210. * Gets or sets a boolean indicating if animations must loop when beginAnimationOnStart is true
  211. */
  212. beginAnimationLoop: boolean;
  213. /**
  214. * Specifies whether the particle system will be disposed once it reaches the end of the animation.
  215. */
  216. disposeOnStop: boolean;
  217. /**
  218. * Specifies if the particles are updated in emitter local space or world space
  219. */
  220. isLocal: boolean;
  221. /**
  222. * Gets the maximum number of particles active at the same time.
  223. * @returns The max number of active particles.
  224. */
  225. getCapacity(): number;
  226. /**
  227. * Gets if the system has been started. (Note: this will still be true after stop is called)
  228. * @returns True if it has been started, otherwise false.
  229. */
  230. isStarted(): boolean;
  231. /**
  232. * Animates the particle system for this frame.
  233. */
  234. animate(): void;
  235. /**
  236. * Renders the particle system in its current state.
  237. * @returns the current number of particles
  238. */
  239. render(): number;
  240. /**
  241. * Dispose the particle system and frees its associated resources.
  242. * @param disposeTexture defines if the particule texture must be disposed as well (true by default)
  243. */
  244. dispose(disposeTexture?: boolean): void;
  245. /**
  246. * Clones the particle system.
  247. * @param name The name of the cloned object
  248. * @param newEmitter The new emitter to use
  249. * @returns the cloned particle system
  250. */
  251. clone(name: string, newEmitter: any): Nullable<IParticleSystem>;
  252. /**
  253. * Serializes the particle system to a JSON object.
  254. * @returns the JSON object
  255. */
  256. serialize(): any;
  257. /**
  258. * Rebuild the particle system
  259. */
  260. rebuild(): void;
  261. /**
  262. * Starts the particle system and begins to emit
  263. * @param delay defines the delay in milliseconds before starting the system (0 by default)
  264. */
  265. start(delay?: number): void;
  266. /**
  267. * Stops the particle system.
  268. */
  269. stop(): void;
  270. /**
  271. * Remove all active particles
  272. */
  273. reset(): void;
  274. /**
  275. * Is this system ready to be used/rendered
  276. * @return true if the system is ready
  277. */
  278. isReady(): boolean;
  279. /**
  280. * Returns the string "ParticleSystem"
  281. * @returns a string containing the class name
  282. */
  283. getClassName(): string;
  284. /**
  285. * Adds a new color gradient
  286. * @param gradient defines the gradient to use (between 0 and 1)
  287. * @param color1 defines the color to affect to the specified gradient
  288. * @param color2 defines an additional color used to define a range ([color, color2]) with main color to pick the final color from
  289. * @returns the current particle system
  290. */
  291. addColorGradient(gradient: number, color1: Color4, color2?: Color4): IParticleSystem;
  292. /**
  293. * Remove a specific color gradient
  294. * @param gradient defines the gradient to remove
  295. * @returns the current particle system
  296. */
  297. removeColorGradient(gradient: number): IParticleSystem;
  298. /**
  299. * Adds a new size gradient
  300. * @param gradient defines the gradient to use (between 0 and 1)
  301. * @param factor defines the size factor to affect to the specified gradient
  302. * @param factor2 defines an additional factor used to define a range ([factor, factor2]) with main value to pick the final value from
  303. * @returns the current particle system
  304. */
  305. addSizeGradient(gradient: number, factor: number, factor2?: number): IParticleSystem;
  306. /**
  307. * Remove a specific size gradient
  308. * @param gradient defines the gradient to remove
  309. * @returns the current particle system
  310. */
  311. removeSizeGradient(gradient: number): IParticleSystem;
  312. /**
  313. * Gets the current list of color gradients.
  314. * You must use addColorGradient and removeColorGradient to udpate this list
  315. * @returns the list of color gradients
  316. */
  317. getColorGradients(): Nullable<Array<ColorGradient>>;
  318. /**
  319. * Gets the current list of size gradients.
  320. * You must use addSizeGradient and removeSizeGradient to udpate this list
  321. * @returns the list of size gradients
  322. */
  323. getSizeGradients(): Nullable<Array<FactorGradient>>;
  324. /**
  325. * Gets the current list of angular speed gradients.
  326. * You must use addAngularSpeedGradient and removeAngularSpeedGradient to udpate this list
  327. * @returns the list of angular speed gradients
  328. */
  329. getAngularSpeedGradients(): Nullable<Array<FactorGradient>>;
  330. /**
  331. * Adds a new angular speed gradient
  332. * @param gradient defines the gradient to use (between 0 and 1)
  333. * @param factor defines the angular speed to affect to the specified gradient
  334. * @param factor2 defines an additional factor used to define a range ([factor, factor2]) with main value to pick the final value from
  335. * @returns the current particle system
  336. */
  337. addAngularSpeedGradient(gradient: number, factor: number, factor2?: number): IParticleSystem;
  338. /**
  339. * Remove a specific angular speed gradient
  340. * @param gradient defines the gradient to remove
  341. * @returns the current particle system
  342. */
  343. removeAngularSpeedGradient(gradient: number): IParticleSystem;
  344. /**
  345. * Gets the current list of velocity gradients.
  346. * You must use addVelocityGradient and removeVelocityGradient to udpate this list
  347. * @returns the list of velocity gradients
  348. */
  349. getVelocityGradients(): Nullable<Array<FactorGradient>>;
  350. /**
  351. * Adds a new velocity gradient
  352. * @param gradient defines the gradient to use (between 0 and 1)
  353. * @param factor defines the velocity to affect to the specified gradient
  354. * @param factor2 defines an additional factor used to define a range ([factor, factor2]) with main value to pick the final value from
  355. * @returns the current particle system
  356. */
  357. addVelocityGradient(gradient: number, factor: number, factor2?: number): IParticleSystem;
  358. /**
  359. * Remove a specific velocity gradient
  360. * @param gradient defines the gradient to remove
  361. * @returns the current particle system
  362. */
  363. removeVelocityGradient(gradient: number): IParticleSystem;
  364. /**
  365. * Gets the current list of limit velocity gradients.
  366. * You must use addLimitVelocityGradient and removeLimitVelocityGradient to udpate this list
  367. * @returns the list of limit velocity gradients
  368. */
  369. getLimitVelocityGradients(): Nullable<Array<FactorGradient>>;
  370. /**
  371. * Adds a new limit velocity gradient
  372. * @param gradient defines the gradient to use (between 0 and 1)
  373. * @param factor defines the limit velocity to affect to the specified gradient
  374. * @param factor2 defines an additional factor used to define a range ([factor, factor2]) with main value to pick the final value from
  375. * @returns the current particle system
  376. */
  377. addLimitVelocityGradient(gradient: number, factor: number, factor2?: number): IParticleSystem;
  378. /**
  379. * Remove a specific limit velocity gradient
  380. * @param gradient defines the gradient to remove
  381. * @returns the current particle system
  382. */
  383. removeLimitVelocityGradient(gradient: number): IParticleSystem;
  384. /**
  385. * Adds a new drag gradient
  386. * @param gradient defines the gradient to use (between 0 and 1)
  387. * @param factor defines the drag to affect to the specified gradient
  388. * @param factor2 defines an additional factor used to define a range ([factor, factor2]) with main value to pick the final value from
  389. * @returns the current particle system
  390. */
  391. addDragGradient(gradient: number, factor: number, factor2?: number): IParticleSystem;
  392. /**
  393. * Remove a specific drag gradient
  394. * @param gradient defines the gradient to remove
  395. * @returns the current particle system
  396. */
  397. removeDragGradient(gradient: number): IParticleSystem;
  398. /**
  399. * Gets the current list of drag gradients.
  400. * You must use addDragGradient and removeDragGradient to udpate this list
  401. * @returns the list of drag gradients
  402. */
  403. getDragGradients(): Nullable<Array<FactorGradient>>;
  404. /**
  405. * Adds a new emit rate gradient (please note that this will only work if you set the targetStopDuration property)
  406. * @param gradient defines the gradient to use (between 0 and 1)
  407. * @param factor defines the emit rate to affect to the specified gradient
  408. * @param factor2 defines an additional factor used to define a range ([factor, factor2]) with main value to pick the final value from
  409. * @returns the current particle system
  410. */
  411. addEmitRateGradient(gradient: number, factor: number, factor2?: number): IParticleSystem;
  412. /**
  413. * Remove a specific emit rate gradient
  414. * @param gradient defines the gradient to remove
  415. * @returns the current particle system
  416. */
  417. removeEmitRateGradient(gradient: number): IParticleSystem;
  418. /**
  419. * Gets the current list of emit rate gradients.
  420. * You must use addEmitRateGradient and removeEmitRateGradient to udpate this list
  421. * @returns the list of emit rate gradients
  422. */
  423. getEmitRateGradients(): Nullable<Array<FactorGradient>>;
  424. /**
  425. * Adds a new start size gradient (please note that this will only work if you set the targetStopDuration property)
  426. * @param gradient defines the gradient to use (between 0 and 1)
  427. * @param factor defines the start size to affect to the specified gradient
  428. * @param factor2 defines an additional factor used to define a range ([factor, factor2]) with main value to pick the final value from
  429. * @returns the current particle system
  430. */
  431. addStartSizeGradient(gradient: number, factor: number, factor2?: number): IParticleSystem;
  432. /**
  433. * Remove a specific start size gradient
  434. * @param gradient defines the gradient to remove
  435. * @returns the current particle system
  436. */
  437. removeStartSizeGradient(gradient: number): IParticleSystem;
  438. /**
  439. * Gets the current list of start size gradients.
  440. * You must use addStartSizeGradient and removeStartSizeGradient to udpate this list
  441. * @returns the list of start size gradients
  442. */
  443. getStartSizeGradients(): Nullable<Array<FactorGradient>>;
  444. /**
  445. * Adds a new life time gradient
  446. * @param gradient defines the gradient to use (between 0 and 1)
  447. * @param factor defines the life time factor to affect to the specified gradient
  448. * @param factor2 defines an additional factor used to define a range ([factor, factor2]) with main value to pick the final value from
  449. * @returns the current particle system
  450. */
  451. addLifeTimeGradient(gradient: number, factor: number, factor2?: number): IParticleSystem;
  452. /**
  453. * Remove a specific life time gradient
  454. * @param gradient defines the gradient to remove
  455. * @returns the current particle system
  456. */
  457. removeLifeTimeGradient(gradient: number): IParticleSystem;
  458. /**
  459. * Gets the current list of life time gradients.
  460. * You must use addLifeTimeGradient and removeLifeTimeGradient to udpate this list
  461. * @returns the list of life time gradients
  462. */
  463. getLifeTimeGradients(): Nullable<Array<FactorGradient>>;
  464. /**
  465. * Gets the current list of color gradients.
  466. * You must use addColorGradient and removeColorGradient to udpate this list
  467. * @returns the list of color gradients
  468. */
  469. getColorGradients(): Nullable<Array<ColorGradient>>;
  470. /**
  471. * Adds a new ramp gradient used to remap particle colors
  472. * @param gradient defines the gradient to use (between 0 and 1)
  473. * @param color defines the color to affect to the specified gradient
  474. * @returns the current particle system
  475. */
  476. addRampGradient(gradient: number, color: Color3): IParticleSystem;
  477. /**
  478. * Gets the current list of ramp gradients.
  479. * You must use addRampGradient and removeRampGradient to udpate this list
  480. * @returns the list of ramp gradients
  481. */
  482. getRampGradients(): Nullable<Array<Color3Gradient>>;
  483. /** Gets or sets a boolean indicating that ramp gradients must be used
  484. * @see http://doc.babylonjs.com/babylon101/particles#ramp-gradients
  485. */
  486. useRampGradients: boolean;
  487. /**
  488. * Adds a new color remap gradient
  489. * @param gradient defines the gradient to use (between 0 and 1)
  490. * @param min defines the color remap minimal range
  491. * @param max defines the color remap maximal range
  492. * @returns the current particle system
  493. */
  494. addColorRemapGradient(gradient: number, min: number, max: number): IParticleSystem;
  495. /**
  496. * Gets the current list of color remap gradients.
  497. * You must use addColorRemapGradient and removeColorRemapGradient to udpate this list
  498. * @returns the list of color remap gradients
  499. */
  500. getColorRemapGradients(): Nullable<Array<FactorGradient>>;
  501. /**
  502. * Adds a new alpha remap gradient
  503. * @param gradient defines the gradient to use (between 0 and 1)
  504. * @param min defines the alpha remap minimal range
  505. * @param max defines the alpha remap maximal range
  506. * @returns the current particle system
  507. */
  508. addAlphaRemapGradient(gradient: number, min: number, max: number): IParticleSystem;
  509. /**
  510. * Gets the current list of alpha remap gradients.
  511. * You must use addAlphaRemapGradient and removeAlphaRemapGradient to udpate this list
  512. * @returns the list of alpha remap gradients
  513. */
  514. getAlphaRemapGradients(): Nullable<Array<FactorGradient>>;
  515. /**
  516. * Creates a Point Emitter for the particle system (emits directly from the emitter position)
  517. * @param direction1 Particles are emitted between the direction1 and direction2 from within the box
  518. * @param direction2 Particles are emitted between the direction1 and direction2 from within the box
  519. * @returns the emitter
  520. */
  521. createPointEmitter(direction1: Vector3, direction2: Vector3): PointParticleEmitter;
  522. /**
  523. * Creates a Hemisphere Emitter for the particle system (emits along the hemisphere radius)
  524. * @param radius The radius of the hemisphere to emit from
  525. * @param radiusRange The range of the hemisphere to emit from [0-1] 0 Surface Only, 1 Entire Radius
  526. * @returns the emitter
  527. */
  528. createHemisphericEmitter(radius: number, radiusRange: number): HemisphericParticleEmitter;
  529. /**
  530. * Creates a Sphere Emitter for the particle system (emits along the sphere radius)
  531. * @param radius The radius of the sphere to emit from
  532. * @param radiusRange The range of the sphere to emit from [0-1] 0 Surface Only, 1 Entire Radius
  533. * @returns the emitter
  534. */
  535. createSphereEmitter(radius: number, radiusRange: number): SphereParticleEmitter;
  536. /**
  537. * Creates a Directed Sphere Emitter for the particle system (emits between direction1 and direction2)
  538. * @param radius The radius of the sphere to emit from
  539. * @param direction1 Particles are emitted between the direction1 and direction2 from within the sphere
  540. * @param direction2 Particles are emitted between the direction1 and direction2 from within the sphere
  541. * @returns the emitter
  542. */
  543. createDirectedSphereEmitter(radius: number, direction1: Vector3, direction2: Vector3): SphereDirectedParticleEmitter;
  544. /**
  545. * Creates a Cylinder Emitter for the particle system (emits from the cylinder to the particle position)
  546. * @param radius The radius of the emission cylinder
  547. * @param height The height of the emission cylinder
  548. * @param radiusRange The range of emission [0-1] 0 Surface only, 1 Entire Radius
  549. * @param directionRandomizer How much to randomize the particle direction [0-1]
  550. * @returns the emitter
  551. */
  552. createCylinderEmitter(radius: number, height: number, radiusRange: number, directionRandomizer: number): CylinderParticleEmitter;
  553. /**
  554. * Creates a Directed Cylinder Emitter for the particle system (emits between direction1 and direction2)
  555. * @param radius The radius of the cylinder to emit from
  556. * @param height The height of the emission cylinder
  557. * @param radiusRange the range of the emission cylinder [0-1] 0 Surface only, 1 Entire Radius (1 by default)
  558. * @param direction1 Particles are emitted between the direction1 and direction2 from within the cylinder
  559. * @param direction2 Particles are emitted between the direction1 and direction2 from within the cylinder
  560. * @returns the emitter
  561. */
  562. createDirectedCylinderEmitter(radius: number, height: number, radiusRange: number, direction1: Vector3, direction2: Vector3): SphereDirectedParticleEmitter;
  563. /**
  564. * Creates a Cone Emitter for the particle system (emits from the cone to the particle position)
  565. * @param radius The radius of the cone to emit from
  566. * @param angle The base angle of the cone
  567. * @returns the emitter
  568. */
  569. createConeEmitter(radius: number, angle: number): ConeParticleEmitter;
  570. /**
  571. * Creates a Box Emitter for the particle system. (emits between direction1 and direction2 from withing the box defined by minEmitBox and maxEmitBox)
  572. * @param direction1 Particles are emitted between the direction1 and direction2 from within the box
  573. * @param direction2 Particles are emitted between the direction1 and direction2 from within the box
  574. * @param minEmitBox Particles are emitted from the box between minEmitBox and maxEmitBox
  575. * @param maxEmitBox Particles are emitted from the box between minEmitBox and maxEmitBox
  576. * @returns the emitter
  577. */
  578. createBoxEmitter(direction1: Vector3, direction2: Vector3, minEmitBox: Vector3, maxEmitBox: Vector3): BoxParticleEmitter;
  579. /**
  580. * Get hosting scene
  581. * @returns the scene
  582. */
  583. getScene(): Scene;
  584. }