createGraphics

概要

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

[p5.js] createGraphics

サンプル

def setup
  createCanvas(100, 100)
  @pg = createGraphics(100, 100)
end

def draw
  background(200)
  @pg.background(100)
  @pg.noStroke
  @pg.ellipse(@pg.width / 2, @pg.height / 2, 50, 50)
  image(@pg, 50, 50)
  image(@pg, 0, 0, 50, 50)
end

構文

戻値