[x3d-public] protos for v4: x3dom + cobweb?

Joe D Williams joedwil at earthlink.net
Thu Jan 28 13:54:49 PST 2016

----- Original Message ----- 
From: "John Carlson" <yottzumm at gmail.com>
To: "Joe D Williams" <joedwil at earthlink.net>
Cc: "doug sanden" <highaspirations at hotmail.com>; "X3D Graphics public 
mailing list" <x3d-public at web3d.org>
Sent: Thursday, January 28, 2016 12:38 PM
Subject: Re: [x3d-public] protos for v4: x3dom + cobweb?

> So you have to keep all events around until all direct outputs are 
> sent?

Main idea, the X3D Script node is (can be) a full featured Sensor node 
and basically runs like all other nodes; is smart.

Right, no sense sending events as they are set, unless you really need 

Don't get "direct outputs" or "directOuts" mixed up with normal 

You declare each directOut.
Figure that directOut means the Script node has direct access to the 
gozinta of another node (no route required) and thus will be sent as 
To some, this is like existing real life everywhere, but to X3D it is 
the exception because preservation of the cascade is most 
important.and besides we like routes.

If tuning, you send periodic updates via the cascade, but if you need 
to use a hammer, then you can kick only it without distrurbing the 
rest using a directOut

So, the idea is that all events are sent in sequence when the script 
is complete, then contol is returned. Still, this might not result in 
actual update of graph if cascade is not complete, I think.

> How do you create a cascade?

Let's look at the abstract and SAI, but the initial event gets a time 
stamp and all events in that cascade have the same time stamp. All 
events in a cascade happen at the same time, or instantaneously.

>  What is “complete”?

There are some words for this having to do with control being passed 
between the Script node and the system.

>  Parsed?

something gets parsed somewhere sometime, I guess.
There are strict tules about when scripts are alive and can be called

> How do scripts “run”,

a function has an entry and an exit point. The part that allows the 
script node to do its thing passes control

>  when they are a collection of functions?

then 'this' for sure. a Script node can include several functions; 
some have predefined names.

> Are functions events?

the gozintas and gozoutas of the functions are events

next I would start looking at 4 Concepts and SAI definitions.

Basically all operations (like Script node) are the same for VRML2/97 
and X3D, just the old VRML EIA was replaced by better 
internal/external alignment of X3D SAI.


> On Jan 28, 2016, at 1:10 PM, Joe D Williams <joedwil at earthlink.net> 
> wrote:
> The X3D execution model is simple.
> The script is this.
> Events are sent when the script is complete.
> Events are part of the current cascade.
> DirectOutputs are sent as set, outside the current cascade.
> Joe
> ----- Original Message ----- From: "John Carlson" 
> <yottzumm at gmail.com <mailto:yottzumm at gmail.com>>
> To: "doug sanden" <highaspirations at hotmail.com 
> <mailto:highaspirations at hotmail.com>>
> Cc: "X3D Graphics public mailing list" <x3d-public at web3d.org 
> <mailto:x3d-public at web3d.org>>
> Sent: Thursday, January 28, 2016 7:05 AM
> Subject: Re: [x3d-public] protos for v4: x3dom + cobweb?
> Here’s a good start on porting Scripts from X3D to X3DOM:
> https://github.com/coderextreme/X3DJSONLD/blob/master/Script.js 
> <https://github.com/coderextreme/X3DJSONLD/blob/master/Script.js><https://github.com/coderextreme/X3DJSONLD/blob/master/Script.js 
> <https://github.com/coderextreme/X3DJSONLD/blob/master/Script.js>>
> download the code with:
> git clone https://github.com/coderextreme/X3DJSONLD/ 
> <https://github.com/coderextreme/X3DJSONLD/>
> I need help understanding the X3D execution model.  Right now, it’s 
> all messed up.
> This is a driver for it:
> https://github.com/coderextreme/X3DJSONLD/blob/master/PPP.js 
> <https://github.com/coderextreme/X3DJSONLD/blob/master/PPP.js><https://github.com/coderextreme/X3DJSONLD/blob/master/PPP.js 
> <https://github.com/coderextreme/X3DJSONLD/blob/master/PPP.js>> 
> which generates the JavaScript and evals (yuck!) it.
> I’m not sure prototypes need too much more work, but you can try 
> converting your prototypes to JSON and expanding them.  it would be 
> helpful to get a
> tester.  I would just like to get scripting working in the short 
> term. That’s my priority 1 item besides validating and encoding JSON 
> for display in X3DOM.
> We can add stuff like the requestFieldRef and releaseFieldRef to the 
> X3D JSON loader for X3DOM soon as well.  Question:  Can I request 
> and release in quick succession, and can I use objects and arrays to 
> set the values of the requested field?
> This code allows for Cross Site Scripting (XSS) if used improperly! 
> Know your data (no don’t trust it), or validate with schema and 
> encode (yes we are working on it).
> John
>> On Jan 28, 2016, at 9:42 AM, John Carlson <yottzumm at gmail.com> 
>> wrote:
>> Think of Cobweb as a classic VRML silo ported to the web.  At least 
>> that’s what it seems like to me.  You must use VRML types in your 
>> VRMLscript, it’s not JavaScript.
>> But yeah, if I read your subject right, you want to port Cobweb 
>> protos to X3DOM.  I believe scripts would have to be ported as 
>> well. It might be worth investigating.
>> John
>>> On Jan 28, 2016, at 9:19 AM, John Carlson <yottzumm at gmail.com> 
>>> wrote:
>>> AFAIK, Cobweb does not do DOM or JQuery.  Protos can be used with 
>>> X3DOM, using my prototype expander for JSON (in beta), but not 
>>> VRMLscript (partial implementation, alpha or pre alpha).
>>> We need to figure out how to route to and from scripts in X3DOM. 
>>> See my many postings pleading for help.  If you would want to 
>>> help, I can show you the ropes.
>>> The alternative to Protos for X3DOM is web components, which is 
>>> what the X3DOM folks are proposing.
>>> John
>>>> On Jan 28, 2016, at 9:13 AM, doug sanden 
>>>> <highaspirations at hotmail.com> wrote:
>>>> Q. could protos for V4 be in cobweb format?
>>>> -Doug
>>>> Goal: keep the jQuery/DOM crowd happy, but just up to the 
>>>> interface of a proto, not its body.
>>>> x I have not studied any techical details of either x3dom or 
>>>> cobweb, I have no idea if its doable/practical
>>>> _______________________________________________
>>>> x3d-public mailing list
>>>> x3d-public at web3d.org
>>>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
> --------------------------------------------------------------------------------
>> _______________________________________________
>> x3d-public mailing list
>> x3d-public at web3d.org <mailto:x3d-public at web3d.org>
>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org 
>> <http://web3d.org/mailman/listinfo/x3d-public_web3d.org>

More information about the x3d-public mailing list