[x3d-public] ProtoInstance USE without name

Andreas Plesch andreasplesch at gmail.com
Sun Nov 22 17:48:03 PST 2020


https://github.com/create3000/Library/search?p=3&q=ProtoInstance+USE%3D

is a search for USE ProtoInstances in the Library (although github search
is very limited).

Most USE ProtoInstances do not have a name attribute in the Library but a
few do:

https://github.com/create3000/Library/blob/11f7f4ad710f2fd9ab88c82a0ea39cb1afe67686/Tests/Components/ParticleSystems/BoundedPhysicsModel.x3d#L121

Perhaps sometimes it is somehow required to actually add the name ?

-Andreas

On Sun, Nov 22, 2020 at 8:36 PM John Carlson <yottzumm at gmail.com> wrote:

> I don't have any .x3d HTML examples for Holger's library. I can provide
> json examples, if needed.  I
>
> If you've got X3DJSONLD installed, running x_ite.sh in
> X3DJSONLD/src/main/shell should look in ../Library (Holger's library copy)
> and produce a plethora of .json files. I would uncomment the commented out
> "exit" in several.sh to stop running all the example code generated.
>
> But it may be easier to provide you with my copy of Holger's Library.
>
> Thanks!
>
> John
>
> On Sun, Nov 22, 2020 at 7:25 PM John Carlson <yottzumm at gmail.com> wrote:
>
>> Holger's Library probably still has ProtoInstance's with USE without a
>> name.  You'll probably want to check if they work in X3DOM.
>>
>>
>> On Sun, Nov 22, 2020 at 6:46 PM Andreas Plesch <andreasplesch at gmail.com>
>> wrote:
>>
>>> Yes. I was saying these are the only Proto examples I came across which
>>> do have USE without a name. To me it would be clearer and more similar to
>>> regular nodes if name would be always added, perhaps even required (even
>>> though not strictly necessary).
>>>
>>> Andreas
>>>
>>> On Sun, Nov 22, 2020 at 6:21 PM John Carlson <yottzumm at gmail.com> wrote:
>>>
>>>> I'm not finding any name's and USE's together in ProtoInstance node in
>>>> the LOA*.x3d examples from the HAnim 2 part 1 spec.
>>>>
>>>> grep ProtoInstance LOA*x3d|grep USE|grep name
>>>>
>>>> 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
>>>>>
>>>>
>>>
>>> --
>>> Andreas Plesch
>>> Waltham, MA 02453
>>>
>>

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


More information about the x3d-public mailing list