media @ VU
music-dossier-Environment.vr
music-dossier-Environment.vr
(wrl
)
[ flux /
bitmanagement /
cortona /
octaga
]
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"
]
# installation
EXTERNPROTO GuitarEnv [
eventOut SFBool closeMyTD
eventIn MFNode setNodes
eventIn SFBool show
eventIn SFBool exitInstallation
]"music-dossier-3D_installation_environment.wrl#GuitarEnv"
EXTERNPROTO PresentationEnvironment [
eventIn SFBool show
eventIn SFString text
eventIn SFNode contentLeft
eventIn SFNode contentMiddle
eventIn SFNode contentRight
eventIn SFNode onlyContent
eventIn SFString returnNodeID
eventIn SFString titleText
eventOut SFBool closeButtons
eventOut SFBool ready
eventOut SFString exit
eventIn MFNode nodes
eventOut SFString exitNodeID
eventOut SFBool closeEnv
eventIn SFBool clickedMiddle #
eventIn SFBool clickedMinimize #
eventIn SFTime playAudioMiddle #
]"music-dossier-presentationEnvironment.wrl#PresentationEnvironment"
EXTERNPROTO ConceptGraph [
eventIn MFNode setNodes
eventIn SFString show
eventOut SFString clickedOnNode
exposedField SFVec3f viewpointPosition
eventOut SFBool ready
eventOut SFString historyAdd
eventOut SFFloat endTransparencyCGButtons
eventOut SFString nodeTitle
eventOut SFString exit
eventOut SFString showNodePG
eventOut SFBool exitButtons
eventOut SFBool selectMiddleWindow
eventOut SFString text
eventOut SFBool MaxMiddleWindow
eventOut SFBool minimizeWindow
eventOut SFBool startAudio
eventOut SFTime playAudio
eventOut SFBool exit3Dinstallation
]
"music-dossier-ConceptGraph8.wrl#ConceptGraph"
EXTERNPROTO PresentationButtons [
eventOut SFString clickedOnNode
eventOut SFBool ready
eventOut SFString close
eventIn MFNode setNodes
eventIn SFString show
eventOut SFNode contentLeft
eventOut SFNode contentMiddle
eventOut SFNode contentRight
eventOut SFNode onlyContent
eventOut SFBool noContent
eventIn SFBool closeButtons
eventIn SFString activeLink
eventIn SFInt32 placeActive
eventIn SFBool touchExit #
eventIn SFBool touchMiddle #
eventIn SFString clickedText #
]
"music-dossier-PresentationButtons.wrl#PresentationButtons"
EXTERNPROTO History[
eventIn SFString nodeIn
eventOut SFString nodeOut
eventOut SFBool ready
eventOut SFBool show
eventIn SFFloat endTransparencyButton
]
"music-dossier-History.wrl#History"
PROTO NodePresentationGraph [
eventIn MFNode connectedNodes
eventIn SFNode setInfoObject
field SFString ID "Noppes"
eventOut SFNode infoObject
eventOut MFNode connectedNodesOut
]{
Script {
eventIn MFNode connectedNodes IS connectedNodes
eventIn SFNode setInfoObject IS setInfoObject
eventOut SFNode infoObject IS infoObject
eventOut MFNode connectedNodesOut IS connectedNodesOut
url "javascript:
function connectedNodes(value) {
connectedNodesOut = value;
}
function setInfoObject (value) {
infoObject = value;
}
"
}
}
PROTO Environment [
eventIn MFNode setConceptGraphNodes
eventIn MFNode setPresentationGraphNodes
eventIn SFString text
eventOut SFBool ready
eventOut SFBool conceptGraphReady
eventOut SFBool presentationGraphReady
eventOut SFBool historyReady
eventOut SFBool presentationEnvironmentReady
eventIn SFBool prepare
eventIn SFString showNodeConceptGraph
eventOut SFFloat endTransparencyCGButtons
eventIn SFString showNodePresentation
eventIn SFNode contentLeft
eventIn SFNode contentMiddle
eventIn SFNode contentRight
eventIn SFString setActiveLink
eventIn SFInt32 placeActiveLinkOnPane
]
{
NavigationInfo {
type "NONE"
}
DEF presEnv PresentationEnvironment {
ready IS presentationEnvironmentReady
nodes IS setConceptGraphNodes
contentLeft IS contentLeft
contentMiddle IS contentMiddle
contentRight IS contentRight
text IS text
}
DEF conceptGraph ConceptGraph {
setNodes IS setConceptGraphNodes
ready IS conceptGraphReady
show IS showNodeConceptGraph
endTransparencyCGButtons IS endTransparencyCGButtons
}
Transform {
translation -21.5 6 0
children [
DEF history History {ready IS historyReady}
]
}
DEF TDSwitch Switch {
whichChoice -1
choice [
DEF guitar GuitarEnv{setNodes IS setPresentationGraphNodes}
]
}
DEF layer Layer3D {
depth -10
size 1 1
navigationInfo NavigationInfo {
type "NONE"
}
viewpoint DEF Viewpoint1 Viewpoint {
fieldOfView 0.96
orientation 0 1 0 0.0
position 0 0 20
description "Viewpoint Presentation Graph"
},
children [
Transform {
translation 0 0 -10
children [
DEF layerSwitch Switch {
whichChoice -1
choice [
DEF presentationGraph PresentationButtons {
setNodes IS setPresentationGraphNodes
ready IS presentationGraphReady
activeLink IS setActiveLink
placeActive IS placeActiveLinkOnPane
}
]
}
]
}
DirectionalLight {
direction 0 0 -1
on TRUE
intensity 0.9
}
]
}
DEF layerTimer TimeSensor {
loop TRUE
enabled TRUE
}
DEF switchTerra Switch {
whichChoice -1
choice [
GuitarEnv {}
]
}
DEF layerScript Script {
eventIn SFString showNodePresentation IS showNodePresentation
eventIn SFString showNodeCG
eventIn SFString showNodePG
eventIn SFTime timer
eventIn SFBool prepare IS prepare
eventIn SFBool hide
eventIn SFBool closeTD
eventIn SFBool exitPresentationEnv
eventIn SFString openClose
eventIn SFNode showOnlyContent
eventOut SFInt32 showLayer
eventOut SFVec2f size
eventOut SFString showPresentationGraph
eventOut SFString showConceptGraph
eventOut SFBool showPresentationEnvironment
eventOut SFBool ready IS ready
eventOut SFInt32 showTD
eventOut SFBool TDshow
eventOut SFString returnNodeID
field SFVec2f endSize 1 0
field SFBool on FALSE
field SFTime beginTime 0
field SFVec2f beginSize 1 0.01
field SFFloat totalTime 2
field SFNode presentationG USE presentationGraph
directOutput TRUE
url "javascript:
function initialize() {
ready = true;
}
// preprate function is called after data is loaded
// smooth textures are disabled to make transparent font in the concept graph readable
function prepare(value) {
size = beginSize;
showLayer = -1;
Browser.setOption('smooth','FALSE');
}
function hide(value,time) // used for in/out zoom
{
if(value){
endSize = new SFVec2f(1,0.01);
size = endSize;
showLayer = -1;
} else {
endSize = new SFVec2f(1,0.3);
size = endSize;
showLayer = 0;
}
}
// interpolation of the scale of the presentation buttons layer
function timer(value) {
if (on) {
factor = (value - beginTime) / totalTime;
if (factor < 1) {
size = new SFVec2f(factor * (endSize.x - beginSize.x) + beginSize.x, factor * (endSize.y - beginSize.y) + beginSize.y);
} else {
size = endSize;
on = false;
if (size.y < 0.1) showLayer = -1;
}
}
}
function showNodeCG(value,time) {
// print('show node cg');
endSize = new SFVec2f(1,0.01);
Browser.setOption('smooth','FALSE'); // disable smooth textures to make font in concept graph readable
showConceptGraph = value;
showPresentationGraph = null; // removes information items from buttonbar and from presentation environment
showPresentationEnvironment = false; // closes presentation environment and zooms out
if (value != 'GUITARINSTALLATION') { // if not closing terra della, then activate interpolation to shrink presentation button layer
beginTime = time;
beginSize = new SFVec2f(size);
on = true;
}
}
function showNodePG(value,time) {
// print('show node pg');
size = endSize;
endSize = new SFVec2f(1,0.3);
if (value != 'GUITARINSTALLATION')
{
showPresentationGraph = value;
if (presentationG.noContent) {
// print('No content!');
showNodeCG(value,time);
return;
}
if (presentationG.onlyContent) {
showLayer = -1;
returnNodeID = value;
} else {
showLayer = 0;
}
} / installation
showConceptGraph = null;
Browser.setOption('smooth','TRUE'); // enables smooth textures for better texture quality in presentation environment
showPresentationEnvironment = true;
if (value != 'GUITARINSTALLATION') { // if not opening terra della, then activate interpolation to enlarge presentation button layer
beginTime = time;
beginSize = new SFVec2f(size);
on = true;
} else {
showGuitarInstallation();
}
}
/ installation
function showGuitarInstallation() {
Browser.setNavigationMode('ANY'); // activate navigation
Browser.setViewpointByValue(new SFVec3f(1,0, 6),new SFRotation(0,0, 1, 0),2);
showTD = 0; //sets terra switch to show environment
TDshow = true; // activate terra environment
}
/ installation
function closeTD(value,time) {
Browser.setNavigationMode('NONE'); // disable navigation
Browser.setViewpointByValue(new SFVec3f(0,0, 38),new SFRotation(0,0, 1, 0),2);
showTD = -1; // hide terra
TDshow = false; // disable environment
showNodeCG('GUITARINSTALLATION',time); // show the terra deglia node in the concept graph
//showConceptGraph =;
}
"
}
ROUTE layerScript.showConceptGraph TO conceptGraph.show
ROUTE layerScript.showPresentationGraph TO presentationGraph.show
ROUTE layerScript.size TO layer.size
ROUTE layerTimer.time TO layerScript.timer
ROUTE conceptGraph.clickedOnNode TO layerScript.showNodePG
ROUTE presentationGraph.clickedOnNode TO layerScript.openClose
ROUTE presentationGraph.close TO layerScript.showNodeCG
ROUTE layerScript.showPresentationEnvironment TO presEnv.show
ROUTE layerScript.showLayer TO layerSwitch.whichChoice
ROUTE presentationGraph.contentLeft TO presEnv.contentLeft
ROUTE presentationGraph.contentMiddle TO presEnv.contentMiddle
ROUTE presentationGraph.contentRight TO presEnv.contentRight
ROUTE presentationGraph.onlyContent TO presEnv.onlyContent
ROUTE presentationGraph.onlyContent TO layerScript.showOnlyContent
ROUTE conceptGraph.historyAdd TO history.nodeIn
ROUTE history.nodeOut TO conceptGraph.show
ROUTE presEnv.closeButtons TO layerScript.hide
ROUTE conceptGraph.endTransparencyCGButtons TO history.endTransparencyButton
ROUTE layerScript.showTD TO TDSwitch.whichChoice
ROUTE guitar.closeMyTD TO layerScript.closeTD
ROUTE layerScript.TDshow TO guitar.show
ROUTE presEnv.exit TO layerScript.showNodeCG
ROUTE presentationGraph.noContent TO layerScript.exitPresentationEnv
ROUTE layerScript.returnNodeID TO presEnv.returnNodeID
################## guided tour related routes ###########################
ROUTE conceptGraph.nodeTitle TO presEnv.titleText
ROUTE conceptGraph.exit TO layerScript.showNodeCG
ROUTE conceptGraph.showNodePG TO layerScript.showNodePG
ROUTE conceptGraph.exitButtons TO presentationGraph.touchExit
ROUTE conceptGraph.exitButtons TO layerScript.hide
ROUTE conceptGraph.selectMiddleWindow TO presentationGraph.touchMiddle
ROUTE conceptGraph.text TO presentationGraph.clickedText
ROUTE conceptGraph.MaxMiddleWindow TO presEnv.clickedMiddle
ROUTE conceptGraph.minimizeWindow TO presEnv.clickedMinimize
ROUTE conceptGraph.playAudio TO presEnv.playAudioMiddle
ROUTE conceptGraph.exit3Dinstallation TO guitar.exitInstallation
#########################################################################
ROUTE presEnv.closeEnv TO presentationGraph.closeButtons
ROUTE presEnv.exitNodeID TO layerScript.showNodeCG
}
(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.