[x3d-public] metadata for ProtoInstance

Don Brutzman brutzman at nps.edu
Fri Jun 5 06:54:49 PDT 2020


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



More information about the x3d-public mailing list