[x3d-public] Macro Children [was: Nodes for V4]

Leonard Daly web3d at realism.com
Fri Sep 2 07:37:42 PDT 2016


On 9/2/2016 5:01 AM, Andreas Plesch wrote:
>
> DEF/USE looks nice. It would require special treatment of nodes 
> DEF/USE by Macro, and perhaps avoiding registration of the nodes 
> element. It may work.
>


I think you want the DOM and X3D trees to look the same whether the 
nodes are inserted from an external source or as a children of 'nodes'. 
That either requires removing the 'nodes' element from the tree (or not 
inserting it) as you indicate OR adding one in when loading from an 
external source. I think this is more of a code optimization issue. I 
don't think it is a good idea to walk the scene graph and assume a 
particular structure.

Another way to look at this is similar to using a color (via Material) 
and an external texture (via ImageTexture). The idea is so that objects 
have some color prior to applying the complete texture. Perhaps X3D 
Nodes in the 'nodes' field are designed to be the initial display of the 
object prior to loading in the external resource. That might cause some 
issues, but I think it is worthy of discussion.

Leonard Daly



> Andreas
>
>
> On Sep 2, 2016 12:32 AM, "Leonard Daly" <web3d at realism.com 
> <mailto:web3d at realism.com>> wrote:
>
>     See below...
>>     On Mon, Aug 29, 2016 at 12:32 AM, Leonard Daly <web3d at realism.com
>>     <mailto:web3d at realism.com>> wrote:
>>
>>         On 8/26/2016 7:39 PM, Leonard Daly wrote:
>>>>         For the last year I have been working on advancing X3D to
>>>>         be standardized in HTML5/DOM environment and support mobile
>>>>         and VR. I have just completed alpha work on the Macro node.
>>>>         This node provides the static definition capabilities of
>>>>         PROTO in an HTML5 environment. It can perform string
>>>>         substitution (name/value pairs) on X3D code stored
>>>>         externally. The node documentation is at
>>>>         http://tools.realism.com/specification/x3d-v40/abstract-specification/changes-additions-x3d-v33/macro
>>>>         <http://tools.realism.com/specification/x3d-v40/abstract-specification/changes-additions-x3d-v33/macro>.
>>>>
>>>>         I will continue to get to at least alpha stage (basic
>>>>         functional implemented and working) for all nodes I
>>>>         discussed during my presentations at Web3D2016 & SIGGRAPH.
>>>>         The presentation is online at
>>>>         http://realism.com/presentations/188?title=Extending-X3DOM-to-Mobile
>>>>         <http://realism.com/presentations/188?title=Extending-X3DOM-to-Mobile>.
>>>>
>>>>
>>>>         All of the code is up on Github at
>>>>         https://github.com/DrX3D/x3dv4 with testing code.
>>>>
>>>>         I am interested in any bugs that are found or new/revised
>>>>         direction for the nodes. I am completely open to anyone who
>>>>         would like to help code.
>>
>>     I understand how the external reference to a macro template works
>>     since for each instance of the macro it is possible to reference
>>     the same url, and therefore template. How do you envision, on the
>>     other hand, use of the nodes field as the other option where the
>>     template is provided as child nodes ? Repeating the template for
>>     each instance would not make a lot of sense. Is there something
>>     you had in mind ?
>
>     I was thinking DEF/USE. USE works in X3DOM by referencing the node
>     sub-tree defined by DEF. Something like:
>
>     <Macro params='"n1=v1","n2=v2"'>
>         <nodes DEF='Macro1Nodes'>
>             <transform ...>
>                     ...
>             </transform>
>         </nodes>
>     </Macro>
>         :
>         :
>     <Macro params='"n1=va","n2=vb"'>
>         <nodes USE='Macro1Nodes'></nodes>
>     </Macro>
>
>
>
>     -- 
>     *Leonard Daly*
>     X3D Co-Chair
>     Cloud Consultant
>     President, Daly Realism - /Creating the Future/
>


-- 
*Leonard Daly*
X3D Co-Chair
Cloud Consultant
President, Daly Realism - /Creating the Future/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20160902/ba01e36b/attachment.html>


More information about the x3d-public mailing list