imageMode

概要

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

[p5.js] imageMode

サンプル

※以下のサンプルの実行の際には、rbCanvas/p5エディタ上で
 適当な画像ファイルの取り込みをおこなってください。

def setup
  img = loadImage("fruit.png")
  background(50)
  imageMode(CORNER)
  image(img, 10, 10, 50, 50)
end
def setup
  img = loadImage("fruit.png")
  background(50)
  imageMode(CORNERS)
  image(img, 10, 10, 90, 40)
end
def setup
  img = loadImage("fruit.png")
  background(50)
  imageMode(CENTER)
  image(img, 50, 50, 80, 80)
end

構文

戻値