The VRML extensions are Cortona Screen Saver specific and transparent for standard VRML browsers.
WorldInfo node addins
You can easily control your Screen Saver settings from VRML scene using WorldInfo node.
WorldInfo {
info "cortsaver:<expr>"
}
where: <expr> = <command> | <replacement>
Supported commands:
| |

 |
Set scene autorotation. That's very useful feature for static scenes.
|
autorotate [<cycle_interval> [<x> <y> <z>]]
Example:
WorldInfo {
info [
"cortsaver:autorotate 8 0 0.8 -0.6"
]
}
| |

 |
Activate viewpoint tour.
|
viewpointtour [<cycle_interval>]
Example:
WorldInfo {
info [
"cortsaver:viewpointtour 1.5"
]
}
| |

 |
Disable navigation in Screen Saver.
|
nonavigate
Example:
WorldInfo {
info [
"cortsaver:nonavigate",
]
}
| |

 |
Select renderer for current scene.
|
renderername <name>
See Screen Saver Settings for list of available renderer names.
Example:
WorldInfo {
info [
"cortsaver:renderername OpenGL",
]
}
| |

 |
Set advanced features for selected renderer.
|
rendererhints <value>
See Cortona SDK for rendererhints value.
Example:
WorldInfo {
info [
"cortsaver:rendererhints 0x0020",
]
}
Supported replacements:
| |

 |
%rendererhints%
|
Replace info string with current rendererhints value.
See Cortona SDK for rendererhints value.
Example:
DEF main_WI WorldInfo {
info "cortsaver:%rendererhints%"
}
Shape {
geometry DEF main_TXT Text {}
}
Script {
directOutput TRUE
field SFNode main_WI USE main_WI
field SFNode main_TXT USE main_TXT
url "javascript:
function initialize(){
main_TXT.string=main_WI.info;
}
"
}
| |

 |
%supportedhints%
|
Replace info string with rendererhints mask.
See Cortona SDK for details.
| |

 |
%renderername%
|
Replace info string with selected renderer name.
See Cortona SDK for details.
| |

 |
%navigation%
|
Replace info string with selected navigation value (true/false).
| |

 |
%sceneduration%
|
Replace info string with current scene duration value (in seconds).
Specific Script node definition
The other way to control your Screen Saver settings from VRML scene is using Script node.
DEF _F175B020-BC4A-11D3-9C4B-00A0C94C8A8A Script {
eventOut MFString __message
eventIn MFString __answer
url "javascript: ..."
}
Outgoing message has the following format:
<property_name> [<value>]
Supported properties
renderername (rw)
rendererhints (rw)
supportedhints (r)
sceneduration (r)
See WorldInfo addins for details.
If __answer eventIn is present script will receive new property value through
this eventIn.
Example:
Shape {
geometry DEF main_TXT Text {}
}
DEF _F175B020-BC4A-11D3-9C4B-00A0C94C8A8A >Script {
directOutput TRUE
eventOut MFString __message
eventIn MFString __answer
field SFNode main_TXT USE main_TXT
url "javascript:
function initialize(){
__message = new MFString('renderername');
}
function __answer(val) {
main_TXT.string = val;
}
"
}
|