Lighthouse3d.com

uW(.JUMLO-O)ͭKLSW(L)ɰU7TWHL(3RRl bJP< 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

Z6y ];CƼ.YN%s*[Tlש-Ϭ "AcBёd<)Hu)n4ݛ0cյ~\׷B [튂OX(<~X1C]Kl:/e}ݝ8y6K9fԏu{jS[@O4t<^UմGiׯiZ¹[_Dk- Wf8{PF{F/*T  b ,n[tfQҖñA$xs1 y̧w2B1o5WzN{Ubߦ(avώ\C I5x)&gA{lJċ&cd12h@S=\7K(sRQ`EF@IN ~Ur]mohV(ƷyRL }|dJ!lvKO܁d,^M ’&^z!K0lɆB0I0;crUuq)gYЁTh+Qb$m%鬩,80Ds m2cc=3ϜG㠍E3u8! (IӗOxzVng_(uNIA.D7Q@x'b U'[\?I^{͵у28R~L|qXwSEN#zs;hf=g"^yKϷ@QT.EH?`nVv m?s! U٤0j-BH?6^Y",Ry0C)sg,k;WWļgQ`]F-E_߿o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ZuL;NQ 4y}ũ<I}O\x

AudioClip Node


This node specifies the location and properties of an audio source for the Sound node. The file specified in the url must be in either a MIDI or WAVE format.

The following fields are present in this node:;
  • loop specifies if the sound is to play repeatedly, see notes after field definition.;
  • pitch specifies the speed at which the sound will play, for instance if pitch is 2 then the sound will play twice as fast. Only positive values are allowed.
  • startTime specifies the starting Time of the sound 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 sound 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 sound. You can specify multiple locations if you want to, the browser will look for data in those locations in decreasing order of preference.
  • description is a string which can be used to describe the sound. The browser is not required to display the string.;
  • 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 sound will play forever. However if startTime < stopTime the sound will stop as soon as stopTime is reached.;
  • If startTime >= stopTime then the sound should start as soon as startTime is reached. Note that some browsers only start the sound when startTime > stopTime. This is because in the early drafts of the VRML 2.0 specification this later condition was required to start the sound.;
  • 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 sound, url, then no sound will be played.

    Syntax:
    AudioClip {
    loop FALSE
    pitch 1.0
    startTime 0
    stopTime 0
    url [ ]
    description ""
    }


    The AudioClip 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 pitch does not produce a duration_changed event. The event isActive with a value TRUE is generated when the sound starts playing, when the sound stops the event isActive will output FALSE.

    To play the sound in the example provided press the mouse button over the sphere. Note that, in the example provided, once the sound has started you can't restart it by pressing the sphere.