Files
processing4/java/examples/Topics/Create Shapes/PolygonPShapeOOP/PolygonPShapeOOP.pde
2012-05-22 02:05:57 +00:00

27 lines
302 B
Plaintext

/**
* PolygonPShapeOOP.
*
* Wrapping a PShape inside a custom class
*/
// A Star object
Star s;
void setup() {
size(640, 360, P2D);
smooth();
// Make a new Star
s = new Star();
}
void draw() {
background(51);
// Display the star
s.display();
// Move the star
s.move();
}