mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 20:53:39 +00:00
The ScenePlugin
will now queue all of the following ops with the Scene Manager: start
, run
, pause
, resume
, sleep
, wake
, switch
and stop
. This means for all of these calls the Scene Manager will add the call into its queue and process it at the start of the next frame.
This commit is contained in:
parent
84c7960a48
commit
cd508ab3f1
2 changed files with 11 additions and 27 deletions
|
@ -109,6 +109,7 @@ There is a new Game Object Component called `TextureCrop`. It replaces the Textu
|
||||||
* `Graphics.arc` has a new optional argument `overshoot`. This is a small value that is added onto the end of the `endAngle` and allows you to extend the arc further than the default 360 degrees. You may wish to do this if you're trying to draw an arc with an especially thick line stroke, to ensure there are no gaps. Fix #3798 (thanks @jjalonso)
|
* `Graphics.arc` has a new optional argument `overshoot`. This is a small value that is added onto the end of the `endAngle` and allows you to extend the arc further than the default 360 degrees. You may wish to do this if you're trying to draw an arc with an especially thick line stroke, to ensure there are no gaps. Fix #3798 (thanks @jjalonso)
|
||||||
* The TextureManager Sprite Sheet Parser will now throw a concise console warning if you specify invalid frame sizes that would result in no frames being generated (thanks @andygroff)
|
* The TextureManager Sprite Sheet Parser will now throw a concise console warning if you specify invalid frame sizes that would result in no frames being generated (thanks @andygroff)
|
||||||
* The `Quad` Game Object now has a new `setFrame` method that allows you to change the frame being rendered by the Quad, including using frames that are part of a texture atlas. Fix #3161 (thanks @halgorithm)
|
* The `Quad` Game Object now has a new `setFrame` method that allows you to change the frame being rendered by the Quad, including using frames that are part of a texture atlas. Fix #3161 (thanks @halgorithm)
|
||||||
|
* The `ScenePlugin` will now queue all of the following ops with the Scene Manager: `start`, `run`, `pause`, `resume`, `sleep`, `wake`, `switch` and `stop`. This means for all of these calls the Scene Manager will add the call into its queue and process it at the start of the next frame. This fixes #3812 and keeps things more predictable (thanks @Waclaw-I)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
|
@ -130,6 +131,7 @@ There is a new Game Object Component called `TextureCrop`. It replaces the Textu
|
||||||
* The DataManager couldn't redefine previously removed properties. Fix #3803 (thanks @AleBles @oo7ph)
|
* The DataManager couldn't redefine previously removed properties. Fix #3803 (thanks @AleBles @oo7ph)
|
||||||
* The Canvas DrawImage function has been recoded entirely so it now correctly supports parent matrix and camera matrix calculations. This fixes an issue where children inside Containers would lose their rotation, and other issues, when in the Canvas Renderer. Fix #3728 (thanks @samid737)
|
* The Canvas DrawImage function has been recoded entirely so it now correctly supports parent matrix and camera matrix calculations. This fixes an issue where children inside Containers would lose their rotation, and other issues, when in the Canvas Renderer. Fix #3728 (thanks @samid737)
|
||||||
* `clearMask(true)` would throw an exception if the Game Object didn't have a mask. Now it checks first before destroying the mask. Fix #3809 (thanks @NokFrt)
|
* `clearMask(true)` would throw an exception if the Game Object didn't have a mask. Now it checks first before destroying the mask. Fix #3809 (thanks @NokFrt)
|
||||||
|
* In the WebGL `GeometryMask` the stencil has been changed from `INVERT` to `KEEP` in order to fix issues when masking Graphics objects and other complex objects. Fix #3807 (thanks @zilbuz)
|
||||||
|
|
||||||
### Examples, Documentation and TypeScript
|
### Examples, Documentation and TypeScript
|
||||||
|
|
||||||
|
|
|
@ -469,14 +469,7 @@ var ScenePlugin = new Class({
|
||||||
{
|
{
|
||||||
if (key && key !== this.key)
|
if (key && key !== this.key)
|
||||||
{
|
{
|
||||||
if (this.settings.status !== CONST.RUNNING)
|
this.manager.queueOp('start', key, data);
|
||||||
{
|
|
||||||
this.manager.queueOp('start', key, data);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.manager.start(key, data);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
@ -501,14 +494,10 @@ var ScenePlugin = new Class({
|
||||||
*/
|
*/
|
||||||
run: function (key, data)
|
run: function (key, data)
|
||||||
{
|
{
|
||||||
if (this.settings.status !== CONST.RUNNING)
|
if (key && key !== this.key)
|
||||||
{
|
{
|
||||||
this.manager.queueOp('run', key, data);
|
this.manager.queueOp('run', key, data);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
this.manager.run(key, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
@ -528,7 +517,7 @@ var ScenePlugin = new Class({
|
||||||
{
|
{
|
||||||
if (key === undefined) { key = this.key; }
|
if (key === undefined) { key = this.key; }
|
||||||
|
|
||||||
this.manager.pause(key, data);
|
this.manager.queueOp('pause', key, data);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
@ -548,7 +537,7 @@ var ScenePlugin = new Class({
|
||||||
{
|
{
|
||||||
if (key === undefined) { key = this.key; }
|
if (key === undefined) { key = this.key; }
|
||||||
|
|
||||||
this.manager.resume(key, data);
|
this.manager.queueOp('resume', key, data);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
@ -568,7 +557,7 @@ var ScenePlugin = new Class({
|
||||||
{
|
{
|
||||||
if (key === undefined) { key = this.key; }
|
if (key === undefined) { key = this.key; }
|
||||||
|
|
||||||
this.manager.sleep(key, data);
|
this.manager.queueOp('sleep', key, data);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
@ -579,7 +568,7 @@ var ScenePlugin = new Class({
|
||||||
* @method Phaser.Scenes.ScenePlugin#wake
|
* @method Phaser.Scenes.ScenePlugin#wake
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {string} key - The Scene to wake up.
|
* @param {string} [key] - The Scene to wake up.
|
||||||
* @param {object} [data] - An optional data object that will be passed to the Scene and emitted in its wake event.
|
* @param {object} [data] - An optional data object that will be passed to the Scene and emitted in its wake event.
|
||||||
*
|
*
|
||||||
* @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.
|
* @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.
|
||||||
|
@ -588,7 +577,7 @@ var ScenePlugin = new Class({
|
||||||
{
|
{
|
||||||
if (key === undefined) { key = this.key; }
|
if (key === undefined) { key = this.key; }
|
||||||
|
|
||||||
this.manager.wake(key, data);
|
this.manager.queueOp('wake', key, data);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
@ -607,14 +596,7 @@ var ScenePlugin = new Class({
|
||||||
{
|
{
|
||||||
if (key !== this.key)
|
if (key !== this.key)
|
||||||
{
|
{
|
||||||
if (this.settings.status !== CONST.RUNNING)
|
this.manager.queueOp('switch', this.key, key);
|
||||||
{
|
|
||||||
this.manager.queueOp('switch', this.key, key);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.manager.switch(this.key, key);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
@ -634,7 +616,7 @@ var ScenePlugin = new Class({
|
||||||
{
|
{
|
||||||
if (key === undefined) { key = this.key; }
|
if (key === undefined) { key = this.key; }
|
||||||
|
|
||||||
this.manager.stop(key);
|
this.manager.queueOp('stop', key);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue