9.5.2

Table Of Contents
108 CHAPTER 3
CONFIGURATION 109
Integrating UZR les in HTML
When editing the UZR lename, keep in mind that it is case sensitive.
Like standard image les, UZR les can be included in HTML web pages. To view the 3D model with
a browser, the Java applet le ‘uzrviewer.jar’ must be provided. If you export to UZR, an HTML le is
written. This le can be edited manually and the following parts are of special interest.
<input type=”radio” checked=”checked” name=”Camera” onclick=”setCamera(this.value)” value=”Camera xy”> Camera xy<br>
The above part denes the JavaScript controls that activate the different exported cameras. You can
edit the number and names of the available camera position JavaScript controls. The names given to
the camera positions in CINEMA 4D are included automatically.
<input type=”checkbox” checked=”checked” name=”Lights” onclick=”toggleLight(this.value)” value=”Light xy”> Light xy<br>
The above part denes the JavaScript controls that activate the different exported light sources. You
can edit the number and names of the available light sources JavaScript controls. The names given to
the light sources in CINEMA 4D are included automatically.
<input type=”button” name=”Start” onclick=”startAnim()” value=”Start”>
<input type=”button” name=”Reset” onclick=”resetNodes()” value=”Reset”>
The above part is written if you include the JavaScript controls in the UZR export. Two buttons are
integrated in the HTML le: a Start button that starts an existing animation, and a Reset button that
resets the current camera to its original position. These buttons can also be edited manually. You can
change the names of the buttons (e.g. Back instead of Reset). You can also delete one or both buttons,
which is useful, for example, if no animation is available.
<applet name=”Viewer” archive=”uzrviewer.jar” code=”uzrviewer.Viewer.class” width=”600” height=”400”>
<param name=”scene” value=”xy.uzr”>
</applet>
The above part denes the UZR le that is loaded into the applet window (the ‘scene’ parameter),
as well as some display settings (‘width’ and ‘height’ parameters). Additionally, the following applet
parameters can be dened:
<param name=”nocamrt” value=”true/false”>
<param name=”bgcolor” value=”#XXXXXX”>
<param name=”s_cameras” value=”xy”>
<param name=”s_lights” value=”xy”>
<param name=”s_reset” value=”xy”>
<param name=”s_start” value=”xy”>
<param name=”camera” value=”Camera XY”>
<param name=”anim” value=”true/false”>
<param name=”loop” value=”true/false”>
nocamrt
The UZR le display can be controlled with the mouse. If the ‘nocamrt’ parameter is set to true, a
rotation of the cameras is disabled. If the ‘nocamrtparameter is set to false, the exported cameras
can be rotated, allowing the user an advanced 3D navigation.