Update examples

This commit is contained in:
codeanticode
2012-12-31 00:30:48 +00:00
parent 1e193ca436
commit 4b51e9c4c0
10 changed files with 28 additions and 28 deletions
@@ -12,8 +12,8 @@ void setup() {
// Make a shape
s = createShape();
s.beginShape();
s.fill(0xFF000000);
s.stroke(0xFFFFFFFF);
s.fill(0);
s.stroke(255);
s.strokeWeight(2);
// Exterior part of shape
s.vertex(-100,-100);
@@ -18,7 +18,7 @@ void setup() {
PShape star = createShape();
star.beginShape();
star.noFill();
star.stroke(0xFFFFFFFF);
star.stroke(255);
star.vertex(0, -50);
star.vertex(14, -20);
star.vertex(47, -15);
@@ -35,7 +35,7 @@ void setup() {
PShape path = createShape();
path.beginShape();
path.noFill();
path.stroke(0xFFFFFFFF);
path.stroke(255);
for (float a = -PI; a < 0; a += 0.1) {
float r = random(60, 70);
path.vertex(r*cos(a), r*sin(a));
@@ -45,7 +45,7 @@ void setup() {
// Make a primitive (Rectangle) PShape
PShape rectangle = createShape(RECT,-10,-10,20,20);
rectangle.setFill(false);
rectangle.setStroke(0xFFFFFFFF);
rectangle.setStroke(255);
// Add them all to the group
group.addChild(star);
@@ -15,7 +15,7 @@ void setup() {
path.beginShape();
// Set fill and stroke
path.noFill();
path.stroke(color(255));
path.stroke(255);
path.strokeWeight(2);
float x = 0;
@@ -15,8 +15,8 @@ void setup() {
star = createShape();
star.beginShape();
// You can set fill and stroke
star.fill(color(102));
star.stroke(color(255));
star.fill(102);
star.stroke(255);
star.strokeWeight(2);
// Here, we are hardcoding a series of vertices
star.vertex(0, -50);
@@ -16,7 +16,7 @@ class Star {
s = createShape();
s.beginShape();
// You can set fill and stroke
s.fill(color(255, 204));
s.fill(255, 204);
s.noStroke();
// Here, we are hardcoding a series of vertices
s.vertex(0, -50);
@@ -17,7 +17,7 @@ void setup() {
PShape star = createShape();
star.beginShape();
star.noStroke();
star.fill(color(0,127));
star.fill(0, 127);
star.vertex(0, -50);
star.vertex(14, -20);
star.vertex(47, -15);
@@ -18,14 +18,14 @@ void setup() {
smooth();
shapes[0] = createShape(ELLIPSE,0,0,100,100);
shapes[0].setFill(color(255,127));
shapes[0].setFill(color(255, 127));
shapes[0].setStroke(false);
shapes[1] = createShape(RECT,0,0,100,100);
shapes[1].setFill(color(255,127));
shapes[1].setFill(color(255, 127));
shapes[1].setStroke(false);
shapes[2] = createShape();
shapes[2].beginShape();
shapes[2].fill(color(0,127));
shapes[2].fill(0, 127);
shapes[2].noStroke();
shapes[2].vertex(0, -50);
shapes[2].vertex(14, -20);
@@ -29,8 +29,8 @@ class Wiggler {
// Now make the PShape with those vertices
s = createShape();
s.beginShape();
s.setFill(color(127));
s.stroke(color(0));
s.fill(127);
s.stroke(0);
s.strokeWeight(2);
for (PVector v : original) {
s.vertex(v.x, v.y);