Filstruktur

XML-kodning

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "+//ISO//DTD X3D//EN"
  "http://www.web3D.org/Specifications/X3D/x3d-compact.dtd">
<X3D version="3.0" profile="Interactive">
  <head>
    <meta name="description" content="X3D scene example"/>
  </head>

  <Scene>
    <Transform translation='6.1 0.6 -3.0'>
      <Shape>
        <Appearance>
          <Material/>
        </Appearance>
        <Box/>
        </Shape>
    </Transform>
  </Scene>
</X3D>

VRML-kodning

#VRML V2.0 utf8
Transform {
  translation 6.1 0.6 -3.1
  children [
    Shape {
      appearance Appearance {
        material Material { }
      }
      geometry Box { }  
    }
  ]
}
I fortsättningen kommer vi att använda VRML-kodning…