IParticleSystem.ts 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630
  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. * Adds a new color gradient
  281. * @param gradient defines the gradient to use (between 0 and 1)
  282. * @param color1 defines the color to affect to the specified gradient
  283. * @param color2 defines an additional color used to define a range ([color, color2]) with main color to pick the final color from
  284. * @returns the current particle system
  285. */
  286. addColorGradient(gradient: number, color1: Color4, color2?: Color4): IParticleSystem;
  287. /**
  288. * Remove a specific color gradient
  289. * @param gradient defines the gradient to remove
  290. * @returns the current particle system
  291. */
  292. removeColorGradient(gradient: number): IParticleSystem;
  293. /**
  294. * Adds a new size gradient
  295. * @param gradient defines the gradient to use (between 0 and 1)
  296. * @param factor defines the size factor to affect to the specified gradient
  297. * @param factor2 defines an additional factor used to define a range ([factor, factor2]) with main value to pick the final value from
  298. * @returns the current particle system
  299. */
  300. addSizeGradient(gradient: number, factor: number, factor2?: number): IParticleSystem;
  301. /**
  302. * Remove a specific size gradient
  303. * @param gradient defines the gradient to remove
  304. * @returns the current particle system
  305. */
  306. removeSizeGradient(gradient: number): IParticleSystem;
  307. /**
  308. * Gets the current list of color gradients.
  309. * You must use addColorGradient and removeColorGradient to udpate this list
  310. * @returns the list of color gradients
  311. */
  312. getColorGradients(): Nullable<Array<ColorGradient>>;
  313. /**
  314. * Gets the current list of size gradients.
  315. * You must use addSizeGradient and removeSizeGradient to udpate this list
  316. * @returns the list of size gradients
  317. */
  318. getSizeGradients(): Nullable<Array<FactorGradient>>;
  319. /**
  320. * Gets the current list of angular speed gradients.
  321. * You must use addAngularSpeedGradient and removeAngularSpeedGradient to udpate this list
  322. * @returns the list of angular speed gradients
  323. */
  324. getAngularSpeedGradients(): Nullable<Array<FactorGradient>>;
  325. /**
  326. * Adds a new angular speed gradient
  327. * @param gradient defines the gradient to use (between 0 and 1)
  328. * @param factor defines the angular speed to affect to the specified gradient
  329. * @param factor2 defines an additional factor used to define a range ([factor, factor2]) with main value to pick the final value from
  330. * @returns the current particle system
  331. */
  332. addAngularSpeedGradient(gradient: number, factor: number, factor2?: number): IParticleSystem;
  333. /**
  334. * Remove a specific angular speed gradient
  335. * @param gradient defines the gradient to remove
  336. * @returns the current particle system
  337. */
  338. removeAngularSpeedGradient(gradient: number): IParticleSystem;
  339. /**
  340. * Gets the current list of velocity gradients.
  341. * You must use addVelocityGradient and removeVelocityGradient to udpate this list
  342. * @returns the list of velocity gradients
  343. */
  344. getVelocityGradients(): Nullable<Array<FactorGradient>>;
  345. /**
  346. * Adds a new velocity gradient
  347. * @param gradient defines the gradient to use (between 0 and 1)
  348. * @param factor defines the velocity to affect to the specified gradient
  349. * @param factor2 defines an additional factor used to define a range ([factor, factor2]) with main value to pick the final value from
  350. * @returns the current particle system
  351. */
  352. addVelocityGradient(gradient: number, factor: number, factor2?: number): IParticleSystem;
  353. /**
  354. * Remove a specific velocity gradient
  355. * @param gradient defines the gradient to remove
  356. * @returns the current particle system
  357. */
  358. removeVelocityGradient(gradient: number): IParticleSystem;
  359. /**
  360. * Gets the current list of limit velocity gradients.
  361. * You must use addLimitVelocityGradient and removeLimitVelocityGradient to udpate this list
  362. * @returns the list of limit velocity gradients
  363. */
  364. getLimitVelocityGradients(): Nullable<Array<FactorGradient>>;
  365. /**
  366. * Adds a new limit velocity gradient
  367. * @param gradient defines the gradient to use (between 0 and 1)
  368. * @param factor defines the limit velocity to affect to the specified gradient
  369. * @param factor2 defines an additional factor used to define a range ([factor, factor2]) with main value to pick the final value from
  370. * @returns the current particle system
  371. */
  372. addLimitVelocityGradient(gradient: number, factor: number, factor2?: number): IParticleSystem;
  373. /**
  374. * Remove a specific limit velocity gradient
  375. * @param gradient defines the gradient to remove
  376. * @returns the current particle system
  377. */
  378. removeLimitVelocityGradient(gradient: number): IParticleSystem;
  379. /**
  380. * Adds a new drag gradient
  381. * @param gradient defines the gradient to use (between 0 and 1)
  382. * @param factor defines the drag to affect to the specified gradient
  383. * @param factor2 defines an additional factor used to define a range ([factor, factor2]) with main value to pick the final value from
  384. * @returns the current particle system
  385. */
  386. addDragGradient(gradient: number, factor: number, factor2?: number): IParticleSystem;
  387. /**
  388. * Remove a specific drag gradient
  389. * @param gradient defines the gradient to remove
  390. * @returns the current particle system
  391. */
  392. removeDragGradient(gradient: number): IParticleSystem;
  393. /**
  394. * Gets the current list of drag gradients.
  395. * You must use addDragGradient and removeDragGradient to udpate this list
  396. * @returns the list of drag gradients
  397. */
  398. getDragGradients(): Nullable<Array<FactorGradient>>;
  399. /**
  400. * Adds a new emit rate gradient (please note that this will only work if you set the targetStopDuration property)
  401. * @param gradient defines the gradient to use (between 0 and 1)
  402. * @param factor defines the emit rate to affect to the specified gradient
  403. * @param factor2 defines an additional factor used to define a range ([factor, factor2]) with main value to pick the final value from
  404. * @returns the current particle system
  405. */
  406. addEmitRateGradient(gradient: number, factor: number, factor2?: number): IParticleSystem;
  407. /**
  408. * Remove a specific emit rate gradient
  409. * @param gradient defines the gradient to remove
  410. * @returns the current particle system
  411. */
  412. removeEmitRateGradient(gradient: number): IParticleSystem;
  413. /**
  414. * Gets the current list of emit rate gradients.
  415. * You must use addEmitRateGradient and removeEmitRateGradient to udpate this list
  416. * @returns the list of emit rate gradients
  417. */
  418. getEmitRateGradients(): Nullable<Array<FactorGradient>>;
  419. /**
  420. * Adds a new start size gradient (please note that this will only work if you set the targetStopDuration property)
  421. * @param gradient defines the gradient to use (between 0 and 1)
  422. * @param factor defines the start size to affect to the specified gradient
  423. * @param factor2 defines an additional factor used to define a range ([factor, factor2]) with main value to pick the final value from
  424. * @returns the current particle system
  425. */
  426. addStartSizeGradient(gradient: number, factor: number, factor2?: number): IParticleSystem;
  427. /**
  428. * Remove a specific start size gradient
  429. * @param gradient defines the gradient to remove
  430. * @returns the current particle system
  431. */
  432. removeStartSizeGradient(gradient: number): IParticleSystem;
  433. /**
  434. * Gets the current list of start size gradients.
  435. * You must use addStartSizeGradient and removeStartSizeGradient to udpate this list
  436. * @returns the list of start size gradients
  437. */
  438. getStartSizeGradients(): Nullable<Array<FactorGradient>>;
  439. /**
  440. * Adds a new life time gradient
  441. * @param gradient defines the gradient to use (between 0 and 1)
  442. * @param factor defines the life time factor to affect to the specified gradient
  443. * @param factor2 defines an additional factor used to define a range ([factor, factor2]) with main value to pick the final value from
  444. * @returns the current particle system
  445. */
  446. addLifeTimeGradient(gradient: number, factor: number, factor2?: number): IParticleSystem;
  447. /**
  448. * Remove a specific life time gradient
  449. * @param gradient defines the gradient to remove
  450. * @returns the current particle system
  451. */
  452. removeLifeTimeGradient(gradient: number): IParticleSystem;
  453. /**
  454. * Gets the current list of life time gradients.
  455. * You must use addLifeTimeGradient and removeLifeTimeGradient to udpate this list
  456. * @returns the list of life time gradients
  457. */
  458. getLifeTimeGradients(): Nullable<Array<FactorGradient>>;
  459. /**
  460. * Gets the current list of color gradients.
  461. * You must use addColorGradient and removeColorGradient to udpate this list
  462. * @returns the list of color gradients
  463. */
  464. getColorGradients(): Nullable<Array<ColorGradient>>;
  465. /**
  466. * Adds a new ramp gradient used to remap particle colors
  467. * @param gradient defines the gradient to use (between 0 and 1)
  468. * @param color defines the color to affect to the specified gradient
  469. * @returns the current particle system
  470. */
  471. addRampGradient(gradient: number, color: Color3): IParticleSystem;
  472. /**
  473. * Gets the current list of ramp gradients.
  474. * You must use addRampGradient and removeRampGradient to udpate this list
  475. * @returns the list of ramp gradients
  476. */
  477. getRampGradients(): Nullable<Array<Color3Gradient>>;
  478. /** Gets or sets a boolean indicating that ramp gradients must be used
  479. * @see http://doc.babylonjs.com/babylon101/particles#ramp-gradients
  480. */
  481. useRampGradients: boolean;
  482. /**
  483. * Adds a new color remap gradient
  484. * @param gradient defines the gradient to use (between 0 and 1)
  485. * @param min defines the color remap minimal range
  486. * @param max defines the color remap maximal range
  487. * @returns the current particle system
  488. */
  489. addColorRemapGradient(gradient: number, min: number, max: number): IParticleSystem;
  490. /**
  491. * Gets the current list of color remap gradients.
  492. * You must use addColorRemapGradient and removeColorRemapGradient to udpate this list
  493. * @returns the list of color remap gradients
  494. */
  495. getColorRemapGradients(): Nullable<Array<FactorGradient>>;
  496. /**
  497. * Adds a new alpha remap gradient
  498. * @param gradient defines the gradient to use (between 0 and 1)
  499. * @param min defines the alpha remap minimal range
  500. * @param max defines the alpha remap maximal range
  501. * @returns the current particle system
  502. */
  503. addAlphaRemapGradient(gradient: number, min: number, max: number): IParticleSystem;
  504. /**
  505. * Gets the current list of alpha remap gradients.
  506. * You must use addAlphaRemapGradient and removeAlphaRemapGradient to udpate this list
  507. * @returns the list of alpha remap gradients
  508. */
  509. getAlphaRemapGradients(): Nullable<Array<FactorGradient>>;
  510. /**
  511. * Creates a Point Emitter for the particle system (emits directly from the emitter position)
  512. * @param direction1 Particles are emitted between the direction1 and direction2 from within the box
  513. * @param direction2 Particles are emitted between the direction1 and direction2 from within the box
  514. * @returns the emitter
  515. */
  516. createPointEmitter(direction1: Vector3, direction2: Vector3): PointParticleEmitter;
  517. /**
  518. * Creates a Hemisphere Emitter for the particle system (emits along the hemisphere radius)
  519. * @param radius The radius of the hemisphere to emit from
  520. * @param radiusRange The range of the hemisphere to emit from [0-1] 0 Surface Only, 1 Entire Radius
  521. * @returns the emitter
  522. */
  523. createHemisphericEmitter(radius: number, radiusRange: number): HemisphericParticleEmitter;
  524. /**
  525. * Creates a Sphere Emitter for the particle system (emits along the sphere radius)
  526. * @param radius The radius of the sphere to emit from
  527. * @param radiusRange The range of the sphere to emit from [0-1] 0 Surface Only, 1 Entire Radius
  528. * @returns the emitter
  529. */
  530. createSphereEmitter(radius: number, radiusRange: number): SphereParticleEmitter;
  531. /**
  532. * Creates a Directed Sphere Emitter for the particle system (emits between direction1 and direction2)
  533. * @param radius The radius of the sphere to emit from
  534. * @param direction1 Particles are emitted between the direction1 and direction2 from within the sphere
  535. * @param direction2 Particles are emitted between the direction1 and direction2 from within the sphere
  536. * @returns the emitter
  537. */
  538. createDirectedSphereEmitter(radius: number, direction1: Vector3, direction2: Vector3): SphereDirectedParticleEmitter;
  539. /**
  540. * Creates a Cylinder Emitter for the particle system (emits from the cylinder to the particle position)
  541. * @param radius The radius of the emission cylinder
  542. * @param height The height of the emission cylinder
  543. * @param radiusRange The range of emission [0-1] 0 Surface only, 1 Entire Radius
  544. * @param directionRandomizer How much to randomize the particle direction [0-1]
  545. * @returns the emitter
  546. */
  547. createCylinderEmitter(radius: number, height: number, radiusRange: number, directionRandomizer: number): CylinderParticleEmitter;
  548. /**
  549. * Creates a Directed Cylinder Emitter for the particle system (emits between direction1 and direction2)
  550. * @param radius The radius of the cylinder to emit from
  551. * @param height The height of the emission cylinder
  552. * @param radiusRange the range of the emission cylinder [0-1] 0 Surface only, 1 Entire Radius (1 by default)
  553. * @param direction1 Particles are emitted between the direction1 and direction2 from within the cylinder
  554. * @param direction2 Particles are emitted between the direction1 and direction2 from within the cylinder
  555. * @returns the emitter
  556. */
  557. createDirectedCylinderEmitter(radius: number, height: number, radiusRange: number, direction1: Vector3, direction2: Vector3): SphereDirectedParticleEmitter;
  558. /**
  559. * Creates a Cone Emitter for the particle system (emits from the cone to the particle position)
  560. * @param radius The radius of the cone to emit from
  561. * @param angle The base angle of the cone
  562. * @returns the emitter
  563. */
  564. createConeEmitter(radius: number, angle: number): ConeParticleEmitter;
  565. /**
  566. * Creates a Box Emitter for the particle system. (emits between direction1 and direction2 from withing the box defined by minEmitBox and maxEmitBox)
  567. * @param direction1 Particles are emitted between the direction1 and direction2 from within the box
  568. * @param direction2 Particles are emitted between the direction1 and direction2 from within the box
  569. * @param minEmitBox Particles are emitted from the box between minEmitBox and maxEmitBox
  570. * @param maxEmitBox Particles are emitted from the box between minEmitBox and maxEmitBox
  571. * @returns the emitter
  572. */
  573. createBoxEmitter(direction1: Vector3, direction2: Vector3, minEmitBox: Vector3, maxEmitBox: Vector3): BoxParticleEmitter;
  574. /**
  575. * Get hosting scene
  576. * @returns the scene
  577. */
  578. getScene(): Scene;
  579. }