[x3d-public] Report on X3DJSONLD, X3DJSAIL conversion work.PLYSTL <-> JSON conversions. Future plans. Program -> DOM

John Carlson yottzumm at gmail.com
Thu May 2 16:04:46 PDT 2019


From: Leonard Daly


1. >DOM is not a file format, but an API. X3D (in JSON or XML) is a file format. How do you handle conversion of a file format to an API? Is the result something that populates the DOM tree? Is it something else? Note that XML -> DOM is a well-defined conversion (and built-in to web browsers) that populates the DOM tree with the data from the XML document. DOM contains data, structure, and methods that are not present in the XML document; but are part of the standard DOM and DOM-tree definition.
I mean DOM tree in your parlance. DOM is commonly acceptable for DOM tree, for example, on W3schools.com. I do not read standards for the most part! I do agree that model is a poor term for non-architectural purposes when you mean interface.  I will use hyperobject to refer to your DOM tree in the future. It’s not a document or a model!
2. >DOM very explicitly does not allow multi-parents. I think I understand your statements that when converting from a multi-parent structure to one that only allows single parent, you create a copy of the original. This resolves the multi-parent issue into one that may break run-time. As I understand your description: if A & B are parents of node-subtrees and X is DEFed in the A tree and USEd in the B tree; then the A and B trees have distinct copies of X (called X and X'). Do you add mechanisms so that runtime changes to X also change X'?

>Unreal (and perhaps Unity) get around this issue (node reuse in a single-parent environment) by making X a class and having each USE of X to be a new instance of that class. Changes to the X class are propagated to all instances. Each instance may define instance-specific methods/data that override those from the inherited class. It is also possible to sub-class X' and add in instance-specific methods/data.

I do something similar in my programs, and leave it up to SAI to solve.  SAI has setUSE, which should solve the issue.  Does it?

Is that simple enough?

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190502/8d024fc0/attachment.html>


More information about the x3d-public mailing list