resizeCanvas

概要

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

[p5.js] resizeCanvas

サンプル

def setup
  createCanvas(windowWidth * 0.8, windowHeight * 0.8)
end

def draw
  background(0, 100, 200)
end

def mouseClicked
  resizeCanvas(windowWidth * 0.4, windowHeight * 0.4)
end

構文

戻値