[x3d-public] Simplifying ProtoInstance nodes
John Carlson
yottzumm at gmail.com
Thu May 15 06:52:21 PDT 2025
I have modified CreateElement() and elementSetAttribute() in x3dschema to
take short-form in JSON encoding, expand to long-form. Changes were made
to X3DJSONLD.java.
Here's where I store PROTOs and create ProtoInstance elements:
https://github.com/coderextreme/x3dschema/blob/72a2ea6920a4d2c87083f2b28a5cf0e1396a5613/X3DJSONLD.java#L88
elementSetAttribute() now creates fieldValue statements where appropropriate
Note:
fieldValues can't have "name" or "DEF" values for name fields. These go in
the ProtoInstance node.
There's probably more bugs, but I'd rather put it out there to get test
examples (I already have many):
Here's a test example for people:
https://github.com/coderextreme/x3dschema/blob/main/examples/rubik.json
I'll start working on removing my Proto Expander from X3DJSONLD now.
John
On Sat, May 10, 2025 at 9:58 PM John Carlson <yottzumm at gmail.com> wrote:
>
> When that’s done, I’ll work on x3dschema:
>
> CreateElement in Java:
>
>
> https://github.com/coderextreme/x3dschema/blob/269135736fdbe61e8b21c48fe17fbeaa8a7f93c1/X3DJSONLD.java#L73
>
> Ditto, but this time, no need to validate with Ajv.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20250515/3f99ebcb/attachment.html>
More information about the x3d-public
mailing list