Untitled
unknown
plain_text
2 years ago
764 B
6
Indexable
let LineCount = [12,12*5,12*5*60] let LineSize = [4,8,16] for (let c = 0; c < 3; c++) { let angle = 2 * Math.PI / LineCount[c]; for (let ik = 0; ik < LineCount[c]; ik++) { let x = 450 + 1 * Math.cos(ik * angle); let y = 450 + 1 * Math.sin(ik * angle); ctx.moveTo(x/LineSize[c], y/LineSize[c]) ctx.strokeStyle = "rgb(0,200,0)" ctx.lineWidth= 2; ctx.beginPath(); ctx.moveTo(x,y) ctx.stroke() ctx.moveTo(0,0) } }
Editor is loading...