def setup
createCanvas(100, 100, WEBGL)
end
def draw
background(0)
noStroke
locX = mouseX - width / 2
locY = mouseY - height / 2
ambientLight(60, 60, 60)
pointLight(255, 255, 255, locX, locY, 50)
specularMaterial(250)
translate(-25, 0, 0)
shininess(1)
sphere(20)
translate(50, 0, 0)
shininess(20)
sphere(20)
end
specularMaterialメソッドの光沢度を設定します。
| 引数名 | 内容 | 備考 | オプション | デフォルト値 |
|---|---|---|---|---|
| shine | 光沢度 |
なし
・光沢度のデフォルト値および最小値は「1」です。