Warning! This page is still in the works.


cc.fillStyle = "color"
cc.beginPath()
cc.arc(x, y, radius, 0*Math.PI, 2*Math.PI)
cc.fill()

In regards to the above, please note the following:

  • beginPath() "creates a new path. Once created, future drawing commands are directed into the path and used to build the path up."

  • cc.fillStyle = "color"
    cc.beginPath()
    cc.arc(x, y, radius, 0*Math.PI, 2*Math.PI)
    cc.fill()

    In regards to the above, please note the following:

  • arc() draws the arc.
  • The 'x,' 'y,' and 'r' should have either a number or variable.
  • The 'x' and 'y' tell the computer where to start drawing the center of the circle.
  • 'r' is the radius of the circle.
  • The '0*Math.PI' and '2*Math.PI' draw the circle.

  • cc.fillStyle = "color"
    cc.beginPath()
    cc.arc(x, y, radius, 0*Math.PI, 2*Math.PI)
    cc.fill()

    In regards to the above, please note the following:

  • fill() Fills the circle according to the color given in fillStyle


  • source: MDN Web Docs