soulwire / sketch.js

Cross-Platform JavaScript Creative Coding Framework
MIT License
4.09k stars 430 forks source link

Added max_pixels option #25

Closed isaksky closed 11 years ago

isaksky commented 11 years ago

Rendering can get a little slow if you're running a game fullscreen on a high resolution display, so I added an option to set the max_pixels you are willing to render. When set, sketch limits how high it sets the canvas and drawing context width and height to numbers so that the total number of pixels does not exceed this number. The scaling is then handled with .style.height and .style.width instead, so that stuff can still be fullscreen.

It is off by default.