From 4b0cb9cd8b9c93db5af5d6705183e2c222b3843c Mon Sep 17 00:00:00 2001 From: ae10u <142628398+ae10u@users.noreply.github.com> Date: Wed, 20 Sep 2023 12:42:52 -0700 Subject: [PATCH] Update Lightning.pde --- Lightning.pde | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Lightning.pde b/Lightning.pde index 4fa770ac..7b214876 100644 --- a/Lightning.pde +++ b/Lightning.pde @@ -2,7 +2,7 @@ int startX=150; int startY=0; int endX=150; int endY=0; -float strokeWeight= 4.0; +float strokeW= 4.0; void setup() { @@ -20,15 +20,15 @@ void draw() fill(53, 57, 53, 10); rect(0, 0, 300, 300); stroke(255, 230, 0); - strokeWeight(strokeWeight); + strokeWeight(strokeW); endX = startX + (int)(Math.random()*40) - 20; endY = startY + (int)(Math.random()*35); line(startX, startY, endX, endY); startX = endX; startY = endY; - if (strokeWeight > 1) + if (strokeW > 1) { - strokeWeight = strokeWeight - 0.25; + strokeW = strokeW - 0.25; } } void mousePressed() @@ -43,6 +43,6 @@ void mousePressed() endX = startX; startY = 0; endY = 0; - strokeWeight = (int)(Math.random()*5+1); + strokeW = (int)(Math.random()*5+1); background(220, 220, 200); }