๋ชฉ๋ก2022/02/03 (3)
whatisthis?
GitHub - thisisyjin/paintJS: Painting Board made with vanila JS (ref. NomadCoder) Painting Board made with vanila JS (ref. NomadCoder) - GitHub - thisisyjin/paintJS: Painting Board made with vanila JS (ref. NomadCoder) github.com ** ๊นํ์ ์ ๋ก๋ ํด๋์๋ค. index.html Fill Save style.css @import "./reset.css"; body { background-color: #f6f9fc; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Rob..
color.addEventListener("click", handleColorClick)); if (range) { range.addEventListener('input', handleRangeChange); } mode.addEventListener('click', handleModeClick); canvas์ ๊ทธ๋ฆผ์ ๊ทธ๋ฆฌ๊ณ , ์ฐํด๋ฆญ์ ๋๋ฌ๋ณด๋ฉด ์๋์ ๊ฐ์ด ๋ฌ๋ค. ์ด๋ฏธ์ง๋ฅผ ๋ค๋ฅธ ์ด๋ฆ์ผ๋ก ์ ์ฅ์ ํด๋ฆญํ๋ฉด >>์์ ๊ฐ์ด ์ด๋ฆ์ ์ง์ ํด์ ์ ์ฅ ๊ฐ๋ฅํ๋ค. ์ด๋, ์ฐ๋ฆฌ๊ฐ ์บ๋ฒ์ค์ ๋ฐฑ๊ทธ๋ผ์ด๋๋ฅผ ์ค์ ์ํด์ ๋ฐฐ๊ฒฝ์์ด ํฌ๋ช ์ผ๋ก ์ ์ฅ๋๋ ๋ฒ๊ทธ๊ฐ ์๋ค. ๋ฐ๋ผ์, ์ด๊ธฐํ ๋ถ๋ถ์ ๋ค์๊ณผ ๊ฐ์ ์ฝ๋๋ฅผ ์ถ๊ฐํ๋ค. ctx.fillStyle = "white"; ctx.fillRect(0, 0, canvas.width, canvas..
javaScript. Painting App ๊ตฌํ - (5) Brush Size javaScript. Painting App ๊ตฌํ - (4) Change Color javaScript. Painting App ๊ตฌํ - (3) 2D context controls__r.." data-og-host="mywebproject.tistory.com" data-og-source-url="htt.." data-og-host="mywebp.. mywebproject.tistory.com ์ง๋ ํ์ฐจ ์งํ์ฌํญ - ๋ธ๋ฌ์ ์ฌ์ด์ฆ ์กฐ์ function changeSize(event) { // const size = range.value; const size = event.target.value; ctx.lineWidth = ..