Lighthouse3d.com

Send me bugs and suggestions, please
VRML Script Tutorial
Full list

VRML Interactive Tutorial

Introduction
VRML File Structure
Drawing: Shape node
Geometry Nodes:
Box
Sphere
Cone
Cylinder
PointSet
IndexedLineSet
IndexedFaceSet
Extrusion
ElevationGrid
Example: Chessboard
Text
FontStyle
Appearance
Material
Textures
Image Texture
Movie Texture
Pixel Texture
Texture Coordinate
Texture Transform
Let there be Light
Directional Light
Point Light
Spot Light
Materials with Colored Lights
Hierarchical Node Structures
Group
Transform
Collision
Anchor
Billboard
Switch
Inlining Files
Defining and Instancing Nodes
Defining Levels of Detail
Events in VRML
Creating Paths between events: ROUTE
Generating Events based on Timers or User Actions
Timers
Touch Sensor
Visibility Sensor
Dragging Sensors
Plane Sensor
Sphere Sensor
Cylinder Sensor
Proximity Sensors
Example: Proximity sensor
Interpolators
Color
Coordinate
Normal
Orientation
Position
Scalar
Example
Let the Music Play
Sound
AudioClip
Bindable Nodes
Who Am I: NavigationInfo
Where Am I: ViewPoint
Adding Realism to the world
Background
Fog
Information about your world
WorldInfo
Definition for Auxiliary Nodes
Coordinate
Color
Normal

ZF~ 4 Xy,ox³rXRlL{E@\O66 MjbFB^WYݛ0KիkU¯ok 3=ӱHC{Qx 08K8|>\bI}(-$qҙlcFX'&1E,DCsUu˺^ͺuu%,|Ϳ6k$Z[o1XUz5y}ݫDg%4?Ou|{Q,^8(usZߛY%p`"m-\ Iԧw2Be#?j̯}"Y*xv2%H6H ? Pb3/Nهg3U0 h'fz.#1!tӱҧT $'_*H-I@Ƿ,Dir+ƷyR\ƌ>zt> bJI?yt%ҧ_ @4^C ’&^zaʼ0lɆB0I0;cru qijQЁ6Wܲ4!yx$&Ƴ4ć)BЦ Bv:yu3AO) IJ5BCR#$/x:*7E#JS :]& (d[삡jT>{J7?O h}44Ma,, IGb-t#9nv4Ck=g"nyKϷ@Ql*"&!zg*|HgU!f^#e,qﮅ S>) )B.yJ(/ "%Qh=.)[gxdq ɐ*@Jx(t. e}Jj@i_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:6}7sY5K'(uO68?+=YjLLeBsգ7 {`>}ɞ,] DM?Js$钏{ͦz2W~"ܾ>߾m^mű *)ny̿gxZ0XeSˆ#˜-Beu}=OZ; - {8ͽ=mRNThb+Tc 7 \d4NSUB;Nq +dͻU(^#GFYwfX(z92C%N\m8Vea[Fy#''##=Ň듋˫?'cK1 w~Em[eHa7y4XI0ՉbOc֯Ee&4.kۤ8*h6ձp:N x/lNN]ATnhUtT+Hh,<_cLx|o_,`<ݫ2-V/T k F񚢣T@qoiF{S|\InL=Zyw([ntV(ppʩ겜j%E|xbVO{S{n@(;y6LfM'2 PJm%I}U;+`kFVz0:pyH,ŚNe\PWFvWfFS`ON'L.Ŵjzi/.uYe-u/>v^Q"/ K׮ Lg d~"GDtqF)]]K\@1*T*Zr0+Uz{%Tѹ916ݏ5OSPe40Lz0O5I5f'C۪GE/e/Lc@)H3 t ):oMb%/f=.Z2y#Eʹjuղ&IJiB~F~RM(MmI} %GcU͕Ko3E_qZT^ɪa Z+:>n|E 8\d@Cϙ>\6 DW h. `QʟZc=E븂+@Ml@4U7HݪTY#]h]e>jӗ!L T0':HXf*QCM5ޚ[vRW`IT`IA G|C@Q۰@C B1#,y!Ld+0=_<2t]sh/9%4kq) d2Ӷ-J{3ꎗIh˙Hռ6&<^DxU1⌑l@kBj ank}ãgY/މ(ٌ$}~l.k7pu(RWmRxJ;{!uWie::vxi CZn'i:RcMW5<'/kІ7z@@$ؽ_P ;cYpFU.=Y" &LAg˅ muZ]gvT߾:t{(q LB;9qDrLv~̂(8` +pu{CCwߓ{;*8[>},/RdNEE|Qk(9}{r}rhu~yěqc,mn-yݶԓ3\Pl}fjo_ 7ܢ{* v"VIn>p!TC #%BȲ OhOK+l0cU+&ܺq]{Noėn" ,v~W9ח+)xe4U.$'qO3ވ{w_MjDn7wZif'M(g ?݃.Pm-GFPZmvpNV i+c)2

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.