You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Emitter.emitParticle now has 4 new optional arguments: x, y, key and frame. These allow you to override whatever the Emitter default values may be and emit the particle from the given coordinates and with a new texture.
Copy file name to clipboardExpand all lines: README.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -258,11 +258,14 @@ If you are an exceptional JavaScript developer and would like to join the Phaser
258
258
259
259
### New Features
260
260
261
+
* Emitter.emitParticle now has 4 new optional arguments: `x`, `y`, `key` and `frame`. These allow you to override whatever the Emitter default values may be and emit the particle from the given coordinates and with a new texture.
262
+
261
263
### Updates
262
264
263
-
* TypeScript definitions fixes and updates (thanks @clark-stevenson@milkey-mouse)
265
+
* TypeScript definitions fixes and updates (thanks @clark-stevenson@milkey-mouse@timotei@qdrj)
264
266
* JSDoc typo fixes (thanks @rwrountree)
265
267
* Math.average has been optimized (thanks @rwrountree#2025)
268
+
* Change splice.call(arguments, ..) to use slice instead (thanks @pnstickne#2034#2032)
* @param {number} [x] - The x coordinate to emit the particle from. If `null` or `undefined` it will use `Emitter.emitX` or if the Emitter has a width > 1 a random value between `Emitter.left` and `Emitter.right`.
547
+
* @param {number} [y] - The y coordinate to emit the particle from. If `null` or `undefined` it will use `Emitter.emitY` or if the Emitter has a height > 1 a random value between `Emitter.top` and `Emitter.bottom`.
548
+
* @param {string|Phaser.RenderTexture|Phaser.BitmapData|Phaser.Video|PIXI.Texture} [key] - This is the image or texture used by the Particle during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.
549
+
* @param {string|number} [frame] - If this Particle is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index.
542
550
* @return {boolean} True if a particle was emitted, otherwise false.
0 commit comments