diff --git a/.gitignore b/.gitignore index 4c432e8..2c9253a 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,6 @@ node_modules docs/ examples_old/ + +# jetBrains IDE ignores +.idea diff --git a/.gitignore b/.gitignore index 4c432e8..2c9253a 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,6 @@ node_modules docs/ examples_old/ + +# jetBrains IDE ignores +.idea diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 2289d87..d9b2e2d 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -21,6 +21,7 @@ * @param [options.resolution=1] {number} 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. */ function CanvasRenderer(width, height, options) { @@ -55,7 +56,7 @@ * * @member {boolean} */ - this.roundPixels = false; + this.roundPixels = options.roundPixels === true; /** * Tracks the active scale mode for this renderer. @@ -219,7 +220,7 @@ //reset the scale mode.. oddly this seems to be reset when the canvas is resized. //surely a browser bug?? Let pixi fix that for you.. this.currentScaleMode = CONST.SCALE_MODES.DEFAULT; - + if(this.smoothProperty) { this.context[this.smoothProperty] = (this.currentScaleMode === CONST.SCALE_MODES.LINEAR);