let canvas = document.getElementById('id-canvas')
let ctx = canvas.getContext('2d')
function clear() {
ctx.clearRect(0, 0, canvas.width, canvas.height)
}
'html | javascript' 카테고리의 다른 글
html javascript - array join (0) | 2024.08.18 |
---|---|
html javascript - input txt file (0) | 2024.08.18 |
html javascript - canvas size 화면에 꽉 채우기 (0) | 2024.08.18 |
html javascript - canvas size 화면에 맞추기 (0) | 2024.08.18 |
html javascript - date string format (1) | 2024.08.18 |