mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 14:38:30 +00:00
Merge branch 'master' of https://github.com/photonstorm/phaser
This commit is contained in:
commit
80a1ef3a6d
1 changed files with 13 additions and 21 deletions
|
@ -66,7 +66,7 @@ var Wrap = require('../../math/Wrap');
|
||||||
/**
|
/**
|
||||||
* @typedef {object} ParticleEmitterEdgeZoneConfig
|
* @typedef {object} ParticleEmitterEdgeZoneConfig
|
||||||
*
|
*
|
||||||
* @property {EdgeZoneSource|RandomZoneSource} source - A shape representing the zone. See {@link Phaser.GameObjects.Particles.Zones.EdgeZone#source}.
|
* @property {EdgeZoneSource} source - A shape representing the zone. See {@link Phaser.GameObjects.Particles.Zones.EdgeZone#source}.
|
||||||
* @property {string} type - 'edge'.
|
* @property {string} type - 'edge'.
|
||||||
* @property {integer} quantity - The number of particles to place on the source edge. Set to 0 to use `stepRate` instead.
|
* @property {integer} quantity - The number of particles to place on the source edge. Set to 0 to use `stepRate` instead.
|
||||||
* @property {float} [stepRate] - The distance between each particle. When set, `quantity` is implied and should be set to 0.
|
* @property {float} [stepRate] - The distance between each particle. When set, `quantity` is implied and should be set to 0.
|
||||||
|
@ -77,7 +77,7 @@ var Wrap = require('../../math/Wrap');
|
||||||
/**
|
/**
|
||||||
* @typedef {object} ParticleEmitterRandomZoneConfig
|
* @typedef {object} ParticleEmitterRandomZoneConfig
|
||||||
*
|
*
|
||||||
* @property {EdgeZoneSource|RandomZoneSource} source - A shape representing the zone. See {@link Phaser.GameObjects.Particles.Zones.RandomZone#source}.
|
* @property {RandomZoneSource} source - A shape representing the zone. See {@link Phaser.GameObjects.Particles.Zones.RandomZone#source}.
|
||||||
* @property {string} [type] - 'random'.
|
* @property {string} [type] - 'random'.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1571,13 +1571,6 @@ var ParticleEmitter = new Class({
|
||||||
var type = GetFastValue(zoneConfig, 'type', 'random');
|
var type = GetFastValue(zoneConfig, 'type', 'random');
|
||||||
var source = GetFastValue(zoneConfig, 'source', null);
|
var source = GetFastValue(zoneConfig, 'source', null);
|
||||||
|
|
||||||
// TODO:
|
|
||||||
// For an EdgeZone, only source.getPoints(quantity, stepRate) is required.
|
|
||||||
// For a RandomZone, only source.getRandomPoint(point) is required.
|
|
||||||
// Any object implementing getPoint(position) could also be assigned here (instead of new EdgeZone, new RandomZone).
|
|
||||||
|
|
||||||
if (source && typeof source.getPoint === 'function')
|
|
||||||
{
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case 'random':
|
case 'random':
|
||||||
|
@ -1598,7 +1591,6 @@ var ParticleEmitter = new Class({
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue