Chapter 17

VRML Controls


CONTENTS

Glide off a Web page into a virtual world through a VRML ActiveX control. Virtual worlds began appearing on the Web following the release of the first version of the Virtual Reality Modeling Language (VRML 1.0) in late 1995. Since then, VRML worlds have evolved into places that include animated virtual objects, three-dimensional sound, and time. Immerse yourself in state-of-the-art Internet virtual realities or present your own virtual worlds by using VRML ActiveX controls.

In this chapter, you will review several of the leading ActiveX controls and Netscape plug-ins that are available for creating your own VRML world.

You will learn all about each of the controls introduced and discover where you can get them. Then you will learn about the properties, events, and methods available for use with each control.

Using VRML

You explore virtual worlds by walking or flying through three-dimensions, which is in sharp contrast to the way you encounter Web pages. Virtual worlds and Web pages are defined using different languages. Virtual worlds on the Internet are typically defined using the Virtual Reality Modeling Language (VRML), whereas Web pages are defined using the Hypertext Markup Language (HTML). Each language requires its own interpreter; which requires a separate browser to view the virtual worlds and Web pages; that is, until VRML ActiveX controls and Netscape plug-ins appeared on the scene.

A VRML ActiveX control or a Netscape plug-in adds a VRML interpreter to your Web browser so that the browser can display both virtual worlds and Web pages. In fact, your browser can display a virtual world in a Web page! Your Web browser switches between the VRML and HTML interpreters, depending on the Internet file's extension (the three letters after the period in the file name). If the file's extension is WRL, your Web browser sends the file's contents through the VRML interpreter provided by the installed VRML ActiveX control or Netscape plug-in. Otherwise, if the file's extension is HTM, the file's contents are interpreted by the browser's own HTML interpreter.

Once you've installed a VRML ActiveX control or Netscape plug-in, virtual worlds appear in your Web browser automatically when you click a hyperlink to a VRML file. However, the different VRML ActiveX controls and Netscape plug-ins that are provided by different companies vary in the details of their implementations. Which VRML ActiveX control or Netscape plug-in you prefer is a matter of taste. You may like how one company implements controls for flying through a world over another company's implementation of these controls. More importantly, they may be compatible with one of two VRML versions, VRML 1.0 or VRML 2.0.

VRML 1.0 worlds are static, three-dimensional spaces filled with static, three-dimensional objects, whereas VRML 2.0 worlds include animated, three-dimensional objects that exhibit behavior. Clearly, VRML 2.0 worlds are more exciting. Also, ActiveX controls and Netscape plug-ins that are VRML 2.0 compatible can display VRML 1.0 virtual worlds, but only ActiveX controls and Netscape plug-ins that are VRML 1.0 compatible cannot display VRML 2.0 worlds.

The Microsoft VRML 1.0 ActiveX Control

The Microsoft VRML 1.0 ActiveX control is an excellent control to start with. It's free and it's easy to download from the Microsoft Web site. Also, because it's free, it's probably the most widely used VRML ActiveX control. This control's main limitation is that it's only compatible with VRML 1.0. In the ActiveX Control Pad, this control is called the VrmlViewer object. The Microsoft VRML 1.0 ActiveX control is available for free at Microsoft's Web site.

Source

Vendor Information:

Microsoft Corporation
http://www.microsoft.com/ie/download/ieadd.htm
One Microsoft Way
Redmond, WA 98052-6399
(800) 426-9400

Figure 17.1 : The Microsoft VRML 1.0 ActiveX control

Properties

Table 17.1  Microsoft VRML 1.0 ActiveX Control Properties

PropertyDescription
CodeBaseThe URL where the Microsoft VRML 1.0 ActiveX control resides. Installation is automatically initiated if the user doesn't already have the control installed on their computer.
DataPathThe URL where the VRML file resides.
HeightThe height of the ActiveX control's window.
IDA name that identifies the particular instance of a control on your Web page. Use this ID in scripts.
LeftThe amount of space between the left edge of the Web page and the left edge of the ActiveX control's window.
TabIndexSets the tab index. The tab index determines the order in which tab stops are visited. If TabStop is set to True, a TabIndex of "0" indicates this is the first tab stop. A TabIndex of "1" indicates this is the second tab stop, and so on.
TabStopSet to True if you want the control window to be a tab stop; otherwise, set it to False.
TopThe amount of space between the top of the Web page and the top of the ActiveX control's window.
VisibleSet to True if you want the control window to be visible; otherwise, set it to False.
WidthThe width of the ActiveX control's window.

