[x3d-public] FW: Forgot what we did Re: ProtoInstance for material in X3DUOM.
John Carlson
yottzumm at gmail.com
Tue Sep 5 09:28:50 PDT 2017
Roy, read this.
Grrr. What if all I have left over from the big crash of 2018 is binary code, X3DUOM and some X3D JSON files and the abstract specification is lost? How do I reconstruct a JSON schema in that case? Things should be made explicit and self-documenting for archival purposes. We can't have stuff floating in people heads.
Yes, I have a disability.
If we have a class of nodes that goes everywhere, then let's give them an interface and I will hard code it in the JSON schema generator. I don't like it though. I believe I'm already hardcoding several statements. Instead of putting the logic in the object model where it belongs, we’re putting it in ALL our tools.
Perhaps I should have been plainer. I actually am not adding ProtoInstance to -material, I am adding it to
"-X3DMaterialNodeSFNode": {
"type": "object",
"properties": {
"Material": {
"$ref": "#/definitions/Material"
},
"TwoSidedMaterial": {
"$ref": "#/definitions/TwoSidedMaterial"
},
"ProtoInstance": {
"$ref": "#/definitions/ProtoInstance"
}
},
"additionalProperties": false
},
For the time being. I would like to add it to:
"-X3DMaterialNode|X3DAnyNodeThatGoesAnywhereSFNode": {
Instead, which would actually be acceptableNodeTypes=”X3DMaterialNode|X3DAnyNodeThatGoesAnywhere” on the field named “material” in X3DUOM.
I can certainly hardcode “X3DAnyNodeThatGoesAnywhere” in the JSON schema generator, no problem. It will go on ALL acceptableNodeTypes and appear on most if not all -SFNodes and -MFNodes. For the time being. Is that acceptable? Alternatively, I may get a list of nodes that go anywhere, and add them to all -SFNode and -MFNode fields, without adding the long and unwieldy “X3DAnyNodeThatGoesAnywhere.” I still don’t know why I’m coding Object Model-like stuff in the JSON schema generator though.
I thought we already had an interface that went everywhere, and we discarded it???? Roy?
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170905/3df15e34/attachment.html>
More information about the x3d-public
mailing list