diff --git a/src/core/const.js b/src/core/const.js index 9366125..57d08b9 100644 --- a/src/core/const.js +++ b/src/core/const.js @@ -223,7 +223,7 @@ RETINA_PREFIX: /@(.+)x/, /** - * Default resolution of the renderer. + * Default resolution / device pixel ratio of the renderer. * * @property {number} RESOLUTION * @constant diff --git a/src/core/const.js b/src/core/const.js index 9366125..57d08b9 100644 --- a/src/core/const.js +++ b/src/core/const.js @@ -223,7 +223,7 @@ RETINA_PREFIX: /@(.+)x/, /** - * Default resolution of the renderer. + * Default resolution / device pixel ratio of the renderer. * * @property {number} RESOLUTION * @constant diff --git a/src/core/index.js b/src/core/index.js index 42fc231..1ab7f39 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -75,7 +75,7 @@ * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) * @param [options.preserveDrawingBuffer=false] {boolean} enables drawing buffer preservation, enable this if you * need to call toDataUrl on the webgl context - * @param [options.resolution=1] {number} the resolution of the renderer, retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer, retina would be 2 * @param [noWebGL=false] {boolean} prevents selection of WebGL renderer, even if such is present * * @return {WebGLRenderer|CanvasRenderer} Returns WebGL renderer if available, otherwise CanvasRenderer diff --git a/src/core/const.js b/src/core/const.js index 9366125..57d08b9 100644 --- a/src/core/const.js +++ b/src/core/const.js @@ -223,7 +223,7 @@ RETINA_PREFIX: /@(.+)x/, /** - * Default resolution of the renderer. + * Default resolution / device pixel ratio of the renderer. * * @property {number} RESOLUTION * @constant diff --git a/src/core/index.js b/src/core/index.js index 42fc231..1ab7f39 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -75,7 +75,7 @@ * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) * @param [options.preserveDrawingBuffer=false] {boolean} enables drawing buffer preservation, enable this if you * need to call toDataUrl on the webgl context - * @param [options.resolution=1] {number} the resolution of the renderer, retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer, retina would be 2 * @param [noWebGL=false] {boolean} prevents selection of WebGL renderer, even if such is present * * @return {WebGLRenderer|CanvasRenderer} Returns WebGL renderer if available, otherwise CanvasRenderer diff --git a/src/core/renderers/SystemRenderer.js b/src/core/renderers/SystemRenderer.js index b519d6b..c50e26a 100644 --- a/src/core/renderers/SystemRenderer.js +++ b/src/core/renderers/SystemRenderer.js @@ -19,7 +19,7 @@ * @param [options.transparent=false] {boolean} If the render view is transparent, default false * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. * @param [options.backgroundColor=0x000000] {number} The background color of the rendered area (shown if not transparent). @@ -80,7 +80,7 @@ this.view = options.view || document.createElement('canvas'); /** - * The resolution of the renderer + * The resolution / device pixel ratio of the renderer * * @member {number} * @default 1 @@ -230,7 +230,7 @@ * * @param displayObject {PIXI.DisplayObject} The displayObject the object will be generated from * @param scaleMode {number} Should be one of the scaleMode consts - * @param resolution {number} The resolution of the texture being generated + * @param resolution {number} The resolution / device pixel ratio of the texture being generated * @return {PIXI.Texture} a texture of the graphics object */ SystemRenderer.prototype.generateTexture = function (displayObject, scaleMode, resolution) { diff --git a/src/core/const.js b/src/core/const.js index 9366125..57d08b9 100644 --- a/src/core/const.js +++ b/src/core/const.js @@ -223,7 +223,7 @@ RETINA_PREFIX: /@(.+)x/, /** - * Default resolution of the renderer. + * Default resolution / device pixel ratio of the renderer. * * @property {number} RESOLUTION * @constant diff --git a/src/core/index.js b/src/core/index.js index 42fc231..1ab7f39 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -75,7 +75,7 @@ * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) * @param [options.preserveDrawingBuffer=false] {boolean} enables drawing buffer preservation, enable this if you * need to call toDataUrl on the webgl context - * @param [options.resolution=1] {number} the resolution of the renderer, retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer, retina would be 2 * @param [noWebGL=false] {boolean} prevents selection of WebGL renderer, even if such is present * * @return {WebGLRenderer|CanvasRenderer} Returns WebGL renderer if available, otherwise CanvasRenderer diff --git a/src/core/renderers/SystemRenderer.js b/src/core/renderers/SystemRenderer.js index b519d6b..c50e26a 100644 --- a/src/core/renderers/SystemRenderer.js +++ b/src/core/renderers/SystemRenderer.js @@ -19,7 +19,7 @@ * @param [options.transparent=false] {boolean} If the render view is transparent, default false * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. * @param [options.backgroundColor=0x000000] {number} The background color of the rendered area (shown if not transparent). @@ -80,7 +80,7 @@ this.view = options.view || document.createElement('canvas'); /** - * The resolution of the renderer + * The resolution / device pixel ratio of the renderer * * @member {number} * @default 1 @@ -230,7 +230,7 @@ * * @param displayObject {PIXI.DisplayObject} The displayObject the object will be generated from * @param scaleMode {number} Should be one of the scaleMode consts - * @param resolution {number} The resolution of the texture being generated + * @param resolution {number} The resolution / device pixel ratio of the texture being generated * @return {PIXI.Texture} a texture of the graphics object */ SystemRenderer.prototype.generateTexture = function (displayObject, scaleMode, resolution) { diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 21d3cc8..1264abe 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -19,7 +19,7 @@ * @param [options.transparent=false] {boolean} If the render view is transparent, default false * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. * @param [options.roundPixels=false] {boolean} If true Pixi will Math.floor() x/y values when rendering, stopping pixel interpolation. diff --git a/src/core/const.js b/src/core/const.js index 9366125..57d08b9 100644 --- a/src/core/const.js +++ b/src/core/const.js @@ -223,7 +223,7 @@ RETINA_PREFIX: /@(.+)x/, /** - * Default resolution of the renderer. + * Default resolution / device pixel ratio of the renderer. * * @property {number} RESOLUTION * @constant diff --git a/src/core/index.js b/src/core/index.js index 42fc231..1ab7f39 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -75,7 +75,7 @@ * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) * @param [options.preserveDrawingBuffer=false] {boolean} enables drawing buffer preservation, enable this if you * need to call toDataUrl on the webgl context - * @param [options.resolution=1] {number} the resolution of the renderer, retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer, retina would be 2 * @param [noWebGL=false] {boolean} prevents selection of WebGL renderer, even if such is present * * @return {WebGLRenderer|CanvasRenderer} Returns WebGL renderer if available, otherwise CanvasRenderer diff --git a/src/core/renderers/SystemRenderer.js b/src/core/renderers/SystemRenderer.js index b519d6b..c50e26a 100644 --- a/src/core/renderers/SystemRenderer.js +++ b/src/core/renderers/SystemRenderer.js @@ -19,7 +19,7 @@ * @param [options.transparent=false] {boolean} If the render view is transparent, default false * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. * @param [options.backgroundColor=0x000000] {number} The background color of the rendered area (shown if not transparent). @@ -80,7 +80,7 @@ this.view = options.view || document.createElement('canvas'); /** - * The resolution of the renderer + * The resolution / device pixel ratio of the renderer * * @member {number} * @default 1 @@ -230,7 +230,7 @@ * * @param displayObject {PIXI.DisplayObject} The displayObject the object will be generated from * @param scaleMode {number} Should be one of the scaleMode consts - * @param resolution {number} The resolution of the texture being generated + * @param resolution {number} The resolution / device pixel ratio of the texture being generated * @return {PIXI.Texture} a texture of the graphics object */ SystemRenderer.prototype.generateTexture = function (displayObject, scaleMode, resolution) { diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 21d3cc8..1264abe 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -19,7 +19,7 @@ * @param [options.transparent=false] {boolean} If the render view is transparent, default false * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. * @param [options.roundPixels=false] {boolean} If true Pixi will Math.floor() x/y values when rendering, stopping pixel interpolation. diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index 84aae27..958106a 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,7 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas - * @param [resolution=CONST.RESOLUTION] The resolution of the canvas + * @param [resolution=1] The resolution / device pixel ratio of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/const.js b/src/core/const.js index 9366125..57d08b9 100644 --- a/src/core/const.js +++ b/src/core/const.js @@ -223,7 +223,7 @@ RETINA_PREFIX: /@(.+)x/, /** - * Default resolution of the renderer. + * Default resolution / device pixel ratio of the renderer. * * @property {number} RESOLUTION * @constant diff --git a/src/core/index.js b/src/core/index.js index 42fc231..1ab7f39 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -75,7 +75,7 @@ * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) * @param [options.preserveDrawingBuffer=false] {boolean} enables drawing buffer preservation, enable this if you * need to call toDataUrl on the webgl context - * @param [options.resolution=1] {number} the resolution of the renderer, retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer, retina would be 2 * @param [noWebGL=false] {boolean} prevents selection of WebGL renderer, even if such is present * * @return {WebGLRenderer|CanvasRenderer} Returns WebGL renderer if available, otherwise CanvasRenderer diff --git a/src/core/renderers/SystemRenderer.js b/src/core/renderers/SystemRenderer.js index b519d6b..c50e26a 100644 --- a/src/core/renderers/SystemRenderer.js +++ b/src/core/renderers/SystemRenderer.js @@ -19,7 +19,7 @@ * @param [options.transparent=false] {boolean} If the render view is transparent, default false * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. * @param [options.backgroundColor=0x000000] {number} The background color of the rendered area (shown if not transparent). @@ -80,7 +80,7 @@ this.view = options.view || document.createElement('canvas'); /** - * The resolution of the renderer + * The resolution / device pixel ratio of the renderer * * @member {number} * @default 1 @@ -230,7 +230,7 @@ * * @param displayObject {PIXI.DisplayObject} The displayObject the object will be generated from * @param scaleMode {number} Should be one of the scaleMode consts - * @param resolution {number} The resolution of the texture being generated + * @param resolution {number} The resolution / device pixel ratio of the texture being generated * @return {PIXI.Texture} a texture of the graphics object */ SystemRenderer.prototype.generateTexture = function (displayObject, scaleMode, resolution) { diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 21d3cc8..1264abe 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -19,7 +19,7 @@ * @param [options.transparent=false] {boolean} If the render view is transparent, default false * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. * @param [options.roundPixels=false] {boolean} If true Pixi will Math.floor() x/y values when rendering, stopping pixel interpolation. diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index 84aae27..958106a 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,7 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas - * @param [resolution=CONST.RESOLUTION] The resolution of the canvas + * @param [resolution=1] The resolution / device pixel ratio of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 8683eb5..9ca25e5 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -32,7 +32,7 @@ * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias. If not available natively then FXAA antialiasing is used * @param [options.forceFXAA=false] {boolean} forces FXAA antialiasing to be used over native. FXAA is faster, but may not always look as great - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. If you wish to set this to false, you *must* set preserveDrawingBuffer to `true`. * @param [options.preserveDrawingBuffer=false] {boolean} enables drawing buffer preservation, enable this if diff --git a/src/core/const.js b/src/core/const.js index 9366125..57d08b9 100644 --- a/src/core/const.js +++ b/src/core/const.js @@ -223,7 +223,7 @@ RETINA_PREFIX: /@(.+)x/, /** - * Default resolution of the renderer. + * Default resolution / device pixel ratio of the renderer. * * @property {number} RESOLUTION * @constant diff --git a/src/core/index.js b/src/core/index.js index 42fc231..1ab7f39 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -75,7 +75,7 @@ * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) * @param [options.preserveDrawingBuffer=false] {boolean} enables drawing buffer preservation, enable this if you * need to call toDataUrl on the webgl context - * @param [options.resolution=1] {number} the resolution of the renderer, retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer, retina would be 2 * @param [noWebGL=false] {boolean} prevents selection of WebGL renderer, even if such is present * * @return {WebGLRenderer|CanvasRenderer} Returns WebGL renderer if available, otherwise CanvasRenderer diff --git a/src/core/renderers/SystemRenderer.js b/src/core/renderers/SystemRenderer.js index b519d6b..c50e26a 100644 --- a/src/core/renderers/SystemRenderer.js +++ b/src/core/renderers/SystemRenderer.js @@ -19,7 +19,7 @@ * @param [options.transparent=false] {boolean} If the render view is transparent, default false * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. * @param [options.backgroundColor=0x000000] {number} The background color of the rendered area (shown if not transparent). @@ -80,7 +80,7 @@ this.view = options.view || document.createElement('canvas'); /** - * The resolution of the renderer + * The resolution / device pixel ratio of the renderer * * @member {number} * @default 1 @@ -230,7 +230,7 @@ * * @param displayObject {PIXI.DisplayObject} The displayObject the object will be generated from * @param scaleMode {number} Should be one of the scaleMode consts - * @param resolution {number} The resolution of the texture being generated + * @param resolution {number} The resolution / device pixel ratio of the texture being generated * @return {PIXI.Texture} a texture of the graphics object */ SystemRenderer.prototype.generateTexture = function (displayObject, scaleMode, resolution) { diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 21d3cc8..1264abe 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -19,7 +19,7 @@ * @param [options.transparent=false] {boolean} If the render view is transparent, default false * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. * @param [options.roundPixels=false] {boolean} If true Pixi will Math.floor() x/y values when rendering, stopping pixel interpolation. diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index 84aae27..958106a 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,7 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas - * @param [resolution=CONST.RESOLUTION] The resolution of the canvas + * @param [resolution=1] The resolution / device pixel ratio of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 8683eb5..9ca25e5 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -32,7 +32,7 @@ * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias. If not available natively then FXAA antialiasing is used * @param [options.forceFXAA=false] {boolean} forces FXAA antialiasing to be used over native. FXAA is faster, but may not always look as great - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. If you wish to set this to false, you *must* set preserveDrawingBuffer to `true`. * @param [options.preserveDrawingBuffer=false] {boolean} enables drawing buffer preservation, enable this if diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index da22e25..91a833c 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -13,7 +13,7 @@ * @param [width=0] {number} the horizontal range of the filter * @param [height=0] {number} the vertical range of the filter * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [resolution=1] {number} The current resolution / device pixel ratio * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) @@ -58,9 +58,10 @@ this.size = new math.Rectangle(0, 0, 1, 1); /** - * The current resolution + * The current resolution / device pixel ratio * * @member {number} + * @default 1 */ this.resolution = resolution || CONST.RESOLUTION; diff --git a/src/core/const.js b/src/core/const.js index 9366125..57d08b9 100644 --- a/src/core/const.js +++ b/src/core/const.js @@ -223,7 +223,7 @@ RETINA_PREFIX: /@(.+)x/, /** - * Default resolution of the renderer. + * Default resolution / device pixel ratio of the renderer. * * @property {number} RESOLUTION * @constant diff --git a/src/core/index.js b/src/core/index.js index 42fc231..1ab7f39 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -75,7 +75,7 @@ * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) * @param [options.preserveDrawingBuffer=false] {boolean} enables drawing buffer preservation, enable this if you * need to call toDataUrl on the webgl context - * @param [options.resolution=1] {number} the resolution of the renderer, retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer, retina would be 2 * @param [noWebGL=false] {boolean} prevents selection of WebGL renderer, even if such is present * * @return {WebGLRenderer|CanvasRenderer} Returns WebGL renderer if available, otherwise CanvasRenderer diff --git a/src/core/renderers/SystemRenderer.js b/src/core/renderers/SystemRenderer.js index b519d6b..c50e26a 100644 --- a/src/core/renderers/SystemRenderer.js +++ b/src/core/renderers/SystemRenderer.js @@ -19,7 +19,7 @@ * @param [options.transparent=false] {boolean} If the render view is transparent, default false * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. * @param [options.backgroundColor=0x000000] {number} The background color of the rendered area (shown if not transparent). @@ -80,7 +80,7 @@ this.view = options.view || document.createElement('canvas'); /** - * The resolution of the renderer + * The resolution / device pixel ratio of the renderer * * @member {number} * @default 1 @@ -230,7 +230,7 @@ * * @param displayObject {PIXI.DisplayObject} The displayObject the object will be generated from * @param scaleMode {number} Should be one of the scaleMode consts - * @param resolution {number} The resolution of the texture being generated + * @param resolution {number} The resolution / device pixel ratio of the texture being generated * @return {PIXI.Texture} a texture of the graphics object */ SystemRenderer.prototype.generateTexture = function (displayObject, scaleMode, resolution) { diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 21d3cc8..1264abe 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -19,7 +19,7 @@ * @param [options.transparent=false] {boolean} If the render view is transparent, default false * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. * @param [options.roundPixels=false] {boolean} If true Pixi will Math.floor() x/y values when rendering, stopping pixel interpolation. diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index 84aae27..958106a 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,7 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas - * @param [resolution=CONST.RESOLUTION] The resolution of the canvas + * @param [resolution=1] The resolution / device pixel ratio of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 8683eb5..9ca25e5 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -32,7 +32,7 @@ * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias. If not available natively then FXAA antialiasing is used * @param [options.forceFXAA=false] {boolean} forces FXAA antialiasing to be used over native. FXAA is faster, but may not always look as great - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. If you wish to set this to false, you *must* set preserveDrawingBuffer to `true`. * @param [options.preserveDrawingBuffer=false] {boolean} enables drawing buffer preservation, enable this if diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index da22e25..91a833c 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -13,7 +13,7 @@ * @param [width=0] {number} the horizontal range of the filter * @param [height=0] {number} the vertical range of the filter * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [resolution=1] {number} The current resolution / device pixel ratio * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) @@ -58,9 +58,10 @@ this.size = new math.Rectangle(0, 0, 1, 1); /** - * The current resolution + * The current resolution / device pixel ratio * * @member {number} + * @default 1 */ this.resolution = resolution || CONST.RESOLUTION; diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ad60a2e..41f9685 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -19,7 +19,7 @@ * @memberof PIXI * @param text {string} The string that you would like the text to display * @param [style] {object|PIXI.TextStyle} The style parameters - * @param [resolution=CONST.RESOLUTION] The resolution of the canvas + * @param [resolution=1] {number} The current resolution / device pixel ratio of the canvas */ function Text(text, style, resolution) { @@ -37,8 +37,9 @@ this.context = this.canvas.getContext('2d'); /** - * The resolution of the canvas. + * The resolution / device pixel ratio of the canvas * @member {number} + * @default 1 */ this.resolution = resolution || CONST.RESOLUTION; diff --git a/src/core/const.js b/src/core/const.js index 9366125..57d08b9 100644 --- a/src/core/const.js +++ b/src/core/const.js @@ -223,7 +223,7 @@ RETINA_PREFIX: /@(.+)x/, /** - * Default resolution of the renderer. + * Default resolution / device pixel ratio of the renderer. * * @property {number} RESOLUTION * @constant diff --git a/src/core/index.js b/src/core/index.js index 42fc231..1ab7f39 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -75,7 +75,7 @@ * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) * @param [options.preserveDrawingBuffer=false] {boolean} enables drawing buffer preservation, enable this if you * need to call toDataUrl on the webgl context - * @param [options.resolution=1] {number} the resolution of the renderer, retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer, retina would be 2 * @param [noWebGL=false] {boolean} prevents selection of WebGL renderer, even if such is present * * @return {WebGLRenderer|CanvasRenderer} Returns WebGL renderer if available, otherwise CanvasRenderer diff --git a/src/core/renderers/SystemRenderer.js b/src/core/renderers/SystemRenderer.js index b519d6b..c50e26a 100644 --- a/src/core/renderers/SystemRenderer.js +++ b/src/core/renderers/SystemRenderer.js @@ -19,7 +19,7 @@ * @param [options.transparent=false] {boolean} If the render view is transparent, default false * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. * @param [options.backgroundColor=0x000000] {number} The background color of the rendered area (shown if not transparent). @@ -80,7 +80,7 @@ this.view = options.view || document.createElement('canvas'); /** - * The resolution of the renderer + * The resolution / device pixel ratio of the renderer * * @member {number} * @default 1 @@ -230,7 +230,7 @@ * * @param displayObject {PIXI.DisplayObject} The displayObject the object will be generated from * @param scaleMode {number} Should be one of the scaleMode consts - * @param resolution {number} The resolution of the texture being generated + * @param resolution {number} The resolution / device pixel ratio of the texture being generated * @return {PIXI.Texture} a texture of the graphics object */ SystemRenderer.prototype.generateTexture = function (displayObject, scaleMode, resolution) { diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 21d3cc8..1264abe 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -19,7 +19,7 @@ * @param [options.transparent=false] {boolean} If the render view is transparent, default false * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. * @param [options.roundPixels=false] {boolean} If true Pixi will Math.floor() x/y values when rendering, stopping pixel interpolation. diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index 84aae27..958106a 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,7 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas - * @param [resolution=CONST.RESOLUTION] The resolution of the canvas + * @param [resolution=1] The resolution / device pixel ratio of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 8683eb5..9ca25e5 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -32,7 +32,7 @@ * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias. If not available natively then FXAA antialiasing is used * @param [options.forceFXAA=false] {boolean} forces FXAA antialiasing to be used over native. FXAA is faster, but may not always look as great - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. If you wish to set this to false, you *must* set preserveDrawingBuffer to `true`. * @param [options.preserveDrawingBuffer=false] {boolean} enables drawing buffer preservation, enable this if diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index da22e25..91a833c 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -13,7 +13,7 @@ * @param [width=0] {number} the horizontal range of the filter * @param [height=0] {number} the vertical range of the filter * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [resolution=1] {number} The current resolution / device pixel ratio * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) @@ -58,9 +58,10 @@ this.size = new math.Rectangle(0, 0, 1, 1); /** - * The current resolution + * The current resolution / device pixel ratio * * @member {number} + * @default 1 */ this.resolution = resolution || CONST.RESOLUTION; diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ad60a2e..41f9685 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -19,7 +19,7 @@ * @memberof PIXI * @param text {string} The string that you would like the text to display * @param [style] {object|PIXI.TextStyle} The style parameters - * @param [resolution=CONST.RESOLUTION] The resolution of the canvas + * @param [resolution=1] {number} The current resolution / device pixel ratio of the canvas */ function Text(text, style, resolution) { @@ -37,8 +37,9 @@ this.context = this.canvas.getContext('2d'); /** - * The resolution of the canvas. + * The resolution / device pixel ratio of the canvas * @member {number} + * @default 1 */ this.resolution = resolution || CONST.RESOLUTION; diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index fb5ce06..07f358f 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -43,7 +43,7 @@ * @param [width=100] {number} The width of the base render texture * @param [height=100] {number} The height of the base render texture * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param [resolution=1] {number} The resolution of the texture being generated + * @param [resolution=1] {number} The resolution / device pixel ratio of the texture being generated */ function BaseRenderTexture(width, height, scaleMode, resolution) { diff --git a/src/core/const.js b/src/core/const.js index 9366125..57d08b9 100644 --- a/src/core/const.js +++ b/src/core/const.js @@ -223,7 +223,7 @@ RETINA_PREFIX: /@(.+)x/, /** - * Default resolution of the renderer. + * Default resolution / device pixel ratio of the renderer. * * @property {number} RESOLUTION * @constant diff --git a/src/core/index.js b/src/core/index.js index 42fc231..1ab7f39 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -75,7 +75,7 @@ * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) * @param [options.preserveDrawingBuffer=false] {boolean} enables drawing buffer preservation, enable this if you * need to call toDataUrl on the webgl context - * @param [options.resolution=1] {number} the resolution of the renderer, retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer, retina would be 2 * @param [noWebGL=false] {boolean} prevents selection of WebGL renderer, even if such is present * * @return {WebGLRenderer|CanvasRenderer} Returns WebGL renderer if available, otherwise CanvasRenderer diff --git a/src/core/renderers/SystemRenderer.js b/src/core/renderers/SystemRenderer.js index b519d6b..c50e26a 100644 --- a/src/core/renderers/SystemRenderer.js +++ b/src/core/renderers/SystemRenderer.js @@ -19,7 +19,7 @@ * @param [options.transparent=false] {boolean} If the render view is transparent, default false * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. * @param [options.backgroundColor=0x000000] {number} The background color of the rendered area (shown if not transparent). @@ -80,7 +80,7 @@ this.view = options.view || document.createElement('canvas'); /** - * The resolution of the renderer + * The resolution / device pixel ratio of the renderer * * @member {number} * @default 1 @@ -230,7 +230,7 @@ * * @param displayObject {PIXI.DisplayObject} The displayObject the object will be generated from * @param scaleMode {number} Should be one of the scaleMode consts - * @param resolution {number} The resolution of the texture being generated + * @param resolution {number} The resolution / device pixel ratio of the texture being generated * @return {PIXI.Texture} a texture of the graphics object */ SystemRenderer.prototype.generateTexture = function (displayObject, scaleMode, resolution) { diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 21d3cc8..1264abe 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -19,7 +19,7 @@ * @param [options.transparent=false] {boolean} If the render view is transparent, default false * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. * @param [options.roundPixels=false] {boolean} If true Pixi will Math.floor() x/y values when rendering, stopping pixel interpolation. diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index 84aae27..958106a 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,7 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas - * @param [resolution=CONST.RESOLUTION] The resolution of the canvas + * @param [resolution=1] The resolution / device pixel ratio of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 8683eb5..9ca25e5 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -32,7 +32,7 @@ * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias. If not available natively then FXAA antialiasing is used * @param [options.forceFXAA=false] {boolean} forces FXAA antialiasing to be used over native. FXAA is faster, but may not always look as great - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. If you wish to set this to false, you *must* set preserveDrawingBuffer to `true`. * @param [options.preserveDrawingBuffer=false] {boolean} enables drawing buffer preservation, enable this if diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index da22e25..91a833c 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -13,7 +13,7 @@ * @param [width=0] {number} the horizontal range of the filter * @param [height=0] {number} the vertical range of the filter * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [resolution=1] {number} The current resolution / device pixel ratio * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) @@ -58,9 +58,10 @@ this.size = new math.Rectangle(0, 0, 1, 1); /** - * The current resolution + * The current resolution / device pixel ratio * * @member {number} + * @default 1 */ this.resolution = resolution || CONST.RESOLUTION; diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ad60a2e..41f9685 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -19,7 +19,7 @@ * @memberof PIXI * @param text {string} The string that you would like the text to display * @param [style] {object|PIXI.TextStyle} The style parameters - * @param [resolution=CONST.RESOLUTION] The resolution of the canvas + * @param [resolution=1] {number} The current resolution / device pixel ratio of the canvas */ function Text(text, style, resolution) { @@ -37,8 +37,9 @@ this.context = this.canvas.getContext('2d'); /** - * The resolution of the canvas. + * The resolution / device pixel ratio of the canvas * @member {number} + * @default 1 */ this.resolution = resolution || CONST.RESOLUTION; diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index fb5ce06..07f358f 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -43,7 +43,7 @@ * @param [width=100] {number} The width of the base render texture * @param [height=100] {number} The height of the base render texture * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param [resolution=1] {number} The resolution of the texture being generated + * @param [resolution=1] {number} The resolution / device pixel ratio of the texture being generated */ function BaseRenderTexture(width, height, scaleMode, resolution) { diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index 3f3616f..0811c30 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -11,7 +11,7 @@ * @memberof PIXI * @param [source ]{Image|HTMLCanvasElement} the source object of the texture. * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param [resolution=CONST.resolution] {number} the resolution of the texture for devices with different pixel ratios + * @param [resolution=1] {number} The resolution / device pixel ratio of the texture */ function BaseTexture(source, scaleMode, resolution) { @@ -22,9 +22,10 @@ this.touched = 0; /** - * The Resolution of the texture. + * The resolution / device pixel ratio of the texture * * @member {number} + * @default 1 */ this.resolution = resolution || CONST.RESOLUTION; diff --git a/src/core/const.js b/src/core/const.js index 9366125..57d08b9 100644 --- a/src/core/const.js +++ b/src/core/const.js @@ -223,7 +223,7 @@ RETINA_PREFIX: /@(.+)x/, /** - * Default resolution of the renderer. + * Default resolution / device pixel ratio of the renderer. * * @property {number} RESOLUTION * @constant diff --git a/src/core/index.js b/src/core/index.js index 42fc231..1ab7f39 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -75,7 +75,7 @@ * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) * @param [options.preserveDrawingBuffer=false] {boolean} enables drawing buffer preservation, enable this if you * need to call toDataUrl on the webgl context - * @param [options.resolution=1] {number} the resolution of the renderer, retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer, retina would be 2 * @param [noWebGL=false] {boolean} prevents selection of WebGL renderer, even if such is present * * @return {WebGLRenderer|CanvasRenderer} Returns WebGL renderer if available, otherwise CanvasRenderer diff --git a/src/core/renderers/SystemRenderer.js b/src/core/renderers/SystemRenderer.js index b519d6b..c50e26a 100644 --- a/src/core/renderers/SystemRenderer.js +++ b/src/core/renderers/SystemRenderer.js @@ -19,7 +19,7 @@ * @param [options.transparent=false] {boolean} If the render view is transparent, default false * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. * @param [options.backgroundColor=0x000000] {number} The background color of the rendered area (shown if not transparent). @@ -80,7 +80,7 @@ this.view = options.view || document.createElement('canvas'); /** - * The resolution of the renderer + * The resolution / device pixel ratio of the renderer * * @member {number} * @default 1 @@ -230,7 +230,7 @@ * * @param displayObject {PIXI.DisplayObject} The displayObject the object will be generated from * @param scaleMode {number} Should be one of the scaleMode consts - * @param resolution {number} The resolution of the texture being generated + * @param resolution {number} The resolution / device pixel ratio of the texture being generated * @return {PIXI.Texture} a texture of the graphics object */ SystemRenderer.prototype.generateTexture = function (displayObject, scaleMode, resolution) { diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 21d3cc8..1264abe 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -19,7 +19,7 @@ * @param [options.transparent=false] {boolean} If the render view is transparent, default false * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. * @param [options.roundPixels=false] {boolean} If true Pixi will Math.floor() x/y values when rendering, stopping pixel interpolation. diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index 84aae27..958106a 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,7 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas - * @param [resolution=CONST.RESOLUTION] The resolution of the canvas + * @param [resolution=1] The resolution / device pixel ratio of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 8683eb5..9ca25e5 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -32,7 +32,7 @@ * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias. If not available natively then FXAA antialiasing is used * @param [options.forceFXAA=false] {boolean} forces FXAA antialiasing to be used over native. FXAA is faster, but may not always look as great - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. If you wish to set this to false, you *must* set preserveDrawingBuffer to `true`. * @param [options.preserveDrawingBuffer=false] {boolean} enables drawing buffer preservation, enable this if diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index da22e25..91a833c 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -13,7 +13,7 @@ * @param [width=0] {number} the horizontal range of the filter * @param [height=0] {number} the vertical range of the filter * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [resolution=1] {number} The current resolution / device pixel ratio * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) @@ -58,9 +58,10 @@ this.size = new math.Rectangle(0, 0, 1, 1); /** - * The current resolution + * The current resolution / device pixel ratio * * @member {number} + * @default 1 */ this.resolution = resolution || CONST.RESOLUTION; diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ad60a2e..41f9685 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -19,7 +19,7 @@ * @memberof PIXI * @param text {string} The string that you would like the text to display * @param [style] {object|PIXI.TextStyle} The style parameters - * @param [resolution=CONST.RESOLUTION] The resolution of the canvas + * @param [resolution=1] {number} The current resolution / device pixel ratio of the canvas */ function Text(text, style, resolution) { @@ -37,8 +37,9 @@ this.context = this.canvas.getContext('2d'); /** - * The resolution of the canvas. + * The resolution / device pixel ratio of the canvas * @member {number} + * @default 1 */ this.resolution = resolution || CONST.RESOLUTION; diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index fb5ce06..07f358f 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -43,7 +43,7 @@ * @param [width=100] {number} The width of the base render texture * @param [height=100] {number} The height of the base render texture * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param [resolution=1] {number} The resolution of the texture being generated + * @param [resolution=1] {number} The resolution / device pixel ratio of the texture being generated */ function BaseRenderTexture(width, height, scaleMode, resolution) { diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index 3f3616f..0811c30 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -11,7 +11,7 @@ * @memberof PIXI * @param [source ]{Image|HTMLCanvasElement} the source object of the texture. * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param [resolution=CONST.resolution] {number} the resolution of the texture for devices with different pixel ratios + * @param [resolution=1] {number} The resolution / device pixel ratio of the texture */ function BaseTexture(source, scaleMode, resolution) { @@ -22,9 +22,10 @@ this.touched = 0; /** - * The Resolution of the texture. + * The resolution / device pixel ratio of the texture * * @member {number} + * @default 1 */ this.resolution = resolution || CONST.RESOLUTION; diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index 72675f7..e9976f4 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -112,7 +112,7 @@ * @param [width=100] {number} The width of the render texture * @param [height=100] {number} The height of the render texture * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param [resolution=1] {number} The resolution of the texture being generated + * @param [resolution=1] {number} The resolution / device pixel ratio of the texture being generated */ RenderTexture.create = function(width, height, scaleMode, resolution) { diff --git a/src/core/const.js b/src/core/const.js index 9366125..57d08b9 100644 --- a/src/core/const.js +++ b/src/core/const.js @@ -223,7 +223,7 @@ RETINA_PREFIX: /@(.+)x/, /** - * Default resolution of the renderer. + * Default resolution / device pixel ratio of the renderer. * * @property {number} RESOLUTION * @constant diff --git a/src/core/index.js b/src/core/index.js index 42fc231..1ab7f39 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -75,7 +75,7 @@ * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) * @param [options.preserveDrawingBuffer=false] {boolean} enables drawing buffer preservation, enable this if you * need to call toDataUrl on the webgl context - * @param [options.resolution=1] {number} the resolution of the renderer, retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer, retina would be 2 * @param [noWebGL=false] {boolean} prevents selection of WebGL renderer, even if such is present * * @return {WebGLRenderer|CanvasRenderer} Returns WebGL renderer if available, otherwise CanvasRenderer diff --git a/src/core/renderers/SystemRenderer.js b/src/core/renderers/SystemRenderer.js index b519d6b..c50e26a 100644 --- a/src/core/renderers/SystemRenderer.js +++ b/src/core/renderers/SystemRenderer.js @@ -19,7 +19,7 @@ * @param [options.transparent=false] {boolean} If the render view is transparent, default false * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. * @param [options.backgroundColor=0x000000] {number} The background color of the rendered area (shown if not transparent). @@ -80,7 +80,7 @@ this.view = options.view || document.createElement('canvas'); /** - * The resolution of the renderer + * The resolution / device pixel ratio of the renderer * * @member {number} * @default 1 @@ -230,7 +230,7 @@ * * @param displayObject {PIXI.DisplayObject} The displayObject the object will be generated from * @param scaleMode {number} Should be one of the scaleMode consts - * @param resolution {number} The resolution of the texture being generated + * @param resolution {number} The resolution / device pixel ratio of the texture being generated * @return {PIXI.Texture} a texture of the graphics object */ SystemRenderer.prototype.generateTexture = function (displayObject, scaleMode, resolution) { diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 21d3cc8..1264abe 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -19,7 +19,7 @@ * @param [options.transparent=false] {boolean} If the render view is transparent, default false * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. * @param [options.roundPixels=false] {boolean} If true Pixi will Math.floor() x/y values when rendering, stopping pixel interpolation. diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index 84aae27..958106a 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,7 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas - * @param [resolution=CONST.RESOLUTION] The resolution of the canvas + * @param [resolution=1] The resolution / device pixel ratio of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 8683eb5..9ca25e5 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -32,7 +32,7 @@ * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias. If not available natively then FXAA antialiasing is used * @param [options.forceFXAA=false] {boolean} forces FXAA antialiasing to be used over native. FXAA is faster, but may not always look as great - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. If you wish to set this to false, you *must* set preserveDrawingBuffer to `true`. * @param [options.preserveDrawingBuffer=false] {boolean} enables drawing buffer preservation, enable this if diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index da22e25..91a833c 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -13,7 +13,7 @@ * @param [width=0] {number} the horizontal range of the filter * @param [height=0] {number} the vertical range of the filter * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [resolution=1] {number} The current resolution / device pixel ratio * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) @@ -58,9 +58,10 @@ this.size = new math.Rectangle(0, 0, 1, 1); /** - * The current resolution + * The current resolution / device pixel ratio * * @member {number} + * @default 1 */ this.resolution = resolution || CONST.RESOLUTION; diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ad60a2e..41f9685 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -19,7 +19,7 @@ * @memberof PIXI * @param text {string} The string that you would like the text to display * @param [style] {object|PIXI.TextStyle} The style parameters - * @param [resolution=CONST.RESOLUTION] The resolution of the canvas + * @param [resolution=1] {number} The current resolution / device pixel ratio of the canvas */ function Text(text, style, resolution) { @@ -37,8 +37,9 @@ this.context = this.canvas.getContext('2d'); /** - * The resolution of the canvas. + * The resolution / device pixel ratio of the canvas * @member {number} + * @default 1 */ this.resolution = resolution || CONST.RESOLUTION; diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index fb5ce06..07f358f 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -43,7 +43,7 @@ * @param [width=100] {number} The width of the base render texture * @param [height=100] {number} The height of the base render texture * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param [resolution=1] {number} The resolution of the texture being generated + * @param [resolution=1] {number} The resolution / device pixel ratio of the texture being generated */ function BaseRenderTexture(width, height, scaleMode, resolution) { diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index 3f3616f..0811c30 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -11,7 +11,7 @@ * @memberof PIXI * @param [source ]{Image|HTMLCanvasElement} the source object of the texture. * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param [resolution=CONST.resolution] {number} the resolution of the texture for devices with different pixel ratios + * @param [resolution=1] {number} The resolution / device pixel ratio of the texture */ function BaseTexture(source, scaleMode, resolution) { @@ -22,9 +22,10 @@ this.touched = 0; /** - * The Resolution of the texture. + * The resolution / device pixel ratio of the texture * * @member {number} + * @default 1 */ this.resolution = resolution || CONST.RESOLUTION; diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index 72675f7..e9976f4 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -112,7 +112,7 @@ * @param [width=100] {number} The width of the render texture * @param [height=100] {number} The height of the render texture * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param [resolution=1] {number} The resolution of the texture being generated + * @param [resolution=1] {number} The resolution / device pixel ratio of the texture being generated */ RenderTexture.create = function(width, height, scaleMode, resolution) { diff --git a/src/core/utils/index.js b/src/core/utils/index.js index d47bef9..f87ce18 100644 --- a/src/core/utils/index.js +++ b/src/core/utils/index.js @@ -65,7 +65,7 @@ /** - * get the resolution of an asset by looking for the prefix + * get the resolution / device pixel ratio of an asset by looking for the prefix * used by spritesheets and image urls * * @param url {string} the image path diff --git a/src/core/const.js b/src/core/const.js index 9366125..57d08b9 100644 --- a/src/core/const.js +++ b/src/core/const.js @@ -223,7 +223,7 @@ RETINA_PREFIX: /@(.+)x/, /** - * Default resolution of the renderer. + * Default resolution / device pixel ratio of the renderer. * * @property {number} RESOLUTION * @constant diff --git a/src/core/index.js b/src/core/index.js index 42fc231..1ab7f39 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -75,7 +75,7 @@ * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) * @param [options.preserveDrawingBuffer=false] {boolean} enables drawing buffer preservation, enable this if you * need to call toDataUrl on the webgl context - * @param [options.resolution=1] {number} the resolution of the renderer, retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer, retina would be 2 * @param [noWebGL=false] {boolean} prevents selection of WebGL renderer, even if such is present * * @return {WebGLRenderer|CanvasRenderer} Returns WebGL renderer if available, otherwise CanvasRenderer diff --git a/src/core/renderers/SystemRenderer.js b/src/core/renderers/SystemRenderer.js index b519d6b..c50e26a 100644 --- a/src/core/renderers/SystemRenderer.js +++ b/src/core/renderers/SystemRenderer.js @@ -19,7 +19,7 @@ * @param [options.transparent=false] {boolean} If the render view is transparent, default false * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. * @param [options.backgroundColor=0x000000] {number} The background color of the rendered area (shown if not transparent). @@ -80,7 +80,7 @@ this.view = options.view || document.createElement('canvas'); /** - * The resolution of the renderer + * The resolution / device pixel ratio of the renderer * * @member {number} * @default 1 @@ -230,7 +230,7 @@ * * @param displayObject {PIXI.DisplayObject} The displayObject the object will be generated from * @param scaleMode {number} Should be one of the scaleMode consts - * @param resolution {number} The resolution of the texture being generated + * @param resolution {number} The resolution / device pixel ratio of the texture being generated * @return {PIXI.Texture} a texture of the graphics object */ SystemRenderer.prototype.generateTexture = function (displayObject, scaleMode, resolution) { diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 21d3cc8..1264abe 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -19,7 +19,7 @@ * @param [options.transparent=false] {boolean} If the render view is transparent, default false * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias (only applicable in chrome at the moment) - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. * @param [options.roundPixels=false] {boolean} If true Pixi will Math.floor() x/y values when rendering, stopping pixel interpolation. diff --git a/src/core/renderers/canvas/utils/CanvasRenderTarget.js b/src/core/renderers/canvas/utils/CanvasRenderTarget.js index 84aae27..958106a 100644 --- a/src/core/renderers/canvas/utils/CanvasRenderTarget.js +++ b/src/core/renderers/canvas/utils/CanvasRenderTarget.js @@ -7,7 +7,7 @@ * @memberof PIXI * @param width {number} the width for the newly created canvas * @param height {number} the height for the newly created canvas - * @param [resolution=CONST.RESOLUTION] The resolution of the canvas + * @param [resolution=1] The resolution / device pixel ratio of the canvas */ function CanvasRenderTarget(width, height, resolution) { diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index 8683eb5..9ca25e5 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -32,7 +32,7 @@ * @param [options.autoResize=false] {boolean} If the render view is automatically resized, default false * @param [options.antialias=false] {boolean} sets antialias. If not available natively then FXAA antialiasing is used * @param [options.forceFXAA=false] {boolean} forces FXAA antialiasing to be used over native. FXAA is faster, but may not always look as great - * @param [options.resolution=1] {number} the resolution of the renderer retina would be 2 + * @param [options.resolution=1] {number} The resolution / device pixel ratio of the renderer. The resolution of the renderer retina would be 2. * @param [options.clearBeforeRender=true] {boolean} This sets if the CanvasRenderer will clear the canvas or * not before the new render pass. If you wish to set this to false, you *must* set preserveDrawingBuffer to `true`. * @param [options.preserveDrawingBuffer=false] {boolean} enables drawing buffer preservation, enable this if diff --git a/src/core/renderers/webgl/utils/RenderTarget.js b/src/core/renderers/webgl/utils/RenderTarget.js index da22e25..91a833c 100644 --- a/src/core/renderers/webgl/utils/RenderTarget.js +++ b/src/core/renderers/webgl/utils/RenderTarget.js @@ -13,7 +13,7 @@ * @param [width=0] {number} the horizontal range of the filter * @param [height=0] {number} the vertical range of the filter * @param [scaleMode=CONST.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param [resolution=CONST.RESOLUTION] {number} the current resolution + * @param [resolution=1] {number} The current resolution / device pixel ratio * @param [root=false] {boolean} Whether this object is the root element or not */ var RenderTarget = function(gl, width, height, scaleMode, resolution, root) @@ -58,9 +58,10 @@ this.size = new math.Rectangle(0, 0, 1, 1); /** - * The current resolution + * The current resolution / device pixel ratio * * @member {number} + * @default 1 */ this.resolution = resolution || CONST.RESOLUTION; diff --git a/src/core/text/Text.js b/src/core/text/Text.js index ad60a2e..41f9685 100644 --- a/src/core/text/Text.js +++ b/src/core/text/Text.js @@ -19,7 +19,7 @@ * @memberof PIXI * @param text {string} The string that you would like the text to display * @param [style] {object|PIXI.TextStyle} The style parameters - * @param [resolution=CONST.RESOLUTION] The resolution of the canvas + * @param [resolution=1] {number} The current resolution / device pixel ratio of the canvas */ function Text(text, style, resolution) { @@ -37,8 +37,9 @@ this.context = this.canvas.getContext('2d'); /** - * The resolution of the canvas. + * The resolution / device pixel ratio of the canvas * @member {number} + * @default 1 */ this.resolution = resolution || CONST.RESOLUTION; diff --git a/src/core/textures/BaseRenderTexture.js b/src/core/textures/BaseRenderTexture.js index fb5ce06..07f358f 100644 --- a/src/core/textures/BaseRenderTexture.js +++ b/src/core/textures/BaseRenderTexture.js @@ -43,7 +43,7 @@ * @param [width=100] {number} The width of the base render texture * @param [height=100] {number} The height of the base render texture * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param [resolution=1] {number} The resolution of the texture being generated + * @param [resolution=1] {number} The resolution / device pixel ratio of the texture being generated */ function BaseRenderTexture(width, height, scaleMode, resolution) { diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index 3f3616f..0811c30 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -11,7 +11,7 @@ * @memberof PIXI * @param [source ]{Image|HTMLCanvasElement} the source object of the texture. * @param [scaleMode=PIXI.SCALE_MODES.DEFAULT] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param [resolution=CONST.resolution] {number} the resolution of the texture for devices with different pixel ratios + * @param [resolution=1] {number} The resolution / device pixel ratio of the texture */ function BaseTexture(source, scaleMode, resolution) { @@ -22,9 +22,10 @@ this.touched = 0; /** - * The Resolution of the texture. + * The resolution / device pixel ratio of the texture * * @member {number} + * @default 1 */ this.resolution = resolution || CONST.RESOLUTION; diff --git a/src/core/textures/RenderTexture.js b/src/core/textures/RenderTexture.js index 72675f7..e9976f4 100644 --- a/src/core/textures/RenderTexture.js +++ b/src/core/textures/RenderTexture.js @@ -112,7 +112,7 @@ * @param [width=100] {number} The width of the render texture * @param [height=100] {number} The height of the render texture * @param [scaleMode] {number} See {@link PIXI.SCALE_MODES} for possible values - * @param [resolution=1] {number} The resolution of the texture being generated + * @param [resolution=1] {number} The resolution / device pixel ratio of the texture being generated */ RenderTexture.create = function(width, height, scaleMode, resolution) { diff --git a/src/core/utils/index.js b/src/core/utils/index.js index d47bef9..f87ce18 100644 --- a/src/core/utils/index.js +++ b/src/core/utils/index.js @@ -65,7 +65,7 @@ /** - * get the resolution of an asset by looking for the prefix + * get the resolution / device pixel ratio of an asset by looking for the prefix * used by spritesheets and image urls * * @param url {string} the image path diff --git a/src/interaction/InteractionManager.js b/src/interaction/InteractionManager.js index 1dc5dc9..29757a5 100644 --- a/src/interaction/InteractionManager.js +++ b/src/interaction/InteractionManager.js @@ -174,8 +174,9 @@ /** - * The current resolution + * The current resolution / device pixel ratio. * @member {number} + * @default 1 */ this.resolution = 1; @@ -191,7 +192,7 @@ * another DOM element to receive those events. * * @param element {HTMLElement} the DOM element which will receive mouse and touch events. - * @param [resolution=1] {number} THe resolution of the new element (relative to the canvas). + * @param [resolution=1] {number} The resolution / device pixel ratio of the new element (relative to the canvas). * @private */ InteractionManager.prototype.setTargetElement = function (element, resolution)