soulwire / sketch.js

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

when retina true, after resize window, canvasRendingContext will be scale large #94

Open kkxlkkxllb opened 7 years ago

kkxlkkxllb commented 7 years ago

when retina true, after resize browser window, canvasRendingContext will be scale large

ripexz commented 7 years ago

Ran into this too, as a workaround I added a callback on resize to scale down again by 1 / window.devicePixelRatio (but only after initial setup resize is done). Would be nice to see a fix for this or I'll submit a PR when I get around to it. 😄