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

Andreas Plesch andreasplesch at gmail.com
Fri Apr 14 13:22:09 PDT 2017


>
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170414/43da4c13/attachment.html>


More information about the x3d-public mailing list