<div><div dir="auto">Requirement 4 subsumes requirement 7.</div><div dir="auto"><br></div><div dir="auto">This looks like a good pattern to follow to replace my serializers (thanks Don, for steering me away from something more complex). This pattern was partly designed similar to X3DJSONLD.js without XML/DOM except as provided by x3d.py.</div><div dir="auto"><br></div><div dir="auto">Let’s discuss doing something similar, but instead, push out Three.js, Babylon.js, X3DOM and X_ITE app code, hopefully just add a few generating functions for each SAI. Converting X3D JSON to these 4 SAI libraries will position X3D well in the web world.</div><div dir="auto"><br></div><div dir="auto"> Jeff, maybe we can start on a Three.js app generator if no one else is interested? You wanted to learn JavaScript?</div><div dir="auto"><br></div><div dir="auto">Seed code is here: <div dir="auto"><a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/python/x3djsonld.py">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/python/x3djsonld.py</a> . This is similar to JSONParser code in x3dom and x_ite.</div><div dir="auto"><br></div><div dir="auto">Note that generating JS code should be an off-line process without evals.</div><div dir="auto"><br></div><div dir="auto">Michalis, any thoughts on creating Pascal SAI app code generator from an encoded x3d file?</div><div dir="auto"><br></div><div dir="auto">John</div></div></div><div><div dir="auto"><br></div><div dir="auto"><br></div><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 3, 2022 at 2:16 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">
<div>
<p>I have not written a Python generator or serializer for use
creating x3d.py application programs yet, so here's my chance:</p>
<p>Some requirements:</p>
<p>1. Written in Python, possibly using x3d.py or SAI, not
JavaScript using DOM<br>
2. Take JSON as input<br>
3. Do not create XML/DOM like X3DJSONLD does.<br>
4. Still create string/file on output. Writing out x3d.py SAI
application code will be first example, similar to
X3dToPython.xslt, but using Python instead of XSLT, and JSON input
instead of XML input.<br>
5. Intended to be just a few methods, on the same order as
X3DJSONLD + a Serializer.<br>
6. May be moved into x3d.py.<br>
7. May initally use eval, but should be easily ported to use a
dispatch table or reflection, replacing eval. I will have to
write an "autoclass" which maps strings to classes.</p>
</div>
</blockquote></div></div>
</div>