A few subtle draw performance fixes

By rounding all floated values to whole numbers... we can help a tad
with aliasing and the like
This commit is contained in:
Amadeus Demarzi
2014-07-24 21:37:48 -07:00
parent 9d615b5a25
commit f6cd6434ae
4 changed files with 19 additions and 13 deletions

View File

@@ -55,8 +55,8 @@ Engine.Particle.Fixed.prototype = {
// Draw a circle - far less performant
ctx.beginPath();
ctx.arc(
this.pos.x * scale,
this.pos.y * scale,
this.pos.x * scale >> 0,
this.pos.y * scale >> 0,
this.radius * scale,
0,
Math.PI * 2,