[x3d-public] Starter Script.js for X3DOM JSON Script development. Your effort requested.

John Carlson yottzumm at gmail.com
Sun Jul 3 02:49:39 PDT 2016


Here’s my Script.js if you want to start working on a Script node in the X3D JSON Encoding for X3DOM!   It generates two logs, one for the JavaScript classes code, and one for “Route code” which copies values around (in and out of the scripts).   The package may be initially undefined.  If we could get it to the point where it uses X3DOM routing for Scripts, that would be an accomplishment!

processScripts(JSON object, LOG classes, Script package, LOG routecode) is the main entry point.

I suggest using a different tag if you’re going to put the scripts in DOM.  Perhaps <vrmlscript>, <ECMAScript> or <javascript>.  You can change the “Script” to something that X3DOM will recognize (that is, program a script extension for X3DOM).

Or you can start with a different implementation and the X3D JSON encoding standard!  One thing we’re working on is making Scripts independent of Protos, so the Script.js developer won’t have to worry about Protos.   The prototype expander should hopefully take care of all the proto dependent stuff.  You will however, be expected to deal with similar Script that come out of multiple instances of a proto body—each should have a different DEF (if you want to collaborate, we can discuss—however, I’m trying to build tools which plug and play together well, so we can leave out proto expansion or scripting if we don’t need it—hopefully, we don’t have to bundle them together, but I’m willing to discuss a common core if you have some ideas).

John

Sent from Mail for Windows 10

From: John Carlson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20160703/b49ce9b4/attachment-0001.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Script.js.txt
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20160703/b49ce9b4/attachment-0001.txt>


More information about the x3d-public mailing list