There are 16 TimeSensors. Each sensor is routed to an position interpolator that moves a rectangle along a horizontal track (line). At the left of each track is a white circle that shows the active state of each TimeSensor, that when filled means the TimeSensor is active. All TimeSensors have a cycleInterval of 20s.
The group of upper eight tracks are 'powered' by TimeSensors with loop set to false. The lower eight tracks have loop set to true. The track groups are in different colors to easily visually separate these two sets.
Within each group of 8 tracks the upper 4 have enabled set to true whilst the lower 4 initially have enabled set to false. The lower 4 tracks in each group then have enabled set to true at t=5s and set back to false at t=15s.
Then within each group of 4 the startTime and stopTimes are as follows:
startTime | stopTime |
---|---|
0s | 0s |
2s | 0s |
0s | 10s |
2s | 10s |
At t=30s the loop field for the TimeSensors of tracks 8 and 9 (the first two in the lower set) is set from true to false. So these carry on until t=40s when they come to the end of the cycleInterval.
And then just to ensure times are based from the insertion point a new equivalent scene is created at t=45s that, apart from the different colors, should behave exactly the same as what was already seen.
To help visualize this there are a set of screen captures below taken at various times during the test
Snapshot of rendered output just after t=2s. The first blocks move at t=0 (tracks 1, 3, 8 and 10) as the startTime of those
TimeSensors is 0. Tracks 2, 4, 9 and 11 have their TimeSensor startTime at t=2s. So up until t=5s only these 2 groups of 4 tracks
move.
![]() |
Snapshot of rendered output just after t=5s. At t=5s the tracks 4, 5, 6 and 7; plus tracks 12, 13, 14 and 15 had their
TimeSensor enabled field set to true from the initial value of false. So all tracks are now active.
![]() |
Snapshot of rendered output just after t=10s. At t=10s tracks 3, 4, 7, 8, 11, 12, 15 and 16 all reached the stopTime on their
TimeSensors and have become inactive (this is every other group of 2 tracks).
![]() |
Snapshot of rendered output just after t=15s. At t=15s tracks 5 thru' 8 and 13 thru' 16 all have TimeSensor enabled set back to
false and are frozen in position. So now only tracks 1, 2, 8 and 9 continue to be active (the others reached their stopTime at
t=10s or were just disabled at t=15s).
![]() |
Snapshot of rendered output around t=25s. Tracks 1 and 2 ended at 20s but tracks 8 and 9, with loop set true, continue to run. At
t=30s TimeSensor loop is set to false on tracks 8 and 9 and they should continue to run until t=40s.
![]() |
At t=40s blocks 8 and 9 have finally moved all the way along the track for the second time and the sequence ends.
![]() |
At t=45s a whole new sequence started that plays out the same as the first (different color blocks only to show its the new
scene).
![]() |