[x3d-public] ProtoInstance USE without name

John Carlson yottzumm at gmail.com
Sun Nov 22 15:12:01 PST 2020


Andreas, we used to support name, but as Holger's examples pointed out,
X_ITE balks at name.    Note that for some HAnim nodes, containerField is
required along with USE, last I checked.   Don, do you care to comment on
use of containerField with USE in HAnim lists of HAnim nodes?  I
believe the containerField here in the lists may be critical for creating
-skins, -joints and -segments fields in JSON

Excerpt of JoeKick.x3d:

       <HAnimJoint USE='Joe_l_thumb1' containerField='joints'/>
        <HAnimJoint USE='Joe_r_thumb1' containerField='joints'/>
        <HAnimJoint USE='Joe_l_thumb2' containerField='joints'/>
        <HAnimJoint USE='Joe_r_thumb2' containerField='joints'/>
        <HAnimJoint USE='Joe_l_thumb3' containerField='joints'/>
        <HAnimJoint USE='Joe_r_thumb3' containerField='joints'/>
        <HAnimSegment USE='Joe_sacrum' containerField='segments'/>
        <HAnimSite USE='Joe_RootFront_view' containerField='sites'/>

Should we just leave out containerField, and autoinsert Joints, Segments
and Sites into the lists?

Thanks.

John

On Sun, Nov 22, 2020 at 5:02 PM Andreas Plesch <andreasplesch at gmail.com>
wrote:

> Looking at why the old Prototypes for HAnim did not work properly for
> x3dom, I found that the xml examples typically have a ProtoInstance
> statement with a USE attribute but without the corresponding name attribute
> defining the actual node type. However, x3dom expects a name attribute with
> every ProtoInstance statement, even USE ones, to be able to insert the
> appropriate node.
>
> The xml spec  at
>
>
> https://www.web3d.org/documents/specifications/19776-1/V3.3/Part01/concepts.html#ProtoInstanceAndFieldValueStatement
>
> does not address USE of ProtoInstances but all examples always have a name
> attribute.
>
> Also, in my quite extensive testing of Protos, I did not come across other
> examples of ProtoInstance elements without a name attribute.
>
> To be fair, the name attribute is not strictly necessary for USE
> ProtoInstances since the type of the inserted node can be determined from
> the referenced DEF node. But having the name attribute makes ProtoInstance
> elements more similar to regular nodes. So I think not requiring the name
> attribute for USE ProtoInstances should be explicitly allowed in the xml
> spec., but still be encouraged.
>
> I do not think the xml spec. would be otherwise affected by V.4 ?
>
> Best, Andreas
>
> --
> Andreas Plesch
> Waltham, MA 02453
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20201122/174e6566/attachment-0001.html>


More information about the x3d-public mailing list