redraw

概要

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

[p5.js] redraw

サンプル

def setup
  @x = 0
  createCanvas(100, 100)
  noLoop
end

def draw
  background(204)
  line(@x, 0, @x, height)
end

def mousePressed
  @x += 1;
  redraw
end

構文

戻値