diff --git a/Gruntfile.js b/Gruntfile.js index f6d0cec..f58aaa6 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -6,7 +6,7 @@ grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-contrib-yuidoc'); grunt.loadNpmTasks('grunt-contrib-watch'); - + grunt.loadTasks('tasks'); var srcFiles = [ diff --git a/Gruntfile.js b/Gruntfile.js index f6d0cec..f58aaa6 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -6,7 +6,7 @@ grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-contrib-yuidoc'); grunt.loadNpmTasks('grunt-contrib-watch'); - + grunt.loadTasks('tasks'); var srcFiles = [ diff --git a/bin/pixi.dev.js b/bin/pixi.dev.js index be63a7b..8738467 100644 --- a/bin/pixi.dev.js +++ b/bin/pixi.dev.js @@ -11922,6 +11922,16 @@ return baseTexture; }; +/** + * Helper function that returns a base texture based on a canvas element + * If the image is not in the base texture cache it will be created and loaded + * + * @static + * @method fromCanvas + * @param canvas {Canvas} The canvas element source of the texture + * @param scaleMode {Number} Should be one of the PIXI.scaleMode consts + * @return BaseTexture + */ PIXI.BaseTexture.fromCanvas = function(canvas, scaleMode) { if(!canvas._pixiId) @@ -12101,6 +12111,7 @@ * @method fromImage * @param imageUrl {String} The image url of the texture * @param crossorigin {Boolean} Whether requests should be treated as crossorigin + * @param scaleMode {Number} Should be one of the PIXI.scaleMode consts * @return Texture */ PIXI.Texture.fromImage = function(imageUrl, crossorigin, scaleMode) @@ -12139,6 +12150,7 @@ * @static * @method fromCanvas * @param canvas {Canvas} The canvas element source of the texture + * @param scaleMode {Number} Should be one of the PIXI.scaleMode consts * @return Texture */ PIXI.Texture.fromCanvas = function(canvas, scaleMode) diff --git a/Gruntfile.js b/Gruntfile.js index f6d0cec..f58aaa6 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -6,7 +6,7 @@ grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-contrib-yuidoc'); grunt.loadNpmTasks('grunt-contrib-watch'); - + grunt.loadTasks('tasks'); var srcFiles = [ diff --git a/bin/pixi.dev.js b/bin/pixi.dev.js index be63a7b..8738467 100644 --- a/bin/pixi.dev.js +++ b/bin/pixi.dev.js @@ -11922,6 +11922,16 @@ return baseTexture; }; +/** + * Helper function that returns a base texture based on a canvas element + * If the image is not in the base texture cache it will be created and loaded + * + * @static + * @method fromCanvas + * @param canvas {Canvas} The canvas element source of the texture + * @param scaleMode {Number} Should be one of the PIXI.scaleMode consts + * @return BaseTexture + */ PIXI.BaseTexture.fromCanvas = function(canvas, scaleMode) { if(!canvas._pixiId) @@ -12101,6 +12111,7 @@ * @method fromImage * @param imageUrl {String} The image url of the texture * @param crossorigin {Boolean} Whether requests should be treated as crossorigin + * @param scaleMode {Number} Should be one of the PIXI.scaleMode consts * @return Texture */ PIXI.Texture.fromImage = function(imageUrl, crossorigin, scaleMode) @@ -12139,6 +12150,7 @@ * @static * @method fromCanvas * @param canvas {Canvas} The canvas element source of the texture + * @param scaleMode {Number} Should be one of the PIXI.scaleMode consts * @return Texture */ PIXI.Texture.fromCanvas = function(canvas, scaleMode) diff --git a/bower.json b/bower.json index 370123a..35fdb8a 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pixi.js", - "version": "1.5.0", + "version": "1.5.2", "main": "bin/pixi.js", diff --git a/Gruntfile.js b/Gruntfile.js index f6d0cec..f58aaa6 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -6,7 +6,7 @@ grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-contrib-yuidoc'); grunt.loadNpmTasks('grunt-contrib-watch'); - + grunt.loadTasks('tasks'); var srcFiles = [ diff --git a/bin/pixi.dev.js b/bin/pixi.dev.js index be63a7b..8738467 100644 --- a/bin/pixi.dev.js +++ b/bin/pixi.dev.js @@ -11922,6 +11922,16 @@ return baseTexture; }; +/** + * Helper function that returns a base texture based on a canvas element + * If the image is not in the base texture cache it will be created and loaded + * + * @static + * @method fromCanvas + * @param canvas {Canvas} The canvas element source of the texture + * @param scaleMode {Number} Should be one of the PIXI.scaleMode consts + * @return BaseTexture + */ PIXI.BaseTexture.fromCanvas = function(canvas, scaleMode) { if(!canvas._pixiId) @@ -12101,6 +12111,7 @@ * @method fromImage * @param imageUrl {String} The image url of the texture * @param crossorigin {Boolean} Whether requests should be treated as crossorigin + * @param scaleMode {Number} Should be one of the PIXI.scaleMode consts * @return Texture */ PIXI.Texture.fromImage = function(imageUrl, crossorigin, scaleMode) @@ -12139,6 +12150,7 @@ * @static * @method fromCanvas * @param canvas {Canvas} The canvas element source of the texture + * @param scaleMode {Number} Should be one of the PIXI.scaleMode consts * @return Texture */ PIXI.Texture.fromCanvas = function(canvas, scaleMode) diff --git a/bower.json b/bower.json index 370123a..35fdb8a 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pixi.js", - "version": "1.5.0", + "version": "1.5.2", "main": "bin/pixi.js", diff --git a/src/pixi/textures/BaseTexture.js b/src/pixi/textures/BaseTexture.js index 116f969..82c8675 100644 --- a/src/pixi/textures/BaseTexture.js +++ b/src/pixi/textures/BaseTexture.js @@ -170,6 +170,16 @@ return baseTexture; }; +/** + * Helper function that returns a base texture based on a canvas element + * If the image is not in the base texture cache it will be created and loaded + * + * @static + * @method fromCanvas + * @param canvas {Canvas} The canvas element source of the texture + * @param scaleMode {Number} Should be one of the PIXI.scaleMode consts + * @return BaseTexture + */ PIXI.BaseTexture.fromCanvas = function(canvas, scaleMode) { if(!canvas._pixiId) diff --git a/Gruntfile.js b/Gruntfile.js index f6d0cec..f58aaa6 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -6,7 +6,7 @@ grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-contrib-yuidoc'); grunt.loadNpmTasks('grunt-contrib-watch'); - + grunt.loadTasks('tasks'); var srcFiles = [ diff --git a/bin/pixi.dev.js b/bin/pixi.dev.js index be63a7b..8738467 100644 --- a/bin/pixi.dev.js +++ b/bin/pixi.dev.js @@ -11922,6 +11922,16 @@ return baseTexture; }; +/** + * Helper function that returns a base texture based on a canvas element + * If the image is not in the base texture cache it will be created and loaded + * + * @static + * @method fromCanvas + * @param canvas {Canvas} The canvas element source of the texture + * @param scaleMode {Number} Should be one of the PIXI.scaleMode consts + * @return BaseTexture + */ PIXI.BaseTexture.fromCanvas = function(canvas, scaleMode) { if(!canvas._pixiId) @@ -12101,6 +12111,7 @@ * @method fromImage * @param imageUrl {String} The image url of the texture * @param crossorigin {Boolean} Whether requests should be treated as crossorigin + * @param scaleMode {Number} Should be one of the PIXI.scaleMode consts * @return Texture */ PIXI.Texture.fromImage = function(imageUrl, crossorigin, scaleMode) @@ -12139,6 +12150,7 @@ * @static * @method fromCanvas * @param canvas {Canvas} The canvas element source of the texture + * @param scaleMode {Number} Should be one of the PIXI.scaleMode consts * @return Texture */ PIXI.Texture.fromCanvas = function(canvas, scaleMode) diff --git a/bower.json b/bower.json index 370123a..35fdb8a 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pixi.js", - "version": "1.5.0", + "version": "1.5.2", "main": "bin/pixi.js", diff --git a/src/pixi/textures/BaseTexture.js b/src/pixi/textures/BaseTexture.js index 116f969..82c8675 100644 --- a/src/pixi/textures/BaseTexture.js +++ b/src/pixi/textures/BaseTexture.js @@ -170,6 +170,16 @@ return baseTexture; }; +/** + * Helper function that returns a base texture based on a canvas element + * If the image is not in the base texture cache it will be created and loaded + * + * @static + * @method fromCanvas + * @param canvas {Canvas} The canvas element source of the texture + * @param scaleMode {Number} Should be one of the PIXI.scaleMode consts + * @return BaseTexture + */ PIXI.BaseTexture.fromCanvas = function(canvas, scaleMode) { if(!canvas._pixiId) diff --git a/src/pixi/textures/Texture.js b/src/pixi/textures/Texture.js index 8500a6e..3ee72f8 100644 --- a/src/pixi/textures/Texture.js +++ b/src/pixi/textures/Texture.js @@ -157,6 +157,7 @@ * @method fromImage * @param imageUrl {String} The image url of the texture * @param crossorigin {Boolean} Whether requests should be treated as crossorigin + * @param scaleMode {Number} Should be one of the PIXI.scaleMode consts * @return Texture */ PIXI.Texture.fromImage = function(imageUrl, crossorigin, scaleMode) @@ -195,6 +196,7 @@ * @static * @method fromCanvas * @param canvas {Canvas} The canvas element source of the texture + * @param scaleMode {Number} Should be one of the PIXI.scaleMode consts * @return Texture */ PIXI.Texture.fromCanvas = function(canvas, scaleMode)