From ae052105fc4243ab54d982c6e79be67b00966b68 Mon Sep 17 00:00:00 2001 From: Kotaro Hirakawa <23e1141@andrew.ac.jp> Date: Fri, 1 Nov 2024 09:52:02 +0900 Subject: [PATCH] let --- sketch.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/sketch.js b/sketch.js index 2c2e862..531a621 100644 --- a/sketch.js +++ b/sketch.js @@ -1,3 +1,6 @@ +let dia = 20; +let y = 80; + function setup() { createCanvas(400, 200); background(220); @@ -7,9 +10,12 @@ function setup() { function draw() { fill(128, 128, 0); noStroke(); - - // ここで dia を 60 に設定する -circle(100, 100, dia); -circle(200, 100, dia); -circle(300, 100, dia); -} \ No newline at end of file + + circle(100, y, dia); +circle(200, y, dia); +circle(300, y, dia); +} +y = 120; +circle(100, y, dia); +circle(200, y, dia); +circle(300, y, dia); \ No newline at end of file