[x3d-public] X3D JSON Loader now includes sample Python imperative encoding as output; Challenge for Don.
yottzumm at gmail.com
yottzumm at gmail.com
Tue Nov 8 13:17:25 PST 2016
Following along with Don B.’s imperative HelloWorld.java, I have created an imperative encoding for python. See repository at: https://github.com/coderextreme/X3DJSONLD and webserver: http://coderextreme.net/X3DJSONLD/ for examples of this encoding. An example HelloWorld.py is included here, but shouldn’t run—I’m still working on that code.
I hope more imperative encodings will be accepted in the future, including JavaScript and D3.js.
The approach I took when generating the python was to generate from DOM. This worked well. The serializer is 32 lines and is found in X3DJSONLD.js in the repository. I have not tested comments or scripts yet. So far, the new encoding is only an output encoding.
Don, I challenge you to create a declarative Java encoding using nested object arrays. Yes, you can translate XML into Java object arrays.
I see a wonderful mixture of declarative and imperative styles coming.
John
Sent from Mail for Windows 10
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20161108/3415383a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: HelloWorld.py
Type: application/octet-stream
Size: 6047 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20161108/3415383a/attachment.obj>
More information about the x3d-public
mailing list