[x3d-public] [x3dom-users] Whither protoexpander in X3DOM? umm, just define input-to-output and write code

Andreas Plesch andreasplesch at gmail.com
Thu May 28 12:09:09 PDT 2020


Let me write down a few notes on ProtoDeclare/Instance.

- The expander approach would be ok for x3dom as well but I am not
sure if it is easier to implement.
- These are Statements and would be handled separately from Nodes,
similar to ROUTE, in x3dom in NodeNameSpace.js
- in x3dom gltf inlines are handled by translation to a (by default
non-accessible) sub DOM, which is then tree parsed and added as a
subgraph in a child namespace to the main scene. Similar to
ProtoInstance this involves some processing before attaching to the
main scene. So I think it would be not too hard to do the same for
ProtoInstance by looking up the corresponding ProtoBody in a registry.
The registry is populated while parsing, looking for ProtoDeclare
elements.
- the main challenge is how to implement custom fields, and 'IS' ing.
For routing to ProtoInstances there needs to be a crossing of the
namescope boundary.
- ProtoInstances are more like Nodes than Statements, since they need
to be included in traversing the scene.
- not sure if x3dom currently has a way to send events into namescoped
subgraphs (via IS/connect), and capture events from those (via
IS/connect).
- perhaps it makes sense to have the ProtoInstance statement construct
a ProtoInstanceNode node to insert in the scenegraph. The statement
takes care of field definitions for the node, and the node takes care
of ISing and events during travesal.

-Andreas





On Thu, May 28, 2020 at 12:52 AM John Carlson <yottzumm at gmail.com> wrote:
>
> so perhaps this is the reasoning Leonard had.:
>
> Developers and designers want the full power of the web.   If I restrict people to inlines, they can’t use standard tools to inspect the DOM, especially where it’s critical.
>
> 1.   Should X3D4 allow all X3D elements in the HTML page or perhaps just a few?
>
> 2.  Should X3D4 allow Protos on the main HTML page?  Or only in inlines?
>
> John



--
Andreas Plesch
Waltham, MA 02453



More information about the x3d-public mailing list