Error 404 - Not Found
Sorry, the page that you are looking for does not exist.
VRML Script Tutorial Full list VRML Interactive Tutorial
Introduction
Hierarchical Node Structures
Defining and Instancing Nodes Defining Levels of Detail Events in VRML
|
Lighthouse3d.comMostly about 3D graphics
Error 404 - Not FoundSorry, the page that you are looking for does not exist.
|
|
First one needs the to define a Group with a Shape, a TimeSensor, and a ScalarInterpolator.
We need to get the eventOut fraction_changed generated by the TimeSensor. This event outputs a value between 0 and 1. We can use this value to set a key for the ScalarInterpolator by routing the fraction_changed eventOut from the TimeSensor to the set_fraction eventIn from the ScalarInterpolator.
A new fraction being set in an interpolator causes the keyValue to be changed. As a consequence the interpolator will generate the fraction_changed eventOut. Because the interpolator used is a ScalarInterpolator, this event outputs a floating point value.
Finally we use this eventOut to set the transparency in the Material node. Because the transparency is an exposed field of the Material node we can use the eventIn set_transparency to change it. To do this we route the fraction_changed eventOut of the ScalarInterpolator to the set_transparency eventIn of the Material node.
The ROUTE statements to do this are: