mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 13:13:43 +00:00
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.
This commit is contained in:
parent
6e8694d5f7
commit
917c7491cd
2 changed files with 3 additions and 9 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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 !== '')
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue