[x3d-public] metadata for ProtoInstance

Andreas Plesch andreasplesch at gmail.com
Fri Jun 5 12:45:31 PDT 2020


Indeed,

https://savage.nps.edu/Savage/Tools/Animation/DoubleClickTouchSensorPrototypeIndex.html

shows that pattern of allowing metadata for a ProtoInstance. Perhaps
the exposed metadata field should be populated in the example
ProtoInstance as well.

Authors should consider ProtoInstance as a node in the scenegraph.
Does that indicate that the spec. also should consider ProtoInstance
more formally as a node, rather than a statement ? The SAI efforts, I
think, already do that. It would be a node which is dynamically
defined as it derives its definition from the named Protodeclaration.
So instead of treating it as something to be replaced/expanded, it
would be stay in the scenegraph and reference the Protodeclaration.

To be honest, I am a bit worried that if Proto's should become
available for x3dom, there will be unnecessary management of
expectations, mostly with regards to scripting. So strategically, it
will be best to first figure out if it is possible to reproduce
scripted prototype behaviours with dom scripts, and only then release
more widely.

-Andreas

On Fri, Jun 5, 2020 at 9:54 AM Don Brutzman <brutzman at nps.edu> wrote:
>
> Great question about metadata in a protoinstance... i believe that your deduction is correct and that we have some examples.  here are some:
>
> [1] X3D Example Archives: Savage, Tools, Animation, Flying Text Prototype
>      https://savage.nps.edu/Savage/Tools/Animation/FlyingTextPrototypeIndex.html
>
> [2] X3D Example Archives: Savage, Tools, Animation, Flying Text Example
>      https://savage.nps.edu/Savage/Tools/Animation/FlyingTextExampleIndex.html
>
> <field name='metadata' type='SFNode' accessType='initializeOnly'/>
>
> [3] X3D Example Archives: Savage, Tools, Animation, Double Click Touch Sensor Prototype
>      https://savage.nps.edu/Savage/Tools/Animation/DoubleClickTouchSensorPrototypeIndex.html
>
> <field name='metadata' type='SFNode' accessType='initializeOnly'>
>      <!-- initialization node (if any) goes here -->
> </field>
>
> [4] X3D Example Archives: Savage, Tools, Animation, Double Click Touch Sensor Example
>      https://savage.nps.edu/Savage/Tools/Animation/DoubleClickTouchSensorExampleIndex.html
>
> Authors should definitely consider a ProtoInstance as a node in the scene graph.
>
> btw i fixed a small error in x3d.py for serializing out typed values found in field/fieldValue declarations, wrapping str() around the value being written out.  planning to deploy an x3d.py at the end of the weekend, hopefully.
>
> Finally, i expend demand for ProtoInstance to shoot way up as people understand it and as X3DOM matches support found in other key implementations (InstantReality, X_ITE, Xj3D, others).  Will be happy for the community to check compliance all around, especially if you and John Carlson et al. are successful in finally bringing it to X3DOM some day.
>
> Prototypes are a fundamental part of the "X" in X3D.  Onward we go...
>
> On 6/4/2020 3:36 PM, Andreas Plesch wrote:
> > I realized that the way to add metadata to a protoinstance is expose a
> > metadata field in the protodeclaration. I think that answers my
> > question.
> >
> > -Andreas
> >
> > On Thu, Jun 4, 2020 at 3:31 PM Andreas Plesch <andreasplesch at gmail.com> wrote:
> >>
> >> I think a ProtoInstance currently cannot have its own, instance
> >> specific metadata node since it is a statement rather than a node.
> >>
> >> Is that correct ?
> >>
> >> If so, it does not seem to be much of an issue since there does not
> >> seem to be much demand for it. But everything else can have associated
> >> metadata, so should a ProtoInstance not have this ability as well ?
> >>
> >> -Andreas
>
> all the best, Don
> --
> Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
> X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman



-- 
Andreas Plesch
Waltham, MA 02453



More information about the x3d-public mailing list