#VRML V2.0 utf8 NavigationInfo { headlight TRUE avatarSize [ 0.25 1.75 0.75 ] type ["WALK"]} Viewpoint { position 15 1.75 20 description "Point zéro" } Viewpoint { position 0 100 0 description "Point un" orientation 1 0 0 -1.57 } DirectionalLight {direction 0 -1 0} Transform { translation 2 5 0 children [ Anchor { children [ Transform{ # translation $Position_x $Position_y $Position_z rotation 0 1 0 $Rotation children [ Shape { geometry IndexedFaceSet { solid FALSE coord Coordinate { point [ 0 -0.5 -.05, 0 1 -.05, 14.5 1 -.05, 14.5 -0.5 -.05, ]}#fin coordinate coordIndex [0,1,2,3,-1 ] texCoord TextureCoordinate {point [ 0 0,0 1,1 1,1 0, ]} } appearance Appearance { material Material { diffuseColor .9 .0 .10 shininess .1 specularColor .9 .15 .02 ambientIntensity 0 emissiveColor .9 .18 .09 } } #appearance Appearance {texture ImageTexture { url "http://perso.kaina.mageos.com/texture/pierre.jpg"} } }]#fin children shape indexface }#fin transform Shape { appearance Appearance { material Material { diffuseColor .9 .44 .22 shininess .1 specularColor .9 .15 .02 ambientIntensity 0 emissiveColor .9 .18 .09 } } geometry Text { string " Leave a message / Laissez un message !"} } ] url "http://www.raging.is-a-chef.com/3dtext/Saisie.php" parameter ["target=_top"] } ]} Transform { translation 20 5 0 children [ Transform{ # translation $Position_x $Position_y $Position_z rotation 0 1 0 $Rotation children [ Shape { geometry IndexedFaceSet { solid FALSE coord Coordinate { point [ -0.05 -0.5 -.05, -0.05 1 -.05, 8.5 1 -.05, 8.5 -0.5 -.05, ]}#fin coordinate coordIndex [0,1,2,3,-1 ] texCoord TextureCoordinate {point [ 0 0,0 1,1 1,1 0, ]} } appearance Appearance { material Material { diffuseColor .1 .50 .50 shininess .1 specularColor .9 .15 .02 ambientIntensity 0 emissiveColor .9 .18 .09 } } #appearance Appearance {texture ImageTexture { url "http://perso.kaina.mageos.com/texture/pierre.jpg"} } }]#fin children shape indexface }#fin transform DEF Bouton TouchSensor {} Shape { appearance Appearance { material Material { diffuseColor .9 .0 .0 shininess .1 ambientIntensity 0 } } geometry Text { string " Click to experience !"} } ] } # Les commentaires sont la DEF Conteneur Transform {children []} DEF Change Script { field SFNode Recepteur USE Conteneur eventIn SFBool isActive field MFNode tempNode [] field MFString newVRML "" field SFInt32 etat 0 directOutput TRUE url "javascript: function initialize() { newVRML = ' Inline { url \"http://www.raging.is-a-chef.com/3dtext/3dpost.php \" }'; tempNode=Browser.createVrmlFromString(newVRML); Recepteur.addChildren=tempNode; etat=2; } function isActive(value) { if (value) { if (etat==0){ newVRML = 'Inline { url \"http://www.raging.is-a-chef.com/3dtext/escalier.php \" }'; } if (etat==1){ newVRML = ' Inline { url \"http://www.raging.is-a-chef.com/3dtext/3dpost.php \" }'; } if (etat==2){ newVRML = ' Inline { url \"http://www.raging.is-a-chef.com/3dtext/vague.php \" }'; } etat++; if (etat==3){etat=0;} Recepteur.removeChildren=tempNode; tempNode=Browser.createVrmlFromString(newVRML); Recepteur.addChildren=tempNode; } } " } ROUTE Bouton.isActive TO Change.isActive