Transform { translation 0 -1.75 0 children [ DEF Frame Group { children [ DEF T TouchSensor {} Shape { appearance Appearance { material Material { diffuseColor 0 0 0 ambientIntensity 0 specularColor 0.025 0.025 0.025 shininess 0.06615 } } geometry IndexedFaceSet { coord Coordinate { point [ 0.672 0.805 0.0381, 0.678 0.805 0.0204, -0.677 0.805 0.0193, -0.67 0.805 0.0377, 0.658 0.785 0.0487, -0.657 0.785 0.0476, 0.644 0.775 0.0487, 0.644 0.035 0.0487, -0.642 0.775 0.0483, -0.657 0.02 0.0476, 0.631 0.765 0.0381, -0.63 0.765 0.0377, 0.624 0.755 0.0197, -0.622 0.755 0.0201, -0.657 0.785 -0.0471, 0.658 0.785 -0.0475, 0.658 0.02 -0.0475, 0.671 0.805 -0.0362, -0.67 0.805 -0.0372, 0.678 0.805 -0.0192, -0.677 0.805 -0.0188, 0.672 0.007 0.0381, 0.678 0 0.0204, 0.658 0.02 0.0487, -0.642 0.035 0.0483, 0.631 0.047 0.0381, 0.624 0.055 0.0197, 0.671 0.007 -0.0362, 0.678 0 -0.0192, -0.67 0.007 0.0377, -0.677 0 0.0193, -0.63 0.047 0.0377, -0.622 0.055 0.0201, -0.657 0.02 -0.0471, -0.67 0.007 -0.0372, -0.677 0 -0.0188] } coordIndex [ 1, 2, 3, -1, 0, 1, 3, -1, 4, 0, 3, -1, 4, 3, 5, -1, 4, 5, 6, -1, 6, 7, 4, -1, 8, 6, 5, -1, 8, 5, 9, -1, 10, 6, 8, -1, 10, 8, 11, -1, 10, 11, 13, -1, 12, 10, 13, -1, 14, 15, 16, -1, 14, 18, 17, -1, 17, 15, 14, -1, 20, 19, 17, -1, 17, 18, 20, -1, 1, 19, 20, -1, 1, 20, 2, -1, 21, 22, 1, -1, 21, 1, 0, -1, 21, 0, 4, -1, 23, 21, 4, -1, 7, 24, 23, -1, 4, 7, 23, -1, 25, 7, 6, -1, 25, 6, 10, -1, 25, 10, 12, -1, 26, 25, 12, -1, 15, 17, 27, -1, 27, 16, 15, -1, 19, 28, 27, -1, 27, 17, 19, -1, 22, 28, 19, -1, 22, 19, 1, -1, 29, 30, 22, -1, 29, 22, 21, -1, 29, 21, 23, -1, 9, 29, 23, -1, 9, 23, 24, -1, 24, 8, 9, -1, 24, 7, 25, -1, 31, 24, 25, -1, 32, 31, 25, -1, 32, 25, 26, -1, 16, 33, 14, -1, 27, 34, 33, -1, 33, 16, 27, -1, 27, 28, 35, -1, 35, 34, 27, -1, 35, 28, 22, -1, 30, 35, 22, -1, 2, 30, 29, -1, 3, 2, 29, -1, 5, 3, 29, -1, 5, 29, 9, -1, 8, 24, 31, -1, 11, 8, 31, -1, 13, 11, 31, -1, 13, 31, 32, -1, 34, 18, 14, -1, 14, 33, 34, -1, 34, 35, 20, -1, 20, 18, 34, -1, 2, 20, 35, -1, 2, 35, 30, -1] }
} ] } DEF Sphere01 Transform { translation -0.6 0.03253 0.04627 children [ Shape { appearance Appearance { material DEF Mat Material { diffuseColor 1 0 0 } } geometry Sphere { radius 0.012 } } ] } DEF AudioDummy Shape { appearance DEF App Appearance { material Material { diffuseColor 1 1 1 } } #geometry Box { size 0.001 0.001 0.001 } geometry Box { size 1 1 1 } } ] } DEF MovieControl Script { eventIn SFTime startTime eventIn SFBool isOver field SFNode app USE App field SFNode mov DEF Mov MovieTexture { # Icecast streaming server (linux only?) url "http://localhost:8012/playlist.pls?mount=/&file=dummy.pls" speed 0.1 } field SFNode mat USE Mat field SFNode n NULL field SFBool playing FALSE directOutput TRUE url "javascript: function startTime (val,ts) { if (!playing) { app.material.diffuseColor=new SFColor(1,1,1); mat.diffuseColor=new SFColor(0,1,0); app.texture=mov; app.texture.startTime=ts+1; } else { app.material.diffuseColor=new SFColor(0.2,0.2,0.2); mat.diffuseColor=new SFColor(1,0,0); app.texture.stopTime=ts; app.texture=n; } playing=!playing; } function isOver (v,t) { if (v) Browser.setDescription('Radio | Click to listen in'); else Browser.setDescription(''); } " } ROUTE T.touchTime TO MovieControl.startTime ROUTE T.isOver TO MovieControl.isOver |