[x3d-public] x3d-public Digest, Vol 97, Issue 32

yottzumm at gmail.com yottzumm at gmail.com
Sat Apr 15 07:19:11 PDT 2017


I gained enough knowledge to realize I’m going to have to use templates I think.

John.

Sent from Mail for Windows 10

From: Andreas Plesch
Sent: Friday, April 14, 2017 5:19 PM
To: John Carlson
Cc: X3D Graphics public mailing list
Subject: Re: [x3d-public] x3d-public Digest, Vol 97, Issue 32

Hi John,

all the a-frame documentation is on a-frame.io . 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. 

-Andreas



On Fri, Apr 14, 2017 at 4:44 PM, John Carlson <yottzumm at gmail.com> wrote:
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?

On Apr 14, 2017 4:23 PM, "Andreas Plesch" <andreasplesch at gmail.com> wrote:
Date: Fri, 14 Apr 2017 08:54:20 -0700
From: Leonard Daly <Leonard.Daly at realism.com>
..
<Transform translation='1 2 3' rotation='1 0 0 3.14' scale='3 2 1'>
     <Shape>
         <Cone></Cone>
         <Appearance>
             <Material diffuseColor='1 .5 .2' specularColor='.8 0
0'></Material>
         </Appearance>
     </Shape>
</Transform>

Could be represented (using an arbitrary, non-XML representation) as:

Transform {translation:(1 2 3); rotation:(1 0 0 3.14); scale:(3 2 1);
             geometry:Cone; diffuseColor:(1 .5 .2); specularColor:(.8 0 0);}

...
For me, what makes this important is that it is a lot like the
definitions in A-Frame on an entity. I know that there are a lot of
capabilities of X3D that are not being included in this example, but
this gives me connection between the two in representing the same objects.

I am interested in what others have to say about this connection idea.

Actually, a-frame has transformation hierarchy:

https://aframe.io/docs/0.5.0/guides/#parent-and-child-transforms

A Transform node translates to:

<a-entity position=''>
  <a-entity rotation=''>
    <a-entity scale=''>
      <a-entity geometry='' material='' />
    </a-entity>
  </a-entity>
</a-entity>

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'>.

So shape translates to <a-entity geometry='' material='' />

DEF and USE translates more or less to mixins:

https://aframe.io/docs/0.5.0/core/mixins.html

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.

Prototypes translate more or less to this non core component:

https://github.com/ngokevin/kframe/tree/master/components/template/

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.

Andreas


 

_______________________________________________
x3d-public mailing list
x3d-public at web3d.org
http://web3d.org/mailman/listinfo/x3d-public_web3d.org





-- 
Andreas Plesch
39 Barbara Rd.
Waltham, MA 02453

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170415/8571b1e1/attachment.html>


More information about the x3d-public mailing list