##:@* template logo ##@ video and text @text1

@text2

<3dobject id=@tid-o-1 s=0.5 x=7 y=-1> DEF @tid-touch TouchSensor { } Shape { appearance Appearance { material DEF @tid-MAT Material { diffuseColor 1 1 0 transparency 0.6 } } geometry Box { } } ##@ animator <3dobject> DEF @tid-time TimeSensor { cycleInterval 4 loop TRUE } DEF @tid-script Script { directOutput TRUE eventIn SFTime touch eventIn SFTime time eventOut SFFloat transparency field SFNode video USE @tid-ch-1 field SFNode text1 USE @tid-t-1 field SFNode text2 USE @tid-t-2 field SFNode block USE @tid-MAT field MFString string [] field SFInt32 state 0 field SFInt32 notify 0 url "javascript: function time(value) { if (notify==0) { notify = 1; } else if (notify==1) { touch(value); notify++; } else if (notify==2) { touch(value); notify++; } } function touch(value) { if (state == 0) { string = text1.string; text1.string = text2.string[0]; text1.alpha = 0; text2.alpha = 1; state = 1; } else if (state == 1) { text1.alpha = 1; block.transparency = 1; state = 2; } else if (state == 2) { text1.string = string; text1.alpha = 0; block.transparency = 0.6; state = 3; } else if (state == 3) { video.stopTime = value; state = 4; } else if (state == 4) { video.stopTime = 0; video.startTime = value; state = 0; } } " } ROUTE @tid-touch.touchTime TO @tid-script.touch ##ROUTE @tid-time.cycleTime TO @tid-script.time DEF @tid-time TimeSensor { loop TRUE cycleInterval 5 } DEF @tid-colors ColorInterpolator { key [ 0 0.5 1 ] keyValue [ 0 1 0, 1 0 0 ,1 0 1 ] } DEF @tid-scalar ScalarInterpolator { key [ 0 0.5 1 ] keyValue [ 0 0.5 1 ] } ## ROUTE @tid-time.fraction TO @tid-colors.fraction ## ROUTE @tid-colors.value TO @tid-t-1.color ## ROUTE @tid-colors.value TO @tid-MAT.diffuseColor DEF @tid-back ColorInterpolator { key [ 0 0.5 1 ] keyValue [ 1 1 0, 0 1 0 ,0 1 1 ] } DEF @tid-rotation OrientationInterpolator { key [ 0 0.5 1] keyValue [ 1 1 0 0, 1 1 0 1.56 , 1 1 0 3.14 ] } ## ROUTE @tid-time.fraction TO @tid-back.fraction ## ROUTE @tid-back.value TO @tid-ch-1.color ## ROUTE @tid-time.fraction TO @tid-scalar.fraction ## ROUTE @tid-scalar.value TO @tid-ch-1.alpha ROUTE @tid-time.fraction TO @tid-rotation.fraction ROUTE @tid-rotation.value TO @tid-o-1.rotation ##