<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"><meta http-equiv="content-type" content="text/html; charset=utf-8">Joe, if you like. I can produce ECMAScript 6 from this example, but the only thing the library does right now is produce XML…so…<div><br></div><div>Still a long ways to go…</div><div><br></div><div>Suggest you get it to work in X3DOM or X_ITE right now.</div><div><br></div><div>If you want to run and debug ES6 code and help,  I recommend going to X3DJSONLD/src/main/node/net/ecma/data and running node *.mjs scripts.   I know HAnim is currently broken.</div><div><div><div><br><div dir="ltr">Sent from my iPad</div><div dir="ltr"><br><blockquote type="cite">On Oct 31, 2021, at 6:55 PM, Joseph D Williams <joedwil@earthlink.net> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="Generator" content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><div class="WordSection1"><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal">Looks like great stuff if I as a simple user of the x3d ecmascript SAI ever needed to know about it in order to create and use x3d Script node./</p><p class="MsoNormal">All I want to know is will this example work. </p><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal"><a href="https://www.web3d.org/documents/specifications/19775-2/V3.3/index.html">ISO/IEC 19775-2 Index page (web3d.org)</a><o:p></o:p></p><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal">https://www.web3d.org/documents/specifications/19775-2/V3.3/index.html<o:p></o:p></p><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal"><a href="https://www.web3d.org/documents/specifications/19777-1/V3.3/index.html">ISO/IEC 19777-1 Edition 2 -- X3D ECMAScript binding (web3d.org)</a><o:p></o:p></p><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal">https://www.web3d.org/documents/specifications/19777-1/V3.3/index.html<o:p></o:p></p><p><a href="https://www.web3d.org/documents/specifications/19776-1/V3.3/index.html">ISO/IEC 19776-1:2015 — X3D XML encoding — Index (web3d.org)</a><o:p></o:p></p><p><a href="https://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/examples.html#ScriptingExample">https://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/examples.html#ScriptingExample</a><o:p></o:p></p><p><span style="font-size:12.0pt;font-family:"Verdana",sans-serif;color:black">Here is the example:<o:p></o:p></span></p><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black"><?xml version="1.0" encoding="utf-8"?><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black"><!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN"<o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">  "http://www.web3d.org/specifications/x3d-3.0.dtd"><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black"><o:p> </o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black"><X3D version='3.0' profile='Immersive'><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">  <head><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">    <meta name='filename' content='Scripting.x3d'/><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">  </head><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">  <Scene><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">    <Script DEF='OpenVault'><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">      <field name='openVault' type='SFTime' <o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">             accessType='inputOnly'/><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">      <field name='combinationEntered' type='SFBool' <o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">             accessType='inputOnly'/><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">      <field name='vaultUnlocked' type='SFTime' <o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">             accessType='outputOnly'/><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">      <field name='unlocked' type='SFBool' value='false' <o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">             accessType='initializeOnly' /><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">      <![CDATA[<o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">      ecmascript:<o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">      function combinationEntered (value) {<o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">        unlocked = value;<o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">      }<o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">      function openVault(value) {<o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">      if (unlocked) vaultUnlocked = value;<o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">      }<o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">      ]]><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">    </Script><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">    <Shape><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">      <Appearance><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">        <Material diffuseColor='1 0 0'/><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">      </Appearance><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">      <Sphere/><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">    </Shape><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">    <Sound maxBack='1000' maxFront='1000' minBack='1000' minFront='1000'><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">      <AudioClip DEF='Click' stopTime='1' <o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">        description='clicking sound' url='"click.wav"'/><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">    </Sound><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">    <TouchSensor DEF='TS'/><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">    <ROUTE fromNode='TS' fromField='isOver' <o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">           toNode='OpenVault' toField='combinationEntered'/><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">    <ROUTE fromNode='TS' fromField='touchTime' <o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">           toNode='OpenVault' toField='openVault'/><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">    <ROUTE fromNode='OpenVault' fromField='vaultUnlocked' <o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">           toNode='Click' toField='startTime'/><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black">  </Scene><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black"></X3D><o:p></o:p></span></b></pre><pre style="margin-left:11.25pt"><b><span style="font-size:8.5pt;color:black"><o:p> </o:p></span></b></pre><pre style="margin-left:11.25pt"><a href="https://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/Examples/Scripting.x3d" target="3D_Scenexml"><span style="font-size:12.0pt;font-family:"Verdana",sans-serif;background:white">Click here</span></a><span style="font-size:12.0pt;font-family:"Verdana",sans-serif;color:black;background:white"> to view this example in a 3D scene window.<o:p></o:p></span></pre><pre style="margin-left:11.25pt"><span style="font-size:12.0pt;font-family:"Verdana",sans-serif;color:black;background:white"><o:p> </o:p></span></pre><pre style="margin-left:11.25pt"><span style="font-size:12.0pt;font-family:"Verdana",sans-serif;color:black;background:white">If already ok for some tools please tell me: <o:p></o:p></span></pre><pre style="margin-left:11.25pt"><span style="font-size:12.0pt;font-family:"Verdana",sans-serif;color:black;background:white">How can we best be sure that when that ‘Click here’ in the spec or in this note gets made, that it works as described using any competent html Dom webGL ecmascript browser, not in a sandbox (at least show the geometry and retrieve that .wav), free to interact with the rest of our WWW. <o:p></o:p></span></pre><pre style="margin-left:11.25pt"><span style="font-size:12.0pt;font-family:"Verdana",sans-serif;color:black;background:white"><o:p> </o:p></span></pre><pre style="margin-left:11.25pt"><span style="font-size:12.0pt;font-family:"Verdana",sans-serif;color:black;background:white">Thanks for all, <o:p></o:p></span></pre><pre style="margin-left:11.25pt"><span style="font-size:12.0pt;font-family:"Verdana",sans-serif;color:black;background:white">Joe </span><b><span style="font-size:8.5pt;color:black"><o:p></o:p></span></b></pre><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal"><o:p> </o:p></p><div style="mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal" style="border:none;padding:0in"><b>From: </b><a href="mailto:yottzumm@gmail.com">John Carlson</a><br><b>Sent: </b>Sunday, October 31, 2021 1:16 PM<br><b>To: </b><a href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a><br><b>Subject: </b>[x3d-public] ECMAScript 6 X3D API</p></div><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal">More work done on es6x3d:</p><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal">https://GitHub.com/coderextreme/es6x3d</p><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal">Changes for MFString, and other MF work.</p><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal">Still lots of work to do, including possible export to three.js</p><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal">John</p><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal">_______________________________________________</p><p class="MsoNormal">x3d-public mailing list</p><p class="MsoNormal">x3d-public@web3d.org</p><p class="MsoNormal">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</p><p class="MsoNormal"><o:p> </o:p></p></div></div></blockquote></div></div></div></div></body></html>