WHS.PointLight
creates a light at a specific position in the scene. The light shines in all directions (roughly similar to a light bulb.)
It has the same options as WHS.AmbientLight
in light
paramater, but it also supports position
and target
paramaters.
new WHS.PointLight( {
light: {
color: 0xff0000,
intensity: 3,
distance: 1000
},
position: [10, 20, 10],
target: {
x: 5
}
}).addTo(world);
This light will fall down from vec3(10, 20, 10) to vec3(5, 0, 0)
Updated over 7 years ago