Methods

The Microsoft VRML 1.0 ActiveX control does not provide any methods.

Events

The Microsoft VRML 1.0 ActiveX control does not provide any events.

VR Scout ActiveX Control for Windows 95 and Windows NT

The VR Scout ActiveX control provides the same properties as the Microsoft VRML 1.0 ActiveX control listed in Table 17.1. The only difference is that the DataPath property is named the VrmlFile property in VR Scout. VR Scout has an excellent rendering engine. The VR Scout ActiveX control is called the VRScoutCtl Object in the ActiveX Control Pad. You can download the VR Scout ActiveX control and try it free for 30 days. Then you must buy the control to keep using it. Download the control from the Chaco Web site.

Source

Vendor Information:

Chaco Communications, Inc.
http://www.chaco.com/
10164 Parkwood Dr., Suite 8
Cupertino, CA 95014
(408) 996-1115
(408) 865-0571 fax

Figure 17.2 : The VR Scout ActiveX control for Windows 95 and Windows NT

Properties

Table 17.2  VR Scout ActiveX Control Properties

PropertyDescription
CodeBaseThe URL where the VR Scout ActiveX control resides. Installation is automatically initiated if the user doesn't already have the control installed on their computer.
HeightThe height of the ActiveX control's window.
IDA name that identifies the particular instance of a control on your Web page. Use this ID in scripts.
LeftThe amount of space between the left edge of the Web page and the left edge of the ActiveX control's window.
TabIndexSets the tab index. The tab index determines the order in which tab stops are visited. If TabStop is set to True, a TabIndex of "0" means that this is the first tab stop. A TabIndex of "1" means that this is the second tab stop, and so on.
TabStopSet to True if you want the control window to be a tab stop; otherwise, set it to False.
TopThe amount of space between the top of the Web page and the top of the ActiveX control's window.
VisibleSet to True if you want the control window to be visible; otherwise, set it to False.
VrmlFileThe URL where the VRML file resides.
WidthThe width of the ActiveX control's window.

Methods

Table 17.3  VR Scout ActiveX Control Methods

MethodDescription
AboutBoxDisplays a dialog box that describes the VR Scout ActiveX control.
NavigateTakes a fully qualified URL to a virtual world.

Event

Table 17.4  VR Scout ActiveX Control Event

EventDescription
OnProgressThe control fires progress status events so that you can show a progress message.

WIRL 1.20 ActiveX Control

The WIRL 1.20 ActiveX control provides more properties than Microsoft's VRML 1.0 ActiveX control. One of these properties allows you to turn the display of WIRL's control panel interface on and off. WIRL has a long list of options that you can set from a menu. WIRL's 1.20 ActiveX control is called the Wirlocx Control in the ActiveX Control Pad. Download WIRL 1.20 from the VREAM Web site.

Source

Vendor Information:

VREAM, Inc.
http://www.vream.com
223 West Erie Street, Suite 600
Chicago, Illinois 60610
(312) 337-5164
(312) 337-5264 fax

Figure 17.3 : The WIRL 1.20 ActiveX control

Properties

Table 17.5  WIRL 1.2 ActiveX Control Properties

PropertyDescription
CodeBaseThe URL where the WIRL 1.2 ActiveX control resides. Installation is automatically initiated if the user doesn't already have the control installed on their computer.
Control PanelSet to True if you want WIRL's control panel displayed; otherwise, set it to False.
HeightThe height of the ActiveX control's window.
IDA name that identifies the particular instance of a control on your Web page. Use this ID in scripts.
LeftThe amount of space between the left edge of the Web page and the left edge of the ActiveX control's window.
RendererThis property remains exposed but is no longer implemented. (It was used to switch between different rendering libraries.)
TabIndexSets the tab index. The tab index determines the order in which tab stops are visited. If TabStop is set to True, a TabIndex of "0" means that this is the first tab stop. A TabIndex of "1" means that this is the second tab stop and so on.
TabStopSet to True if you want the control window to be a tab stop; otherwise, set it to False.
TopThe amount of space between the top of the Web page and the top of the ActiveX control's window.
VisibleSet to True if you want the control window to be visible; otherwise, set it to False.
WidthThe width of the ActiveX control's window.
WorldThe URL where the VRML file resides.

Method

Table 17.6  WIRL 1.20 ActiveX Control Method

MethodDescription
AboutBoxDisplays a dialog box that describes the WIRL 1.20 ActiveX control.

Events

The WIRL 1.20 ActiveX control does not provide any events.