智慧水务管理系统 - 精河县供水工程综合管理平台

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import Frozen from "../Core/Frozen.js";
  2. /**
  3. * Represents a burst of {@link Particle}s from a {@link ParticleSystem} at a given time in the systems lifetime.
  4. *
  5. * @alias ParticleBurst
  6. * @constructor
  7. *
  8. * @param {object} [options] An object with the following properties:
  9. * @param {number} [options.time=0.0] The time in seconds after the beginning of the particle system's lifetime that the burst will occur.
  10. * @param {number} [options.minimum=0.0] The minimum number of particles emmitted in the burst.
  11. * @param {number} [options.maximum=50.0] The maximum number of particles emitted in the burst.
  12. */
  13. function ParticleBurst(options) {
  14. options = options ?? Frozen.EMPTY_OBJECT;
  15. /**
  16. * The time in seconds after the beginning of the particle system's lifetime that the burst will occur.
  17. * @type {number}
  18. * @default 0.0
  19. */
  20. this.time = options.time ?? 0.0;
  21. /**
  22. * The minimum number of particles emitted.
  23. * @type {number}
  24. * @default 0.0
  25. */
  26. this.minimum = options.minimum ?? 0.0;
  27. /**
  28. * The maximum number of particles emitted.
  29. * @type {number}
  30. * @default 50.0
  31. */
  32. this.maximum = options.maximum ?? 50.0;
  33. this._complete = false;
  34. }
  35. Object.defineProperties(ParticleBurst.prototype, {
  36. /**
  37. * <code>true</code> if the burst has been completed; <code>false</code> otherwise.
  38. * @memberof ParticleBurst.prototype
  39. * @type {boolean}
  40. */
  41. complete: {
  42. get: function () {
  43. return this._complete;
  44. },
  45. },
  46. });
  47. export default ParticleBurst;