Points Of Light
Node
PointLight • Attributes
Description
A sphere "hovering" above a flat box with a PointLight directly in front of the avatar looking forward. The avatars headlight is off. When rotating the scene, the light will maintain its relative position to the sphere.
VRIGNETTE Notes
This is the X3D equivilent to a light bulb. When using PointLight, there is no visible light source object rendered.
Example
Rotate the vrignette to view the geometry.
Code
<x3d> <scene> <worldInfo title="X3D PointLight Example"> </worldInfo> <navigationInfo headlight="false"> </navigationInfo> <viewpoint position="0.0 4.0 20.0" centerOfRotation="0.0 0.0 0.0"> </viewpoint> <directionalLight on="false"> </directionalLight> <pointLight color="0.5 1.0 0.5" intensity="1.0" location="0.0 4.0 20.0" radius="30"> </pointLight> <!-- Sphere --> <transform translation="0.0 5.0 0.0"> <shape> <appearance> <material diffuseColor="1.0 1.0 1.0"> </material> </appearance> <sphere radius="2.0"> </sphere> </shape> </transform> <!-- Floor --> <shape> <appearance> <material diffuseColor="1.0 1.0 1.0"> </material> </appearance> <box size="10.0 0.25 10.0"> </box> </shape> <background skyColor="0.20 0.20 0.20" groundColor="0.20 0.20 0.20"> </background> </scene> </x3d>