[x3d-public] dynamic cycleInterval changes
andreasplesch at gmail.com
Mon Nov 21 12:05:39 PST 2016
excellent catch. That is a very explicit rule. It does then seem to make BS
Contact and freewrl non-conforming to the current spec.
Of course, there is a good reason that those browsers behave this way. It
is hard concept to discover and then deal with that only the value
evaluated last will be used to set the actual value and that even ordering
is not guaranteed, eg. set_cycleInterval could occur before
On Mon, Nov 21, 2016 at 9:48 AM, Patrick Dähne <
patrick.daehne at igd.fraunhofer.de> wrote:
> Hello Andreas,
> code does not comply with X3D. Have a look at the following lines:
> time.enabled = false;
> time.cycleInterval = 5;
> time.enabled = true;
> And now have a look at the spec (X3D Language Bindings : ECMAScript
> … Events generated by setting an input-capable field on a node are sent at
> the completion of the initial function call made to the user code by the
> browser. … Assigning to the inputOnly field multiple times during one
> execution of the function still only sends one event and that event shall
> be the last value assigned.
> So in X3D conformant browsers, the lines above send only two events:
> 1. time.enabled = true
> 2. time.cycleInterval = 5
> The first assignment to time.enabled gets overwritten by the second
> assignment, so the timer never gets disabled.
> > Am 20.11.2016 um 21:36 schrieb Andreas Plesch <andreasplesch at gmail.com>:
> > I want to change the cycleTime of a TimeSensor in a x3d script:
> > https://raw.githubusercontent.com/andreasplesch/cobweb_dom/
> > cycleTime input events are ignored when the TimeSensor is enabled. So it
> is necessary to disable it first, then change the cycleTime and then
> reenable it.
> > However, in all tested browser the above does not work as expected.
> These are cobweb, instant player and bs contact. bs contact also has this
> console message:
> > Script node speeder: parse error: line 16 "time.cycleInterval = 2;" ()
> > and therefore does not get to change the color to grey.
> > cobweb and instant player change the color but do not slow down the ball.
> > I first thought that cobweb does not correctly work through the sequence
> of events but since no browser works sofar I start to think that I am
> missing something.
> > Any help or feedback appreciated,
> > -Andreas
39 Barbara Rd.
Waltham, MA 02453
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the x3d-public