IParticleSystem.ts 25 KB

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