#VRML V2.0 utf8 WorldInfo { info "2000/9/20 by GoGoGo, http://www1.plala.or.jp/Studio_GoGoGo/" title "Texture On/Off 1/4" } NavigationInfo {type "EXAMINE"} Viewpoint {} #Box DEF TS TouchSensor {} Shape { appearance Appearance { material Material {} texture DEF imageTex ImageTexture {} } geometry Box {} } #Script DEF SC Script { eventIn SFTime touchTime eventOut MFString URL field SFBool texOn FALSE field MFString texURL1 "sign.gif" field MFString texURL2 [] url "javascript: function touchTime(value){ if(!texOn){ texOn=TRUE; URL=texURL1; } else { texOn=FALSE; URL=texURL2; } }" } ROUTE TS.touchTime TO SC.touchTime ROUTE SC.URL TO imageTex.set_url