canvas quality | Sololearn: Learn to code for FREE!


canvas quality

how to increase the quality of canvas ? Because it is not have enough quality to display sensitive animations

4/25/2019 2:00:51 AM


5 Answers

New Answer


my idea will be to do this in JS var W=canvas.width=innerWidth*4; var H=canvas.height*4; this way quality it will become 4 times the aspect ratio of window ... (make sure u use Variables W and H in your entire code for collisions) then in CSS use canvas width:100% to make sure it dont overflow from viewport width :)


Very_Hard(asm & js & c++ & java & py & (@Hard)) but i think he asked for quality .. not smooth animation 😁..


requestAnimationFrame(func); it might help...


This document then... ctx.imageSmoothingEnabled


Prashanth Kumar you are right I asked for quality . But keyboard resulted it as quantity