Merge pull request #572 from anissen/fix-autoDetectRenderer-constructor
Changed parameter ordering to be consistent with WebGLRenderer and CanvasRenderer
This commit is contained in:
commit
963ea0b4af
3 changed files with 5 additions and 5 deletions
|
@ -25,8 +25,7 @@
|
|||
var sprite= PIXI.Sprite.fromImage("spinObj_02.png");
|
||||
//stage.addChild(sprite);
|
||||
// create a renderer instance
|
||||
// the 5the parameter is the anti aliasing
|
||||
var renderer = PIXI.autoDetectRenderer(620, 380, null, false, true);
|
||||
var renderer = PIXI.autoDetectRenderer(620, 380, null, false /* transparent */, true /* antialias */);
|
||||
|
||||
// set the canvas width and height to fill the screen
|
||||
//renderer.view.style.width = window.innerWidth + "px";
|
||||
|
|
|
@ -32,7 +32,8 @@
|
|||
|
||||
// create a renderer instance
|
||||
|
||||
var renderer = PIXI.autoDetectRenderer(400, 300,false,true);
|
||||
var renderer = PIXI.autoDetectRenderer(400, 300, null, true, true);
|
||||
|
||||
|
||||
// add the renderer view element to the DOM
|
||||
document.body.appendChild(renderer.view);
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
* @param width=800 {Number} the width of the renderers view
|
||||
* @param height=600 {Number} the height of the renderers view
|
||||
* @param [view] {Canvas} the canvas to use as a view, optional
|
||||
* @param [antialias=false] {Boolean} sets antialias (only applicable in webGL chrome at the moment)
|
||||
* @param [transparent=false] {Boolean} the transparency of the render view, default false
|
||||
* @param [antialias=false] {Boolean} sets antialias (only applicable in webGL chrome at the moment)
|
||||
*
|
||||
*/
|
||||
PIXI.autoDetectRenderer = function(width, height, view,antialias,transparent)
|
||||
PIXI.autoDetectRenderer = function(width, height, view, transparent, antialias)
|
||||
{
|
||||
if(!width)width = 800;
|
||||
if(!height)height = 600;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue