mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
some fixes in PShape examples
This commit is contained in:
@@ -15,6 +15,7 @@ class Star {
|
||||
// You can set fill and stroke
|
||||
s.fill(102);
|
||||
s.stroke(255);
|
||||
s.strokeWeight(2);
|
||||
// Here, we are hardcoding a series of vertices
|
||||
s.vertex(0, -50);
|
||||
s.vertex(14, -20);
|
||||
@@ -33,8 +34,8 @@ class Star {
|
||||
void move() {
|
||||
// Demonstrating some simple motion
|
||||
x++;
|
||||
if (x > width) {
|
||||
x = 0;
|
||||
if (x > width+100) {
|
||||
x = -100;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user