【p5.js】Canvasを作成する

createCanvas関数でスケッチを描画するためのcanvas要素を作成する。

function setup() {
  createCanvas(640, 480);
}

function draw() {
  background("black");
}

今回は、以下のように出力される。

p5.js Web Editor
A web editor for p5.js, a JavaScript library with the goal of making coding accessible to artists, designers, educators,...

参考

reference | p5.js
p5.js a JS client-side library for creating graphic and interactive experiences, based on the core principles of Process...
タイトルとURLをコピーしました