ParticleEmitter.js 938 B

123456789101112131415161718192021222324252627282930313233343536
  1. import DeveloperError from "../Core/DeveloperError.js";
  2. /**
  3. * <p>
  4. * An object that initializes a {@link Particle} from a {@link ParticleSystem}.
  5. * </p>
  6. * <p>
  7. * This type describes an interface and is not intended to be instantiated directly.
  8. * </p>
  9. *
  10. * @alias ParticleEmitter
  11. * @constructor
  12. *
  13. * @see BoxEmitter
  14. * @see CircleEmitter
  15. * @see ConeEmitter
  16. * @see SphereEmitter
  17. */
  18. function ParticleEmitter(options) {
  19. //>>includeStart('debug', pragmas.debug);
  20. throw new DeveloperError(
  21. "This type should not be instantiated directly. Instead, use BoxEmitter, CircleEmitter, ConeEmitter or SphereEmitter."
  22. );
  23. //>>includeEnd('debug');
  24. }
  25. /**
  26. * Initializes the given {Particle} by setting it's position and velocity.
  27. *
  28. * @private
  29. * @param {Particle} The particle to initialize
  30. */
  31. ParticleEmitter.prototype.emit = function (particle) {
  32. DeveloperError.throwInstantiationError();
  33. };
  34. export default ParticleEmitter;