diff --git a/README.md b/README.md index 0488381d2..86d54c25f 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,7 @@ Version 2.0.6 - "Jornhill" - -in development- * Loader.tilemap has renamed the `mapURL` parameter to `url` and `mapData` to `data` to keep it consistent with the other Loader methods. * Loader.physics has renamed the `dataURL` parameter to `url` and `jsonData` to `data` to keep it consistent with the other Loader methods. * Stage no longer creates the Phaser.Canvas object, but Game itself does in the setupRenderer method. +* Canvas.create has deprecated the noCocoon parameter as it's no longer required. The parameter is still in the signature, but no longer used in the method. ### CocoonJS Specific Updates diff --git a/src/system/Canvas.js b/src/system/Canvas.js index c99fce99e..859629180 100644 --- a/src/system/Canvas.js +++ b/src/system/Canvas.js @@ -19,7 +19,7 @@ Phaser.Canvas = { * @param {number} [width=256] - The width of the canvas element. * @param {number} [height=256] - The height of the canvas element.. * @param {string} [id=''] - If given this will be set as the ID of the canvas element, otherwise no ID will be set. - * @param {boolean} [noCocoon=false] - CocoonJS only allows 1 screencanvas object, which should be your game. If you need to create another canvas (i.e. for a texture) set this to 'true'. + * @param {boolean} [noCocoon=false] - DEPRECATED: This parameter is no longer used. * @return {HTMLCanvasElement} The newly created canvas element. */ create: function (width, height, id, noCocoon) { @@ -29,14 +29,7 @@ Phaser.Canvas = { width = width || 256; height = height || 256; - if (noCocoon) - { - var canvas = document.createElement('canvas'); - } - else - { - var canvas = document.createElement(navigator.isCocoonJS ? 'screencanvas' : 'canvas'); - } + var canvas = document.createElement('canvas'); if (typeof id === 'string' && id !== '') {