[X3D-Ecosystem] X3DJSAIL utility Code generation from X3DOM

John Carlson yottzumm at gmail.com
Sun Jul 21 20:53:56 PDT 2024


Here’s my current approach for generating a lot of code for removing a set
of nodes or statements from an X3DJSAIL scenegraph:

https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/python/removeGenerator.py

I generate Java classes mirroring X3DJSAIL, subclassing each X3DJSAIL
class.  Then there’s a class which brings it all together.

Here’s the result:
https://github.com/coderextreme/jaminate/tree/main/Jaminate/app/src/main/java/net/coderextreme/remove

(Remove.java brings it all together)

Here’s additional X3DJSAIL code:
https://github.com/coderextreme/jaminate/tree/main/Jaminate/app/src/main/java/net/coderextreme/remove

Something similar could be done for selecting nodes from a scene graph (but
use JXPath or similar).

My current use case is much simpler than JXPath so far.   Testers welcome!
More details below.

John

On Sun, Jul 21, 2024 at 9:56 PM John Carlson <yottzumm at gmail.com> wrote:

>
> More priorities for X3DJSAIL: Comprehensive ways to select all instances
> of a given class in a scenegraph.   Ways to filter on nodes with an
> attribute (DEF) present and value (ala HTML DOM and CSS), realizing
> libraries like JXPath exist (is there something better?). Convenience
> methods for removing nodes and statements in a set from the scenegraph
> would allow me to deprecate my code.   Understood that this can probably
>  be done with DOM.  I may wish to load JavaScript into an X3DJSAIL
> scenegraph as subclasses of X3DJSAIL through class shims (see my
> X3Dautoclass.js files for graaljs).
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-ecosystem_web3d.org/attachments/20240721/495fd7f6/attachment.html>


More information about the X3D-Ecosystem mailing list