lib/particles.js
function(prefab) {
    /**
     * The name of a prefab to instantiate for the particle, as defined in <code>prefabs.json</code>.
     * @member {string}
     */
    this.prefab = prefab;
    /**
     * The origin point in which to create particles.
     *
     * If the origin is a number it represents an entity and a random point inside the entity will be used.
     * If origin is a point like <code>{"x": 50, "y": 50}</code> particles will spawn at that position.
     * @member {object | number}
     */
    this.origin = { "x": 0, "y": 0 };
    /**
     * How to distribute particles along the {@link module:splat-ecs/lib/particles.Config#arcWidth arcWidth}.
     *
     * Possible values:
     * <dl>
     * <dt><code>"even"</code></dt>
     * <dd>Distribute the particles evenly along the arc.</dd>
     * <dt><code>"random"</code></dt>
     * <dd>Scatter the particles on random points of the arc.</dd>
     * </dl>
     * @member {string}
     */
    this.spreadType = "random";
    /**
     * The direction (an angle in radians) that the particles should move.
     * @member {number}
     */
    this.angle = 0;
    /**
     * The width of an arc (represented by an angle in radians) to spread the particles. The arc is centered around {@link module:splat-ecs/lib/particles.Config#angle angle}.
     * @member {number}
     */
    this.arcWidth = Math.PI / 2;
    /**
     * The minimum number of particles to create.
     * @member {number}
     */
    this.qtyMin = 1;
    /**
     * The maximum number of particles to create.
     * @member {number}
     */
    this.qtyMax = 1;
    /**
     * The minimum percentage to scale each particle.
     * <ul>
     * <li>A scale of 0.5 means the particle will spawn at 50% (half) of the original size.</li>
     * <li>A scale of 1 means the particle will spawn at the original size.</li>
     * <li>A scale of 2 means the particle will spawn at 200% (double) the original size.</li>
     * </ul>
     * @member {number}
     */
    this.sizeMin = 1;
    /**
     * The maximum percentage to scale each particle.
     * <ul>
     * <li>A scale of 0.5 means the particle will spawn at 50% (half) of the original size.</li>
     * <li>A scale of 1 means the particle will spawn at the original size.</li>
     * <li>A scale of 2 means the particle will spawn at 200% (double) the original size.</li>
     * </ul>
     * @member {number}
     */
    this.sizeMax = 1;
    /**
     * The minimum velocity to apply to each particle.
     * @member {number}
     */
    this.velocityMin = 0.5;
    /**
     * The maximum velocity to apply to each particle.
     * @member {number}
     */
    this.velocityMax = 0.5;
    /**
     * The acceleration on the x-axis to apply to each particle.
     * @member {number}
     */
    this.accelerationX = 0;
    /**
     * The acceleration on the y-axis to apply to each particle.
     * @member {number}
     */
    this.accelerationY = 0;
    /**
     * The minimum life span to apply to each particle.
     * @member {number}
     */
    this.lifeSpanMin = 0;
    /**
     * The maximum life span to apply to each particle.
     * @member {number}
     */
    this.lifeSpanMax = 500;
  }
function(prefab) {
    /**
     * The name of a prefab to instantiate for the particle, as defined in <code>prefabs.json</code>.
     * @member {string}
     */
    this.prefab = prefab;
    /**
     * The origin point in which to create particles.
     *
     * If the origin is a number it represents an entity and a random point inside the entity will be used.
     * If origin is a point like <code>{"x": 50, "y": 50}</code> particles will spawn at that position.
     * @member {object | number}
     */
    this.origin = { "x": 0, "y": 0 };
    /**
     * How to distribute particles along the {@link module:splat-ecs/lib/particles.Config#arcWidth arcWidth}.
     *
     * Possible values:
     * <dl>
     * <dt><code>"even"</code></dt>
     * <dd>Distribute the particles evenly along the arc.</dd>
     * <dt><code>"random"</code></dt>
     * <dd>Scatter the particles on random points of the arc.</dd>
     * </dl>
     * @member {string}
     */
    this.spreadType = "random";
    /**
     * The direction (an angle in radians) that the particles should move.
     * @member {number}
     */
    this.angle = 0;
    /**
     * The width of an arc (represented by an angle in radians) to spread the particles. The arc is centered around {@link module:splat-ecs/lib/particles.Config#angle angle}.
     * @member {number}
     */
    this.arcWidth = Math.PI / 2;
    /**
     * The minimum number of particles to create.
     * @member {number}
     */
    this.qtyMin = 1;
    /**
     * The maximum number of particles to create.
     * @member {number}
     */
    this.qtyMax = 1;
    /**
     * The minimum percentage to scale each particle.
     * <ul>
     * <li>A scale of 0.5 means the particle will spawn at 50% (half) of the original size.</li>
     * <li>A scale of 1 means the particle will spawn at the original size.</li>
     * <li>A scale of 2 means the particle will spawn at 200% (double) the original size.</li>
     * </ul>
     * @member {number}
     */
    this.sizeMin = 1;
    /**
     * The maximum percentage to scale each particle.
     * <ul>
     * <li>A scale of 0.5 means the particle will spawn at 50% (half) of the original size.</li>
     * <li>A scale of 1 means the particle will spawn at the original size.</li>
     * <li>A scale of 2 means the particle will spawn at 200% (double) the original size.</li>
     * </ul>
     * @member {number}
     */
    this.sizeMax = 1;
    /**
     * The minimum velocity to apply to each particle.
     * @member {number}
     */
    this.velocityMin = 0.5;
    /**
     * The maximum velocity to apply to each particle.
     * @member {number}
     */
    this.velocityMax = 0.5;
    /**
     * The acceleration on the x-axis to apply to each particle.
     * @member {number}
     */
    this.accelerationX = 0;
    /**
     * The acceleration on the y-axis to apply to each particle.
     * @member {number}
     */
    this.accelerationY = 0;
    /**
     * The minimum life span to apply to each particle.
     * @member {number}
     */
    this.lifeSpanMin = 0;
    /**
     * The maximum life span to apply to each particle.
     * @member {number}
     */
    this.lifeSpanMax = 500;
  }
The settings for a type of particle.
@constructor
@param {string} prefab The name of a prefab to instantiate for the particle, as defined in <code>prefabs.json</code>.