#VRML V2.0 utf8 EXTERNPROTO ScrollPane [ eventIn SFString loadURL eventIn SFString setText eventIn SFInt32 scrollText eventOut SFString linkClicked eventOut SFString activeLink field SFInt32 maxCharsOnALine field SFString linkFont field SFFloat charAspect ] "music-dossier-text.wrl#ScrollPane" EXTERNPROTO pointer[ eventIn SFBool selected ] "models\buttonBar\back\back_forward_button.wrl#ModelBackForwardNode" EXTERNPROTO exit[] "models\exit.wrl#exitButton" PROTO Content[ eventIn SFNode infoObject eventIn SFInt32 pos eventOut SFNode clicked eventOut MFNode shape ] { DEF trans Transform { scale 2 2 2 translation -10 8 0 children [ Shape { geometry Box { size 3 2 1 } appearance Appearance { material Material { transparency 1 } } } Shape { geometry DEF textField Text { fontStyle FontStyle { justify "MIDDLE" } } appearance Appearance { material Material { diffuseColor 1 1 1 specularColor .92 .43 .01 ambientIntensity .117 shininess .4 } } } DEF touch TouchSensor{} ] } DEF Clicked Script { directOutput TRUE eventIn SFInt32 pos IS pos eventOut SFVec3f position eventIn SFBool click eventOut SFNode clicked IS clicked eventOut MFNode shape IS shape eventIn SFNode infoObject IS infoObject eventOut MFString text field MFNode trans USE trans url "javascript: function infoObject(value) { text = new MFString(value.shortName); } function pos(value) { //print(value); position = new SFVec3f(-20 + value*10,0,0); shape = trans; //print(position); } function click() { clicked = infoObject; } " } ROUTE Clicked.text TO textField.string ROUTE Clicked.position TO trans.translation ROUTE touch.isActive TO Clicked.click } PROTO PresentationButtons [ eventIn MFNode setNodes eventIn SFString show eventIn SFBool closeButtons eventIn SFString activeLink eventIn SFInt32 placeActive eventOut MFNode indexNodesOut eventOut SFString clickedOnNode eventOut SFBool ready eventOut SFNode contentLeft eventOut SFNode contentMiddle eventOut SFNode contentRight eventOut SFNode onlyContent eventOut SFString close eventOut SFBool noContent eventIn SFBool touchExit eventIn SFBool touchMiddle eventIn SFString clickedText ] { Transform { scale 2 2 2 translation -10 8 0 rotation 0 0 1 3.14 children [ DEF pointerLeft pointer{} DEF touchLeft TouchSensor{} ] } Transform { scale 2 2 2 translation 0 8 0 rotation 0 0 1 1.57 children [ DEF pointerMiddle pointer{} DEF touchMiddle TouchSensor{} ] } Transform { scale 2 2 2 translation 10 8 0 children [ DEF pointerRight pointer{} DEF touchRight TouchSensor{} ] } Transform { scale 10 10 1 translation 70 -5 0 children [ exit{} DEF touchExit TouchSensor{} ] } Transform { scale 30 15 1 translation -57.5 -5 0 children [ DEF scrollPicture ScrollPane {maxCharsOnALine 30 linkFont "fonts/aerial_link_black.bmp" charAspect 0.25 } ] } Transform { scale 30 15 1 translation -22.5 -5 0 children [ DEF scrollVideo ScrollPane {maxCharsOnALine 30 linkFont "fonts/aerial_link_black.bmp" charAspect 0.25} ] } Transform { scale 30 15 1 translation 12.5 -5 0 children [ DEF scrollAudio ScrollPane {maxCharsOnALine 30 linkFont "fonts/aerial_link_black.bmp" charAspect 0.25} ] } Transform { scale 30 15 1 translation 47.5 -5 0 children [ DEF scrollText ScrollPane {maxCharsOnALine 30 linkFont "fonts/aerial_link_black.bmp" charAspect 0.25} ] } DEF titlesCategories Transform { # titles categories children [ DEF titleCategoriesVideo Transform { scale 2 2 2 translation -24 3.5 0 children [ Shape { geometry DEF VideoTitle Text { # video list title string "Video Clips" fontStyle FontStyle { justify "MIDDLE" family "arial" size 1.5 } } appearance Appearance { material Material { diffuseColor 1 1 1 } } } ] } DEF titleCategoriesPicture Transform { scale 2 2 2 translation -59 3.5 0 children [ Shape { geometry DEF PictureTitle Text { # video list title string "Pictures" fontStyle FontStyle { justify "MIDDLE" family "arial" size 1.5 } } appearance Appearance { material Material { diffuseColor 1 1 1 } } } ] } DEF titleCategoriesText Transform { scale 2 2 2 translation 46 3.5 0 children [ Shape { geometry DEF TextTitle Text { # video list title string "Texts" fontStyle FontStyle { justify "MIDDLE" family "arial" size 1.5 } } appearance Appearance { material Material { diffuseColor 1 1 1 } } } ] } DEF titleCategoriesAudio Transform { scale 2 2 2 translation 11 3.5 0 children [ Shape { geometry DEF TextAudio Text { # audio list title string "Audio files" fontStyle FontStyle { justify "MIDDLE" family "arial" size 1.5 } } appearance Appearance { material Material { diffuseColor 1 1 1 } } } ] } ] } DEF Clicked Script { directOutput TRUE eventIn SFBool touchRight eventIn SFBool touchLeft eventIn SFBool touchMiddle IS touchMiddle # eventIn SFBool touchExit IS touchExit # eventIn SFBool closedByPresEnv IS closeButtons eventIn SFString clickedVideo eventIn SFString clickedAudio eventIn SFString clickedPicture eventIn SFString clickedText IS clickedText # eventIn SFString activeLink IS activeLink eventIn SFInt32 placeActive IS placeActive eventOut SFNode contentLeft IS contentLeft eventOut SFNode contentMiddle IS contentMiddle eventOut SFNode contentRight IS contentRight eventOut SFNode onlyContent IS onlyContent eventOut SFString clickedOnNode IS clickedOnNode eventOut SFBool rightPointerSelected eventOut SFBool leftPointerSelected eventOut SFBool middlePointerSelected eventOut SFString close IS close eventOut SFBool noContent IS noContent eventIn SFNode clicked eventIn MFNode allNodes IS setNodes eventIn SFString show IS show eventOut SFBool ready IS ready eventOut SFString videoText eventOut SFString audioText eventOut SFString textText eventOut SFString pictureText field SFInt32 current -1 field MFNode infoObjects [] field SFNode materials NULL url "javascript: function initialize() { ready = true; text ='dit is tekst'; } function touchLeft() { current =0; leftPointerSelected =true; middlePointerSelected =false; rightPointerSelected =false; } function touchMiddle() { current =1; leftPointerSelected =false; middlePointerSelected =true; rightPointerSelected =false; } function touchRight() { current =2; leftPointerSelected =false; middlePointerSelected =false; rightPointerSelected =true; } function touchExit(value) { if(value) { close = show; unselect(); } } function closedByPresEnv(value) { if (value) unselect(); } function unselect() { leftPointerSelected =false; middlePointerSelected =false; rightPointerSelected =false; current=-1; } function searchNode(value) { for(j=0;j 1) onlyContent = null; if(infoObjects.length<=3) { if(infoObjects.length>0) contentMiddle = infoObjects[0]; if(infoObjects.length >1) contentLeft = infoObjects[1]; if(infoObjects.length >2) contentRight = infoObjects[2]; } else { if(picture!='null') contentLeft = picture; else contentLeft = infoObjects[0]; if(video!='null') contentMiddle = video; else contentMiddle = infoObjects[1]; if(text!='null') contentRight = text; else contentRight = infoObjects[2]; } videoText =textvideo; textText = texttext; pictureText =textpicture; audioText = textaudio; // clickedOnNode = value; } } else { contentLeft=null; contentMiddle=null; contentRight=null; videoText =''; textText = ''; pictureText =''; audioText =''; infoObjects = new MFNode(); } } function allNodes(value) { //print('crenode'); // var x = 0; // for (i = 0; i < value.length; i ++) { // x++; //indexobjects // for(j=0;j