[x3d-public] Simplifying ProtoInstance nodes
John Carlson
yottzumm at gmail.com
Fri May 16 03:31:44 PDT 2025
Here are test links for short form rubik.json:
https://create3000.github.io/x_ite/playground/?url=%20https://raw.githubusercontent.com/coderextreme/x3dschema/refs/heads/main/examples/rubik.json
https://andreasplesch.github.io/Library/Viewer/index.html?url=https://raw.githubusercontent.com/coderextreme/x3dschema/refs/heads/main/examples/rubik.json
Thumbs up in both cases.
What I may try to do is create a whole webpage for a bake-off, hopefully
including Castle.
John
On Thu, May 15, 2025 at 8:52 AM John Carlson <yottzumm at gmail.com> wrote:
> 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/20250516/adafc665/attachment.html>
More information about the x3d-public
mailing list