create3000 / titania

Titania X3D Editor
https://github.com/create3000/titania/wiki
GNU General Public License v3.0
39 stars 10 forks source link

TimeSensor always sends a cycleTime on startup #116

Closed splace closed 5 years ago

splace commented 5 years ago

seems related to #74

TimeSensor always sends a cycleTime on startup, which WAS alright, but now with the fix for #74 you are generally part-way through a loop on startup. (same in X-ite)

*** The browser is requested to replace the world with 'file:///home/simon/timer.wrl'.

1560959786.3916085
1560959790.010871
1560959800.0028558
#VRML V2.0 utf8 Titania V4.5.6

DEF Timer TimeSensor {
  cycleInterval 10
  loop TRUE
}

DEF printTime Script {
  eventIn   SFTime moment

  url "ecmascript:
function moment(ts){
    Browser.println(ts)
}"
  mustEvaluate TRUE
}

ROUTE Timer.cycleTime TO printTime.moment
splace commented 5 years ago

confirmed fixed.