[x3d-public] port this example to X3DOM? Stumbling block to X3DV4 adoption [ one script for 2 X3DOMs - need array of scripts or something ]

John Carlson yottzumm at gmail.com
Thu Jun 15 00:13:38 PDT 2017

Okay, here’s where I ended up when porting the X3D event model to X3DOM.  Following Andreas advice, I changed my MutationObservers to outputchanged events.  It works, but I can’t get the x3dconnector.json working inside X3DJSONLD with X3DOM.  I may be able to get it to work inside X3DOM if it’s packaged with it, IDK.  It seems like I have better luck preprocessing scripts than using eval.


Original X3D:


The X3D and the JSON behave differently inside X3DJSONLD with X3DOM.  That may be a clue!

One side of the JSON X3DOM example in X3DJSON doesn’t work.   In XML, the cylinder doesn’t get initialized, I’d say.  I think it’s because I’m using getFieldValue/setFieldValue and not JQuery, which would set/get both attributes (I have two X3DOM viewers, I need to add an extra #id to my selector, and I haven’t figured out how to do that yet—I might have to pass an #id through my code, IDK).  So it may work fine with a single X3DOM instance, and not with a dual instance—there’s only one script shared between the two X3DOM instances.  I think Leonard indicated this.  This may be a stumbling block to X3DV4 unless we use a an array for scripts we don’t want to share between X3D viewer instances, and figure out how to address them separately.

Sent from Mail for Windows 10

From: John Carlson
Sent: Wednesday, May 31, 2017 3:44 PM
To: x3dom mlist; X3D Graphics public mailing list
Subject: port this example to X3DOM?

Can someone port the attached example to X3DOM?  It would help with the X3DOM upgrade effort.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170615/4a176a4d/attachment.html>

More information about the x3d-public mailing list