pointLight

概要

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

[p5.js] pointLight

サンプル

# 初期設定用のコード (your setup code here)
def setup
  createCanvas(100, 100, WEBGL)
end

# 画面描画用のコード (your draw code here)
def draw
  background(0)
  # move your mouse to change light position
  locX = mouseX - width / 2
  locY = mouseY - height / 2
  pointLight(250, 250, 250, locX, locY, 50)
  noStroke
  sphere(40)
end

構文

戻値