def setup ... end

概要

p5.jsリファレンス(参考情報)

[p5.js] setup()

サンプル

def setup
  @a = 0
  background(0)
  noStroke
  fill(102)
end

def draw
  @a += 1
  rect(@a % width, 10, 2, 80)
end

構文

戻値