Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Ignore Styles.
- * Illustration by George Brower.
- *
- * Shapes are loaded with style information that tells them how
- * to draw (the color, stroke weight, etc.) The disableStyle()
- * method of PShape turns off this information. The enableStyle()
- * method turns it back on.
- */
- /* @pjs preload="stars.svg"; */
- PShape star;
- float delta = 0.0;
- void setup() {
- size(640, 360);
- star = loadShape("stars.svg");
- shapeMode(CENTER);
- }
- void draw() {a
- background(102);
- // Draw star
- //star.disableStyle();
- //fill(0, 102, 153, random(100)); // Set the SVG fill to blue
- //stroke(random(255)); // Set the SVG fill to white
- delta += 0.01;
- translate(width/2, height/2);
- scale(sin(frameCount/100.0));
- rotate(delta);
- shape(star);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement