mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 15:12:18 +00:00
Fixed State.renderToTexture setting.
This commit is contained in:
parent
b0e2018c73
commit
a877cdaa02
5 changed files with 9 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
|||
var CHECKSUM = {
|
||||
build: '2c3243e0-ed7f-11e6-a825-abeab037992f'
|
||||
build: 'd2813a20-ed80-11e6-9112-31e669c80df9'
|
||||
};
|
||||
module.exports = CHECKSUM;
|
|
@ -67,7 +67,7 @@ BaseLoader.prototype = {
|
|||
|
||||
start: function ()
|
||||
{
|
||||
console.log(this.state.settings.key, 'BaseLoader start. Files to load:', this.list.size);
|
||||
console.log(this.state.settings.key, ' - BaseLoader start. Files to load:', this.list.size);
|
||||
|
||||
if (!this.isReady())
|
||||
{
|
||||
|
@ -247,7 +247,7 @@ BaseLoader.prototype = {
|
|||
|
||||
processComplete: function ()
|
||||
{
|
||||
console.log(this.state.settings.key, 'Loader Complete. Loaded:', this.storage.size, 'Failed:', this.failed.size);
|
||||
console.log(this.state.settings.key, ' - Loader Complete. Loaded:', this.storage.size, 'Failed:', this.failed.size);
|
||||
|
||||
this.list.clear();
|
||||
this.inflight.clear();
|
||||
|
|
|
@ -149,6 +149,7 @@ CanvasRenderer.prototype = {
|
|||
var ctx = state.sys.context;
|
||||
var settings = state.sys.settings;
|
||||
var scissor = (camera.x !== 0 || camera.y !== 0 || camera.width !== ctx.canvas.width || camera.height !== ctx.canvas.height);
|
||||
|
||||
this.currentContext = ctx;
|
||||
|
||||
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
||||
|
|
|
@ -280,7 +280,7 @@ StateManager.prototype = {
|
|||
|
||||
createStateDisplay: function (state)
|
||||
{
|
||||
console.log('createStateDisplay', state.settings.key);
|
||||
// console.log('createStateDisplay', state.settings.key);
|
||||
|
||||
var settings = state.sys.settings;
|
||||
|
||||
|
@ -295,7 +295,7 @@ StateManager.prototype = {
|
|||
{
|
||||
if (settings.renderToTexture)
|
||||
{
|
||||
console.log('renderToTexture');
|
||||
// console.log('renderToTexture', width, height);
|
||||
state.sys.canvas = CanvasPool.create(state, width, height);
|
||||
state.sys.context = GetContext(state.sys.canvas);
|
||||
|
||||
|
@ -307,7 +307,7 @@ StateManager.prototype = {
|
|||
}
|
||||
else
|
||||
{
|
||||
console.log('using game canvas');
|
||||
// console.log('using game canvas');
|
||||
state.sys.mask = new Rectangle(0, 0, width, height);
|
||||
state.sys.canvas = this.game.canvas;
|
||||
state.sys.context = this.game.context;
|
||||
|
@ -317,7 +317,6 @@ StateManager.prototype = {
|
|||
{
|
||||
// state.sys.fbo = this.game.renderer.createFBO(state, x, y, width, height);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
getState: function (key)
|
||||
|
|
|
@ -27,6 +27,8 @@ var Systems = function (state, config)
|
|||
|
||||
this.x = this.settings.x;
|
||||
this.y = this.settings.y;
|
||||
this.width = this.settings.width;
|
||||
this.height = this.settings.height;
|
||||
|
||||
this.mask = null;
|
||||
this.canvas;
|
||||
|
|
Loading…
Reference in a new issue