loop

概要

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

[p5.js] loop

サンプル

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

def draw
  background(204);
  @x += 0.1
  if @x > width
    @x = 0
  end
  line(@x, 0, @x, height)
end

def mousePressed
  loop
end

def mouseReleased
  noLoop
end

構文

戻値