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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$1Tˋ͢ݸb-`'?8uA[٧Y\['{Hmr'w.a: RNh{蟊O9b]koFY~Ѯ+Aˎ.7a4n +HidqCZ{̐CRv@8;g sS)KJb8| MwrD1M~}ӌ_%uA*n|8Sb')\=-m1YB6CGlL!G`§2N::۟\\[uY؊u淆4%m_XMIjF崙LOgǙ5#2K(YΟĉk/9sۑ&zV#FuHAB2 6KTI9NB<-2,2hV#8o냔KL]ӄ·Aji(}%tA`y_D_&1wV)^h&5Wu rZ.6eaG]wINtgmHk^ ޾ywsfś񯿼O0 %^mH8Vs1W ̓1`S2.3SdřOF]7=iZ*] B?f>u SmƿH~U^׬I x*9S>%w eN26{R%2+ju#z0JФzf|DmC,j׮տ3eh = /ҧHJΠ}TǝS@jYMԲfu}zBݛ{{o0wGG\I%42=Dyh,u8UԿgNIBe;V"l4Y uedj ySY2{ą-Ub={NXzpqq#*ea-ƕ!\,SDhOXHQ3=d]v(눷PJ2\X9 ?:'fDT4 UM$ef-j8@x" 7NU^(K0zh:uj_]e§j6E`NiE_ְ#+kt YX7yG a#끠@Ionbڴ;1T,Yȭb-Y JS)6MF;W{ 6R,'Ъ e%sAJouTmwui⽩^Uٔb;6ڣ\z5 C^LQFzrw&]0K?`4@N>@*V9{.2C%Ur /+kDbajِפI/8~G~ RM(Ou$ھ(%ʪ[㠾/\FkJ\l۵6T 3Q] KZ+;=:n.LR $Z@CV,,Yx 6 Dͻ* x `q/7c=nUkqF` Ml ~w:U֏gߗ#]h]eO>!LԪ0_ZM( ;rff J`hsg#z7HX}G/[|\Ƶ q  kXek 1 K9 gď8eX';HL۟ٺ}R{Y&m>\2]6Dэuρu8Ii˙Jռ"ίA|ę ـڷSMHڸRG=ZI.AZՆN4Fd-9]B\^]FclJu+/cO>@C+*lUR_ %p| BA^5~髅m;ڮ+񽌧Iڅ'
IndexedLineSet Node

The IndexedLineSet node specifies a set of polylines in the local coordinate system and associated colors.

This node contains five fields: coord, coordIndex, color, colorIndex and colorPerVertex.

The coord field specifies a Coordinate node. In this node a set of 3D coordinates are given.

The coordIndex field specifies a list of coordinate indexes defining the polylines to be drawn. To separate the indexes from one polyline a space is used, to separate the sets of indexes from two adjacent polylines the marker -1 is used, i.e. an index of -1 indicates that the current polyline has ended and the next one begins.

The color field defines a Color node. This node defines a list of colors to apply to the polylines. The color is optional, the default values being applied if the field is not specified. If a Material node is specified the default color is the emissive color from this node. Note that both the default emissive color and background are black, so if no color is specified and the default background is used you won't be able to see the lines.

The colorIndex serves the same purpose has the coordIndex but regarding colors.

The colorPerVertex is a boolean field which defines how the colors are applied.
  • colorPerVertex is TRUE: colors apply to each vertex. The final result is that each line starts in one color and ends with another color, producing a gradient effect. On some browsers the color for each line will be the average color for the two ends of the line. There must be as many indices in colorIndex as in coordIndex with the end-of-polyline markers,-1, in exactly the same place. If the colorIndex is absent then the coordIndex is used to select the colors and there must be as many colors as indices in coordIndex.
  • colorPerVertex is FALSE: colors apply to each polyline. There must be at least as many indices in the colorIndex as there are polylines. If the coordIndex field is absent then the colors are applied in the order presented in the color field.
  • Before presenting the syntax let's see some examples. In all the examples presented, the coord field has the following coordinates: 0 0 0 1 1 0 -1 0 0 -1 -1 0 Playing with coordIndex

    Playing with colors: The colors specified are Red, Green and Blue

    colorPerVertex TRUE colorPerVertex FALSE
    colorIndex [0 1 2 0 ] colorIndex [0 1]
    coordIndex [3 0 2 1] coordIndex [0 1 -1 2 3]

    Note: On the example which had colorPerVertex set to TRUE the colors presented for each line are the average color from the two colors defined for the end of each line.

    Syntax:
    IndexedLineSet {
    coord NULL
    coordIndex [ ]
    color NULL
    colorIndex [ ]
    colorPerVertex TRUE
    }