cityflight_0_00.x3d source
<?xml version="1.0" encoding="UTF-8"?>
<X3D>
<Scene>
<Viewpoint position='7 20 12' orientation='-1 0.14 0 1.3' description='vp1'/>
<Viewpoint position='4.5 2 27' orientation='-0.4 0.4 -0.8 0.23' description='vp2'/>

<NavigationInfo headlight='FALSE' type='"EXAMINE"'/>

<DirectionalLight direction='-0.7 -1 -1' ambientIntensity='0.7'/>

<Background skyColor='1 1 1'/>

<Fog visibilityRange='50' fogType='EXPONENTIAL'/>

<!-- Samples -->
<Switch>
<!-- sample of a buliding -->
<Group DEF='Buildings'>

<!-- sidewalk -->
<Transform translation='0 0.02 0'>
<Shape>
<Appearance>
<Material diffuseColor='0.8 0.65 0.6'/>
<ImageTexture
url='
"tile.png"'
/>
<TextureTransform scale='40 40'/>
</Appearance>
<Box size='6 0.04 6'/>
</Shape>
</Transform>

<!-- front steps -->
<Transform translation='0 0.04 0'>
<Shape>
<Appearance>
<Material diffuseColor='0.95 0.95 1'/>
<ImageTexture
url='
"floor.png"'
/>
<TextureTransform scale='10 10'/>
</Appearance>
<Box size='4.75 0.04 4.75'/>
</Shape>
</Transform>

<!-- buliding A -->
<Transform translation='1 6 1'>
<Shape DEF='Building-Sp'>
<Appearance>
<Material diffuseColor='0.8 0.8 0.9'/>
<ImageTexture
url='
"wall.png"'
/>
<TextureTransform scale='8 30'/>
</Appearance>
<Box size='2.5 12 2.5'/>
</Shape>
</Transform>
<Transform translation='1 0.06 1'>
<Shape DEF='Green-Sp'>
<Appearance>
<Material diffuseColor='0.1 0.4 0.2'/>
<ImageTexture
url='
"green.png"'
/>
<TextureTransform scale='20 20'/>
</Appearance>
<Box size='2.7 0.06 2.7'/>
</Shape>
</Transform>
<Transform translation='1 12.03 1'>
<Shape DEF='Roof-Sp'>
<Appearance>
<Material diffuseColor='1 1 0.95'/>
<ImageTexture
url='
"roof.png"'
/>
</Appearance>
<Box size='2.5 0.06 2.5'/>
</Shape>
</Transform>

<!-- buliding B -->
<Transform translation='-1 6 -1'>
<Shape USE='Building-Sp'/>
</Transform>
<Transform translation='-1 0.06 -1'>
<Shape USE='Green-Sp'/>
</Transform>
<Transform translation='-1 12.03 -1'>
<Shape USE='Roof-Sp'/>
</Transform>

<!-- center buliding -->
<Transform translation='0 2 0'>
<Shape>
<Appearance>
<Material diffuseColor='0.9 0.9 1'/>
</Appearance>
<Box size='2 4 2'/>
</Shape>
</Transform>
<Transform translation='0 7 0'>
<Shape>
<Appearance>
<Material diffuseColor='0.9 0.9 0.85'/>
</Appearance>
<Box size='1 12 1'/>
</Shape>
</Transform>

</Group>

<!-- sample of road -->
<Group DEF='Road'>
<Transform translation='-2 -0.04 -2'>
<Shape DEF='Road-Sp'>
<Appearance>
<Material diffuseColor='0.3 0.3 0.3'/>
<ImageTexture
url='
"road.png"'
/>
</Appearance>
<Box size='4 0.04 4'/>
</Shape>
</Transform>
<Transform translation='-2 -0.04 2' rotation='0 1 0 1.5708'>
<Shape USE='Road-Sp'/>
</Transform>
<Transform translation='2 -0.04 2' rotation='0 1 0 3.1416'>
<Shape USE='Road-Sp'/>
</Transform>
<Transform translation='2 -0.04 -2' rotation='0 1 0 4.7124'>
<Shape USE='Road-Sp'/>
</Transform>
</Group>
</Switch>

<!-- Arrangement of buildings and roads -->
<Transform DEF='City-Tf'>
</Transform>
<Script DEF='Sc'>
<field accessType='outputOnly' type='MFNode' name='children'/>
<field accessType='initializeOnly' type='SFNode' name='Buildings'>
<Group USE='Buildings'/>
</field>
<field accessType='initializeOnly' type='SFNode' name='Road'>
<Group USE='Road'/>
</field>
<![CDATA[ecmascript:

function initialize () {

var Sections = new MFNode ();

for ( var z = -3; z <= 3; z++ ) {
for ( var x = -2; x <= 2; x++ ) {

var OneSection = new SFNode ( 'Transform {}' );
OneSection.translation = new SFVec3f( x * 8, 0, z * 8 );
OneSection.children[0] = Buildings;
OneSection.children[1] = Road;

Sections[Sections.length] = OneSection;

}
}

children = Sections;
}
]]>
</Script>
<ROUTE fromNode='Sc' fromField='children' toNode='City-Tf' toField='children'/>

<!-- Scroll -->
<TimeSensor DEF='TiS' loop='TRUE'/>
<PositionInterpolator DEF='PI'
key='0 1'
keyValue='
0 0 0
0 0 8'
/>
<ROUTE fromNode='TiS' fromField='fraction_changed' toNode='PI' toField='set_fraction'/>
<ROUTE fromNode='PI' fromField='value_changed' toNode='City-Tf' toField='translation'/>
</Scene>
</X3D>