[x3d-public] Prototype Expander, Question on design of instance expansions

John Carlson yottzumm at gmail.com
Sat Jul 2 20:40:05 PDT 2016


On Jul 2, 2016 5:10 PM, "Don Brutzman" <brutzman at nps.edu> wrote:
>
> b. Handle follow-on nodes by also inserting them, in a scene-valid manner.
> b.1. When the first node in the ProtoBody is an X3DChildNode, any
follow-on nodes can be wrapped in a Switch (with whichChoice="-1") to
ensure they are non-rendering.
> b.2. When first node in the ProtoBody is not an X3DChildNode, any
follow-on nodes are still wrapped in a Switch which follows at the closest
subsequent point in the scene graph that can accept children nodes.

Note that the closest subsequent point is likely to  be a parent array,
since objects don't hold objects (they hold objects as values of
attributes).  Is this what we want?  As to finding the parent array, I was
thinking each object could contain a "../arrayElement" attribute which
would have a value of the JSONPath from the root to the array element index
that the ProtoInstance (for example) is contained within.  Doing this with
nested protoinstances could get really tricky. I almost want to do the
Proto expansion first, and then try to add the switch nodes in the
Flattener.js.  hmm.  That may work a lot better.  Thank you John for
thinking this through before implementation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20160702/607f9fbc/attachment.html>


More information about the x3d-public mailing list