Agezao/confetti-js

Retina support

Closed this issue · 2 comments

The circles are blurry on retina devices/zoomed, is there a way around this?

Think I have solved this...

From line 134 on index.js...

//canvas dimensions

cv.width = appstate.width * 2;

cv.height = appstate.height * 2;

cv.getContext('2d').scale(2,2)

particles = [];

Double the width and height then scale down by 2. Can make PR if you like!

Hi Adam! Thanks for reporting.

Can you help me with some steps to reproduce and troubleshoot your real-case scenario? This would really help me:

  1. Json setting to be inputed into confetti-js
  2. Canvas settings (width, height)

At zoomed devices I don't think that there's much to do. But I agree that retina devices should be better supported.

Thanks!