[x3d-public] Nodes for V4

Andreas Plesch andreasplesch at gmail.com
Sun Aug 28 14:42:32 PDT 2016


Hi Don,

to me, the idea here is to be very pragmatic in order to make some progress
with html integration.

Date: Sun, 28 Aug 2016 11:57:37 -0700
> From: Don Brutzman <brutzman at nps.edu>
> To: Leonard Daly <web3d at realism.com>
> Cc: X3Dom Users <x3dom-users at lists.sourceforge.net>, X3D Public
>         <x3d-public at web3d.org>
> Subject: Re: [x3d-public] Nodes for V4
>
>
> a. Not clear what your motivation is.  What functionality does a Macro
> node provide that isn't already available using Script and Prototype
> definitions?  Getting clear about differences helps getting clear about
> goals.
>

I agree, the Macro node would offer nothing that is not already available
with Protos. The issue is, however, that in the foreseeable future Protos
are not actually available with x3dom. To me it makes sense to give a node
with a more narrow and simpler functionality than Protos a distinct name
and distinct semantics.
Even outside of x3dom it would be nice (although not necessary) to have a
simpler to understand, limited Proto, eg. just a Macro with parameter
substitution.

A related question is if such a Macro node could coexist with Protos if it
would come to it, given their overlap. I think it probably could. [To make
it simple, one could disallow usage of Macros within proto declarations and
vice versa.] [[I think, usage of Macro instances within Macro templates is
currently not possible. Should it?]]

As a side note, in an html/DOM environment many scene creators would use a
templating engine:
https://www.sitepoint.com/overview-javascript-templating-engines/
But this requires some non-declarative programming and as such is outside
the scope of x3d.

b. Usage examples are often helpful for illustrating goals at this stage of
> design.
>

Since no internal computations are possible, usage would be limited. There
is still a class of useful templates: variations of color, dimensions (eg.,
an arrow macro), perhaps timesensor/interpolator/route animation macros,
perhaps shaders with parameters, probably many others.

[Currently, one could likely (ab-)use the Macro to also include a DOM
script node which would be affected by parameter substitution and which
then could set fields of x3d nodes in the instance with computed/generated
values upon execution during final parsing].


> c. Previous efforts on NetworkSensor node, and the difficulties
> encountered, may be worth considering:
>
>         http://www.web3d.org/x3d/content/examples/Basic/Networking/
>         http://www.web3d.org/x3d/content/examples/Basic/Networking/
> NetworkSensorConnectionPrototypes.x3d
>         http://www.web3d.org/x3d/content/examples/Basic/Networking/
> NetworkSensorConnectionPrototypes.html
>
>         http://www.web3d.org/x3d/content/examples/Basic/Networking/
> NetworkSensorConnectionNodes.html
>
>
I think the Macro node would not be able define new fields if this is the
concern. Is it ?

some input,

Andreas

-- 
Andreas Plesch
39 Barbara Rd.
Waltham, MA 02453
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20160828/5c6393fc/attachment-0001.html>


More information about the x3d-public mailing list