[x3d-public] X3D JSON Loader and viewer + x3dom xml viewer+cobweb viewer
Andreas Plesch
andreasplesch at gmail.com
Thu Nov 26 15:27:14 PST 2015
Hi John
nice. It might be cool to see the json in a second textarea next to the xml.
X3dom.reload() does not need the data uri approach but the inline takes care of the xml preamble and is expected to understand xml even in a regular (non xhtml) html document.
So self closing x3d elements may not work with x3dom.reload(). But the json parser may not produce those anyways.
To me a main benefit of having a x3d scene in a json object would be easy manipulation of the Json object in js. So I am envisioning a scene graph visualization perhaps as an editable tree. Are there json editors/visualizers like this ?
Andreas
On November 25, 2015, at 11:05 PM, John Carlson <yottzumm at gmail.com> wrote:
The filter works on firefox now. So you can use firefox if you want cobweb, otherwise, it’s just my X3D JSON X3DOM loader + validation with XML out of my loader.
John
On Nov 25, 2015, at 8:27 PM, John Carlson <yottzumm at gmail.com> wrote:
Andreas, I integrated your cobweb loader with my X3D JSON loader and added an XML X3DOM loader that loads XML my X3D JSON loader now produces. You can enter either JSON or XML, or select from a pick list (apparently my filter doesn’t work on firefox).
A demo with a few files is here: http://coderextreme.net/X3DJSONLD/ You should be able to paste X3D JSON and X3D XML in the text area and click on the text above the text area.
Source code is here: https://github.com/coderextreme/X3DJSONLD
Note that I’ve been able to load some X3DOM without Inline, using x3dom.reload(). YMMV.
You can run in Chrome, but Cobweb won’t work.
John
On Nov 24, 2015, at 4:00 PM, Andreas Plesch <andreasplesch at gmail.com> wrote:
For quick testing of and tinkering with x3d scenes I added side by side viewing of x3dom and cobweb
to my live x3d viewer here:
http://andreasplesch.github.io/Library/Viewer/x3dweb.html
The hardest part was to figure out how to deal with both of them claiming/registering the x3d element on a web page for themselves. x3dom on the main page and cobweb in an iframe finally worked.
http://andreasplesch.github.io/Library/Viewer/x3dom.html
has just x3dom and
http://andreasplesch.github.io/Library/Viewer/index.html
has just cobweb.
Enjoy,
-Andreas
--
Andreas Plesch
39 Barbara Rd.
Waltham, MA 02453
_______________________________________________
x3d-public mailing list
x3d-public at web3d.org
http://web3d.org/mailman/listinfo/x3d-public_web3d.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20151126/d186544b/attachment.html>
More information about the x3d-public
mailing list