To fill a shape with KineticJS, we can set the fill property when we instantiate a shape, or we can use the setFill() method. KineticJS supports colors, patterns, linear gradients, and radial gradients.
Instructions: Mouseover each pentagon to change its fill. You can also drag and drop the shapes.
Code Editor
Modified on April 9th, 2013
by Eric Rowell