参考 imageLight()

imageLight()

从图像创建一个环境光。

imageLight() 模拟了从所有方向照射的光。效果就像将绘图放置在一个以图像为纹理的巨大球体的中心。图像的漫反射光会受到 fill() 的影响,而镜面反射则受到 specularMaterial()shininess() 的影响。

参数 img 是要用作光源的 p5.Image 的对象。

示例

语法

imageLight(img)

参数

img
p5.image:

使用作为光源的图像。

Notice any errors or typos? Please let us know. Please feel free to edit src/webgl/light.js and open a pull request!

相关参考