This example shows how 3D can make "efficient use of screen real estate." The embed size was set to 200 by 180 in the Generate VRML screen. Also, an additional parameter was added to the embed tag, requesting the VRML viewer to not display its dashboard. Walking should still be possible with the mouse, and a series of viewpoints are defined to aid in moving down the hall. The embed element in the HTML source for this page is:
<embed src="LongHall.wrl" width=200 height=180 vrml-dashboard="FALSE">
The page was also made red to match the background color of the scene, to create a smoother "inclusion" effect. The HTML body element for this page is:
<body bgcolor="#ff0000"> -or- <body bgcolor="red">
Sometimes it is desirable to adjust various parameters in the VRML of the CiteMap. Fortunately, CiteMap files are designed to be readable and fairly easy to edit. As an example, for the scene above, the default initial viewpoint was adjusted to put the view closer to the scene:
Viewpoint {
description "Initial"
position 0 0.4 12.5 # changed from 0 0.4 15
orientation 1 0 0 0
}
The CiteMap Label was used to put some text on the back wall. This text
wound up to be a little too small to read, mainly because of the small
window size. To edit, we searched on the word "glad" and found the
appropriate data block:
geometry Text {
string ["Hi - Glad you got here.",
"Have a nice trip?"]
fontStyle FontStyle {
size 1.75 #this was 1.0 initially
family "SANS" style "BOLD" #changed TYPEWRITER to SANS
justify ["MIDDLE"]
}
}
Making the size a little larger (1.75 instead of 1.0) and changing
the family to SANS made the text readable. The lines that have the
# symbols are VRML comments: any text after the # on a VRML line
will be ignored.
This ability to "get small" is a popular trend these days, with increasing attention to the use of VRML for ad banners and other embedded content.
Important note: be sure to run VRMLDataTrimmer on your scenes! The scene above has over 20 objects, some of which are fairly complex. The untreated file size is almost 150K, but after running through VDT, the final .wrl file size is a mere 35K. It's easy to run VDT. After creating a CiteMap, and editing it to get it just right, execute VDT via the Start Menu: Programs --> TriVista --> VRMLDataTrimmer. The code should automatically have the correct filename (e.g., LongHall.wrl) if this was the last CiteMap you wrote with CMB. VDT will create a filename like M_LongHall_gz.wrl. Test this in your browser. If it looks OK, replace the unzipped LongHall.wrl with this compressed version. For example:
rename M_LongHall_gz.wrl LongHall.wrl (may need to delete, move or rename original first)
Here is the CiteMap Builder CMB file for this example: LongHall.cmb (right click to download).
p.s. Sorry if all this red gave you a headache!