soulwire/sketch.js

Device pixel ratio support? Sketch output looks blocky on retina displays.

Closed this issue · 6 comments

Will there be any baked in device pixel ratio support for retina displays? Or is it recommended to come up with our own solutions to bump the canvas up on retina devices?

Cheers.

Hi,

You can set the retina flag. It'll be slower since you need to draw more pixels, but will look nice.

Sketch.create({ retina: true, draw: /* ...etc */ });

An older build had automatic detection, something I'm going to add back in (you'll pass 'auto' to the retina flag), but for now if you want this support this just pass true (or something like window.devicePixelRatio > 1)

Took me a while :) The best way to use this now is just to pass true if you want automatic retina support since this will prompt sketch to scale everything based on devicePixelRatio, which of course would just resolve to 1 on non-retina screens anyway.

Haha :) Sounds great! Cheers, Justin! I'll have a tinker later!
I'm using it to great effect here: http://wildflame.co.uk/

Very nice! Can I add it to the showcase?

On Wed, Aug 27, 2014 at 11:38 AM, Scotty Vernon notifications@github.com
wrote:

Haha :) Sounds great! Cheers, Justin! I'll have a tinker later!
I'm using it to great effect here: http://wildflame.co.uk/


Reply to this email directly or view it on GitHub
#51 (comment).

Sure!