Skip to content

Instantly share code, notes, and snippets.

@CodeDraken
Created December 11, 2019 21:31
Show Gist options
  • Save CodeDraken/53043d97a5d0ad71a8c085fbe7a0ce9c to your computer and use it in GitHub Desktop.
Save CodeDraken/53043d97a5d0ad71a8c085fbe7a0ce9c to your computer and use it in GitHub Desktop.
draw (ctx) {
const { x, y, props } = this
ctx.save()
ctx.beginPath()
ctx.fillStyle = props.color
ctx.arc(
x, y,
props.radius,
0, Math.PI * 2
)
ctx.fill()
ctx.restore()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment