mirror of
https://github.com/photonstorm/phaser
synced 2024-11-10 07:04:31 +00:00
Resolved issue where Cocoon won't render a scene in Canvas mode if there is only one Sprite/Image on it.
This commit is contained in:
parent
eee1183a6a
commit
edc1507b4e
2 changed files with 8 additions and 2 deletions
|
@ -64,8 +64,8 @@ Version 2.0.6 - "Jornhill" - -in development-
|
|||
### CocoonJS Specific Updates
|
||||
|
||||
* Wrapped all touch, keyboard, mouse and fulscreen events that CocoonJS doesn't support in conditional checks to avoid Warnings.
|
||||
* Forces use of a Canvas Renderer under CocoonJS automatically.
|
||||
* The SoundManager no longer requires a touch to unlock it, defaults to unlocked.
|
||||
* Resolved issue where Cocoon won't render a scene in Canvas mode if there is only one Sprite/Image on it.
|
||||
|
||||
### New Features
|
||||
|
||||
|
|
|
@ -542,7 +542,7 @@ Phaser.Game.prototype = {
|
|||
*/
|
||||
setUpRenderer: function () {
|
||||
|
||||
if (this.device.trident || this.device.cocoonJS)
|
||||
if (this.device.trident)
|
||||
{
|
||||
// Pixi WebGL renderer on IE11 doesn't work correctly at the moment, the pre-multiplied alpha gets all washed out.
|
||||
// So we're forcing canvas for now until this is fixed, sorry. It's got to be better than no game appearing at all, right?
|
||||
|
@ -633,6 +633,12 @@ Phaser.Game.prototype = {
|
|||
this.plugins.render();
|
||||
this.state.render();
|
||||
this.plugins.postRender();
|
||||
|
||||
if (this.device.cocoonJS && this.renderType === Phaser.CANVAS && this.stage.currentRenderOrderID === 1)
|
||||
{
|
||||
// Horrible hack! But without it Cocoon fails to render a scene with just a single drawImage call on it.
|
||||
this.context.fillRect(0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue