Merge branch 'master' into master

This commit is contained in:
Richard Davey 2018-03-09 15:44:19 +00:00 committed by GitHub
commit 852e74721f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 16 deletions

View file

@ -6,10 +6,15 @@
### Bug Fixes
* Fix #3345 debug draws are not cleared in CANVAS mode using Matter physics.(thanks @samid737)
* Fixed issue with Render Texture tinting. Fix #3336 (thanks @rexrainbow)
* Fixed Utils.String.Format (thanks @samme)
* The Matter Debug Layer wouldn't clear itself in canvas mode. Fix #3345 (thanks @samid737)
### Updates
* The SceneManager.render will now render a Scene as long as it's in a LOADING state or higher. Before it would only render RUNNING scenes, but this precluded those that were loading assets.
* A Scene can now be restarted by calling `scene.start()` and providing no arguments (thanks @migiyubi)
## Version 3.2.0 - Kaori - 5th March 2018
### New Features

View file

@ -515,7 +515,7 @@ var SceneManager = new Class({
{
var sys = this.scenes[i].sys;
if (sys.settings.visible && (sys.settings.status === CONST.RUNNING || sys.settings.status === CONST.PAUSED))
if (sys.settings.visible && sys.settings.status >= CONST.LOADING && sys.settings.status < CONST.SLEEPING)
{
sys.render(renderer);
}

View file

@ -105,18 +105,15 @@ var ScenePlugin = new Class({
{
if (key === undefined) { key = this.key; }
if (key !== this.key)
if (this.settings.status !== CONST.RUNNING)
{
if (this.settings.status !== CONST.RUNNING)
{
this.manager.queueOp('stop', this.key);
this.manager.queueOp('start', key);
}
else
{
this.manager.stop(this.key);
this.manager.start(key, data);
}
this.manager.queueOp('stop', this.key);
this.manager.queueOp('start', key);
}
else
{
this.manager.stop(this.key);
this.manager.start(key, data);
}
return this;

View file

@ -20,12 +20,10 @@
*/
var Format = function (string, values)
{
string.replace(/%([0-9]+)/g, function (s, n)
return string.replace(/%([0-9]+)/g, function (s, n)
{
return values[Number(n) - 1];
});
return string;
};
module.exports = Format;