Script VRML
Script VRML
0 utf8
# file name: almari.wrl
# almari
Group
{
children
[
DEF MyBox Shape
{
appearance Appearance
{
material Material
{
diffuseColor 0.9 0.9 0.9
}
}
geometry Box
{
size 2.0 5.0 2.0
}
},
# handle
Transform
{
translation -0.7 0.6 1.05
scale
0.1 0.1 0.15
children USE MyBox
},
]
}
#VRML V2.0 utf8
# file name: kamar.wrl
# Kamar dengan tempat tidur, meja
kursi belajar, lampu, almari, dan sofa
Group
{
children
[
# kamar dengan tembok
Inline
{
url "ruang.wrl"
}
# tempat tidur dengan dua
bantal merah
Transform
{
translation -7.0 0.5 4.5
children
[
Shape
{
appearance DEF
BedMaterial Appearance
{
material Material
{
diffuseColor 0.0
0.4 0.5
}
}
geometry DEF Bed Box
{
size 7.0 1.0 5.0
}
}
Transform
{
translation -2.0 0.65
-1.0
scale
0.2 0.2 0.2
rotation
0.0 1.0 0.0
-1.57
children
[
Shape
{
appearance DEF
PillowAppearance Appearance
{
material Material
{
diffuseColor
0.8 0.0 0.0
}
}
geometry USE Bed
}
]
}
Transform
{
scale
10.0 10.0
10.0
rotation
0.0
1.0 0.0
1.57
children
[
#lampu belajar
Inline
{
url "lampu.wrl"
}
]
},
]
},
# almari
Transform
{
translation 9.5 2.5 -5.75
scale
1.0 1.0 1.0
rotation
0.0 1.0 0.0
-1.57
children
[
Inline
{
url "almari.wrl"
}
]
},
# meja kecil
Transform
{
translation 7.0 1.5 2.45
scale
0.3 0.2 0.3
children
[
Inline
{
url "meja.wrl"
}
]
},
# sofa santai
Transform
{
}
geometry Box
{
size 9 15 0.5
}
}
]
},
},
]
Transform
{
translation 7.0 0.5 5.5
rotation
0.0 1.0 0.0 3.14
children USE Sofa
},
]
}
#VRML V2.0 utf8
# file name: lampu.wrl
# The VRML 2.0 Sourcebook
Group {
children [
}
#VRML V2.0 utf8
# file name: kursi.wrl
# kursi warna kuning
Group
{
children
[
Inline
{
url "setkursi.wrl"
}
Transform
{
translation 0.0 0.5 -3.25
children
[
Shape
{
appearance Appearance
{
material Material
{
diffuseColor 1.0
1.0 0.0
}
height 0.15
bottomRadius
0.12
bottom FALSE
}
},
# Light bulb
Transform {
translation 0.0
joint
Group {
children [
DEF MoveSecondArm
SphereSensor {
offset 1.0 0.0 0.0 1.9
},
DEF SecondArm
Transform {
translation 0.0 0.3 0.0
rotation 1.0 0.0 0.0
1.9
center 0.0 -0.15 0.0
children [
# Second arm
USE LampArm,
# Second arm - shade
joint
Group {
children [
DEF
MoveLampShade SphereSensor {
offset 1.0 0.0 0.0
-1.25
},
DEF LampShade
Transform {
translation 0.0
0.075 0.0
rotation 1.0 0.0
0.0 -1.25
center 0.0 0.075
0.0
children [
# Shade
Shape {
appearance
USE White
geometry Cone
{
-0.05 0.0
children Shape
{
appearance
USE White
geometry
Sphere {
radius 0.05
}
}
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
]
}
{
rotation 1.0 0.0 0.0 3.14
children
[
Shape
{
appearance Appearance
{
material Material
{
diffuseColor 1.0
1.0 0.0
}
}
geometry Cone
{
bottomRadius 0.75
height
2.0
}
}
]
},
Transform
{
translation 0.0 1.0 0.0
children
[
PointLight
{
location 0.0 2.0 0.0
color 1.0 0.4 0.2
intensity 0.8
attenuation 0.0 0.6 0.0
radius 10.0
}
]
}
]
}
children
[
# atas meja
Shape
{
appearance DEF Yellow
Appearance
{
material Material
{
diffuseColor 1.0 1.0 0.0
}
}
geometry Box { size 9 1.0
7}
},
#kaki1
Transform
{
translation -3.5 -3.5 2.5
children DEF TableLeg Shape
{
appearance USE Yellow
geometry Cylinder
{
radius 0.5
height 7
}
}
},
#kaki2
Transform
{
translation 3.5 -3.5 2.5
children USE TableLeg
},
#kaki3
Transform
{
translation -3.5 -3.5 -2.5
children USE TableLeg
},
#kaki4
Transform
{
translation 3.5 -3.5 -2.5
children USE TableLeg
},
]
}
Transform
{
translation -7.0 3.5 -7.0
children
[
DEF BrickWall Inline
{
url "tembok.wrl"
}
]
},
Transform
{
translation 7.0 3.5 -7.0
children USE BrickWall
},
Transform
{
translation 0.0 3.5 7.0
children USE BrickWall
},
Transform
{
translation -7.0 3.5 7.0
children USE BrickWall
},
Transform
{
translation 7.0 3.5 7.0
children USE BrickWall
},
Transform
{
translation -10.5 3.5 -3.5
rotation 0.0 1.0 0.0 1.57
children USE BrickWall
},
Transform
{
translation -10.5 3.5 3.5
rotation 0.0 1.0 0.0 1.57
children
[
USE BrickWall
DEF Light Inline
{
url "lamputembok.wrl"
}
]
},
[
Shape
{
appearance DEF Yellow
Appearance
{
material Material
{
diffuseColor 1.0 1.0 0.0
}
}
geometry Box { size 9 1.0
7}
},
Transform
{
translation 10.5 3.5 -3.5
rotation 0.0 1.0 0.0 1.57
children USE BrickWall
},
Transform
{
translation -3.5 -3.5 2.5
children DEF TableLeg Shape
{
appearance USE Yellow
geometry Box
{
size 1.0 7 1.0
}
}
},
Transform
{
translation 10.5 3.5 3.5
rotation 0.0 1.0 0.0 1.57
children
[
USE BrickWall
DEF Light Inline
{
url "lamputembok.wrl"
}
]
Transform
{
translation 3.5 -3.5 2.5
children USE TableLeg
},
]
}
},
]
}
]
},
]
}