Skip to content

Commit

Permalink
Scale before clear
Browse files Browse the repository at this point in the history
  • Loading branch information
soulwire committed Sep 1, 2014
1 parent aa167ae commit 33cac83
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions js/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,15 @@

if ( is2D ) {

if ( context.retina ) {

context.save();
context.scale( ratio, ratio );
}

if ( context.autoclear )

context.clear();

context.save();
context.scale( ratio, ratio );
}

// Draw
Expand All @@ -257,7 +260,7 @@

// Post draw

if ( is2D )
if ( is2D && context.retina )

context.restore();
}
Expand Down
2 changes: 1 addition & 1 deletion js/sketch.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 33cac83

Please sign in to comment.