Fixes issue of Pixi DisplayObject width/height sending an emitter scale into Infinity.

This commit is contained in:
photonstorm 2014-07-09 11:37:22 +01:00
parent 0ff2eb2fb9
commit 63fb7780b3

View file

@ -719,6 +719,38 @@ Phaser.Particles.Arcade.Emitter.prototype.at = function (object) {
};
/**
* @name Phaser.Particles.Arcade.Emitter#width
* @property {number} width - Gets or sets the width of the Emitter. This is the region in which a particle can be emitted.
*/
Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "width", {
get: function () {
return this.area.width;
},
set: function (value) {
this.area.width = value;
}
});
/**
* @name Phaser.Particles.Arcade.Emitter#height
* @property {number} height - Gets or sets the height of the Emitter. This is the region in which a particle can be emitted.
*/
Object.defineProperty(Phaser.Particles.Arcade.Emitter.prototype, "height", {
get: function () {
return this.area.height;
},
set: function (value) {
this.area.height = value;
}
});
/**
* @name Phaser.Particles.Arcade.Emitter#x
* @property {number} x - Gets or sets the x position of the Emitter.