[x3d-public] ProtoInstance USE without name

Andreas Plesch andreasplesch at gmail.com
Mon Nov 23 15:30:04 PST 2020


Hi Christoph,

thanks, interesting. Perhaps it will be useful to try a USE ProtoInstance
in a very simple scene, in multiple browsers.

-Andreas

On Mon, Nov 23, 2020 at 1:01 PM Christoph Valentin <
christoph.valentin at gmx.at> wrote:

>
> Hi
>
> This bug is common to many X3D players (even classical non-WebGL X3D
> players).
>
> I was used to use following workaround, which worked for all relevant
> players:
>
> If I want to USE a DEFd ProtoInstance, I will actually instantiate a
> <Script> node with USE.
>
> KR,
> Christoph
>
> *Gesendet:* Montag, 23. November 2020 um 00:00 Uhr
> *Von:* "Andreas Plesch" <andreasplesch at gmail.com>
> *An:* "X3D Graphics public mailing list" <x3d-public at web3d.org>
> *Betreff:* [x3d-public] ProtoInstance USE without name
> 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
>


-- 
Andreas Plesch
Waltham, MA 02453
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20201123/017488e3/attachment-0001.html>


More information about the x3d-public mailing list