[X3D-Ecosystem] Doug's x3dconnectorProto.x3d in X3DOM Script handling

John Carlson yottzumm at gmail.com
Sun Jul 20 23:42:54 PDT 2025


Here's an example that works in X_ITE, Sunrize, FreeWRL,but  not in X3DOM
or Castle Model Viewer or Octaga:  I couldn't find Octaga's problem, but I
think X3DOM and Castle are missing a Script implementation, particularly, a
way to handle Scripts inside ProtoBody's.

https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/data/x3dconnectorProto.x3d

I know that Michalis is working on a web-based X3D browser.

So how do we fix this model, the prototype/script preprocessor, such that
X3DOM will work?  When I was implementing a Prototype Expander for this
code, I ensured that here was a separate script for each ProtoInstance,
eval'ed into running code.    I don't have that for DOM, I have it for
JSON.  But perhaps we could do something with DOM, such that it could
handle both XML and JSON Script nodes?

Maybe someone could look at adapting this script for DOM (If I don't get to
it sooner).  I just need the X3DOM ProtoExapander to duplicate Scripts
before the DOM is sent to the following script:
https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/Script.js
If X3DOM already does that, that would be useful to know, but I would
probably guess it doesn't?

If there's a better way, let me know.

If there's an issue with licensing, I can dual license.

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-ecosystem_web3d.org/attachments/20250721/168b2d82/attachment.html>


More information about the X3D-Ecosystem mailing list