#VRML V2.0 utf8

DEF Wuerfel Transform  { children   Shape { appearance Appearance { material Material {} }
                                            geometry Box {}
                                          }
                       }

Transform
{  children
   [  Shape { appearance Appearance { material Material {diffuseColor 1 0 0} }
              geometry Box {size 0.5 0.5 0.2}
            }
      DEF Schalter TouchSensor {}
   ]
   translation 4 0 0
}

DEF Interpolator PositionInterpolator
{  key      [ 0      0.5     1     ]
   keyValue [ 0 0 0  0 2 0   0 0 0 ]
}

DEF Uhr TimeSensor { enabled FALSE cycleInterval 5.0 loop TRUE }

ROUTE Schalter.isActive TO Uhr.set_enabled
ROUTE Uhr.fraction_changed TO Interpolator.set_fraction
ROUTE Interpolator.value_changed TO Wuerfel.set_translation
