[x3d-public] ProtoInstance USE without name
John Carlson
yottzumm at gmail.com
Sat Nov 28 20:34:20 PST 2020
Note: JSONParser.js does not contain a validator, so we fall back to any
validation is done on DOM/XML.
John
On Sat, Nov 28, 2020 at 2:47 PM Andreas Plesch <andreasplesch at gmail.com>
wrote:
> Thanks, I will take a look.
>
> ---on the phone---
>
> On Sat, Nov 28, 2020, 9:17 AM Christoph Valentin <
> christoph.valentin at gmx.at> wrote:
>
>> Hi Andreas,
>>
>> I felt free to provide an example scene in three flavors.
>>
>> The prototype renders a little pig that says "Eatme!", when you touch it
>> (in remembrance of Douglas Adams)
>>
>> Version A: <ProtoInstance USE="xxx" name="yyy"/> WITH name attribute -
>> standards compliant
>> Version B: <ProtoInstance USE="xxx"/> WITHOUT name attribute
>> Version C: <Script USE="xxx"/> WORKAROUND - works for all browsers
>>
>> I tested with BS Contact --- he can cope with all three versions.
>>
>> Download the .zip file at
>> https://lc-soc-lc.at/experimental/ProtoInstanceWithUSE/ I provide it
>> by a GPLv3.
>>
>> Feed Back welcome. You may take it and give it to your benchmark tests,
>> if you like.
>>
>> Kind regards,
>> Christoph
>>
>>
>> *Gesendet:* Dienstag, 24. November 2020 um 00:30 Uhr
>> *Von:* "Andreas Plesch" <andreasplesch at gmail.com>
>> *An:* "Christoph Valentin" <christoph.valentin at gmx.at>
>> *Cc:* "X3D Graphics public mailing list" <x3d-public at web3d.org>
>> *Betreff:* Re: [x3d-public] ProtoInstance USE without name
>> 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
>>
> _______________________________________________
> 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/20201128/cc0fda33/attachment-0001.html>
More information about the x3d-public
mailing list