[x3d-public] X3D Scripting for X3DOM w/o reading standard
John Carlson
yottzumm at gmail.com
Fri Dec 3 20:01:24 PST 2021
The script node is not in the scene in this instance, rather it’s part of
the page. Unless you are referring to SAI. I think that’s in another
document.
What I’m specifically talking about is X3D scripting inside the scene with
script <field>s, which I’m guessing the standard is now punting on based on
the X3DOM examples presented so far.
If someone has a good example of this X3D scripting with X3DOM, by all
means share it!
I really think the W3C or HTML standards body should be approached for this
specific extension of the script node, if the Web3d consortium wishes to
support <field> children under <script>. That is, unless we can change the
behavior of <script>, which I guess is pretty nailed down for security
purposes.
We should also get our ducks in order in X3DOM what we should do if a
ProtoBody contains a script and we have more than one ProtoInstance of the
ProtoBody. Examples, please!
Please provide an accessible standard. The best way I’ve found to learn
is by example. I don’t think the X3D standard is the correct standard to
change, so yes, X3D might want to punt on the event model, if script
<field>s aren’t supported.
I like how X_ITE does this!
Thanks!
John
On Fri, Dec 3, 2021 at 4:54 PM Joseph D Williams <joedwil at earthlink.net>
wrote:
> To me, that example does not show how a script node in the scene fails.
>
> Since this topic hardly sees this list (anymore), maybe need to hear from
> developers and what changes need to be made in x3d4 text up on the web.
>
>
>
>
> https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/concepts.html#Eventmodel
>
>
>
> Joe
>
> the
>
>
>
> *From: *John Carlson <yottzumm at gmail.com>
> *Sent: *Friday, December 3, 2021 2:07 PM
> *To: *Joseph D Williams <joedwil at earthlink.net>
> *Cc: *X3D Graphics public mailing list <x3d-public at web3d.org>
> *Subject: *Re: [x3d-public] X3D Scripting for X3DOM w/o reading standard
>
>
>
> For example, if we see this:
> https://www.kshell.com/pages/rosetta/rosetta_x3dom.html copied from
> another email, we see that there are *no* script <field>s in the code.
>
> Does the X3D4 standard eschew script <field>s? And instead offer
> "onclick()" events?
>
> Thanks!
>
> John
>
> On 12/3/21 15:33, John Carlson wrote:
>
>
>
>
>
> On Dec 3, 2021, at 1:53 PM, Joseph D Williams <joedwil at earthlink.net>
> <joedwil at earthlink.net> wrote:
>
>
>
> 1. 2. What are the stumbling blocks to getting script fields into the
> event model?
>
>
>
> Hi John,
>
> Scripts are completely involved in the x3d sai event model. A script must
> receive an event to begin execution and then it is like an ’external’ in
> that when the script begins it essentially acts like a beginUpdate and when
> it completes it essentially gets an endUpdate and all outputs are sent with
> the same time stamp as kicked off the script. Think of it as script is like
> any other node that can receive and send events. Only exception is, I
> think, that a script directOut does not initiate a new cascade
>
>
>
> Part of the thing to do is try script fields in X3DOM and see if they work
> at all, and if they don’t, try to do a minimal amount of debugging to see
> what might be done.
>
> I do not recall if Roy’s work on this is available still or not.
>
>
>
>
>
> 1. 3. If scripts are transformed, how?
>
>
>
> If it is ECMAScript then what do you do? What can be done? Break it down
> into json like any other node? For some reason I hope not.
>
>
>
>
>
> Well, one could potentially replace field access with a node attribute
> util get or set method. But this can get really tricky, if not impossible
> to do in all cases. It would be better to implement script field routes,
> if possible. See above. If one could get script field routes into the HTML
> standard, much, much better…
>
> Joe
>
>
>
>
>
> *From: *John Carlson <yottzumm at gmail.com>
> *Sent: *Tuesday, November 30, 2021 11:40 AM
> *To: *X3D Graphics public mailing list <x3d-public at web3d.org>
> *Subject: *[x3d-public] X3D Scripting for X3DOM w/o reading standard
>
>
>
> Information needed:
>
>
>
>
>
> 1. Do scripts in proto bodies get copied?
>
>
>
> 2. What are the stumbling blocks to getting script fields into the event
> model?
>
>
>
> 3. If scripts are transformed, how?
>
>
>
> 4. What is the new event model for X3D4?
>
>
>
> John
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20211203/99f5a008/attachment.html>
More information about the x3d-public
mailing list