show
function showTimer(value,time) {
var currSlide = slides.whichChoice;
var slide = slides.choice[currSlide];
if(value) {
if(slide.showEffect == -1) {
effect = Math.round(Math.random()*
effects.show.length);
if(effect >= effects.show.length) {
effect=0;
}
} else {
effect = slide.showEffect;
}
Browser.addRoute(effects.show[effect],
'translation',
slide,
'translation');
Browser.addRoute(effects.show[effect],
'rotation',
slide,
'rotation');
Browser.addRoute(showTimeSensor,
'fraction_changed',
effects.show[effect],
'set_fraction');
effects.show[effect].set_fraction = 0.0;
} else {
Browser.deleteRoute(effects.show[effect],
'translation',
slide,
'translation');
Browser.deleteRoute(effects.show[effect],
'rotation',
slide,
'rotation');
Browser.deleteRoute(showTimeSensor,
'fraction_changed',
effects.show[effect],
'set_fraction');
}
}