Added PIXI.canvas global object which allows for tighter configuration of the canvas renderer. Allows the dev to control if fillRect / clearRect is called (as it's not needed for lots of games and can help perf slightly on legacy devices). Also added PX_ROUND boolean. If true (default is false) it will Math.floor the x/y values on the transform, this stops interpolation when Sprites are rendered at non-pixel values, keeping pixel art crisp. Also helps performance on older mobiles. I removed the view.style.backgroundColor as it was never set, mostly commented-out and is unreliable as hell on Android anyway :( (which I guess is why it had been replaced with the fillRect instead).
1 parent 3bfa2e2 commit b757e652e9827c2c2de7c5ed66bdb7b7d39e46b3
@photonstorm photonstorm authored on 8 Feb 2014
Showing 4 changed files
View
src/pixi/Pixi.js
View
src/pixi/display/Sprite.js
View
src/pixi/display/SpriteBatch.js
View
src/pixi/renderers/canvas/CanvasRenderer.js