by 勝矢夢子

2024-05-06 19:31:53

sketch.js

function setup() {
  createCanvas(600, 600); //ウィンドウサイズの指定
  background(200, 200, 200); //背景色を指定して1回だけ塗る。
  stroke(0, 0, 0);

  fill(255, 255, 255);
  triangle(70, 200, 530, 200, 300, 400);

  noFill();
  stroke(0, 255, 0);

  noFill();

  stroke(0, 0, 0);
  fill(255, 255, 255);
  circle(300, 300, 400);

  angleMode(DEGREES);
  arc(210, 320, 80, 80, 0, 180, PIE);
  noStroke();
  circle(210, 320, 80);

  stroke(0, 0, 0);
  angleMode(DEGREES);
  arc(390, 320, 80, 80, 0, 180, PIE);
  noStroke();
  circle(390, 320, 80);

  fill(255, 170, 205);
  angleMode(DEGREES);
  arc(300, 300, 400, 400, 180, 0, PIE);

  fill(0, 0, 0);
  circle(300, 420, 10);
}

function draw() {
  // background(0, 0, 0); //背景色を指定して1回だけ塗る。
}

function mousePressed() {
  //マウスのボタンが押し下げられた時の処理
}

function mouseReleased() {
  //マウスのボタンが離された時の処理
}

function keyPressed() {
  if (key == "s") {
    saveCanvas();
  }
}

ファイル一覧

  • index.html
  • p5.min.js
  • p5.sound.min.js
  • sketch.js
  • style.css

ファイルを再アップロード


サムネイル画像を変更