Creates an ambient light from an image.
imageLight()
simulates a light shining from all directions. The effect is like placing the sketch at the center of a giant sphere that uses the image as its texture. The image's diffuse light will be affected by fill() and the specular reflections will be affected by specularMaterial() and shininess().
The parameter, img
, is the p5.Image object to use as the light source.
Examples
Syntax
imageLight(img)
Parameters
img
image to use as the light source.
Notice any errors or typos? Please let us know. Please feel free to edit src/webgl/light.js and open a pull request!