Specification of lights in a room file

The following code demonstrates how to specify directional lights, positional lights and spot lights in a room file.


01 <?xml version="1.0" encoding="ISO-8859-1"?>
02 
03 <room scriptid="room1" scriptfile="room1.bsh">
04   <lights>
05     <directional nr="0">
06       <direction x="0.048722554" y="0.97445107" z="-0.21925148"/>
07       <ambient r="0.0" g="0.0" b="0.0" a="1.0"/>
08       <diffuse r="1.0" g="1.0" b="1.0" a="1.0"/>
09     </directional>
10     <positional nr="1">
11       <position x="0.0" y="50.0" z="20.0"/>
12       <ambient r="0.0" g="0.0" b="0.0" a="1.0"/>
13       <diffuse r="1.0" g="1.0" b="1.0" a="1.0"/>
14     </positional>
15     <spot nr="2">
16       <position x="20.0" y="10.0" z="-30.0"/>
17       <ambient r="0.1" g="0.1" b="0.1" a="1.0"/>
18       <diffuse r="0.5" g="0.75" b="1.0" a="1.0"/>
19       <rotation x="47.5" y="47.5"/>
20       <cutoff value="15.0"/>
21       <exponent value="35.0"/>
22     </spot>
23   </lights>
24 </room>
Java2html