<div dir="ltr"><div dir="ltr">Oh, it's okay with me if we leave the Node.js-X3DJSAIL X3dToNodeJS.xslt in the trashbin. I believe I copied it from X3dToES5.xslt then modified it.  What I really want is a X3dToES6.xslt that follows modern ECMAScript programming: classes/modules/import/export (one module OK with me to start for simplicity).  Please refer to <a href="http://www.web3d.org/x3d/stylesheets/es6">www.web3d.org/x3d/stylesheets/es6</a> for some example code.<div><br></div><div>I agree that a Node.js-X3DJSAIL attempt should be aborted.</div><div><br></div><div>However, I think we should at least pursue ES6, as X_ITE has done.</div><div><br></div><div>John</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 7, 2020 at 2:35 AM John Carlson <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>see app.mjs module for an example of using the ES6 SAI prototype.   x3d.mjs is the module  library.  I'm following on x3d.py's lead!</div><div><br></div><div>Will integrate X3DJSAIL with Node.js when you provide a list of public facing SAI classes beyond X3DUOM.</div><div><br></div><div>Code is also here:</div><div><br></div><div><a href="https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/es6/" target="_blank">https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/es6/</a> </div><div> <br></div><div>The main points for using ES6 is classes/modules/export/import.</div><div><br></div><div>Thanks,</div><div><br></div><div>John</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 30, 2020 at 9:06 AM 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:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Here is another place to pick up the library:<div><br></div><div><a href="http://coderextreme.net/es6.zip" target="_blank">http://coderextreme.net/es6.zip</a> </div><div><br></div><div>I need some examples!</div><div><br></div><div>Suggest possibly modifying ECMAScript SAI examples.</div><div><br></div><div>John <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 30, 2020 at 8:53 AM 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:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Mostly just construction right now.  I'm not quite sure how to do protos.  Below is the first example.<div><br></div><div>Code is here:<a href="https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/es6" target="_blank">https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/es6</a> (if you can access it.  I can't right now).</div><div><br></div><div>Comments?</div><div><br></div><div>John</div><div><br></div><div><br></div><div>$ cat app.mjs<br>"use strict"<br><br>import X3D from './x3d.mjs';<br>import { head, meta, Scene, Transform, Group, Material, Shape, Box, Appearance } from './x3d.mjs';<br>import { MFNode, SFColor, SFVec3f, SFRotation } from './x3d.mjs';<br><br>var x3d = new X3D({<br>        head : new head({<br>                meta : [<br>                        new meta({<br>                                name : "John W",<br>                                content : "Carlson, I"<br>                        }),<br>                        new meta({<br>                                name : "John A",<br>                                content : "Carlson, II"<br>                        }),<br>                        new meta({<br>                                name : "John R",<br>                                content : "Carlson, III"<br>                        })<br>                ]<br>        }),<br>        Scene : new Scene({<br>                children : new MFNode([<br>                        new Group({<br>                                children : new MFNode([<br>                                        new Shape({<br>                                                appearance : new Appearance({<br>                                                        material : new Material({<br>                                                                diffuseColor : new SFColor([1, 0, 0])<br>                                                        })<br>                                                }),<br>                                                geometry : new Box()<br>                                        })<br>                                ])<br>                        }),<br>                        new Transform({<br>                                translation : new SFVec3f([1, 2, 3]),<br>                                scale: new SFVec3f([4, 5, 6]),<br>                                rotation: new SFRotation([7, 8, 9, 3.14])<br>                        })<br>                ])<br>        })<br>})<br><br>console.log(x3d.toXMLNode());<br></div></div>
</blockquote></div>
</blockquote></div></div>
</blockquote></div></div>