1 2 3 4 5 6 7 8 9 10 11
let canvas = document.getElementById("viewport"); let ctx = canvas.getContext("2d"); //var win_height = 600; //var win_width = 800; canvas.height = 600; canvas.width = 800; console.log(canvas.width, canvas.height); canvas.style.background = "#bbf";