This page is a comparison of the same shapes being drawn with three web based 2D drawing approaches. You can see the code here

renderer small scaled scaled, css image-rendering: pixelated
p5.js
p5.js WEBGL mode
canvas api
pixi