[x3d-public] Work Proposal/Wish List: X3D XML, JSON -> Three.JS

Andreas Plesch andreasplesch at gmail.com
Fri Aug 7 09:48:55 PDT 2020


It is an interesting idea, compiling x3d scenes to three.js code.
Nevertheless, I think you may end up essentially developing a new X3D
browser based on three.js. You may run into the same limitations which
X-seen is trying to deal with, mostly no multi-parenting (DEF/USE) in
three.js (but other instancing), the huge scope of x3d and x3d event
handling. three.js has its own idea of a scene graph which x3d has
then to be mapped into.

It will be a large, multi-month effort, for sure, if you are covering
a standard X3D profile. So it may make sense to first think about if
Interpolators, Sensors, ROUTEs or SAI to the running scene should be
supported. Even without those, x3d via three.js  could be useful, for
example for rendering output of our STEP/OCC converter. But then
again, existing three.js loaders may already work for such basic x3d
content, and if not, it would be probably more useful (but less fun)
to enhance those loaders.

Since AFrame provides already declarative three.js, you could consider
an AFrame encoding in parallel, or mixed in.

There may be other warning flags, -Andreas

> Date: Thu, 6 Aug 2020 16:21:41 -0500
> From: John Carlson <yottzumm at gmail.com>
> To: X3D Graphics public mailing list <x3d-public at web3d.org>, Don
>         Brutzman <brutzman at nps.edu>
>
> I think the best approach using existing code is to leverage the work done
> on es6x3d and produce toThreeJS() methods that create Three.JS snippets. I
> have heard that string concatenation is much faster than array.join these
> days (yay! all my code pretty much does that), so I'll pursue string
> concatenation in grouping and transform classes.   Any comments from the
> peanut gallery are encouraged.
>
> I'm feeling pretty good about this now!  A warm space in my heart for not
> totally abandoning X3D, and a path forward for X3DJSAIL to incorporate my
> changes down the road.
>
> Does anyone have any warning flags fly up?
>
> John

-- 
Andreas Plesch
Waltham, MA 02453



More information about the x3d-public mailing list