#VRML V2.0 utf8 #VRML V2.0 utf8 # Ass. 3 MULTIMEDIA AUTHORING 2007-2008 WorldInfo { title "Product" info ["(C) Copyright 2007 V.G. Stolte & " "Nick Peterman"] } Viewpoint { position 2.5 0 15 } NavigationInfo { headlight TRUE type "EXAMINE" } Background { skyColor [ 0.0 0.2 0.7, 0.0 0.5 1.0, 1.0 1.0 1.0 ] skyAngle [ 1.309, 1.571 ] groundColor [ 0.1 0.10 0.0, 0.4 0.25 0.2, 0.6 0.60 0.6, ] groundAngle [ 1.309, 1.571 ] } NavigationInfo { type [ "EXAMINE", "ANY" ] } EXTERNPROTO logo [ field SFColor textcolor field SFFloat doorzichtigheid ] ["logo.wrl"] Transform { translation 7 -2 2 rotation 1 0 0 -1.1 scale 0.5 0.5 0.5 children [ logo { textcolor 1 1 1 } ] } NavigationInfo { headlight TRUE type "EXAMINE" } Anchor { children [ Transform { translation 0 5 0 children [ Shape { appearance Appearance { material Material { diffuseColor 1 0 0 emissiveColor 1 .5 0 } } geometry Text { string "MP3 Player:" fontStyle FontStyle { size 1 justify "MIDDLE" } } } ] } ] description "beschrijving" url "http://www.nl.bol.com/is-bin/INTERSHOP.enfinity/eCS/Store/nl/-/EUR/BOL_DisplayProductInformation-Start?BOL_OWNER_ID=9000000005538279&Section=SCE" } Transform { translation 9 0 0 children [ Shape { appearance Appearance { material Material { diffuseColor 1 0 0 emissiveColor 1 .5 0 } } geometry Text { string "In different colors:" fontStyle FontStyle { size 1 justify "MIDDLE" } } } ] } Transform { translation -2 4 0 children [ Shape { appearance Appearance { material Material { diffuseColor 1 0 0 emissiveColor 1 .5 0 } } geometry Text { string "Press" fontStyle FontStyle { size 1 justify "MIDDLE" } } } ] } Transform { translation 4 4 0 children [ Shape { appearance Appearance { material Material { diffuseColor 1 0 0 emissiveColor 1 .5 0 } } geometry Text { string "for a guided tour" fontStyle FontStyle { size 1 justify "MIDDLE" } } } ] } Transform { translation 0 -.5 0 children [ Shape { appearance Appearance { material Material { diffuseColor 0 0 0 } } geometry Box { size 9 5 2 } } ] } PROTO ButtonBorder [ field SFVec3f positie 0 5 0 ] { Transform { translation IS positie children [ Shape { appearance Appearance { material Material { diffuseColor 1 1 1 } } geometry Box { size 0.7 0.1 0.5 } } ] } } DEF button1 Transform { translation -3.5 -2 1 children [ Shape { appearance Appearance { material Material { diffuseColor 1 1 1 } } appearance Appearance { texture ImageTexture { url "previous.jpg" } } geometry Box { size 1 1 .5 } } DEF touchsensor1 TouchSensor { } ] } DEF button2 Transform { translation -.5 -2 1 children [ Shape { appearance Appearance { material Material { diffuseColor 1 1 1 } texture ImageTexture { url "next.jpg" } } geometry Box { size 1 1 .5 } } DEF touchsensor2 TouchSensor { } ] } DEF button3 Transform { translation 3 -.9 1 children [ Shape { appearance Appearance { texture ImageTexture { url "VolumeUp.jpg" } } geometry Box { size 1 1 1 } } DEF touchsensor3 TouchSensor { } ] } DEF button23 Transform { translation 3 -2 1 children [ Shape { appearance Appearance { texture ImageTexture { url "VolumeDown.jpg" } } geometry Box { size 1 1 1 } } DEF touchsensor23 TouchSensor { } ] } DEF button4 Transform { translation -4 2 -0 children [ Shape { appearance Appearance { material Material { emissiveColor 1 1 1 transparency 0.5 } } geometry Box { size .5 1.5 1 } } DEF touchsensor4 TouchSensor { } ] } DEF button5 Transform { translation 4 -.6 0 children [ Shape { appearance Appearance { material Material { emissiveColor 1 0 0 } } geometry Sphere { radius 0.55 } } DEF touchsensor5 TouchSensor { } ] } DEF button6 Transform { translation -5 -.6 0 children [ Shape { appearance Appearance { material Material { diffuseColor 0.5 0.5 0.5 } } geometry Box { size 1 1 1 } } DEF touchsensor6 TouchSensor { } ] } DEF button7 Transform { translation 0 1 1.1 children [ Shape { geometry Box { size 7 1 0 } } DEF touchsensor7 TouchSensor { } ] } DEF button8 Transform { translation 0 1 1.1 children [ Shape { geometry Box { size 7 1 0 } } DEF touchsensor8 TouchSensor { } ] } DEF button9 Transform { translation 0 1 1.1 children [ Shape { geometry Box { size 7 1 0 } } DEF touchsensor9 TouchSensor { } ] } DEF button10 Transform { translation 0 1 1.1 children [ Shape { geometry Box { size 7 1 0 } } DEF touchsensor10 TouchSensor { } ] } DEF button11 Transform { translation 0 4 1.1 children [ Shape { geometry Box { size 1 .5 1 } } DEF touchsensor11 TouchSensor { } ] } DEF button12 Transform { translation 1 1 -1 scale 1.5 .5 .1 children [ Shape { appearance Appearance { material Material {} texture ImageTexture { url "Battery.jpg" } } geometry Box { ## size 4 1 .1 } } DEF touchsensor12 TouchSensor { } ] } DEF button13 Transform { translation 1 1 -.6 rotation 0 0 1 1.5708 children [ Shape { appearance Appearance { material Material { diffuseColor 0 0 0 } } geometry Cylinder { radius .5 height 2 } } ] } DEF button15 Transform { translation -.1 1 -.8 children [ Shape { appearance Appearance { material Material { diffuseColor 0 0 0 } } geometry Box { size .25 .25 .5 } } ] } DEF button14 Transform { translation 2.5 1 0 children [ Shape { appearance Appearance { material Material {} texture ImageTexture { url "Battery.jpg" } } geometry Box { size .1 1 2 } } DEF touchsensor14 TouchSensor { } ] } DEF audio1 Sound { minBack 5 minFront 5 maxBack 50 maxFront 50 intensity 0 source DEF mix1 AudioClip { loop TRUE url "music1.wav" } spatialize FALSE } DEF audio2 Sound { minBack 5 minFront 5 maxBack 50 maxFront 50 intensity 0 source DEF mix2 AudioClip { loop TRUE url "pop.wav" } spatialize FALSE } DEF audio3 Sound { minBack 5 minFront 5 maxBack 50 maxFront 50 intensity 0 source DEF mix3 AudioClip { loop FALSE url "tour112.wav" } spatialize FALSE } Transform { translation -5.5 -3.5 1 children [ Shape { appearance Appearance { material DEF tekst1 Material { diffuseColor 1 1 0 transparency 1 } } geometry Text { string "Back" fontStyle FontStyle { size 0.36 style "BOLD" family "ARIAL" justify "LEFT" } } } ] } Transform { translation -5.5 -3.5 1 children [ Shape { appearance Appearance { material DEF tekst2 Material { diffuseColor 1 1 0 transparency 1 } } geometry Text { string "Forward" fontStyle FontStyle { size 0.36 style "BOLD" family "ARIAL" justify "LEFT" } } } ] } Transform { translation -5.5 -3.5 1 children [ Shape { appearance Appearance { material DEF tekst3 Material { diffuseColor 1 1 0 transparency 1 } } geometry Text { string "Volume up" fontStyle FontStyle { size 0.36 style "BOLD" family "ARIAL" justify "LEFT" } } } ] } Transform { translation -5.5 -3.5 1 children [ Shape { appearance Appearance { material DEF tekst23 Material { diffuseColor 1 1 0 transparency 1 } } geometry Text { string "Volume down" fontStyle FontStyle { size 0.36 style "BOLD" family "ARIAL" justify "LEFT" } } } ] } Transform { translation -5.5 -3.5 1 children [ Shape { appearance Appearance { material DEF tekst4 Material { diffuseColor 1 1 0 transparency 1 } } geometry Text { string "On/Off" fontStyle FontStyle { size 0.36 style "BOLD" family "ARIAL" justify "LEFT" } } } ] } Transform { translation -5.5 -3.5 1 children [ Shape { appearance Appearance { material DEF tekst5 Material { diffuseColor 1 1 0 transparency 1 } } geometry Text { string "insert headphone" fontStyle FontStyle { size 0.36 style "BOLD" family "ARIAL" justify "LEFT" } } } ] } Transform { translation -5.5 -3.5 1 children [ Shape { appearance Appearance { material DEF tekst6 Material { diffuseColor 1 1 0 transparency 1 } } geometry Text { string "USB" fontStyle FontStyle { size 0.36 style "BOLD" family "ARIAL" justify "LEFT" } } } ] } Transform { translation -5.5 -3.5 1 children [ Shape { appearance Appearance { material DEF tekst7 Material { diffuseColor 1 1 0 transparency 1 } } geometry Text { string "View screen" fontStyle FontStyle { size 0.36 style "BOLD" family "ARIAL" justify "LEFT" } } } ] } Transform { translation 6 3 3 children [ Shape { appearance Appearance { material DEF tekst8 Material { diffuseColor 1 1 0 transparency 1 } } geometry Text { string "Include headphone" fontStyle FontStyle { size 0.36 style "BOLD" family "ARIAL" justify "LEFT" } } } ] } Transform { translation 3 8 -3 rotation 35 35 35 35 children [ Shape { appearance Appearance { material DEF tekst9 Material { diffuseColor 1 1 0 transparency 1 } } geometry Text { string "Include Battery" fontStyle FontStyle { size 0.36 style "BOLD" family "ARIAL" justify "LEFT" } } } ] } Transform { translation 3.5 -.5 -1 rotation 0 1 0 3.13 children [ Shape { appearance Appearance { material DEF tekst19 Material { diffuseColor 1 1 0 } } geometry Text { string "Cool MP3 Player" fontStyle FontStyle { size 1 style "BOLD" family "ARIAL" justify "LEFT" } } } ] } Transform { translation -3.5 -.25 1.1 children [ Shape { appearance Appearance { material DEF tekst29 Material { diffuseColor 1 1 0 } } geometry Text { string "Cool MP3 Player" fontStyle FontStyle { size 1 style "BOLD" family "ARIAL" justify "LEFT" } } } ] } DEF CYCLE Script { eventIn SFTime touchTime field SFInt32 number 5 eventOut SFInt32 output url "javascript: function initialize() { output = 0; } function touchTime(value, time) { if (output == number - 1) output = 0; else ++output; } " } Transform { translation 8 -.75 0 children [ DEF SENSOR TouchSensor { } Shape { appearance Appearance { material Material { emissiveColor 1 0 0 } } geometry Sphere { radius 0.5 } } ] } DEF SWITCH Switch { whichChoice 0 choice [ Transform { translation 0 -.5 0 children [ Shape { appearance DEF BLUE Appearance { material Material { emissiveColor 1 0 1 } } geometry Box { size 9 5 2 } } ] } Transform { translation 0 -.5 0 children [ Shape { appearance Appearance { material Material { emissiveColor 1 1 0 } } geometry Box { size 9 5 2 } } ] } Transform { translation 0 -.5 0 children [ Shape { appearance Appearance { material Material { emissiveColor 0 1 1 } } geometry Box { size 9 5 2 } } ] } Transform { translation 0 -.5 0 children [ Shape { appearance Appearance { material Material { emissiveColor 0 0 0 } } geometry Box { size 9 5 2 } } ] } ] } ROUTE SENSOR.touchTime TO CYCLE.touchTime ROUTE CYCLE.output TO SWITCH.whichChoice DEF TIMER TimeSensor { enabled TRUE cycleInterval 35 loop FALSE } DEF FLOPPYS_POSITION PositionInterpolator { ##key [0, 4, 2] keyValue [0, 4, 2, -4, 2, 2, 0, 1, 2, -5, -.6, 2, -3.5, -2, 2, -.5, -2, 2 , 3 ,-1 ,2, 4, -.6, 2, 0, 4, 2 0, 9, 2] } DEF FLOPPYS Transform { scale 1 0.25 1 children [ Shape { appearance Appearance { texture ImageTexture { url "Floppys.jpg" } } geometry DEF BOX IndexedFaceSet { coord Coordinate { point [ 1 -1 0 1 1 0 -1 1 0 -1 -1 0 ] } coordIndex [0 1 2 3 -1] } } ] } DEF Transform1 Transform { translation 0 1 0 children [ Shape { appearance Appearance { texture ImageTexture { url "plaatje1.jpg" } } geometry Box { size 7 1 0 } } ] } DEF Transform2 Transform { translation 0 1 0 children [ Shape { appearance Appearance { texture ImageTexture { url "plaatje2.jpg" } } geometry Box { size 7 1 0 } } ] } DEF Transform3 Transform { translation 0 1 0 children [ Shape { appearance Appearance { texture ImageTexture { url "webpeople-kerst16.gif" } } geometry Box { size 7 1 0 } } ] } Group { children [ DEF HEAD Transform { translation 6 2 3 children [ Transform { children [ Shape { appearance Appearance { material DEF SKIN Material { diffuseColor 1 0.8 0.6 transparency 1 } texture ImageTexture { url "head.png" } } geometry Sphere { radius 1 } } ] } ] } DEF TIMER1 TimeSensor { cycleInterval .5 loop TRUE } DEF HEAD_ROTATOR OrientationInterpolator { keyValue [, 1 0 0 0.3, 0 1 0 0, ] } ]} ROUTE TIMER1.fraction_changed TO HEAD_ROTATOR.set_fraction ROUTE HEAD_ROTATOR.value_changed TO HEAD.rotation DEF mouseoverscript Script { field SFNode me USE mouseoverscript field SFNode sensor1 USE touchsensor1 field SFNode sensor2 USE touchsensor2 field SFNode sensor3 USE touchsensor3 field SFNode sensor4 USE touchsensor4 field SFNode sensor5 USE touchsensor5 field SFNode sensor6 USE touchsensor6 field SFNode sensor7 USE touchsensor7 field SFNode sensor8 USE touchsensor8 field SFNode sensor9 USE touchsensor12 field SFNode sensor23 USE touchsensor23 field SFNode tekst1 USE tekst1 field SFNode tekst2 USE tekst2 field SFNode tekst3 USE tekst3 field SFNode tekst4 USE tekst4 field SFNode tekst5 USE tekst5 field SFNode tekst6 USE tekst6 field SFNode tekst7 USE tekst7 field SFNode tekst8 USE tekst8 field SFNode tekst9 USE tekst9 field SFNode tekst23 USE tekst23 field SFNode head USE SKIN eventIn SFBool over1 eventIn SFBool over2 eventIn SFBool over3 eventIn SFBool over4 eventIn SFBool over5 eventIn SFBool over6 eventIn SFBool over7 eventIn SFBool over8 eventIn SFBool over9 eventIn SFBool over23 url "vrmlscript: function initialize() { Browser.addRoute(sensor1,'isOver',me,'over1'); Browser.addRoute(sensor2,'isOver',me,'over2'); Browser.addRoute(sensor3,'isOver',me,'over3'); Browser.addRoute(sensor4,'isOver',me,'over4'); Browser.addRoute(sensor5,'isOver',me,'over5'); Browser.addRoute(sensor6,'isOver',me,'over6'); Browser.addRoute(sensor7,'isOver',me,'over7'); Browser.addRoute(sensor5,'isOver',me,'over8'); Browser.addRoute(sensor9,'isOver',me,'over9'); Browser.addRoute(sensor23,'isOver',me,'over23'); } function shutdown() { Browser.deleteRoute(sensor1,'isOver',me,'over1'); Browser.deleteRoute(sensor2,'isOver',me,'over2'); Browser.deleteRoute(sensor3,'isOver',me,'over3'); Browser.deleteRoute(sensor4,'isOver',me,'over4'); Browser.deleteRoute(sensor5,'isOver',me,'over5'); Browser.deleteRoute(sensor6,'isOver',me,'over6'); Browser.deleteRoute(sensor7,'isOver',me,'over7'); Browser.deleteRoute(sensor5,'isOver',me,'over8'); Browser.deleteRoute(sensor9,'isOver',me,'over9'); Browser.deleteRoute(sensor23,'isOver',me,'over23'); } function over1(value,time) { if (value) { tekst1.transparency = 0; } else { tekst1.transparency = 1; } } function over2(value,time) { if (value) { tekst2.transparency = 0; } else { tekst2.transparency = 1; } } function over3(value,time) { if (value) { tekst3.transparency = 0; } else { tekst3.transparency = 1; } } function over4(value,time) { if (value) { tekst4.transparency = 0; } else { tekst4.transparency = 1; } } function over5(value,time) { if (value) { tekst5.transparency = 0; } else { tekst5.transparency = 1; } } function over6(value,time) { if (value) { tekst6.transparency = 0; } else { tekst6.transparency = 1; } } function over7(value,time) { if (value) { tekst7.transparency = 0; } else { tekst7.transparency = 1; } } function over8(value,time) { if (value) { head.transparency = 0; tekst8.transparency = 0; } else { head.transparency = 1; tekst8.transparency = 1; } } function over9(value,time) { if (value) { tekst9.transparency = 0; } else { tekst9.transparency = 1; } } function over23(value,time) { if (value) { tekst23.transparency = 0; } else { tekst23.transparency = 1; } } " } DEF script Script { directOutput TRUE field SFNode me USE script field SFNode sensor1 USE touchsensor1 field SFNode sensor23 USE touchsensor23 field SFNode sensor2 USE touchsensor2 field SFNode sensor3 USE touchsensor3 field SFNode sensor4 USE touchsensor4 field SFNode sensor5 USE touchsensor11 field SFNode sensor12 USE touchsensor12 field SFNode sensor14 USE touchsensor14 field SFNode button1 USE button1 field SFNode button2 USE button2 field SFNode button3 USE button3 field SFNode button4 USE button4 field SFNode button14 USE button14 field SFNode button5 USE button11 field SFNode button12 USE button12 field SFNode button23 USE button23 field SFNode button6 USE TIMER field SFNode button7 USE FLOPPYS_POSITION field SFNode Transform1 USE Transform1 field SFNode Transform2 USE Transform2 field SFNode Transform3 USE Transform3 field SFNode song1 USE audio1 field SFNode song2 USE audio2 field SFNode song3 USE audio3 field SFInt32 state12 0 field SFInt32 state1 1 field SFInt32 state2 1 field SFInt32 state3 0 field SFInt32 state4 0 field SFInt32 state5 0 field SFInt32 state6 0 field SFInt32 state12 0 field SFInt32 state14 0 field SFInt32 state14 23 eventIn SFBool click1 eventIn SFBool click2 eventIn SFBool click3 eventIn SFBool click4 eventIn SFBool click5 eventIn SFBool click6 eventIn SFBool click12 eventIn SFBool click14 eventIn SFBool click23 eventOut SFVec3f set_translation1 eventOut SFVec3f set_translation2 eventOut SFVec3f set_translation3 eventOut SFVec3f set_translation4 eventOut SFVec3f set_translation5 eventOut SFVec3f set_translation6 eventOut SFVec3f set_translation23 eventOut SFVec3f set_translation7 eventOut SFVec3f set_translation8 eventOut SFVec3f set_translation9 eventOut SFVec3f set_translation14 eventOut SFVec3f set_translation12 eventOut SFVec3f set_scale1 url "vrmlscript: function initialize() { Browser.addRoute(sensor1,'isActive',me,'click1'); Browser.addRoute(sensor2,'isActive',me,'click2'); Browser.addRoute(sensor3,'isActive',me,'click3'); Browser.addRoute(sensor4,'isActive',me,'click4'); Browser.addRoute(sensor5,'isActive',me,'click5'); Browser.addRoute(sensor12,'isActive',me,'click12'); Browser.addRoute(sensor14,'isActive',me,'click14'); Browser.addRoute(sensor23,'isActive',me,'click23'); } function shutdown() { Browser.deleteRoute(sensor1,'isActive',me,'click1'); Browser.deleteRoute(sensor2,'isActive',me,'click2'); Browser.deleteRoute(sensor3,'isActive',me,'click3'); Browser.deleteRoute(sensor4,'isActive',me,'click4'); Browser.deleteRoute(sensor5,'isActive',me,'click5'); Browser.deleteRoute(sensor12,'isActive',me,'click12') ; Browser.deleteRoute(sensor23,'isActive',me,'click23'); Browser.deleteRoute(sensor14,'isActive',me,'click14'); } function click1(value,time) { if (value && state1 == 0) { set_translation6 = new SFVec3f(0, 1, 1.1); set_translation7 = new SFVec3f(0, 1, 0); set_translation9 = new SFVec3f(0, 1, 0); song2.intensity = 0; song1.intensity = 1; } if (value && state1 == 0){ } } function click2(value,time) { if (value && state2 == 0) { set_translation7 = new SFVec3f(0, 1, 1.1); set_translation6 = new SFVec3f(0, 1, 0); set_translation9 = new SFVec3f(0, 1, 0); song1.intensity = 0; song2.intensity = 1; } if (value && state2 == 0){ } } function click4(value,time) { if (value && state4 == 0) { set_translation9 = new SFVec3f(0, 1, 1.1); set_translation4 = new SFVec3f(-4, 1.5, 0); state4 = 1; state1 = 0; state2 = 0; } else if (value && state4 == 1) { set_translation6 = new SFVec3f(0, 1, 0); set_translation7 = new SFVec3f(0, 1, 0); set_translation4 = new SFVec3f(-4 ,2 ,0); set_translation9 = new SFVec3f(0, 1, 0); state4 = 0; state1 = 1; state2 = 1; song2.intensity = 0; song1.intensity = 0; } } function click5(value,time) { song3.intensity = 1; if (value && state4 == 1) { state5 = 1; set_translation6 = new SFVec3f(0, 1, 0); set_translation7 = new SFVec3f(0, 1, 0); set_translation4 = new SFVec3f(-4 ,2 ,0); set_translation9 = new SFVec3f(0, 1, 0); state4 = 0; state1 = 1; state2 = 1; song2.intensity = 0; song1.intensity = 0; } } function click3(value,time) { if (value && state4 == 1) { song1.maxBack = 500; song2.maxBack = 500; song1.maxFront = 500; song1.maxFront = 500; song1.minBack = 50; song2.minBack = 50; song1.minFront = 50; song2.minFront = 50; } } //1 1 -1 function click12(value,time) { if (value && state12 == 0) { // state12 = 1; set_translation12 = new SFVec3f(1, 1, 0); set_translation14 = new SFVec3f(2.5, 1, -2); //button14.transparency = 0; } } function click14(value,time) { if (value && state14 == 0) { // state12 = 1; set_translation12 = new SFVec3f(1, 1, -1); set_translation14 = new SFVec3f(2.5, 1, 0); //button14.transparency = 0; } } function click23(value,time) { song1.maxBack = 10; song2.maxBack = 10; song1.maxFront = 10; song1.maxFront = 10; song1.minBack = 1; song2.minBack = 1; song1.minFront = 1; song2.minFront = 1; } " } ROUTE script.set_translation1 TO button1.set_translation ROUTE script.set_translation2 TO button2.set_translation ROUTE script.set_translation3 TO button3.set_translation ROUTE script.set_translation4 TO button4.set_translation ROUTE script.set_translation6 TO Transform1.set_translation ROUTE script.set_translation7 TO Transform2.set_translation ROUTE script.set_translation23 TO button23.set_translation ROUTE script.set_translation8 TO FLOPPYS.translation ROUTE script.set_translation9 TO Transform3.set_translation ROUTE TIMER.fraction_changed TO FLOPPYS_POSITION.set_fraction ROUTE script.set_translation12 TO button12.set_translation ROUTE script.set_translation14 TO button14.set_translation ROUTE FLOPPYS_POSITION.value_changed TO FLOPPYS.translation ROUTE touchsensor1.touchTime TO mix1.startTime ROUTE touchsensor1.touchTime TO mix1.stopTime ROUTE touchsensor2.touchTime TO mix2.startTime ROUTE touchsensor2.touchTime TO mix2.stopTime ROUTE touchsensor11.touchTime TO TIMER.startTime ROUTE touchsensor11.touchTime TO mix3.startTime ROUTE touchsensor11.touchTime TO mix3.stopTime Group { children [ DEF norm Viewpoint { position 0 0 10 description "Normal Entry" } DEF aerial Viewpoint { position 0 5 10 orientation 1 0 0 -0.39 description "Aerial View" } DEF headcam Viewpoint { position 0 2.4 4 fieldOfView 0.39 description "HeadCam" } ] }