clearScreen
This function clears drawing screen. You can experience that on the playground page. This code below first clear the screen, then draw polygon points.
polygon = createPolygon('square'); // create a square shape polygon polygon.draw(); clearScreen(); // clears all objects drawed before polygon = createRandomPolygon();