media @ VU
[] readme course preface I 1 2 II 3 4 III 5 6 7 IV 8 9 10 V 11 12 afterthoughts appendix references examples resources _

talk show tell print

music-dossier-3D_installation_environment.vr

music-dossier-3D_installation_environment.vr (wrl ) [ flux / bitmanagement / cortona / octaga ]


  
  #EXTERNPROTO        exit[]
  #"models\exit.wrl#exitButton"
  #        # installation  

EXTERNPROTO installationGuitarProto [ #c #eventIn SFBool videoOffOn eventIn SFBool resetPosition ] "installation/installation.wrl" EXTERNPROTO Layer3D [ eventIn MFNode addChildren eventIn MFNode removeChildren eventIn MFNode addChildrenLayer eventIn MFNode removeChildrenLayer exposedField SFVec3f bboxSize exposedField SFVec3f bboxCenter exposedField MFNode childrenLayer exposedField SFVec2f translation exposedField SFInt32 depth exposedField SFVec2f size exposedField SFNode background exposedField SFNode fog exposedField SFNode navigationInfo exposedField SFNode viewpoint exposedField MFNode children ] [ "urn:inet:blaxxun.com:node:Layer3D" "http://www.blaxxun.com/vrml/protos/nodes.wrl#Layer3D" "http://www.blaxxun.com/developer/contact/3d/vrml/demo/layer/nodes.wrl#Layer3D" ] PROTO GuitarEnv [ eventOut SFBool closeMyTD eventIn SFBool show eventIn SFString text eventIn SFNode contentLeft eventIn SFNode contentMiddle eventIn SFNode contentRight eventIn SFNode infoObject # eventIn SFString showTitle # eventIn MFNode setNodes # eventOut SFBool closeButtons eventOut SFBool ready eventIn SFBool exitInstallation ]{ DEF environment Transform { # translation 0 0 38 children [ Transform { translation 0 -1.25 4 children [ Shape { geometry Box { size 0 0 0 } appearance Appearance { material Material { diffuseColor .38 .38 .42 specularColor .53 .53 .53 ambientIntensity .0933 shininess .93 } } } ] } DEF installationSwitch Switch { whichChoice 0 choice [ Transform { translation 1 -1 3 children [ DEF installationProto installationGuitarProto{} ] } ] } ] } DEF layer Layer3D { size 1.7 0.7 navigationInfo NavigationInfo { type "NONE" } viewpoint DEF Viewpoint1 Viewpoint { fieldOfView 0.5 orientation 0 1 0 0.0 position -10 3.8 25 } children [ Transform { translation 1 -0.9 3 children [ Inline { url "models/exit.wrl" } DEF exitInstallation TouchSensor{} ] } Transform { translation -1 -1.2 3 children [ Inline { url "models/resetButton3Dinstallation.wrl" } Shape { geometry Box { #hitbox size 0.7 0.7 0.7 } appearance Appearance { material Material { transparency 1 } } } DEF resetPosition TouchSensor{} ] } Transform { translation -11 -1.2 3 children [ Shape { geometry DEF infoTextLine Text { string "" fontStyle FontStyle { size 0.5 justify "MIDDLE" } } } ] } DirectionalLight { direction 0 0 -1 on TRUE intensity 0.9 } ] } DEF layerScript Script { eventIn SFBool exitInstallation IS exitInstallation # exit button -- exit the installation and return to the concept graph # eventIn SFBool infoInstallation # switch button -- for showing background video, picture and text info # eventIn SFBool infoText # textual description switch button eventIn SFBool overResetInstallation eventIn SFBool overExitButton # eventIn SFBool resetFurniture eventIn MFNode nodes IS setNodes eventOut SFBool close IS closeMyTD eventOut SFBool ready IS ready eventOut SFNode pane1 eventOut SFNode pane2 eventOut SFNode pane3 eventOut SFNode pane4 eventOut SFNode pane5 eventOut SFNode pane6 # eventOut MFString rollOverTextInfoButton eventOut MFString rollOverTextResetButton eventOut MFString rollOverTextExitButton # eventOut SFBool videoOnOff field SFNode installation USE installationSwitch eventIn SFBool show IS show field SFNode currentNode NULL field MFNode infoObjects [] # field SFBool environmentOnOff TRUE # boolean for switch button --> background video, picture and text info -- on/off url "javascript: function initialize() { ready = true; } function overResetInstallation(value) { if (value) { rollOverTextResetButton = 'reset to original position'; } else { rollOverTextResetButton =''; } } // function infoText(value){ // if(value){ // rollOverTextInfoButton = 'information on/off'; // } else { // rollOverTextInfoButton =''; // } // } function overExitButton(value){ if(value){ rollOverTextExitButton = 'exit & return to conceptgraph'; } else { rollOverTextExitButton =''; } } function exitInstallation(value){ //print('close'); if(value) close = true; close = true; //raar // videoOnOff = false; //c } // function infoInstallation(value) // {
/ if(value) close = true;

// if(value){ // if(environmentOnOff == true){ // infoVisible(true); // environmentOnOff = false; // } else { // infoVisible(false); // environmentOnOff = true; // } // } // } // function infoVisible(value) // { // if(value) // { // for(j=0;j<currentNode.connectedNodesOut.length;j++) // { // var x = currentNode.connectedNodesOut[j].infoObjects; // for(k=0;k<x.length;k++) // { // //print('test' + x[k].getType()); // if(x[k].getType() == 'Picture' || x[k].getType() == 'Video' || x[k].getType() == 'TextItem') // { // //print('hier' + x[k]); // infoObjects.add(x[k]); // } // } // } // //print('niet nul' + infoObjects[1]); // pane1 = infoObjects[0]; // pane2 = infoObjects[1]; // pane3 = infoObjects[2]; // pane4 = infoObjects[3]; // pane5 = infoObjects[4]; // installation.whichChoice = -1; // c // } // else // { // infoObjects = new MFNode(); // pane1 = null; // pane2 = null; // pane3 = null; // pane4 = null; // pane5 = null; // installation.whichChoice = 0; // c // } // } function show(value) //c { // videoOnOff = value; infoObjects = new MFNode(); pane1 = null; pane2 = null; pane3 = null; pane4 = null; pane5 = null; installation.whichChoice = 0; // c // environmentOnOff = true; } function nodes(value) { //var currentNode = ''; for (i = 0; i < value.length; i++) { //print(value[i].ID); if (value[i].ID == 'GUITAR') { currentNode = value[i]; break; } } //print(currentNode); show(true); }" } ROUTE resetPosition.isOver TO layerScript.overResetInstallation ROUTE exitInstallation.isOver TO layerScript.overExitButton ROUTE resetPosition.isActive TO installationProto.resetPosition # ROUTE layerScript.rollOverTextInfoButton TO infoTextLine.string ROUTE layerScript.rollOverTextResetButton TO infoTextLine.string ROUTE layerScript.rollOverTextExitButton TO infoTextLine.string ROUTE exitInstallation.isActive TO layerScript.exitInstallation } GuitarEnv {} Viewpoint { position 1 0 6 }


(C) A. Eliëns 21/5/2007

You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.