[x3d-public] [x3d] X3D Specification Relationships diagram
Andreas Plesch
andreasplesch at gmail.com
Fri Aug 11 07:33:47 PDT 2017
>
> Date: Thu, 10 Aug 2017 18:31:25 -0700
> From: Leonard Daly <Leonard.Daly at realism.com>
> To: John Carlson <yottzumm at gmail.com>, X3D Graphics public mailing
> list <x3d-public at web3d.org>, Web3D Consortium <
> consortium at web3d.org>
> Cc: X3D Graphics Working Group <x3d at web3d.org>
> Subject: Re: [x3d-public] [x3d] X3D Specification Relationships
> diagram
>
Leonard, thanks for raising this, and I appreciate your attempt to rally
broader support around v4 and web compatibility. I continue to do what I
can which is not too much these days.
On 8/10/2017 5:17 PM, John Carlson wrote:
> >
> > Leonard wrote:
> >
> > >and node name collisions (i.e., Script).
> >
> > There has been quite a bit of progress with this and X3DJSONLD and
> > X3DOM. It?s been under the covers because I have not advertised it
> > much. I have several scripts running, but not the full complement of
> > my examples. It does not run the X3D event model yet, except for
> > initialize().
> >
> > Cobweb of course, already handles this, so quit bellyaching.
> >
>
> Cobweb even with Andreas' DOM interface extensions does not integrate
> with the DOM regarding Scripts. A full integration would allow the
> following:
>
>
Mixing DOM and x3d scripts is inherently problematic since x3d scripts
expect their own environment (scope). But let's see.
> X3D Script function called 'foo'
> HTML script function called 'bar'
>
> In the body of bar, I should be able to redefine 'foo'. It is (in a
> fully integrated system) available as window.foo. Similarly for inside
> of 'foo' to change 'bar'.
>
>
Not sure if x3d scripts should be available globally, eg. as window.foo
which means foo is global. This would mean that any other script or
framework needs to be careful not to use the same function names.
> function bar(event, time) {
> window.foo = bar; // I would (perhaps) settle for
> window.x3d.foo = bar;
> }
>
>
window.x3d should be nicer, as a dedicated namespace. x3dom uses the x3dom
namespace.
This currently does not work since cobweb goes back to the original
function source each time the script is run. But the x3d script could
probably use internally a global HTML script function which can be
redefined at will, to enable a hook into an x3d script.
and
>
> <Script ...> <!-- X3D Script node -->
> function foo (event, time) {
> window.bar = foo;
> }
> </script>
>
>
This probably already works since cobweb evals the function text almost as
is.
Is this the same as
var foo = function (event, time) {do_work;};
window.bar = foo;
?
I should be able to construct an object with 'foo' as a method. E.g.,
>
> var globalVar = {};
> globalVar.x3d = foo;
>
> // should call the X3D script passing it a reference to the current
> value of 'event' and 'time'.
> globalVar.x3d(event, time);
>
>
It may be possible to 'export' named x3d script functions to window.x3d, so
they can be called. cobweb would currently redefine a named function each
time an x3d script is executed.
> Inside 'foo' I should be able to access any DOM element to get it's
> current state or even establish an event listener.
>
You should be able to do that in cobweb now although it would be strange to
find DOM code in an X3D script. Perhaps for HUD of GUI purposes it could be
useful, actually.
> I know there are some things that Cobweb can do, but there has been no
> discussions in the WG for the language that would be necessary to ensure
> HTML/DOM/X3D interaction like I described above.
>
What does the SAI say about manipulating or calling x3d script functions
from the outside ? You may only be able to remove and add complete script
nodes but not work with the script functions ?
> Unrolling scripts on the server (or at least not in the runtime of the
> browser) is all fine and good, but again there has been no discussion in
> the WG as to how to even approach writing that up.
>
> I will be happy to be (relatively) quiet on these points if someone can
> show me working examples and proposed text to make this work.
>
Proposed text would be great. For now, it may be productive to settle for
slightly less integration by keeping x3d scripts pretty much internal to
the x3d context but allow x3d scene control via the DOM, eg. make x3d nodes
similar to svg/html elements.
-Andreas
>
> --
> *Leonard Daly*
> 3D Systems & Cloud Consultant
> LA ACM SIGGRAPH Chair
> President, Daly Realism - /Creating the Future/
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://web3d.org/pipermail/x3d-public_web3d.org/
> attachments/20170810/93cc05ca/attachment.html>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
>
> ------------------------------
>
> End of x3d-public Digest, Vol 101, Issue 9
> ******************************************
--
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/20170811/5e2dbda7/attachment.html>
More information about the x3d-public
mailing list