Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VRML and Netscape

0 views
Skip to first unread message

clair...@my-dejanews.com

unread,
Feb 27, 1999, 3:00:00 AM2/27/99
to
Is there a way to import many .wrl objects in one Netscape window ,
from text links of a document on the same page?

Example, the word "circle" in the text activates a circular object in the
window,
and the word (link) "square" adds a square into the same window, with the
circle?

Desperately searching for an answer.


Fotini

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

Leonard Daly

unread,
Feb 27, 1999, 3:00:00 AM2/27/99
to clair...@my-dejanews.com
Fotini,

You need to use Java to connect the pages (HTML and VRML) together. Inside
the world, you will need to use something like createvrmlFromString to create
the objects as they are clicked.


Leonard Daly <da...@realism.com>
Information Visualization Specialist & VRML Educator
Daly Realism - Interactive Internet Solutions
(http://www.realism.com)

Treasurer, LA VR User's Group: http://lavug.org/

vcard.vcf

Lars Travers

unread,
Feb 28, 1999, 3:00:00 AM2/28/99
to clair...@my-dejanews.com
clair...@my-dejanews.com wrote:
>
> Is there a way to import many .wrl objects in one Netscape window ,
> from text links of a document on the same page?
>
> Example, the word "circle" in the text activates a circular object in the
> window,
> and the word (link) "square" adds a square into the same window, with the
> circle?

Perhaps you could use JavaScript to do this. There is a very nice
example by Paul S. Hoffman at
http://vrml.miningco.com/library/bljsvrml2js.htm The
"JavaScript alone" link would be especially useful. View the page source
for this page after you try it.

How complicated and general is the world you might build? You could
start by creating all the objects you were going to need in a wrl file.
Each one would have a Switch Node as its parent so it could be made
visible/invisible easily. The "JavaScript alone" example demonstrates
how to do this.

To make a word "object" do this, you could use JavaScript pseudo-url's
which is a standard JavaScript technique. These are links which when
clicked call JavaScript functions rather than loading html pages. For
example, in your html first you define a javascript function:

<script language="JavaScript">
function showSphere() { /* javascript code */ }
</script>

Then in your text you might put:

Show me a <a href="javascript:showSphere();">sphere</a>

When you click on "sphere", showSphere() would be called. This would be
a lot like the hideSphere() function in that "JavaScript alone" example.

Lars

0 new messages