[x3d-public] x3dom prototypes, extern proto

Andreas Plesch andreasplesch at gmail.com
Tue Jun 23 05:33:22 PDT 2020


An experimental implementation of prototype functionality is now at a
functional stage. Here are a few examples:

https://andreasplesch.github.io/x3dom/test/functional/proto/inline.html

If you examine the x3d code, you will notice that the original scenes
include additional nodes after each ProtoInstance statement. This is a
result of processing the ProtoInstance statement. In fact, the design
is that it should not be necessary to include a ProtoInstance
statement and rather just use the new node name directly as an xml
tag: <TwoColorTable legColor='1 1 0' />

This protoinstance syntax is much harder to validate (although it
should be possible by looking up available protodeclarations) but also
much easier to read.

The next step would be to support the ExternProtoDeclare statement.
The main question I have is about the function of the additional field
statements under ExternProtoDeclare.

- Do they replace ProtoInterface field statements ? (No.)
- Is the ProtoInterface element still required in the external file ? (Yes.)
- Are they listed just for convenience (for the author and the browser) ? (Yes?)
- Can they be ignored ? (Yes?)

Thanks for any insight,

-Andreas

-- 
Andreas Plesch
Waltham, MA 02453



More information about the x3d-public mailing list