instantreality forum
news: Welcome to the instantreality forums!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
January 17, 2018, 02:31:39 am


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Dynamic TimeSensor only works with loop = true  (Read 1964 times)
jasch
Newbie
*
Posts: 5


View Profile
« on: June 29, 2013, 08:27:19 pm »

Hello,

i got a problem creating a timesensor via javascript and setting its loop-property to false.

My code looks like this:

time_sensor = new SFNode('TimeSensor');
time_sensor.cycleInterval = 10;
time_sensor.loop = false;
transform_node.addChild(time_sensor);
time_sensor.enabled = true;


When i set loop = true everything works as i would expect it. When i set loop = false the timesensor gets created, i can see the timesensor in the web interface of the scene graph, but it is not active. How can i get an activated timesensor without looping?

Thanks in advance

Jan



Logged
yjung
Administrator
Sr. Member
*****
Posts: 260


View Profile
« Reply #1 on: June 30, 2013, 07:01:15 pm »

The X3D spec says: "A time-dependent node is inactive until its startTime is reached." [http://www.web3d.org/files/specifications/19775-1/V3.2/Part01/components/time.html]
Logged
jasch
Newbie
*
Posts: 5


View Profile
« Reply #2 on: July 11, 2013, 05:59:05 pm »

Thank you very much,

i think, i could have looked months into this and wouldn't have seen this.

Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.15 | SMF © 2011, Simple Machines