Use a spotlight

From JReality Wiki
Jump to: navigation, search

Source file: SpotLightDemo

JavaDoc: SpotLight

Run as Java webstart

This example show how to add a spotlight to your scene.

How to use the demo: When the cursor is over the red cylinder representing the spotlight, dragging with left mouse button depressed will rotate the spotlight. If the cursor isn't over the red cylinder, such dragging will rotate the whole scene.

Look in the code to see how the default lights are first removed from the scene graph so that only the spotlight effects the shading.


Previous: Write a texture dragging tool Developer Tutorial: Contents Next: Use the mouse-over input slot