Coffeescript Game Tutorial Action 2014-06-27 ProgrammingCoffeeScript Canvas, CoffeeScript, Programming 원이 대각선 아래로 움직이는 코드이다. 123456789101112131415161718192021222324x = 150y = 150dx = 2dy = 4ctx = nullinit = -> canvas = document.getElementById("myCanvas") ctx = canvas.getContext("2d") return setInterval(draw, 10)draw = -> ctx.clearRect(0, 0, 300, 300) ctx.beginPath() ctx.arc(x, y, 10, 0, Math.PI*2, true) ctx.closePath() ctx.fill() x += dx; y += dy;window.onload = -> init() Reference Newer Coffeescript Game Tutorial Add Some Color Older Coffeescript Game Tutorial Libary an Interlude