www.pudn.com > vrmlExample.rar > 2-1.wrl
#VRML V2.0 utf8
#设置观察角度位置
Viewpoint
{
position 0.0 3.0 15.0
description "全景图"
}
Group
{
children
[
#设置环境背景
Background
{
skyColor
[
0.0 0.6 0.0,
0.6 0.2 0.3,
0.0 0.1 0.6
]
skyAngle
[
1.571,0.786
]
groundColor
[
0.6 0.1 0.1,
0.1 0.6 0.3,
0.2 0.3 0.6
]
groundAngle
[
0.786,1.571
]
},
#添加几何造型
Transform
{
translation 0.0 3.0 0.0
children Shape
{
appearance DEF Red Appearance
{
material Material
{
diffuseColor 1.0 0.0 0.0
}
}
geometry Cylinder
{
radius 1
height 3
}
}
},
Transform
{
translation 0.0 4.0 0.0
children Shape
{
appearance USE Red
geometry Cone
{
bottomRadius 2.0
height 1
}
}
},
#添加文本
Transform
{
translation -6.0 5.0 0.0
children Shape
{
appearance Appearance
{
material Material
{
diffuseColor 0.0 0.0 1.0
}
}
geometry Text
{
string "Hello!World!"
fontStyle FontStyle
{
size 3
style "bolditalic"
}
}
}
}
]
}