diff --git a/LICENSE b/LICENSE old mode 100755 new mode 100644 diff --git a/LICENSE b/LICENSE old mode 100755 new mode 100644 diff --git a/src/pixi/Point.js b/src/pixi/Point.js index 413efd5..0e0884a 100644 --- a/src/pixi/Point.js +++ b/src/pixi/Point.js @@ -16,14 +16,14 @@ * @type Number * @default 0 */ - this.x = x ? x : 0; + this.x = x || 0; /** * @property y * @type Number * @default 0 */ - this.y = y ? y : 0; + this.y = y || 0; } /** diff --git a/LICENSE b/LICENSE old mode 100755 new mode 100644 diff --git a/src/pixi/Point.js b/src/pixi/Point.js index 413efd5..0e0884a 100644 --- a/src/pixi/Point.js +++ b/src/pixi/Point.js @@ -16,14 +16,14 @@ * @type Number * @default 0 */ - this.x = x ? x : 0; + this.x = x || 0; /** * @property y * @type Number * @default 0 */ - this.y = y ? y : 0; + this.y = y || 0; } /** diff --git a/src/pixi/Rectangle.js b/src/pixi/Rectangle.js index fd30aea..eeecc06 100644 --- a/src/pixi/Rectangle.js +++ b/src/pixi/Rectangle.js @@ -18,28 +18,28 @@ * @type Number * @default 0 */ - this.x = x ? x : 0; + this.x = x || 0; /** * @property y * @type Number * @default 0 */ - this.y = y ? y : 0; + this.y = y || 0; /** * @property width * @type Number * @default 0 */ - this.width = width ? width : 0; + this.width = width || 0; /** * @property height * @type Number * @default 0 */ - this.height = height ? height : 0; + this.height = height || 0; } /** diff --git a/LICENSE b/LICENSE old mode 100755 new mode 100644 diff --git a/src/pixi/Point.js b/src/pixi/Point.js index 413efd5..0e0884a 100644 --- a/src/pixi/Point.js +++ b/src/pixi/Point.js @@ -16,14 +16,14 @@ * @type Number * @default 0 */ - this.x = x ? x : 0; + this.x = x || 0; /** * @property y * @type Number * @default 0 */ - this.y = y ? y : 0; + this.y = y || 0; } /** diff --git a/src/pixi/Rectangle.js b/src/pixi/Rectangle.js index fd30aea..eeecc06 100644 --- a/src/pixi/Rectangle.js +++ b/src/pixi/Rectangle.js @@ -18,28 +18,28 @@ * @type Number * @default 0 */ - this.x = x ? x : 0; + this.x = x || 0; /** * @property y * @type Number * @default 0 */ - this.y = y ? y : 0; + this.y = y || 0; /** * @property width * @type Number * @default 0 */ - this.width = width ? width : 0; + this.width = width || 0; /** * @property height * @type Number * @default 0 */ - this.height = height ? height : 0; + this.height = height || 0; } /** diff --git a/src/pixi/Stage.js b/src/pixi/Stage.js index 4abe469..6ae9367 100644 --- a/src/pixi/Stage.js +++ b/src/pixi/Stage.js @@ -21,7 +21,7 @@ this.stage= this; // interaction! - this.interactive = interactive ? true : false; + this.interactive = !!interactive; this.interactionManager = new PIXI.InteractionManager(this); this.setBackgroundColor(backgroundColor); @@ -62,7 +62,7 @@ */ PIXI.Stage.prototype.setBackgroundColor = function(backgroundColor) { - this.backgroundColor = backgroundColor ? backgroundColor : 0x000000; + this.backgroundColor = backgroundColor || 0x000000; this.backgroundColorSplit = HEXtoRGB(this.backgroundColor); this.backgroundColorString = "#" + this.backgroundColor.toString(16); } diff --git a/LICENSE b/LICENSE old mode 100755 new mode 100644 diff --git a/src/pixi/Point.js b/src/pixi/Point.js index 413efd5..0e0884a 100644 --- a/src/pixi/Point.js +++ b/src/pixi/Point.js @@ -16,14 +16,14 @@ * @type Number * @default 0 */ - this.x = x ? x : 0; + this.x = x || 0; /** * @property y * @type Number * @default 0 */ - this.y = y ? y : 0; + this.y = y || 0; } /** diff --git a/src/pixi/Rectangle.js b/src/pixi/Rectangle.js index fd30aea..eeecc06 100644 --- a/src/pixi/Rectangle.js +++ b/src/pixi/Rectangle.js @@ -18,28 +18,28 @@ * @type Number * @default 0 */ - this.x = x ? x : 0; + this.x = x || 0; /** * @property y * @type Number * @default 0 */ - this.y = y ? y : 0; + this.y = y || 0; /** * @property width * @type Number * @default 0 */ - this.width = width ? width : 0; + this.width = width || 0; /** * @property height * @type Number * @default 0 */ - this.height = height ? height : 0; + this.height = height || 0; } /** diff --git a/src/pixi/Stage.js b/src/pixi/Stage.js index 4abe469..6ae9367 100644 --- a/src/pixi/Stage.js +++ b/src/pixi/Stage.js @@ -21,7 +21,7 @@ this.stage= this; // interaction! - this.interactive = interactive ? true : false; + this.interactive = !!interactive; this.interactionManager = new PIXI.InteractionManager(this); this.setBackgroundColor(backgroundColor); @@ -62,7 +62,7 @@ */ PIXI.Stage.prototype.setBackgroundColor = function(backgroundColor) { - this.backgroundColor = backgroundColor ? backgroundColor : 0x000000; + this.backgroundColor = backgroundColor || 0x000000; this.backgroundColorSplit = HEXtoRGB(this.backgroundColor); this.backgroundColorString = "#" + this.backgroundColor.toString(16); } diff --git a/src/pixi/renderers/CanvasRenderer.js b/src/pixi/renderers/CanvasRenderer.js index ee0b832..03948ba 100644 --- a/src/pixi/renderers/CanvasRenderer.js +++ b/src/pixi/renderers/CanvasRenderer.js @@ -18,14 +18,14 @@ * @type Number * @default 800 */ - this.width = width ? width : 800; + this.width = width || 800; /** * The height of the canvas view * @property height * @type Number * @default 600 */ - this.height = height ? height : 600; + this.height = height || 600; this.refresh = true; @@ -34,7 +34,7 @@ * @property view * @type Canvas */ - this.view = view ? view : document.createElement( 'canvas' ); + this.view = view || document.createElement( 'canvas' ); // hack to enable some hardware acceleration! //this.view.style["transform"] = "translatez(0)"; diff --git a/LICENSE b/LICENSE old mode 100755 new mode 100644 diff --git a/src/pixi/Point.js b/src/pixi/Point.js index 413efd5..0e0884a 100644 --- a/src/pixi/Point.js +++ b/src/pixi/Point.js @@ -16,14 +16,14 @@ * @type Number * @default 0 */ - this.x = x ? x : 0; + this.x = x || 0; /** * @property y * @type Number * @default 0 */ - this.y = y ? y : 0; + this.y = y || 0; } /** diff --git a/src/pixi/Rectangle.js b/src/pixi/Rectangle.js index fd30aea..eeecc06 100644 --- a/src/pixi/Rectangle.js +++ b/src/pixi/Rectangle.js @@ -18,28 +18,28 @@ * @type Number * @default 0 */ - this.x = x ? x : 0; + this.x = x || 0; /** * @property y * @type Number * @default 0 */ - this.y = y ? y : 0; + this.y = y || 0; /** * @property width * @type Number * @default 0 */ - this.width = width ? width : 0; + this.width = width || 0; /** * @property height * @type Number * @default 0 */ - this.height = height ? height : 0; + this.height = height || 0; } /** diff --git a/src/pixi/Stage.js b/src/pixi/Stage.js index 4abe469..6ae9367 100644 --- a/src/pixi/Stage.js +++ b/src/pixi/Stage.js @@ -21,7 +21,7 @@ this.stage= this; // interaction! - this.interactive = interactive ? true : false; + this.interactive = !!interactive; this.interactionManager = new PIXI.InteractionManager(this); this.setBackgroundColor(backgroundColor); @@ -62,7 +62,7 @@ */ PIXI.Stage.prototype.setBackgroundColor = function(backgroundColor) { - this.backgroundColor = backgroundColor ? backgroundColor : 0x000000; + this.backgroundColor = backgroundColor || 0x000000; this.backgroundColorSplit = HEXtoRGB(this.backgroundColor); this.backgroundColorString = "#" + this.backgroundColor.toString(16); } diff --git a/src/pixi/renderers/CanvasRenderer.js b/src/pixi/renderers/CanvasRenderer.js index ee0b832..03948ba 100644 --- a/src/pixi/renderers/CanvasRenderer.js +++ b/src/pixi/renderers/CanvasRenderer.js @@ -18,14 +18,14 @@ * @type Number * @default 800 */ - this.width = width ? width : 800; + this.width = width || 800; /** * The height of the canvas view * @property height * @type Number * @default 600 */ - this.height = height ? height : 600; + this.height = height || 600; this.refresh = true; @@ -34,7 +34,7 @@ * @property view * @type Canvas */ - this.view = view ? view : document.createElement( 'canvas' ); + this.view = view || document.createElement( 'canvas' ); // hack to enable some hardware acceleration! //this.view.style["transform"] = "translatez(0)"; diff --git a/src/pixi/renderers/WebGLRenderer.js b/src/pixi/renderers/WebGLRenderer.js index 1253088..3bbee9b 100644 --- a/src/pixi/renderers/WebGLRenderer.js +++ b/src/pixi/renderers/WebGLRenderer.js @@ -17,10 +17,10 @@ */ PIXI.WebGLRenderer = function(width, height, view) { - this.width = width ? width : 800; - this.height = height ? height : 600; + this.width = width || 800; + this.height = height || 600; - this.view = view ? view : document.createElement( 'canvas' ); + this.view = view || document.createElement( 'canvas' ); this.view.width = this.width; this.view.height = this.height; this.view.background = "#FF0000";