<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
.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></head><body lang=EN-US link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal>I gained enough knowledge to realize I’m going to have to use templates I think.</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>Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986">Mail</a> for Windows 10</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:andreasplesch@gmail.com">Andreas Plesch</a><br><b>Sent: </b>Friday, April 14, 2017 5:19 PM<br><b>To: </b><a href="mailto:yottzumm@gmail.com">John Carlson</a><br><b>Cc: </b><a href="mailto:x3d-public@web3d.org">X3D Graphics public mailing list</a><br><b>Subject: </b>Re: [x3d-public] x3d-public Digest, Vol 97, Issue 32</p></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Hi John,</p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>all the a-frame documentation is on <a href="http://a-frame.io">a-frame.io</a> . There is no formal spec. While a partial translator may be possible (viewpoint -> camera etc., transform, geometries, appearance), a fuller x3d on top of a-frame will require development of custom a-frame components (I made some initial ones for ifs and elevationgrid) in js plus three. Particularly for routing, general interpolation (there is a interpolation component for coordinates), sensors. It could be valuable to start a json translator anyways to gain insight. </p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>-Andreas</p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div></div><div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>On Fri, Apr 14, 2017 at 4:44 PM, John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:</p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><div><p class=MsoNormal>You mean like an X3D JSON to A-frame translator?  I could go for that.   Where's the A-frame spec or a complete example or set of examples that covers everything?</p></div><div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>On Apr 14, 2017 4:23 PM, "Andreas Plesch" <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>> wrote:</p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><div><div><div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><p class=MsoNormal>Date: Fri, 14 Apr 2017 08:54:20 -0700<br>From: Leonard Daly <<a href="mailto:Leonard.Daly@realism.com" target="_blank">Leonard.Daly@realism.com</a>><br>..<br><Transform translation='1 2 3' rotation='1 0 0 3.14' scale='3 2 1'><br>     <Shape><br>         <Cone></Cone><br>         <Appearance><br>             <Material diffuseColor='1 .5 .2' specularColor='.8 0<br>0'></Material><br>         </Appearance><br>     </Shape><br></Transform><br><br>Could be represented (using an arbitrary, non-XML representation) as:<br><br>Transform {translation:(1 2 3); rotation:(1 0 0 3.14); scale:(3 2 1);<br>             geometry:Cone; diffuseColor:(1 .5 .2); specularColor:(.8 0 0);}<br><br>...<br>For me, what makes this important is that it is a lot like the<br>definitions in A-Frame on an entity. I know that there are a lot of<br>capabilities of X3D that are not being included in this example, but<br>this gives me connection between the two in representing the same objects.<br><br>I am interested in what others have to say about this connection idea.</p></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Actually, a-frame has transformation hierarchy:</p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><a href="https://aframe.io/docs/0.5.0/guides/#parent-and-child-transforms" target="_blank">https://aframe.io/docs/0.5.0/guides/#parent-and-child-transforms</a></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>A Transform node translates to:</p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><a-entity position=''></p></div><div><p class=MsoNormal>  <a-entity rotation=''></p></div><div><p class=MsoNormal>    <a-entity scale=''></p></div><div><p class=MsoNormal>      <a-entity geometry='' material='' /></p></div><div><p class=MsoNormal>    </a-entity></p></div><div><div><p class=MsoNormal>  </a-entity></p></div></div><div><div><p class=MsoNormal></a-entity></p></div></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>While a-frame has all the a-nodes (a-sphere ..) it is best to really think about those as shortcuts to entity plus components <a-entity geometry='sphere'>.</p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>So shape translates to <a-entity geometry='' material='' /></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>DEF and USE translates more or less to mixins:</p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><a href="https://aframe.io/docs/0.5.0/core/mixins.html" target="_blank">https://aframe.io/docs/0.5.0/core/mixins.html</a></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>The hardest part may be to reflect the x3d event flow but I developed some ideas when I first explored a-frame and remember that it looked not unpromising (but I did not write down or even conceptualize anything more concretely). Components can be written to just listen to (in), or just emit (out) events, or do both (in,out). There is an initialize phase.</p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Prototypes translate more or less to this non core component:</p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><a href="https://github.com/ngokevin/kframe/tree/master/components/template/" target="_blank">https://github.com/ngokevin/kframe/tree/master/components/template/</a></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>One question is if it would be better/easier/robust to develop a x3d -> aframe translator or actually define the x3d nodes as custom a-frame entities.</p></div><div><p class=MsoNormal><span style='color:#888888'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='color:#888888'>Andreas<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='color:#888888'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='color:#888888'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='color:#888888'> <o:p></o:p></span></p></div></div></div></div><p class=MsoNormal style='margin-bottom:12.0pt'><br>_______________________________________________<br>x3d-public mailing list<br><a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br><a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a></p></blockquote></div><p class=MsoNormal><o:p> </o:p></p></div></blockquote></div><p class=MsoNormal><br><br clear=all></p><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>-- </p></div><p class=MsoNormal>Andreas Plesch<br>39 Barbara Rd.<br>Waltham, MA 02453</p><p class=MsoNormal><o:p> </o:p></p></div></body></html>