|
|
VRML Script Tutorial
Full list
VRML Interactive Tutorial
Introduction
VRML File Structure
Drawing: Shape node
Geometry Nodes:
Appearance
Let there be Light
Materials with Colored Lights
Hierarchical Node Structures
Inlining Files
Defining and Instancing Nodes
Defining Levels of Detail
Events in VRML
Interpolators
Let the Music Play
Bindable Nodes
Adding Realism to the world
Information about your world
Definition for Auxiliary Nodes
|
|
|
|
MovieTexture Node
This node specifies the location of the movie to be used for texturing
the shape. The movie must be in the MPEG format. , as well as if the image
is to be repeated vertically, or horizontally, along each of the faces
of the shape.
The following fields are present in this node:
loop specifies if the movie is to play repeatedly, see notes
after field definition.
speed specifies how fast the movie will play, for instance if
speed is 2 then the film will play twice as fast. Negative speeds
play the film backwards.
startTime specifies the starting Time of the movie in seconds.
The value of this field is the number of seconds since midnight, January
the first, 1970.
stopTime specifies the stopping time of the movie in seconds.
The value of this field is the number of seconds since midnight, January
the first, 1970.
url which specifies the location of the movie. You can specify
multiple locations if you want to, the browser will look for data in those
locations in decreasing order of preference.
repeatS which specifies if the movie is to be repeated vertically.
repeatT which specifies if the movie is to be repeated horizontally.
Notes:
In VRML the world was created at midnight, January the first, 1970.
Some say that the reason for choosing this date as the beginning of time
as to do with the birth of the Unix system.
If the loop is set to TRUE and startTime >= stopTime
then the movie will run forever. However if startTime < stopTime
the movie will stop as soon as stopTime is reached.
If startTime >= stopTime then the movie should start
as soon as startTime is reached. Note that some browsers only start
the movie when startTime > stopTime. This is because in
the early drafts of the VRML 2.0 specification this later condition was
required to start the movie.
All fields are optional, the default values being applied if the field
is not specified. Note: if you do not specify the location of the movie,
url, then no texturing takes place.
Syntax:
|
MovieTexture { |
loop FALSE
speed 1
startTime 0
stopTime 0
url [ ]
repeatS TRUE
repeatT TRUE
|
} |
|
The MovieTexture node has two eventOut
fields: duration_changed and isActive. A duration_changed
event is generated when the current url is changed, the value for this
event is the time in seconds of the sound. Note that changing the speed
does not produce a duration_changed event. The event isActive
will output a value TRUE when the movie starts playing, when the movie
stops the event isActive will output FALSE.
Note: for the example on the right the movie will be repeated twice in
each direction if the values for repeatS and repeatT are
set ot TRUE. See the node TextureTransform
to see how to set the repetition rate.
|