#VRML V2.0 utf8 ## ##@* object ##@ proto object PROTO object [ ## "@vr-extern-object.wrl" exposedField SFColor color 0 0 1 exposedField SFFloat transparency 0 exposedField SFNode node NULL exposedField SFTime cycle 1 ]{ DEF time TimeSensor { cycleInterval IS cycle loop TRUE enabled TRUE } Group { children [ DEF object Transform { children [ DEF shape Shape { appearance Appearance { material Material { diffuseColor IS color transparency IS transparency } } geometry Box {} } ] } Script { field SFNode shape USE shape field SFNode node IS node field SFTime cycle IS cycle url "javascript: function initialize() { if (node) shape.geometry = node; if (cycle == 0) time.enabled = FALSE; } " } ] } ##@ sensor and interpolator DEF rotation OrientationInterpolator { key [ 0 0.25 0.5 0.75 1 ] keyValue [ 1 1 0 0, 1 1 0 1.57, 1 1 0 3.14 1 1 0 4.71, 1 1 0 0 ] } ##@ event routing ROUTE time.fraction TO rotation.fraction ROUTE rotation.value TO object.rotation } ##@ instance object { } ##