[X3D-Public] Internal and External Scripting

Joe D Williams joedwil at earthlink.net
Tue Apr 6 13:07:17 PDT 2010


Thanks Don,
I will fix the links.
Please feedback on these general examples.

"INTERNAL"

http://www.hypermultimedia.com/x3d/URLTests/

These examples examples are "Internal' Script tests to show x3d and
x3dv files clicked directly or included in a web page.

Lots of variation is due to how the x3d browsers and the html browsers
handle the mime.

The purpose is to show the X3D Script node changing a URL for and
inline, a texture, or a sound that results in a change in the scene.
The examples all employ a ROUTEd input event.

<ROUTE fromNode='NextSensor' fromField='isActive'
       toNode='LoadNewURL'   toField='znext'/>
<ROUTE fromNode='LoadNewURL' fromField='newurl'
       toNode='MainScene'    toField='url'/>


The variations either change the URL by sending a routed event, or by
changing it directly by USEing the node in the script.

 <Inline USE='MainScene'/>

in the Script node declarations along with:

<ROUTE fromNode='NextSensor' fromField='isActive'
       toNode='LoadNewURL'   toField='znext'/>


These "Internal" examples, especially the .x3d (xml) versions work
everywhere I have tested.


"EXTERNAL"

The "Ajax" examples give a shot at working in the DOM where the SAI is
exchanging events with the host DOM of an html wegb browser.

http://www.hypermultimedia.com/ajax3d/index.htm#Start

Please notice that Example0 just gets a scene going.

Example 1 sends an event from the DOM to the SAI.
from DOM, sets up SAI listener then sends events from DOM to SAI

Example 2 sends an event from the SAI to the DOM

http://www.hypermultimedia.com/ajax3d/E2.htm

from SAI, sets up DOM listener then sends events from SAI to DOM

http://www.hypermultimedia.com/ajax3d/AJAX3Dlogo2.x3d
is still one of my favorites.

Example 3 adds XHR (Ajax)
uses 2 plus 3 plus adds Ajax to go get remote file that is added to
the scene.

I will work with you to get these showable. Not sure now why they fail
if they do but should only require small DOM/SAI code changes to work
as expected.

Thanks and Best Regards,
Joe





----- Original Message ----- 
From: "Don Brutzman" <brutzman at nps.edu>
To: "Joe D Williams" <joedwil at earthlink.net>
Sent: Tuesday, April 06, 2010 8:24 AM
Subject: url correction


> http://hypermultimedia.com/x3d/URLTests/RouteInlineURLFieldx3dhtm.txt
>
> hi Joe, a correction:
>
>> <object class='x3dObject'
>>   height='100%'
>>   width='80%'
>>   type="model/x3d+xml" data="RouteInlineURLField.x3d">
>>   <param name='src' value="RouteInlineURLField.x3d">
>>   <param name="DASHBOARD" value="FALSE">
>>     <div class='notInstalled'>
>>       <h3>If you see this message<br>
>>         <a
>> href="http://www.web3d.org/x3d/content/examples/help.html#Applications"
>>           title='To: Web3D.org Choose Plug-In site'>Choose an X3D
>> plug-in</a>
>>       </h3>
>>     </div>
>> </object>
>
> please note that
>
> http://www.web3d.org/x3d/content/examples/help.html
>
> is now
>
> http://www.web3d.org/x3d/content/examples/X3dResources.html
>
>
> all the best, Don
> -- 
> Don Brutzman  Naval Postgraduate School, Code USW/Br
> brutzman at nps.edu
> Watkins 270   MOVES Institute, Monterey CA 93943-5000 USA  work
> +1.831.656.2149
> X3D, virtual worlds, underwater robots, XMSF
> http://web.nps.navy.mil/~brutzman







More information about the X3D-Public mailing list