Aereal Inc. presents...

VRML/Java/Javascript FAQ

(copyright 1996) by Adrian Scott

Frequently Asked Questions about the intersection of VRML, Java and Javascript

This VRML / Java / Javascript FAQ is located at http://www.aereal.com/faq. Please send updates and suggestions to faq@aereal.com. Thanks. Note: This is a bit old these days.

Getting Started

Where can I get a VRML Browser?

What computer setup do I need to experience VRML?

What setup do I need to experience Javascript with VRML?

What setup do I need to experience Java with VRML?

Where can I download the Java software development kit?

Information Sources

Where are the VRML/Java/Javascript FAQ's?

Where are VRML/Java/Javascript newsgroups?

What are some books and publications that cover VRML and Java?

Examples

Where are examples of VRML and Java?

Where are examples of VRML and Javascript?

Where are examples of VRML?

Server Configuration

What is the MIME type for VRML?

I created my VRML file and put it on my Web server, but when I load it, it appears as text. What's going on?

Creating a VRML World

How can I create a VRML world really quickly?

Java/JavaScript/VRML Workings

How does Java interact with VRML?

How does JavaScript interact with VRML?

What Java APIs are available for VRML?

How does VRML relate to Java3D?

Companies

What are some companies involved with the intersection of Java and VRML?


The Answers

Getting Started

Where can I get a VRML Browser?

You can check the VRML Repository. Some popular browsers include Netscape's Live3D for PC, Virtus Voyager for Mac, and Webspace for SGI.

What computer setup do I need to experience VRML?

At least a 486/50 PC w/ 8 Megs, or a Mac, or a Unix workstation. I'd recommend the PC platform.

What setup do I need to experience Javascript with VRML?

Netscape 2.0 and a VRML plug-in.

What setup do I need to experience Java with VRML?

Basically, a 486/50 w/8 megs minimum PC with Netscape 2.0 and Live3D, or an SGI with Netscape 2.0, Webspace and maybe Cosmo??. I'd recommend having 16 MBs and a Pentium, though you can do without if need be.

Where can I download the Java software development kit?

From Javasoft.


Information Sources

Where are the VRML/Java/Javascript FAQ's?

VRML FAQ

Java FAQs

Where are VRML/Java/Javascript newsgroups?

What are some books and publications that cover VRML and Java?

VRML Books: VRML Browsing and Building Cyberspace by Mark Pesce, from New Riders. The VRML SourceBook by Nadeau, Moreland and... from John Wiley?? Special Edition Using VRML by Bernie Roehl and Stephen Matsuba from Que. There's a book on Virtus Voyager from Hayden??

Java Books: Teach Yourself Java in 21 Days by Laura Lemay from Samsnet is good. Java in a Nutshell by David Flanagan from O'Reilly. Programming in Java book by Tim Ritchie from New Riders?? Also Presenting Java by John December from SamsNet. Hooked on Java from Addison Wesley.

Web Books: I've written VRML chapters for World Wide Web Unleashed, HTML & CGI Unleashed, Java Unleashed and Web Publishing Unleashed, available from Samsnet.

Java publications: There's Java World and also a bi-monthly called Java Report.

VRML publications: VRML World and ZD3D.

VRML e-list: You can get information on the VRML mailing list by e-mailing to:

majordomo@wired.com
with the message
info www-vrml
Be forewarned -- there are easily 30 or more messages a day on the list.


Examples

Where are examples of VRML and Java?

Dimension X and Construct have used Java for multi-user worlds.

TXT2VRML is a Java Applet that'll convert some text of a certain format into VRML.

Where are examples of VRML and Javascript?

A rough example of using Javascript to create VRML L-systems (artificial life stuff) VRML/Javascript L-Systems

Adrian's Grapher lets you graph math functions and their derivatives using JavaScript and VRML.

There's also a little JavaScript page that lets you convert degrees and radians back and forth, something useful for people creating vrml by hand.

Where are examples of VRML?

A good starting point is Aereal BOOM!, which has more than 1000 VRML URLs. Another place to try out is Serch.


Server Configuration

What is the MIME type for VRML?

x-world/x-vrml
This may eventually change to model/vrml when it is approved by the IETF.

I created my VRML file and put it on my Web server, but when I load it, it appears as text. What's going on?

This is one of the most common problems people have. The source of the problem is usually not your VRML world, but the server of your internet service provider (ISP). They most likely don't have the VRML MIME type set up on their server.

They need to set up the

x-world/x-vrml
MIME type for filename extension
.wrl

If you would also like to use gzip-compressed worlds, you should ask them to add

Content-encoding: x-gzip
for extensions
.gz


Creating a VRML World

How can I create a VRML world really quickly?

Try out Aereal's Instant VRML Home World, for a web-based little VRML tool.

Another VRML authoring tool is Paragraph's Virtual Home Space Builder.


Java/JavaScript/VRML Workings

How does Java interact with VRML?

Paper Software/Netscape is developing a Java API for VRML in their Live3D implementation of (what will be) VRML 2.0. In the preliminary versions of the API, you DEF a VRML node, e.g.

DEF fighter1 WWWInline { name "fighter1.wrl" }
and then that fighter1 you DEF'd becomes an instance of a class that has various methods available. For instance, you might be able to call methods something like:

fighter1.addChild();
fighter1.translate();
and so on.

How does JavaScript interact with VRML?

To use JavaScript with VRML, you want to create an HTML file with frames, with one frame -- let's call it vrmlframe -- for your VRML output. Here's what the overall HTML frames file might look like:

<HTML>
<HEAD>
<FRAMESET cols="30%, 70%">
<FRAME NAME="htmlframe" SRC="dummy.html">
<FRAME NAME="vrmlframe" SRC="blank.wrl">
</FRAMESET>
</HEAD>
</HTML>
Then your dummy.html will contain the JavaScript to create your world, and maybe some HTML to get things going. A simple function could be as follows:

function do_vrml() {
	vrml = parent.vrmlframe;
	vrml.document.open( "x-world/x-vrml" );
	vrml.document.writeln("#VRML V1.0 ascii");
	vrml.document.writeln("Separator { AsciiText { string \"hello funky VRML world\" } }");
	vrml.document.writeln("}");
	vrml.document.close();
}

What Java APIs are available for VRML?

Paper Software/Netscape is developing a Java API for their Live3D implementation of VRML. Dimension X has a VRML toolkit called Liquid Reality. I think SGI is also working on a Java API (Cosmo?).

How does VRML relate to Java3D?

Java3d is currently under discussion on the Java3D e-mail list (which currently gets 5-10 messages per day, but is increasing). E-mail

majordomo@trek.eng.sun.com
with the message
info java3d
for more information on this e-mail list.

There is no Java3D specification at this point. There is a VRML 1.0 specification and proposals for the VRML 2.0 specification. It is not really clear what the relationship between the two will be like.


Companies

What are some companies involved with the intersection of Java and VRML?

Aereal

Construct

Dimension X

Netscape/Paper Software

etc.


Thanks to Mark Meadows for contributing the bloblet2 image.

Copyright 1996 by Adrian Scott