CSS Canvas mengatur rasio aspek
canvas.width = canvas.height * (canvas.clientWidth / canvas.clientHeight);
Friendly Hawk
canvas.width = canvas.height * (canvas.clientWidth / canvas.clientHeight);