Browse Source

Merge remote-tracking branch 'refs/remotes/mrdoob/dev' into dev

Kyle Larson 8 years ago
parent
commit
b4a785efa6
46 changed files with 5129 additions and 6299 deletions
  1. 9 5
      build/three.js
  2. 120 327
      build/three.min.js
  3. 9 5
      build/three.module.js
  4. 138 137
      docs/api/geometries/TextGeometry.html
  5. 3 2
      docs/manual/introduction/Creating-text.html
  6. 5 2
      docs/scenes/js/geometry.js
  7. 3 3
      editor/js/Loader.js
  8. 3 3
      editor/js/Viewport.js
  9. 256 114
      examples/js/loaders/GLTFLoader.js
  10. 6 6
      examples/js/pmrem/PMREMCubeUVPacker.js
  11. 1 1
      examples/misc_animation_authoring.html
  12. 1 1
      examples/misc_controls_transform.html
  13. 1 1
      examples/misc_sound.html
  14. BIN
      examples/models/gltf/CesiumMan/glTF-Binary/Cesium_Man.glb
  15. BIN
      examples/models/gltf/CesiumMilkTruck/glTF-Binary/CesiumMilkTruck.glb
  16. BIN
      examples/models/gltf/duck/glTF-Binary/duck.glb
  17. BIN
      examples/models/gltf/monster/glTF-Binary/Monster.glb
  18. 2 2
      examples/models/gltf/snowflake/line_vert.glsl
  19. 3903 5120
      examples/models/vrml/house.wrl
  20. 3 3
      examples/webgl_geometry_extrude_shapes2.html
  21. 1 1
      examples/webgl_geometry_spline_editor.html
  22. 1 1
      examples/webgl_helpers.html
  23. 1 1
      examples/webgl_loader_amf.html
  24. 1 1
      examples/webgl_loader_bvh.html
  25. 1 1
      examples/webgl_loader_fbx.html
  26. 74 94
      examples/webgl_loader_gltf.html
  27. 1 1
      examples/webgl_loader_msgpack.html
  28. 1 1
      examples/webgl_shaders_sky.html
  29. 1 1
      examples/webvr_vive_paint.html
  30. 1 1
      examples/webvr_vive_sculpt.html
  31. 180 9
      src/core/Geometry.js
  32. 40 71
      src/geometries/BoxGeometry.js
  33. 42 23
      src/geometries/CircleGeometry.js
  34. 57 96
      src/geometries/CylinderGeometry.js
  35. 27 26
      src/geometries/LatheGeometry.js
  36. 3 1
      src/geometries/ParametricGeometry.js
  37. 30 33
      src/geometries/PlaneGeometry.js
  38. 26 31
      src/geometries/RingGeometry.js
  39. 5 1
      src/geometries/ShapeGeometry.js
  40. 49 35
      src/geometries/SphereGeometry.js
  41. 22 42
      src/geometries/TorusGeometry.js
  42. 22 30
      src/geometries/TorusKnotGeometry.js
  43. 6 4
      src/helpers/GridHelper.js
  44. 70 60
      src/math/Box3.js
  45. 3 1
      src/math/Sphere.js
  46. 1 1
      src/renderers/webgl/WebGLUniforms.js

File diff suppressed because it is too large
+ 9 - 5
build/three.js


File diff suppressed because it is too large
+ 120 - 327
build/three.min.js


File diff suppressed because it is too large
+ 9 - 5
build/three.module.js


+ 138 - 137
docs/api/geometries/TextGeometry.html

@@ -1,138 +1,139 @@
-<!DOCTYPE html>
-<html lang="en">
-	<head>
+<!DOCTYPE html>
+<html lang="en">
+	<head>
 		<meta charset="utf-8" />
-		<base href="../../" />
-		<script src="list.js"></script>
-		<script src="page.js"></script>
-		<link type="text/css" rel="stylesheet" href="page.css" />
-	</head>
-	<body>
-		[page:ExtrudeGeometry] &rarr;
-
-		<h1>[name]</h1>
-
-		<div class="desc">This object creates a 3D object of text as a single object.</div>
-
-		<iframe id="scene" src="scenes/geometry-browser.html#TextGeometry"></iframe>
-
-		<script>
-
-		// iOS iframe auto-resize workaround
-
-		if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) {
-
-			var scene = document.getElementById( 'scene' );
-
-			scene.style.width = getComputedStyle( scene ).width;
-			scene.style.height = getComputedStyle( scene ).height;
-			scene.setAttribute( 'scrolling', 'no' );
-
-		}
-
-		</script>
-
-		<h2>Example</h2>
-
-		<div>
-		[example:webgl_geometry_text geometry / text ]<br/>
-		[example:webgl_geometry_text2 geometry / text2 ]
-		</div>
-
-		<h2>Constructor</h2>
-
-		<h3>[name]([page:String text], [page:Object parameters])</h3>
-		<div>
-		text — The text that needs to be shown. <br />
-		parameters — Object that can contains the following parameters.
-		<ul>
-			<li>font — THREE.Font.</li>
-			<li>size — Float. Size of the text.</li>
-			<li>height — Float. Thickness to extrude text.  Default is 50.</li>
-			<li>curveSegments — Integer. Number of points on the curves. Default is 12.</li>
-			<li>bevelEnabled — Boolean. Turn on bevel. Default is False.</li>
-			<li>bevelThickness — Float. How deep into text bevel goes. Default is 10.</li>
-			<li>bevelSize — Float. How far from text outline is bevel. Default is 8.</li>
-		</ul>
-		</div>
-
-		<h2>Available Fonts</h2>
-
-		<div>
-		TextGeometry uses <a href='http://gero3.github.io/facetype.js/' target="_top">typeface.json</a> generated fonts.
-		Some existing fonts can be found located in <b>/examples/fonts</b> and must be included in the page.
-		</div>
-		<table>
-			<tr>
-				<th>Font</th>
-				<th>Weight</th>
-				<th>Style</th>
-				<th>File Path</th>
-			</tr>
-			<tr>
-				<td>helvetiker</td>
-				<td>normal</td>
-				<td>normal</td>
-				<td>/examples/fonts/helvetiker_regular.typeface.json</td>
-			</tr>
-			<tr>
-				<td>helvetiker</td>
-				<td>bold</td>
-				<td>normal</td>
-				<td>/examples/fonts/helvetiker_bold.typeface.json</td>
-			</tr>
-			<tr>
-				<td>optimer</td>
-				<td>normal</td>
-				<td>normal</td>
-				<td>/examples/fonts/optimer_regular.typeface.json</td>
-			</tr>
-			<tr>
-				<td>optimer</td>
-				<td>bold</td>
-				<td>normal</td>
-				<td>/examples/fonts/optimer_bold.typeface.json</td>
-			</tr>
-			<tr>
-				<td>gentilis</td>
-				<td>normal</td>
-				<td>normal</td>
-				<td>/examples/fonts/gentilis_regular.typeface.json</td>
-			</tr>
-			<tr>
-				<td>gentilis</td>
-				<td>bold</td>
-				<td>normal</td>
-				<td>/examples/fonts/gentilis_bold.typeface.json</td>
-			</tr>
-			<tr>
-				<td>droid sans</td>
-				<td>normal</td>
-				<td>normal</td>
-				<td>/examples/fonts/droid/droid_sans_regular.typeface.json</td>
-			</tr>
-			<tr>
-				<td>droid sans</td>
-				<td>bold</td>
-				<td>normal</td>
-				<td>/examples/fonts/droid/droid_sans_bold.typeface.json</td>
-			</tr>
-			<tr>
-				<td>droid serif</td>
-				<td>normal</td>
-				<td>normal</td>
-				<td>/examples/fonts/droid/droid_serif_regular.typeface.json</td>
-			</tr>
-			<tr>
-				<td>droid serif</td>
-				<td>bold</td>
-				<td>normal</td>
-				<td>/examples/fonts/droid/droid_serif_bold.typeface.json</td>
-			</tr>
-		</table>
-
-		<h2>Source</h2>
-
-		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
-	</body>
-</html>
+		<base href="../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body>
+		[page:ExtrudeGeometry] &rarr;
+
+		<h1>[name]</h1>
+
+		<div class="desc">This object creates a 3D object of text as a single object.</div>
+
+		<iframe id="scene" src="scenes/geometry-browser.html#TextGeometry"></iframe>
+
+		<script>
+
+		// iOS iframe auto-resize workaround
+
+		if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) {
+
+			var scene = document.getElementById( 'scene' );
+
+			scene.style.width = getComputedStyle( scene ).width;
+			scene.style.height = getComputedStyle( scene ).height;
+			scene.setAttribute( 'scrolling', 'no' );
+
+		}
+
+		</script>
+
+		<h2>Example</h2>
+
+		<div>
+		[example:webgl_geometry_text geometry / text ]<br/>
+		[example:webgl_geometry_text2 geometry / text2 ]
+		</div>
+
+		<h2>Constructor</h2>
+
+		<h3>[name]([page:String text], [page:Object parameters])</h3>
+		<div>
+		text — The text that needs to be shown. <br />
+		parameters — Object that can contains the following parameters.
+		<ul>
+			<li>font — THREE.Font.</li>
+			<li>size — Float. Size of the text.</li>
+			<li>height — Float. Thickness to extrude text.  Default is 50.</li>
+			<li>curveSegments — Integer. Number of points on the curves. Default is 12.</li>
+			<li>bevelEnabled — Boolean. Turn on bevel. Default is False.</li>
+			<li>bevelThickness — Float. How deep into text bevel goes. Default is 10.</li>
+			<li>bevelSize — Float. How far from text outline is bevel. Default is 8.</li>
+			<li>bevelSegments — Integer. Number of bevel segments. Default is 3.</li>
+		</ul>
+		</div>
+
+		<h2>Available Fonts</h2>
+
+		<div>
+		TextGeometry uses <a href='http://gero3.github.io/facetype.js/' target="_top">typeface.json</a> generated fonts.
+		Some existing fonts can be found located in <b>/examples/fonts</b> and must be included in the page.
+		</div>
+		<table>
+			<tr>
+				<th>Font</th>
+				<th>Weight</th>
+				<th>Style</th>
+				<th>File Path</th>
+			</tr>
+			<tr>
+				<td>helvetiker</td>
+				<td>normal</td>
+				<td>normal</td>
+				<td>/examples/fonts/helvetiker_regular.typeface.json</td>
+			</tr>
+			<tr>
+				<td>helvetiker</td>
+				<td>bold</td>
+				<td>normal</td>
+				<td>/examples/fonts/helvetiker_bold.typeface.json</td>
+			</tr>
+			<tr>
+				<td>optimer</td>
+				<td>normal</td>
+				<td>normal</td>
+				<td>/examples/fonts/optimer_regular.typeface.json</td>
+			</tr>
+			<tr>
+				<td>optimer</td>
+				<td>bold</td>
+				<td>normal</td>
+				<td>/examples/fonts/optimer_bold.typeface.json</td>
+			</tr>
+			<tr>
+				<td>gentilis</td>
+				<td>normal</td>
+				<td>normal</td>
+				<td>/examples/fonts/gentilis_regular.typeface.json</td>
+			</tr>
+			<tr>
+				<td>gentilis</td>
+				<td>bold</td>
+				<td>normal</td>
+				<td>/examples/fonts/gentilis_bold.typeface.json</td>
+			</tr>
+			<tr>
+				<td>droid sans</td>
+				<td>normal</td>
+				<td>normal</td>
+				<td>/examples/fonts/droid/droid_sans_regular.typeface.json</td>
+			</tr>
+			<tr>
+				<td>droid sans</td>
+				<td>bold</td>
+				<td>normal</td>
+				<td>/examples/fonts/droid/droid_sans_bold.typeface.json</td>
+			</tr>
+			<tr>
+				<td>droid serif</td>
+				<td>normal</td>
+				<td>normal</td>
+				<td>/examples/fonts/droid/droid_serif_regular.typeface.json</td>
+			</tr>
+			<tr>
+				<td>droid serif</td>
+				<td>bold</td>
+				<td>normal</td>
+				<td>/examples/fonts/droid/droid_serif_bold.typeface.json</td>
+			</tr>
+		</table>
+
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+	</body>
+</html>

+ 3 - 2
docs/manual/introduction/Creating-text.html

@@ -62,8 +62,9 @@
 		<div>
 			<p>
 				Use this method if you prefer to work purely in three.js or create procedural and dynamic 3d
-				text geometries. However, font data files <a href="http://typeface.neocracy.org/fonts.html">http://typeface.neocracy.org/fonts.html</a>
-				in the typeface.js format needs to be loaded.
+				text geometries. However, font data files in THREE.js JSON format needs to be loaded
+				before this will work.
+				See the [page:TextGeometry] page for examples of JSON fonts.
 			</p>
 			<p>A Text Geometry can then be created with </p>
 			<code>new THREE.TextGeometry( text, parameters );</code>

+ 5 - 2
docs/scenes/js/geometry.js

@@ -924,7 +924,8 @@ var guis = {
 			weight : "regular",
 			bevelEnabled : false,
 			bevelThickness : 1,
-			bevelSize : 0.5
+			bevelSize : 0.5,
+			bevelSegments : 3
 		};
 
 		var fonts = [
@@ -950,7 +951,8 @@ var guis = {
 					curveSegments: data.curveSegments,
 					bevelEnabled: data.bevelEnabled,
 					bevelThickness: data.bevelThickness,
-					bevelSize: data.bevelSize
+					bevelSize: data.bevelSize,
+					bevelSegments: data.bevelSegments
 				} );
 				geometry.center();
 
@@ -974,6 +976,7 @@ var guis = {
 		folder.add( data, 'bevelEnabled' ).onChange( generateGeometry );
 		folder.add( data, 'bevelThickness', 0.1, 3 ).onChange( generateGeometry );
 		folder.add( data, 'bevelSize', 0.1, 3 ).onChange( generateGeometry );
+		folder.add( data, 'bevelSegments', 0, 8 ).step( 1 ).onChange( generateGeometry );
 
 		generateGeometry();
 

+ 3 - 3
editor/js/Loader.js

@@ -155,15 +155,15 @@ var Loader = function ( editor ) {
 
 				break;
 
+			case 'glb':
 			case 'gltf':
 
 				reader.addEventListener( 'load', function ( event ) {
 
 					var contents = event.target.result;
-					var json = JSON.parse( contents );
 
 					var loader = new THREE.GLTFLoader();
-					loader.parse( json, function ( result ) {
+					loader.parse( contents, function ( result ) {
 
 						result.scene.name = filename;
 						editor.execute( new AddObjectCommand( result.scene ) );
@@ -171,7 +171,7 @@ var Loader = function ( editor ) {
 					} );
 
 				}, false );
-				reader.readAsText( file );
+				reader.readAsArrayBuffer( file );
 
 				break;
 

+ 3 - 3
editor/js/Viewport.js

@@ -36,7 +36,7 @@ var Viewport = function ( editor ) {
 
 	// helpers
 
-	var grid = new THREE.GridHelper( 30, 60 );
+	var grid = new THREE.GridHelper( 60, 60 );
 	sceneHelpers.add( grid );
 
 	//
@@ -295,12 +295,12 @@ var Viewport = function ( editor ) {
 
 			case 'css/light.css':
 				sceneHelpers.remove( grid );
-				grid = new THREE.GridHelper( 30, 60, 0x444444, 0x888888 );
+				grid = new THREE.GridHelper( 60, 60, 0x444444, 0x888888 );
 				sceneHelpers.add( grid );
 				break;
 			case 'css/dark.css':
 				sceneHelpers.remove( grid );
-				grid = new THREE.GridHelper( 30, 60, 0xbbbbbb, 0x888888 );
+				grid = new THREE.GridHelper( 60, 60, 0xbbbbbb, 0x888888 );
 				sceneHelpers.add( grid );
 				break;
 

+ 256 - 114
examples/js/loaders/GLTFLoader.js

@@ -24,9 +24,12 @@ THREE.GLTFLoader = ( function () {
 			var path = this.path && ( typeof this.path === "string" ) ? this.path : THREE.Loader.prototype.extractUrlBase( url );
 
 			var loader = new THREE.FileLoader( scope.manager );
-			loader.load( url, function ( text ) {
 
-				scope.parse( JSON.parse( text ), onLoad, path );
+			loader.setResponseType( 'arraybuffer' );
+
+			loader.load( url, function ( data ) {
+
+				scope.parse( data, onLoad, path );
 
 			}, onProgress, onError );
 
@@ -44,11 +47,35 @@ THREE.GLTFLoader = ( function () {
 
 		},
 
-		parse: function ( json, callback, path ) {
+		parse: function ( data, callback, path ) {
+
+			var content;
+			var extensions = {};
+
+			var magic = convertUint8ArrayToString( new Uint8Array( data, 0, 4 ) );
+
+			if ( magic === BINARY_EXTENSION_HEADER_DEFAULTS.magic ) {
+
+				extensions[ EXTENSIONS.KHR_BINARY_GLTF ] = new GLTFBinaryExtension( data );
+				content = extensions[ EXTENSIONS.KHR_BINARY_GLTF ].content;
+
+			} else {
+
+				content = convertUint8ArrayToString( new Uint8Array( data ) );
+
+			}
+
+			var json = JSON.parse( content );
+
+			if ( json.extensionsUsed && json.extensionsUsed.indexOf( EXTENSIONS.KHR_MATERIALS_COMMON ) >= 0 ) {
+
+				extensions[ EXTENSIONS.KHR_MATERIALS_COMMON ] = new GLTFMaterialsCommonExtension( json );
+
+			}
 
 			console.time( 'GLTFLoader' );
 
-			var parser = new GLTFParser( json, {
+			var parser = new GLTFParser( json, extensions, {
 
 				path: path || this.path,
 				crossOrigin: this.crossOrigin
@@ -255,6 +282,126 @@ THREE.GLTFLoader = ( function () {
 
 	};
 
+	/*********************************/
+	/********** EXTENSIONS ***********/
+	/*********************************/
+
+	var EXTENSIONS = {
+		KHR_BINARY_GLTF: 'KHR_binary_glTF',
+		KHR_MATERIALS_COMMON: 'KHR_materials_common'
+	};
+
+	/* MATERIALS COMMON EXTENSION */
+
+	function GLTFMaterialsCommonExtension( json ) {
+
+		this.name = EXTENSIONS.KHR_MATERIALS_COMMON;
+
+		this.lights = {};
+
+		var lights = json.extensions && json.extensions[ EXTENSIONS.KHR_MATERIALS_COMMON ].lights;
+
+		for ( var lightId in lights ) {
+
+			var light = lights[ lightId ];
+			var lightNode;
+
+			var lightParams = light[ light.type ];
+			var color = new THREE.Color().fromArray( lightParams.color );
+
+			switch ( light.type ) {
+
+				case "directional":
+					lightNode = new THREE.DirectionalLight( color );
+					lightNode.position.set( 0, 0, 1 );
+					break;
+
+				case "point":
+					lightNode = new THREE.PointLight( color );
+					break;
+
+				case "spot":
+					lightNode = new THREE.SpotLight( color );
+					lightNode.position.set( 0, 0, 1 );
+					break;
+
+				case "ambient":
+					lightNode = new THREE.AmbientLight( color );
+					break;
+
+			}
+
+			if ( lightNode ) {
+
+				this.lights[ lightId ] = lightNode;
+
+			}
+
+		}
+
+	}
+
+	/* BINARY EXTENSION */
+
+	var BINARY_EXTENSION_BUFFER_NAME = 'binary_glTF';
+
+	var BINARY_EXTENSION_HEADER_DEFAULTS = { magic: 'glTF', version: 1, contentFormat: 0 };
+
+	var BINARY_EXTENSION_HEADER_LENGTH = 20;
+
+	function GLTFBinaryExtension( data ) {
+
+		this.name = EXTENSIONS.KHR_BINARY_GLTF;
+
+		var headerView = new DataView( data, 0, BINARY_EXTENSION_HEADER_LENGTH );
+
+		var header = {
+			magic: convertUint8ArrayToString( new Uint8Array( data.slice( 0, 4 ) ) ),
+			version: headerView.getUint32( 4, true ),
+			length: headerView.getUint32( 8, true ),
+			contentLength: headerView.getUint32( 12, true ),
+			contentFormat: headerView.getUint32( 16, true )
+		};
+
+		for ( var key in BINARY_EXTENSION_HEADER_DEFAULTS ) {
+
+			var value = BINARY_EXTENSION_HEADER_DEFAULTS[ key ];
+
+			if ( header[ key ] !== value ) {
+
+				throw new Error( 'Unsupported glTF-Binary header: Expected "%s" to be "%s".', key, value );
+
+			}
+
+		}
+
+		var contentArray = new Uint8Array( data, BINARY_EXTENSION_HEADER_LENGTH, header.contentLength );
+
+		this.header = header;
+		this.content = convertUint8ArrayToString( contentArray );
+		this.body = data.slice( BINARY_EXTENSION_HEADER_LENGTH + header.contentLength, header.length );
+
+	}
+
+	GLTFBinaryExtension.prototype.loadShader = function ( shader, bufferViews ) {
+
+		var bufferView = bufferViews[ shader.extensions[ EXTENSIONS.KHR_BINARY_GLTF ].bufferView ];
+		var array = new Uint8Array( bufferView );
+
+		return convertUint8ArrayToString( array );
+
+	};
+
+	GLTFBinaryExtension.prototype.loadTextureSourceUri = function ( source, bufferViews ) {
+
+		var metadata = source.extensions[ EXTENSIONS.KHR_BINARY_GLTF ];
+		var bufferView = bufferViews[ metadata.bufferView ];
+		var stringData = convertUint8ArrayToString( new Uint8Array( bufferView ) );
+
+		return 'data:' + metadata.mimeType + ';base64,' + btoa( stringData );
+
+	};
+
 	/*********************************/
 	/********** INTERNALS ************/
 	/*********************************/
@@ -471,6 +618,22 @@ THREE.GLTFLoader = ( function () {
 
 	}
 
+	// Avoid the String.fromCharCode.apply(null, array) shortcut, which
+	// throws a "maximum call stack size exceeded" error for large arrays.
+	function convertUint8ArrayToString( array ) {
+
+		var s = '';
+
+		for ( var i = 0; i < array.length; i ++ ) {
+
+			s += String.fromCharCode( array[ i ] );
+
+		}
+
+		return s;
+
+	}
+
 	// Three.js seems too dependent on attribute names so globally
 	// replace those in the shader code
 	function replaceTHREEShaderAttributes( shaderText, technique ) {
@@ -575,7 +738,7 @@ THREE.GLTFLoader = ( function () {
 			side: THREE.FrontSide
 		} );
 
-	};
+	}
 
 	// Deferred constructor for RawShaderMaterial types
 	function DeferredShaderMaterial( params ) {
@@ -614,9 +777,10 @@ THREE.GLTFLoader = ( function () {
 
 	/* GLTF PARSER */
 
-	function GLTFParser( json, options ) {
+	function GLTFParser( json, extensions, options ) {
 
 		this.json = json || {};
+		this.extensions = extensions || {};
 		this.options = options || {};
 
 		// loader object cache
@@ -710,17 +874,32 @@ THREE.GLTFLoader = ( function () {
 	GLTFParser.prototype.loadShaders = function () {
 
 		var json = this.json;
+		var extensions = this.extensions;
 		var options = this.options;
 
-		return _each( json.shaders, function ( shader ) {
+		return this._withDependencies( [
 
-			return new Promise( function ( resolve ) {
+			"bufferViews"
+
+		] ).then( function ( dependencies ) {
 
-				var loader = new THREE.FileLoader();
-				loader.setResponseType( 'text' );
-				loader.load( resolveURL( shader.uri, options.path ), function ( shaderText ) {
+			return _each( json.shaders, function ( shader ) {
 
-					resolve( shaderText );
+				if ( shader.extensions && shader.extensions[ EXTENSIONS.KHR_BINARY_GLTF ] ) {
+
+					return extensions[ EXTENSIONS.KHR_BINARY_GLTF ].loadShader( shader, dependencies.bufferViews );
+
+				}
+
+				return new Promise( function ( resolve ) {
+
+					var loader = new THREE.FileLoader();
+					loader.setResponseType( 'text' );
+					loader.load( resolveURL( shader.uri, options.path ), function ( shaderText ) {
+
+						resolve( shaderText );
+
+					} );
 
 				} );
 
@@ -733,9 +912,16 @@ THREE.GLTFLoader = ( function () {
 	GLTFParser.prototype.loadBuffers = function () {
 
 		var json = this.json;
+		var extensions = this.extensions;
 		var options = this.options;
 
-		return _each( json.buffers, function ( buffer ) {
+		return _each( json.buffers, function ( buffer, name ) {
+
+			if ( name === BINARY_EXTENSION_BUFFER_NAME ) {
+
+				return extensions[ EXTENSIONS.KHR_BINARY_GLTF ].body;
+
+			}
 
 			if ( buffer.type === 'arraybuffer' || buffer.type === undefined ) {
 
@@ -831,52 +1017,68 @@ THREE.GLTFLoader = ( function () {
 	GLTFParser.prototype.loadTextures = function () {
 
 		var json = this.json;
+		var extensions = this.extensions;
 		var options = this.options;
 
-		return _each( json.textures, function ( texture ) {
-
-			if ( texture.source ) {
+		return this._withDependencies( [
 
-				return new Promise( function ( resolve ) {
+			"bufferViews"
 
-					var source = json.images[ texture.source ];
+		] ).then( function ( dependencies ) {
 
-					var textureLoader = THREE.Loader.Handlers.get( source.uri );
+			return _each( json.textures, function ( texture ) {
 
-					if ( textureLoader === null ) {
+				if ( texture.source ) {
 
-						textureLoader = new THREE.TextureLoader();
+					return new Promise( function ( resolve ) {
 
-					}
+						var source = json.images[ texture.source ];
+						var sourceUri = source.uri;
 
-					textureLoader.setCrossOrigin( options.crossOrigin );
+						if ( source.extensions && source.extensions[ EXTENSIONS.KHR_BINARY_GLTF ] ) {
 
-					textureLoader.load( resolveURL( source.uri, options.path ), function ( _texture ) {
+							sourceUri = extensions[ EXTENSIONS.KHR_BINARY_GLTF ].loadTextureSourceUri( source, dependencies.bufferViews );
 
-						_texture.flipY = false;
+						}
 
-						if ( texture.sampler ) {
+						var textureLoader = THREE.Loader.Handlers.get( sourceUri );
 
-							var sampler = json.samplers[ texture.sampler ];
+						if ( textureLoader === null ) {
 
-							_texture.magFilter = WEBGL_FILTERS[ sampler.magFilter ];
-							_texture.minFilter = WEBGL_FILTERS[ sampler.minFilter ];
-							_texture.wrapS = WEBGL_WRAPPINGS[ sampler.wrapS ];
-							_texture.wrapT = WEBGL_WRAPPINGS[ sampler.wrapT ];
+							textureLoader = new THREE.TextureLoader();
 
 						}
 
-						resolve( _texture );
+						textureLoader.setCrossOrigin( options.crossOrigin );
 
-					}, undefined, function () {
+						textureLoader.load( resolveURL( sourceUri, options.path ), function ( _texture ) {
 
-						resolve();
+							_texture.flipY = false;
+
+							if ( texture.sampler ) {
+
+								var sampler = json.samplers[ texture.sampler ];
+
+								_texture.magFilter = WEBGL_FILTERS[ sampler.magFilter ];
+								_texture.minFilter = WEBGL_FILTERS[ sampler.minFilter ];
+								_texture.wrapS = WEBGL_WRAPPINGS[ sampler.wrapS ];
+								_texture.wrapT = WEBGL_WRAPPINGS[ sampler.wrapT ];
+
+							}
+
+							resolve( _texture );
+
+						}, undefined, function () {
+
+							resolve();
+
+						} );
 
 					} );
 
-				} );
+				}
 
-			}
+			} );
 
 		} );
 
@@ -901,13 +1103,13 @@ THREE.GLTFLoader = ( function () {
 
 				var khr_material;
 
-				if ( material.extensions && material.extensions.KHR_materials_common ) {
+				if ( material.extensions && material.extensions[ EXTENSIONS.KHR_MATERIALS_COMMON ] ) {
 
-					khr_material = material.extensions.KHR_materials_common;
+					khr_material = material.extensions[ EXTENSIONS.KHR_MATERIALS_COMMON ];
 
-				} else if ( json.extensions && json.extensions.KHR_materials_common ) {
+				} else if ( json.extensions && json.extensions[ EXTENSIONS.KHR_MATERIALS_COMMON ] ) {
 
-					khr_material = json.extensions.KHR_materials_common;
+					khr_material = json.extensions[ EXTENSIONS.KHR_MATERIALS_COMMON ];
 
 				}
 
@@ -1140,7 +1342,7 @@ THREE.GLTFLoader = ( function () {
 
 							var enable = enables[ i ];
 
-							switch( STATES_ENABLES[ enable ] ) {
+							switch ( STATES_ENABLES[ enable ] ) {
 
 								case 'CULL_FACE':
 
@@ -1413,7 +1615,7 @@ THREE.GLTFLoader = ( function () {
 								case 'POSITION':
 									geometry.addAttribute( 'position', bufferAttribute );
 									break;
-				
+
 								case 'COLOR_0':
 								case 'COLOR0':
 								case 'COLOR':
@@ -1421,7 +1623,8 @@ THREE.GLTFLoader = ( function () {
 									break;
 
 							}
-						};
+
+						}
 
 						var material = dependencies.materials[ primitive.material ];
 
@@ -1599,6 +1802,7 @@ THREE.GLTFLoader = ( function () {
 	GLTFParser.prototype.loadNodes = function () {
 
 		var json = this.json;
+		var extensions = this.extensions;
 		var scope = this;
 
 		return _each( json.nodes, function ( node ) {
@@ -1657,8 +1861,7 @@ THREE.GLTFLoader = ( function () {
 
 				"meshes",
 				"skins",
-				"cameras",
-				"extensions"
+				"cameras"
 
 			] ).then( function ( dependencies ) {
 
@@ -1747,7 +1950,7 @@ THREE.GLTFLoader = ( function () {
 
 										return null;
 
-									}
+									};
 
 									var geometry = originalGeometry;
 									var material = originalMaterial;
@@ -1805,7 +2008,7 @@ THREE.GLTFLoader = ( function () {
 
 										}
 
-									}
+									};
 
 									buildBoneGraph( node, child, 'skeletons' );
 
@@ -1827,9 +2030,12 @@ THREE.GLTFLoader = ( function () {
 
 					}
 
-					if ( node.extensions && node.extensions.KHR_materials_common && node.extensions.KHR_materials_common.light ) {
+					if ( node.extensions
+							 && node.extensions[ EXTENSIONS.KHR_MATERIALS_COMMON ]
+							 && node.extensions[ EXTENSIONS.KHR_MATERIALS_COMMON ].light ) {
 
-						var light = dependencies.extensions.KHR_materials_common.lights[ node.extensions.KHR_materials_common.light ];
+						var extensionLights = extensions[ EXTENSIONS.KHR_MATERIALS_COMMON ].lights;
+						var light = extensionLights[ node.extensions[ EXTENSIONS.KHR_MATERIALS_COMMON ].light ];
 
 						_node.add( light );
 
@@ -1845,70 +2051,6 @@ THREE.GLTFLoader = ( function () {
 
 	};
 
-	GLTFParser.prototype.loadExtensions = function () {
-
-		var json = this.json;
-
-		return _each( json.extensions, function ( extension, extensionId ) {
-
-			switch ( extensionId ) {
-
-				case "KHR_materials_common":
-
-					var extensionNode = {
-						lights: {}
-					};
-
-					var lights = extension.lights;
-
-					for ( var lightId in lights ) {
-
-						var light = lights[ lightId ];
-						var lightNode;
-
-						var lightParams = light[ light.type ];
-						var color = new THREE.Color().fromArray( lightParams.color );
-
-						switch ( light.type ) {
-
-							case "directional":
-								lightNode = new THREE.DirectionalLight( color );
-								lightNode.position.set( 0, 0, 1 );
-								break;
-
-							case "point":
-								lightNode = new THREE.PointLight( color );
-								break;
-
-							case "spot":
-								lightNode = new THREE.SpotLight( color );
-								lightNode.position.set( 0, 0, 1 );
-								break;
-
-							case "ambient":
-								lightNode = new THREE.AmbientLight( color );
-								break;
-
-						}
-
-						if ( lightNode ) {
-
-							extensionNode.lights[ lightId ] = lightNode;
-
-						}
-
-					}
-
-					return extensionNode;
-
-					break;
-
-			}
-
-		} );
-
-	};
-
 	GLTFParser.prototype.loadScenes = function () {
 
 		var json = this.json;
@@ -1981,4 +2123,4 @@ THREE.GLTFLoader = ( function () {
 
 	return GLTFLoader;
 
-} )();
+} )();

+ 6 - 6
examples/js/pmrem/PMREMCubeUVPacker.js

@@ -156,17 +156,17 @@ THREE.PMREMCubeUVPacker.prototype = {
 					uv = uv * 2.0 - 1.0;\
 					uv.y *= -1.0;\
 					if(faceIndex == 0) {\
-						sampleDirection = normalize(vec3(1.0, uv.y, -uv.x));\
+						sampleDirection = normalize(vec3(-1.0, uv.y, -uv.x));\
 					} else if(faceIndex == 1) {\
-						sampleDirection = normalize(vec3(uv.x, 1.0, uv.y));\
+						sampleDirection = normalize(vec3(-uv.x, 1.0, uv.y));\
 					} else if(faceIndex == 2) {\
-						sampleDirection = normalize(vec3(uv.x, uv.y, 1.0));\
+						sampleDirection = normalize(vec3(-uv.x, uv.y, 1.0));\
 					} else if(faceIndex == 3) {\
-						sampleDirection = normalize(vec3(-1.0, uv.y, uv.x));\
+						sampleDirection = normalize(vec3(1.0, uv.y, uv.x));\
 					} else if(faceIndex == 4) {\
-						sampleDirection = normalize(vec3(uv.x, -1.0, -uv.y));\
+						sampleDirection = normalize(vec3(-uv.x, -1.0, -uv.y));\
 					} else {\
-						sampleDirection = normalize(vec3(-uv.x, uv.y, -1.0));\
+						sampleDirection = normalize(vec3(uv.x, uv.y, -1.0));\
 					}\
 					vec4 color = envMapTexelToLinear( textureCube( envMap, sampleDirection ) );\
 					gl_FragColor = linearToOutputTexel( color );\

+ 1 - 1
examples/misc_animation_authoring.html

@@ -57,7 +57,7 @@
 				camera.lookAt( new THREE.Vector3( 0, 200, 0 ) );
 
 				scene = new THREE.Scene();
-				scene.add( new THREE.GridHelper( 500, 10 ) );
+				scene.add( new THREE.GridHelper( 1000, 10 ) );
 
 				var light = new THREE.DirectionalLight( 0xffffff, 2 );
 				light.position.set( 1, 1, 1 );

+ 1 - 1
examples/misc_controls_transform.html

@@ -55,7 +55,7 @@
 				camera.lookAt( new THREE.Vector3( 0, 200, 0 ) );
 
 				scene = new THREE.Scene();
-				scene.add( new THREE.GridHelper( 500, 10 ) );
+				scene.add( new THREE.GridHelper( 1000, 10 ) );
 
 				var light = new THREE.DirectionalLight( 0xffffff, 2 );
 				light.position.set( 1, 1, 1 );

+ 1 - 1
examples/misc_sound.html

@@ -156,7 +156,7 @@
 
 				// ground
 
-				var helper = new THREE.GridHelper( 500, 10, 0x444444, 0x444444 );
+				var helper = new THREE.GridHelper( 1000, 10, 0x444444, 0x444444 );
 				helper.position.y = 0.1;
 				scene.add( helper );
 

BIN
examples/models/gltf/CesiumMan/glTF-Binary/Cesium_Man.glb


BIN
examples/models/gltf/CesiumMilkTruck/glTF-Binary/CesiumMilkTruck.glb


BIN
examples/models/gltf/duck/glTF-Binary/duck.glb


BIN
examples/models/gltf/monster/glTF-Binary/Monster.glb


+ 2 - 2
examples/models/gltf/snowflake/line_vert.glsl

@@ -9,7 +9,7 @@ uniform mat4 u_modelViewMatrix;
 uniform mat4 u_projectionMatrix;
 
 void main(void) {
-	vec4 pos = u_modelViewMatrix * vec4(position,1.0);
+	vec4 pos = u_modelViewMatrix * vec4(a_position,1.0);
 	v_color = a_color;
 	gl_Position = u_projectionMatrix * pos;
-}
+}

+ 3903 - 5120
examples/models/vrml/house.wrl

@@ -1,5183 +1,3966 @@
 #VRML V2.0 utf8
-
-
 Group {
-children[
-DirectionalLight {
-  ambientIntensity  0 
-  color             1 1 0.9
-  direction         0.5 -1.5 -1
-  intensity         1.8 
-  on                TRUE 
-}
-
-DirectionalLight {
-  ambientIntensity  0 
-  color             1 1 0.9
-  direction         -0.5 1 0
-  intensity        1 
-  on                TRUE 
-}
-
-NavigationInfo {
-  
-  avatarSize       [ 0.2, 1.4, 0.5 ]
-
-  headlight        FALSE
- 
-  
-}
-
-
-
-
-DirectionalLight {
-  ambientIntensity  0 
-  color             0.6 0.6 0.8
-  direction         -1 0.5 2
-  intensity         1 
-  on                TRUE 
-}
-
-Background {
-  groundAngle  [ 1.5 1.6 ]
-  groundColor  [ 0.2 0.6 0.3, 0.4 0.4 0.35, 0.3 0.5 0.6  ]
-  backUrl      []
-  bottomUrl    []
-  frontUrl     []
-  leftUrl      []
-  rightUrl     []
-  topUrl       []
-  skyAngle     [ 1.5 ]
-  skyColor     [ 0.5 0.7 1,	0.7 1 0.9 ]
-  
-}
-
-Viewpoint {
-	fieldOfView    1
-	jump           TRUE
-	orientation     0 1 0 -0.5
-	position       -4 2 10
-
-	description    "Entry"
-}
-
-Viewpoint {
-	fieldOfView    1
-	jump           TRUE
-	orientation    0 0 1  0
-	position       3.5 1.7 13
-
-	description    "Vooraanzicht"
-}
-
-Viewpoint {
-	fieldOfView    1
-	jump           TRUE
-	orientation    0 0 1  0
-	position       2.5 1.5 -4.5
-
-	description    "Woonkamer"
-}
-
-Viewpoint {
-	fieldOfView    1
-	jump           TRUE
-	orientation    0 0 1  0
-	position       1.5 1.5 -1.7
-
-	description    "Keuken"
-}
-
-
-
-Viewpoint {
-	fieldOfView    1
-	jump           TRUE
-	orientation    0 1 0  3.1415927
-	position       2.5 2.5 -20
-
-	description    "Achteraanzicht"
-}
-
-Viewpoint {
-	fieldOfView    1
-	jump           TRUE
-	orientation    1 0 0  -1.5707963
-	position       2.5 20 -4.5
-
-	description    "Bovenaanzicht"
-}
-
-
-
-
-
-# beneden/beneden.wrl
-
-
-
-
-DEF vloer Transform {
 	children [
-		Shape {
-appearance Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      1 0.5 0.3
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry IndexedFaceSet {
-				color             NULL
-				coord  Coordinate {	#default NULL
-					point [
-						0.14	0	-0.14,
-						5.54	0	-0.14,
-						5.54	0	-8.86,
-						0.14	0	-8.86,
+		DirectionalLight {
+			ambientIntensity 0
+			color 1 1 .9,
+			direction .5 -1.5 -1,
+			intensity 1.8
+			on TRUE
+		}
+		DirectionalLight {
+			ambientIntensity 0
+			color 1 1 .9,
+			direction -.5 1 0,
+			intensity 1
+			on TRUE
+		}
+		NavigationInfo {
+			avatarSize [
+				.2 1.4 .5
+			]
+			headlight FALSE
+		}
+		DirectionalLight {
+			ambientIntensity 0
+			color .6 .6 .8,
+			direction -1 .5 2,
+			intensity 1
+			on TRUE
+		}
+		Background {
+			groundAngle [
+				1.5 1.6
+			]
+			groundColor [
+				.2 .6 .3 .4 .4 .35 .3 .5 .6
+			]
+			backUrl [
+			]
+			bottomUrl [
+			]
+			frontUrl [
+			]
+			leftUrl [
+			]
+			rightUrl [
+			]
+			topUrl [
+			]
+			skyAngle [
+				1.5
+			]
+			skyColor [
+				.5 .7 1 .7 1 .9
+			]
+		}
+		Viewpoint {
+			fieldOfView 1
+			jump TRUE
+			orientation 0 1 0 -.5
+			position -4 2 10
+			description "Entry"
+		}
+		Viewpoint {
+			fieldOfView 1
+			jump TRUE
+			orientation 0 0 1 0
+			position 3.5 1.7 13
+			description "Vooraanzicht"
+		}
+		Viewpoint {
+			fieldOfView 1
+			jump TRUE
+			orientation 0 0 1 0
+			position 2.5 1.5 -4.5
+			description "Woonkamer"
+		}
+		Viewpoint {
+			fieldOfView 1
+			jump TRUE
+			orientation 0 0 1 0
+			position 1.5 1.5 -1.7
+			description "Keuken"
+		}
+		Viewpoint {
+			fieldOfView 1
+			jump TRUE
+			orientation 0 1 0 3.141592
+			position 2.5 2.5 -20
+			description "Achteraanzicht"
+		}
+		Viewpoint {
+			fieldOfView 1
+			jump TRUE
+			orientation 1 0 0 -1.570796
+			position 2.5 20 -4.5
+			description "Bovenaanzicht"
+		}
+		# beneden/beneden.wrl
+		DEF vloer Transform {
+			children [
+				Shape {
+					appearance Appearance {
+						material Material {
+							ambientIntensity .2
+							diffuseColor 1 .5 .3
+							emissiveColor 0 0 0
+							shininess .1
+							specularColor 0 0 0
+							transparency 0
+						}
+						texture NULL
+						textureTransform NULL
+					}
+					geometry IndexedFaceSet {
+						color NULL
+						coord Coordinate {
+							#default NULL
+							point [
+								.14 0 -.14, 5.54 0 -.14, 5.54 0 -8.86, .14 0 -8.86,
+							]
+						}
+						normal NULL
+						texCoord NULL
+						ccw TRUE
+						colorIndex [
+						]
+						colorPerVertex TRUE
+						convex TRUE
+						coordIndex [
+							0 1 2 3 -1, 0 3 2 1 -1,
+						]
+						#default []
+						creaseAngle 0
+						normalIndex [
+						]
+						normalPerVertex TRUE
+						solid TRUE
+						texCoordIndex [
+						]
+					}
+				}
+			]
+		}
+		DEF drempelvoor Transform {
+			children [
+				Shape {
+					appearance Appearance {
+						material Material {
+							ambientIntensity .2
+							diffuseColor .4 .4 .4
+							emissiveColor 0 0 0
+							shininess .1
+							specularColor 0 0 0
+							transparency 0
+						}
+					}
+					geometry Box {
+						size 1.23 .04 .3
+					}
+				}
+			]
+			translation 3.805 .02 -.14
+		}
+		DEF drempelachter Transform {
+			children [
+				Shape {
+					appearance Appearance {
+						material Material {
+							ambientIntensity .2
+							diffuseColor .4 .4 .4
+							emissiveColor 0 0 0
+							shininess .1
+							specularColor 0 0 0
+							transparency 0
+						}
+					}
+					geometry Box {
+						size 1.05 .04 .3
+					}
+				}
+			]
+			translation 1.725 .02 -8.86
+		}
+		DEF stukmuur1 Transform {
+			children [
+				Shape {
+					appearance DEF wandkleur Appearance {
+						material Material {
+							ambientIntensity .2
+							diffuseColor 1 .9 .7
+							emissiveColor 0 0 0
+							shininess .1
+							specularColor 0 0 0
+							transparency 0
+						}
+						texture NULL
+						textureTransform NULL
+					}
+					geometry Box {
+						size .7 2.7 .07
+					}
+				}
+			]
+			translation .63 1.35 -3.395
+		}
+		DEF stukmuur2 Transform {
+			children [
+				Shape {
+					appearance USE wandkleur
+					geometry Box {
+						size 1.41 2.7 .07
+					}
+				}
+			]
+			translation 2.485 1.35 -3.395
+		}
+		DEF stukmuur3 Transform {
+			children [
+				Shape {
+					appearance USE wandkleur
+					geometry Box {
+						size .43 2.7 .07
+					}
+				}
+			]
+			translation 4.205 1.35 -3.395
+		}
+		DEF stukmuur4 Transform {
+			children [
+				Shape {
+					appearance USE wandkleur
+					geometry Box {
+						size 1.06 2.8 .07
+					}
+				}
+			]
+			translation 4.87 1.4 -4.395
+		}
+		DEF stukmuur5 Transform {
+			children [
+				Shape {
+					appearance USE wandkleur
+					geometry Box {
+						size .07 2.7 2.28
+					}
+				}
+			]
+			translation 3.155 1.35 -1.42
+		}
+		DEF stukmuur6 Transform {
+			children [
+				Shape {
+					appearance USE wandkleur
+					geometry Box {
+						size .98 2.8 .07
+					}
+				}
+			]
+			translation 4.91 1.4 -2.325
+		}
+		DEF stukmuur7 Transform {
+			children [
+				Shape {
+					appearance USE wandkleur
+					geometry Box {
+						size .98 2.7 .07
+					}
+				}
+			]
+			translation 4.91 1.35 -1.515
+		}
+		DEF stukmuur8 Transform {
+			children [
+				Shape {
+					appearance USE wandkleur
+					geometry Box {
+						size .07 2.7 .4
+					}
+				}
+			]
+			translation 4.455 1.35 -.48
+		}
+		DEF stukmuur9 Transform {
+			children [
+				Shape {
+					appearance USE wandkleur
+					geometry Box {
+						size .07 2.7 .74
+					}
+				}
+			]
+			translation 4.7 1.35 -1.92
+		}
+		# binmuur.wrl
+		Transform {
+			children [
+				Shape {
+					appearance Appearance {
+						material Material {
+							ambientIntensity .2
+							diffuseColor 1 .9 .7
+							emissiveColor 0 0 0
+							shininess .1
+							specularColor 0 0 0
+							transparency 0
+						}
+						texture NULL
+						textureTransform NULL
+					}
+					geometry IndexedFaceSet {
+						color NULL
+						coord Coordinate {
+							#default NULL
+							point [
+								.28 0 -.28, #0 linkerbenedenhoek voorgevel
+								5.4 0 -.28, 5.4 5.4 -.28, .28 5.4 -.28, #3 linkerbovenhoek voorgevel
+								3.19 0 -.28, #4 voordeur
+								4.42 0 -.28, 4.42 2.3 -.28, 3.19 2.3 -.28, #7 voordeur
+								4.84 1.6 -.28, #toiletraam-8
+								5.04 1.6 -.28, 5.04 2.3 -.28, 4.84 2.3 -.28, 2.6 .9 -.28,
+								#keukenraam-12
+								2.6 2.3 -.28, .6 2.3 -.28, .6 .9 -.28, .6 3.6 -.28, #bovenraam-16
+								1.5 3.6 -.28, 1.5 5 -.28, 4.42 5 -.28, 4.42 5.4 -.28, .6 5.4 -.28,
+								.28 8.55 -3.15, #linkergevel-22
+								.28 2.7 -8.72, .28 0 -8.72, 5.4 8.55 -3.15, #rechtergevel-25
+								5.4 5.4 -6.3, 5.4 5.4 -8.72, 5.4 0 -8.72, 2.25 0 -8.72, #achtergevel-29
+								2.25 .6 -8.72, 4.8 .6 -8.72, 4.8 5.4 -8.72, 1.2 0 -8.72, 1.2 2.7 -8.72,
+								3.19 0 -.14, #diepte van de voordeur-35
+								4.42 0 -.14, 4.42 2.3 -.14, 3.19 2.3 -.14, #diepte van de voordeur-38
+								2.6 .9 -.14, # diepte van het keukenraam-39
+								2.6 2.3 -.14, .6 2.3 -.14, .6 .9 -.14, 4.84 1.6 -.14, #diepte van het toiletraam-43
+								5.04 1.6 -.14, 5.04 2.3 -.14, 4.84 2.3 -.14, .6 3.6 -.14,
+								#diepte van het bovenraam-47
+								1.5 3.6 -.14, 1.5 5 -.14, 4.42 5 -.14, 4.42 5.4 -.14, .6 5.4 -.14,
+								#52
+								2.25 0 -8.86, #diepte van de achtergevel-53
+								2.25 .6 -8.86, 4.8 .6 -8.86, 4.8 5.4 -8.86, 1.2 0 -8.86, 1.2 2.7 -8.86,
+								#58
+								.28 5.4 0, #59 hoekpunt voor dakvorm zolder
+								5.4 5.4 0, .28 5.4 -6.3, #61
+								.28 2.7 -9, #62 hoekpunt voor dakvorm 1e verdieping
+								.28 2.7 -.28, #63 extra punten voor segmentering beneden
+								.14 2.7 -.14, 5.4 2.7 -.28, #65
+								5.54 2.7 -.14, #
+								.28 2.7 -8.72, #67
+								.14 2.7 -8.86, #
+								5.4 2.7 -8.72, #69
+								5.54 2.7 -8.86, #
+								1.2 2.7 -8.72, #71
+								1.2 2.7 -8.86, #
+								4.8 2.7 -8.72, #73
+								4.8 2.7 -8.86, #
+							]
+						}
+						normal NULL
+						texCoord NULL
+						ccw TRUE
+						colorIndex [
+						]
+						colorPerVertex TRUE
+						convex TRUE
+						coordIndex [
+							0 4 12 15 -1, 0 15 12 4 -1, 0 15 14 63 -1, 0 63 14 15 -1, 14 13 65 63 -1,
+							4 12 13 7 -1, 13 7 6 65 -1, 6 11 10 65 -1, 5 8 11 6 -1, 5 8 9 1 -1, 1 9 10
+							65 -1, 0 63 67 24 -1, 67 24 33 71 -1, 28 29 30 31 -1, 28 31 73 69 -1, 28 69
+							65 1 -1, 63 65 66 64 -1, 65 69 70 66 -1, 63 67 68 64 -1, 69 73 74 70 -1, 67
+							71 72 68 -1, 5 6 37 36 -1, 6 7 38 37 -1, 4 35 38 7 -1, 12 39 40 13 -1, 13
+							40 41 14 -1, 14 41 42 15 -1, 15 42 39 12 -1, 8 43 44 9 -1, 9 44 45 10 -1,
+							10 45 46 11 -1, 11 46 43 8 -1, 29 53 54 30 -1, 30 54 55 31 -1, 31 55 74 73
+							-1, 33 57 72 71 -1,
+						]
+						#default []
+						creaseAngle 0
+						normalIndex [
+						]
+						normalPerVertex TRUE
+						solid FALSE
+						texCoordIndex [
+						]
+					}
+				}
+			]
+		}
+		#benodigde tijd tot hier 2 uur(kale buitenkant van het huis )
+		# /binmuur.wrl
+		# buitmuur.wrl
+		Transform {
+			children [
+				Shape {
+					appearance DEF steen Appearance {
+						material Material {
+							ambientIntensity .2
+							diffuseColor .8 .4 .3
+							emissiveColor 0 0 0
+							shininess .1
+							specularColor 0 0 0
+							transparency 0
+						}
+						texture NULL
+						textureTransform NULL
+					}
+					geometry IndexedFaceSet {
+						color NULL
+						coord Coordinate {
+							#default NULL
+							point [
+								0 0 0, # 0 linkerbenedenhoek voorgevel
+								5.68 0 0, 5.68 5.4 0, # 2
+								0 5.4 0, # 3 linkerbovenhoek voorgevel
+								3.19 0 0, #voordeur
+								4.42 0 0, 4.42 2.3 0, # 6
+								3.19 2.3 0, # 7 voordeur
+								4.84 1.6 0, #toiletraam-8
+								5.04 1.6 0, 5.04 2.3 0, # 10
+								4.84 2.3 0, 2.6 .9 0, #keukenraam-12
+								2.6 2.3 0, # 13
+								.6 2.3 0, .6 .9 0, .6 3.6 0, #bovenraam-16
+								1.5 3.6 0, 1.5 5 0, 4.42 5 0, 4.42 5.4 0, .6 5.4 0, 0 8.555 -3.15,
+								#linkergevel-22
+								0 2.7 -9, 0 0 -9, 5.68 8.555 -3.15, #rechtergevel-25
+								5.68 5.4 -6.3, 5.68 5.4 -9, 5.68 0 -9, 2.25 0 -9, #achtergevel-29
+								2.25 .6 -9, 4.8 .6 -9, 4.8 5.4 -9, 1.2 0 -9, 1.2 2.7 -9, 3.19 0 -.14,
+								#diepte van de voordeur-35
+								4.42 0 -.14, 4.42 2.3 -.14, 3.19 2.3 -.14, #diepte van de voordeur-38
+								2.6 .9 -.14, # diepte van het keukenraam-39
+								2.6 2.3 -.14, .6 2.3 -.14, .6 .9 -.14, 4.84 1.6 -.14, #diepte van het toiletraam-43
+								5.04 1.6 -.14, 5.04 2.3 -.14, 4.84 2.3 -.14, .6 3.6 -.14,
+								#diepte van het bovenraam-47
+								1.5 3.6 -.14, 1.5 5 -.14, 4.42 5 -.14, 4.42 5.4 -.14, .6 5.4 -.14,
+								#52
+								2.25 0 -8.86, #diepte van de achtergevel-53
+								2.25 .6 -8.86, 4.8 .6 -8.86, 4.8 5.4 -8.86, 1.2 0 -8.86, 1.2 2.7 -8.86,
+								#58
+								0 2.7 0, #59 extra punten voor segmentering beneden
+								.14 2.7 -.14, 5.68 2.7 0, #61
+								5.54 2.7 -.14, #
+								0 2.7 -9, #63
+								.14 2.7 -8.86, #
+								5.68 2.7 -9, #65
+								5.54 2.7 -8.86, #
+								1.2 2.7 -9, #67
+								1.2 2.7 -8.86, #
+								4.8 2.7 -9, #69
+								4.8 2.7 -8.86, #
+							]
+						}
+						normal NULL
+						texCoord NULL
+						ccw TRUE
+						colorIndex [
+						]
+						colorPerVertex TRUE
+						convex TRUE
+						coordIndex [
+							0 4 12 15 -1, 0 15 14 59 -1, 14 13 61 59 -1, 4 7 13 12 -1, 13 11 61 -1, 11
+							10 61 -1, 9 1 61 10 -1, 5 1 9 8 -1, 5 8 11 6 -1, 0 59 63 24 -1, 1 28 65 61
+							-1, 28 29 30 31 -1, 28 31 69 65 -1, 33 24 63 67 -1, 5 6 37 36 -1, 6 7 38 37
+							-1, 4 35 38 7 -1, 12 13 40 39 -1, 13 14 41 40 -1, 15 42 41 14 -1, 12 39 42
+							15 -1, 8 9 44 43 -1, 9 10 45 44 -1, 10 11 46 45 -1, 11 8 43 46 -1, 29 53 54
+							30 -1, 30 54 55 31 -1, 31 55 70 69 -1, 33 67 68 57 -1, 59 61 62 60 -1, 59
+							60 64 63 -1, 61 65 66 62 -1, 65 69 70 66 -1, 64 68 67 63 -1,
+						]
+						#default []
+						creaseAngle 0
+						normalIndex [
+						]
+						normalPerVertex TRUE
+						solid FALSE
+						texCoordIndex [
+						]
+					}
+				}
+			]
+		}
+		Transform {
+			#schuurtje
+			children [
+				DEF schuurvloer Transform {
+					children [
+						Shape {
+							appearance Appearance {
+								material Material {
+									ambientIntensity .2
+									diffuseColor 1 .5 .3
+									emissiveColor 0 0 0
+									shininess .1
+									specularColor 0 0 0
+									transparency 0
+								}
+								texture NULL
+								textureTransform NULL
+							}
+							geometry IndexedFaceSet {
+								color NULL
+								coord Coordinate {
+									#default NULL
+									point [
+										.1 0 -.1, 2.1 0 -.1, 2.1 0 -3.1, .1 0 -3.1,
+									]
+								}
+								normal NULL
+								texCoord NULL
+								ccw TRUE
+								colorIndex [
+								]
+								colorPerVertex TRUE
+								convex TRUE
+								coordIndex [
+									0 1 2 3 -1,
+								]
+								#default []
+								creaseAngle 0
+								normalIndex [
+								]
+								normalPerVertex TRUE
+								solid FALSE
+								texCoordIndex [
+								]
+							}
+						}
+					]
+				}
+				Transform {
+					children [
+						Shape {
+							appearance USE steen
+							geometry Box {
+								size 2.2 2.6 .1
+							}
+						}
+					]
+					translation 1.1 1.3 -.05
+				}
+				Transform {
+					children [
+						Shape {
+							appearance USE steen
+							geometry Box {
+								size 2.2 2.6 .1
+							}
+						}
+					]
+					translation 1.1 1.3 -3.15
+				}
+				Transform {
+					children [
+						Shape {
+							appearance USE steen
+							geometry Box {
+								size .1 2.6 1.3
+							}
+						}
+					]
+					translation .05 1.3 -.75
+				}
+				Transform {
+					children [
+						Shape {
+							appearance USE steen
+							geometry Box {
+								size .1 2.6 .75
+							}
+						}
+					]
+					translation .05 1.3 -2.725
+				}
+				Transform {
+					children [
+						Shape {
+							appearance USE steen
+							geometry Box {
+								size .1 2.6 3
+							}
+						}
 					]
+					translation 2.15 1.3 -1.6
 				}
-				normal            NULL
-				texCoord          NULL
-				ccw               TRUE
-				colorIndex        []
-				colorPerVertex    TRUE
-				convex            TRUE
-				coordIndex  [
-	0, 1, 2, 3, -1,
-	0, 3, 2, 1, -1,
-]     #default []
-				creaseAngle       0
-				normalIndex       []
-				normalPerVertex   TRUE
-				solid             TRUE
-				texCoordIndex     []
-			}
+				Transform {
+					children [
+						Shape {
+							appearance DEF blauw Appearance {
+								material Material {
+									ambientIntensity .2
+									diffuseColor .3 .4 .7
+									emissiveColor 0 0 0
+									shininess .1
+									specularColor 0 0 0
+									transparency 0
+								}
+								texture NULL
+								textureTransform NULL
+							}
+							geometry Box {
+								size .05 .44 .85
+							}
+						}
+					]
+					translation .05 2.38 -1.875
+				}
+				Transform {
+					#drempel van schuurdeur
+					children [
+						Transform {
+							#deurpost
+							children [
+								DEF deurpost Shape {
+									appearance DEF grijs Appearance {
+										material Material {
+											ambientIntensity .2
+											diffuseColor .4 .4 .4
+											emissiveColor 0 0 0
+											shininess .1
+											specularColor 0 0 0
+											transparency 0
+										}
+									}
+									geometry Box {
+										size .05 2.56 .05
+									}
+								}
+							]
+							translation 0 1.3 .45
+						}
+						Transform {
+							#deurpost
+							children [
+								Shape {
+									appearance USE grijs
+									geometry Box {
+										size .05 .05 .85
+									}
+								}
+							]
+							translation 0 2.135 0
+						}
+						Transform {
+							#deurpost
+							children [
+								USE deurpost
+							]
+							translation 0 1.3 -.45
+						}
+						Shape {
+							appearance USE grijs
+							geometry Box {
+								size .1 .04 .95
+							}
+						}
+					]
+					translation .05 .02 -1.875
+				}
+			]
+			translation 3.48 0 7.8
 		}
-	]
-}
-
-
-DEF drempelvoor Transform {
-children[
-	Shape {
-		appearance 	Appearance {
-			material 	Material {
-	ambientIntensity  0.2
-	diffuseColor      0.4 0.4 0.4
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-					}	
-				}
-		geometry 	Box {
-	size	1.23 0.04 0.30
-				}
-
-	}
- ]
-translation		3.805	0.02 -0.14
-}
-
-DEF drempelachter Transform {
-children[
-	Shape {
-		appearance 	Appearance {
-			material 	Material {
-	ambientIntensity  0.2
-	diffuseColor      0.4 0.4 0.4
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-					}	
-				}
-		geometry 	Box {
-	size	1.05 0.04 0.30
-				}
-
-	}
- ]
-translation		1.725	0.02 -8.86
-}
-
-
-DEF stukmuur1 Transform {
-children[
-	Shape {
-	appearance DEF wandkleur Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      1 0.9 0.7
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-		geometry 	Box {
-	size	0.70 2.70 0.07
+		# /buitmuur.wrl
+		# trapbeneden.wrl
+		DEF trapbeneden Transform {
+			children [
+				Shape {
+					appearance Appearance {
+						material Material {
+							ambientIntensity .2
+							diffuseColor 1 .5 .3
+							emissiveColor 0 0 0
+							shininess .1
+							specularColor 0 0 0
+							transparency 0
+						}
+						texture NULL
+						textureTransform NULL
+					}
+					geometry DEF trap IndexedFaceSet {
+						color NULL
+						coord Coordinate {
+							#default NULL
+							point [
+								-.2 0 1, #0
+								0 .2 1, 0 .2 0, -.2 0 0, #3
+								.28 .4 1, #4
+								.6 .6 1, .98 .8 1, .98 1 .45, #7
+								.98 1.2 .25, #8
+								.98 1.4 0, .98 1.6 -.25, .98 1.8 -.45, #11
+								.98 2 -1, #12
+								.6 2.2 -1, .28 2.4 -1, 0 2.6 -1, #15
+								0 .6 0, #16
+								0 .8 0, 0 1 0, #18
+								0 1.2 0, #19
+								0 1.4 0, #20
+								0 1.6 0, 0 1.8 0, #22
+								0 2 0, #23
+								0 2.2 0, #24
+								0 2.4 0, 0 2.6 0, 0 2.8 0, #27
+								-.2 .2 1, #28
+								0 .4 1, 0 .4 0, -.2 .2 0, #31
+								.28 .6 1, #32
+								.6 .8 1, .98 1 1, .98 1.2 .45, #35
+								.98 1.4 .25, #36
+								.98 1.6 0, .98 1.8 -.25, .98 2 -.45, #39
+								.98 2.2 -1, #40
+								.6 2.4 -1, .28 2.6 -1, 0 2.8 -1, #43
+								0 0 1, 0 0 0, #45
+								0 .4 0, #46
+							]
+						}
+						normal NULL
+						texCoord NULL
+						ccw TRUE
+						colorIndex [
+						]
+						colorPerVertex TRUE
+						convex TRUE
+						coordIndex [
+							28 1 2 31 -1, #1e_treevlak
+							29 4 46 -1, #2e
+							32 5 16 -1, 33 6 17 -1, 34 7 18 -1, 35 8 19 -1, 36 9 20 -1, 37 10 21 -1, 38
+							11 22 -1, 39 12 23 -1, 40 13 24 -1, 41 14 25 -1, 42 15 26 -1, #13e_treevlak
+							0 28 31 3 -1, #voor_en_zijvlakken_van_de_eerste_tree
+							0 44 1 28 -1, 3 31 2 45 -1, 2 1 29 30 -1, #alle_voorvlakken
+							46 4 32 16 -1, 16 5 33 17 -1, 17 6 34 18 -1, 18 7 35 19 -1, 19 8 36 20 -1,
+							20 9 37 21 -1, 21 10 38 22 -1, 22 11 39 23 -1, 23 12 40 24 -1, 24 13 41 25
+							-1, 25 14 42 26 -1, 26 15 43 27 -1,
+						]
+						#default []
+						creaseAngle 0
+						normalIndex [
+						]
+						normalPerVertex TRUE
+						solid FALSE
+						texCoordIndex [
+						]
+					}
 				}
-
-	}
- ]
-translation		0.63	1.35 -3.395
-}
-
-DEF stukmuur2 Transform {
-children[
-	Shape {
-	appearance USE wandkleur
-		geometry 	Box {
-	size	1.41 2.70 0.07
-				}
-
-	}
- ]
-translation		2.485	1.35 -3.395
-}
-
-
-DEF stukmuur3 Transform {
-children[
-	Shape {
-	appearance USE wandkleur
-		geometry 	Box {
-	size	0.43 2.70 0.07
-				}
-
-	}
- ]
-translation		4.205	1.35 -3.395
-}
-
-DEF stukmuur4 Transform {
-children[
-	Shape {
-	appearance USE wandkleur
-		geometry 	Box {
-	size	1.06 2.8 0.07
-				}
-
-	}
- ]
-translation		4.87	1.4 -4.395
-}
-
-DEF stukmuur5 Transform {
-children[
-	Shape {
-	appearance USE wandkleur
-		geometry 	Box {
-	size	0.07 2.70 2.28
-				}
-
-	}
- ]
-translation		3.155	1.35 -1.42
-}
-
-DEF stukmuur6 Transform {
-children[
-	Shape {
-	appearance USE wandkleur
-		geometry 	Box {
-	size	0.98 2.8 0.07
-				}
-
-	}
- ]
-translation		4.91	1.4 -2.325
-}
-
-DEF stukmuur7 Transform {
-children[
-	Shape {
-	appearance USE wandkleur
-		geometry 	Box {
-	size	0.98 2.70 0.07
-				}
-
-	}
- ]
-translation		4.91	1.35 -1.515
-}
-
-
-DEF stukmuur8 Transform {
-children[
-	Shape {
-	appearance USE wandkleur
-		geometry 	Box {
-	size	0.07 2.70 0.4
-				}
-
-	}
- ]
-translation		4.455	1.35 -0.48
-}
-
-DEF stukmuur9 Transform {
-children[
-	Shape {
-	appearance USE wandkleur
-		geometry 	Box {
-	size	0.07 2.70 0.74
-				}
-
-	}
- ]
-translation		4.7	1.35 -1.92
-}
-
-
-
-# binmuur.wrl
-
-
-
-
-Transform {
-	children [
-		Shape {
-appearance Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      1 0.9 0.7
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry IndexedFaceSet {
-				color             NULL
-				coord  Coordinate {	#default NULL
-					point [
-						0.28	0	-0.28, #0 linkerbenedenhoek voorgevel
-						5.40	0	-0.28,
-						5.40	5.40	-0.28,
-						0.28	5.40	-0.28, #3 linkerbovenhoek voorgevel
-
-						3.19	0	-0.28, #4 voordeur
-						4.42	0	-0.28,
-						4.42	2.30	-0.28,
-						3.19	2.30	-0.28, #7 voordeur
-
-						4.84	1.60	-0.28, #toiletraam-8
-						5.04	1.60	-0.28,
-						5.04	2.30	-0.28,
-						4.84	2.30	-0.28, 
-
-						2.60	0.90	-0.28, #keukenraam-12
-						2.60	2.30	-0.28,
-						0.60	2.30	-0.28,
-						0.60	0.90	-0.28,
-
-						0.60	3.60	-0.28, #bovenraam-16
-						1.50	3.60	-0.28,
-						1.50	5.0	-0.28,
-						4.42	5.0	-0.28,
-						4.42	5.40	-0.28, 
-						0.60	5.40	-0.28,
-
-						0.28	8.55	-3.15, #linkergevel-22
-						0.28	2.70	-8.72,
-						0.28	0	-8.72,
-
-						5.40	8.55	-3.15, #rechtergevel-25
-						5.40	5.40	-6.30,
-						5.40	5.40	-8.72,
-						5.40	0	-8.72,
-
-						2.25	0	-8.72, #achtergevel-29
-						2.25	0.6	-8.72,
-						4.8	0.6	-8.72,
-						4.8	5.40	-8.72,
-						1.2	0	-8.72,
-						1.2	2.70	-8.72,
-
-
-						3.19	0	-0.14, #diepte van de voordeur-35
-						4.42	0	-0.14,
-						4.42	2.30	-0.14,
-						3.19	2.30	-0.14, #diepte van de voordeur-38
-
-						2.60	0.90	-0.14, # diepte van het keukenraam-39
-						2.60	2.30	-0.14,
-						0.60	2.30	-0.14,
-						0.60	0.90	-0.14,
-
-						4.84	1.60	-0.14, #diepte van het toiletraam-43
-						5.04	1.60	-0.14,
-						5.04	2.30	-0.14,
-						4.84	2.30	-0.14, 
-
-						0.60	3.60	-0.14, #diepte van het bovenraam-47
-						1.50	3.60	-0.14,
-						1.50	5.0	-0.14,
-						4.42	5.0	-0.14,
-						4.42	5.40	-0.14, 
-						0.60	5.40	-0.14, #52
-
-						2.25	0	-8.86, #diepte van de achtergevel-53
-						2.25	0.6	-8.86,
-						4.8	0.6	-8.86,
-						4.8	5.40	-8.86,
-						1.2	0	-8.86,
-						1.2	2.70	-8.86,	#58
-
-						0.28	5.40	0,	#59 hoekpunt voor dakvorm zolder
-						5.40	5.40	0,
-						0.28	5.40	-6.30, #61
-						0.28	2.70	-9.0,  #62 hoekpunt voor dakvorm 1e verdieping
-
-						0.28	2.7	-0.28, #63 extra punten voor segmentering beneden
-						0.14	2.7	-0.14,
-
-						5.4	2.7	-0.28, #65
-						5.54	2.7	-0.14, #
-
-						0.28	2.7	-8.72, #67
-						0.14	2.7	-8.86, #
-
-						5.4	2.7	-8.72, #69
-						5.54	2.7	-8.86, #
-
-						1.2	2.7	-8.72, #71
-						1.2	2.7	-8.86, #
-
-						4.8	2.7	-8.72, #73
-						4.8	2.7	-8.86, #
-						
+			]
+			translation 4.42 0 -3.36
+		}
+		# /trapbeneden.wrl
+		# deuren.wrl
+		Transform {
+			children [
+				DEF deurgroep Group {
+					#DEURKEUKENWOONKAMER
+					children [
+						#dwarslat boven de deur
+						DEF dwarslat Transform {
+							children [
+								Shape {
+									appearance DEF kozijn Appearance {
+										material Material {
+											ambientIntensity .2
+											diffuseColor .95 .95 .9
+											emissiveColor 0 0 0
+											shininess .1
+											specularColor 0 0 0
+											transparency 0
+										}
+										texture NULL
+										textureTransform NULL
+									}
+									geometry Box {
+										size .8 .05 .05
+									}
+								}
+							]
+							translation 0 2.035 0
+						}
+						DEF ruitje Transform {
+							children [
+								Shape {
+									appearance DEF glas Appearance {
+										material Material {
+											ambientIntensity .2
+											diffuseColor .6 .6 .9
+											emissiveColor 0 0 0
+											shininess .8
+											specularColor 1 1 1
+											transparency .7
+										}
+										texture NULL
+										textureTransform NULL
+									}
+									geometry Box {
+										size .8 .64 .01
+									}
+								}
+							]
+							translation 0 2.38 0
+						}
+						#ruit boven de deur
+						#deur
+						DEF deur Transform {
+							center -.4 0 0
+							children [
+								DEF klikopdeur TouchSensor {
+								}
+								DEF TimeSource TimeSensor {
+									cycleInterval 20
+								}
+								# Run once for 20 sec.
+								# Animeer het openzwaaien van de deur rond de Y as:
+								DEF Deuropen OrientationInterpolator {
+									key [
+										0 .025 .05 .95 .975 1
+									]
+									keyValue [
+										0 1 0 0 0 1 0 -1 0 1 0 -2 0 1 0 -2 0 1 0 -1 0 1 0 0
+									]
+								}
+								# ../boven/deurklink.wrl
+								DEF deurklink Transform {
+									children [
+										DEF enehelft Shape {
+											appearance DEF aluminium Appearance {
+												material Material {
+													ambientIntensity .2
+													diffuseColor .4 .4 .5
+													emissiveColor 0 0 0
+													shininess .8
+													specularColor .4 .4 .5
+												}
+												texture NULL
+												textureTransform NULL
+											}
+											geometry IndexedFaceSet {
+												color NULL
+												coord Coordinate {
+													point [
+														-.015 .02 0, #0
+														.015 .02 0, .02 -.02 0, -.02 -.02 0, #3
+														-.01 -.015 .06, #4
+														.01 -.015 .06, -.01 .015 .03, .01 .015 .03, .005 .1 .035,
+														#8
+														-.005 .1 .035, -.005 .1 .055, .005 .1 .055,
+													]
+												}
+												normal NULL
+												texCoord NULL
+												ccw TRUE
+												colorIndex [
+												]
+												colorPerVertex TRUE
+												convex TRUE
+												coordIndex [
+													2 3 4 5 -1, 2 5 4 3 -1, 4 5 11 10 -1, 4 10 11 5 -1, 0 1 7 6 -1, 0 6 7 1 -1,
+													6 7 8 9 -1, 6 9 8 7 -1, 8 9 10 11 -1, 8 11 10 9 -1, 0 6 4 3 -1, 0 3 4 6 -1,
+													6 9 10 4 -1, 6 4 10 9 -1, 1 2 5 7 -1, 1 7 5 2 -1, 7 5 11 8 -1, 7 8 11 5 -1,
+													
+												]
+												#default []
+												creaseAngle 0
+												normalIndex [
+												]
+												normalPerVertex TRUE
+												solid TRUE #texCoordIndex     []
+											}
+										}
+										#enehelft
+										Transform {
+											children [
+												USE enehelft
+											]
+											rotation 0 1 0 3.141592
+											translation 0 0 -.07
+										}
+										Transform {
+											children [
+												DEF vlakdeel Shape {
+													appearance USE aluminium
+													geometry Box {
+														size .18 .07 .01
+													}
+												}
+												#shape
+											]
+											translation -.03 0 -.005
+										}
+										Transform {
+											children [
+												USE vlakdeel
+											]
+											translation -.03 0 -.065
+										}
+									]
+									translation .35 0 .035
+									rotation 0 0 1 1.570796
+								}
+								#deurklink
+								# /../boven/deurklink.wrl
+								DEF deurvorm Shape {
+									appearance DEF deurkleur Appearance {
+										material Material {
+											ambientIntensity .2
+											diffuseColor .8 .8 .8
+											emissiveColor 0 0 0
+											shininess .1
+											specularColor 0 0 0
+											transparency 0
+										}
+										texture NULL
+										textureTransform NULL
+									}
+									geometry Box {
+										size .8 2 .05
+									}
+								}
+							]
+							translation 0 1.005 0
+						}
 					]
 				}
-				normal            NULL
-				texCoord          NULL
-				ccw               TRUE
-				colorIndex        []
-				colorPerVertex    TRUE
-				convex            TRUE
-				coordIndex  [
-		0, 4, 12, 15, -1,
-		0, 15, 12, 4, -1,
-
-		0, 15, 14, 63, -1,
-		0, 63, 14, 15, -1,
-
-		14, 13, 65, 63, -1,
-		
-		4, 12, 13, 7, -1,
-
-		13, 7, 6, 65, -1,
-
-		6, 11, 10, 65, -1,
-
-		5, 8, 11, 6, -1,
-
-		5, 8, 9, 1, -1,
-
-		1, 9, 10, 65, -1,
-
-		0, 63, 67, 24, -1,
-
-		67, 24, 33, 71, -1,
-
-		28, 29, 30, 31, -1,
-
-		28, 31, 73, 69, -1,
-
-		28, 69, 65, 1, -1,
-
-		63, 65, 66, 64, -1,
-
-		65, 69, 70, 66, -1,
-
-		63, 67, 68, 64, -1,
-
-		69, 73, 74, 70, -1,
-
-		67, 71, 72, 68, -1,
-
-		5, 6, 37, 36, -1,
-
-		6, 7, 38, 37, -1,
-
-		4, 35, 38, 7, -1,
-
-		12, 39, 40, 13, -1,
-
-		13, 40, 41, 14, -1, 
-
-		14, 41, 42, 15, -1,
-
-		15, 42, 39, 12, -1, 
-
-		8, 43, 44, 9, -1,
-
-
-		9, 44, 45, 10, -1,
-
-
-		10, 45, 46, 11, -1,
-
-
-		11, 46, 43, 8, -1,
-
-
-		29, 53, 54, 30, -1,
-
-
-		30, 54, 55, 31, -1, 
-
-
-		31, 55, 74, 73, -1,
-
-
-		33, 57, 72, 71, -1,
-
-
-
-
-
-]     #default []
-				creaseAngle       0
-				normalIndex       []
-				normalPerVertex   TRUE
-				solid             FALSE
-				texCoordIndex     []
-			}
+				#deurgroep
+			]
+			translation 1.38 0 -3.395
 		}
-	]
-}
-
-#benodigde tijd tot hier 2 uur(kale buitenkant van het huis )
-
-# /binmuur.wrl
-
-# buitmuur.wrl
-
-
-
-
-Transform {
-	children [
-		Shape {
-appearance DEF steen Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      0.8 0.4 0.3
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry IndexedFaceSet {
-				color             NULL
-				coord  Coordinate {	#default NULL
-					point [
-						0	    0	    0, # 0 linkerbenedenhoek voorgevel
-						5.68	0	    0,
-						5.68	5.40	0, # 2
-						0	    5.40	0, # 3 linkerbovenhoek voorgevel
-
-						3.19	0	    0, #voordeur
-						4.42	0	    0,
-						4.42	2.30	0, # 6
-						3.19	2.30	0, # 7 voordeur
-
-						4.84	1.60	0, #toiletraam-8
-						5.04	1.60	0,
-						5.04	2.30	0, # 10
-						4.84	2.30	0, 
-
-						2.60	0.90	0, #keukenraam-12
-						2.60	2.30	0, # 13
-						0.60	2.30	0,
-						0.60	0.90	0,
-
-						0.60	3.60	0, #bovenraam-16
-						1.50	3.60	0,
-						1.50	5.0	    0,
-						4.42	5.0	    0,
-						4.42	5.40	0, 
-						0.60	5.40	0,
-
-						0	8.555	-3.15, #linkergevel-22
-						0	2.7	-9.0,
-						0	0	-9.0,
-
-						5.68	8.555	-3.15, #rechtergevel-25
-						5.68	5.40	-6.3,
-						5.68	5.40	-9,
-						5.68	0	-9.0,
-
-						2.25	0	-9.0, #achtergevel-29
-						2.25	0.6	-9.0,
-						4.8	0.6	-9.0,
-						4.8	5.40	-9.0,
-						1.2	0	-9.0,
-						1.2	2.7	-9,
-
-
-						3.19	0	-0.14, #diepte van de voordeur-35
-						4.42	0	-0.14,
-						4.42	2.30	-0.14,
-						3.19	2.30	-0.14, #diepte van de voordeur-38
-
-						2.60	0.90	-0.14, # diepte van het keukenraam-39
-						2.60	2.30	-0.14,
-						0.60	2.30	-0.14,
-						0.60	0.90	-0.14,
-
-						4.84	1.60	-0.14, #diepte van het toiletraam-43
-						5.04	1.60	-0.14,
-						5.04	2.30	-0.14,
-						4.84	2.30	-0.14, 
-
-						0.60	3.60	-0.14, #diepte van het bovenraam-47
-						1.50	3.60	-0.14,
-						1.50	5.0	-0.14,
-						4.42	5.0	-0.14,
-						4.42	5.40	-0.14, 
-						0.60	5.40	-0.14, #52
-
-						2.25	0	-8.86, #diepte van de achtergevel-53
-						2.25	0.6	-8.86,
-						4.8	0.6	-8.86,
-						4.8	5.40	-8.86,
-						1.2	0	-8.86,
-						1.2	2.7	-8.86,	#58
-
-						0	2.7	0, #59 extra punten voor segmentering beneden
-						0.14	2.7	-0.14,
-
-						5.68	2.7	0, #61
-						5.54	2.7	-0.14, #
-
-						0	2.7	-9, #63
-						0.14	2.7	-8.86, #
-
-						5.68	2.7	-9, #65
-						5.54	2.7	-8.86, #
-
-						1.2	2.7	-9, #67
-						1.2	2.7	-8.86, #
-
-						4.8	2.7	-9, #69
-						4.8	2.7	-8.86, #
-
-
-
+		#moved to end
+		#ROUTE klikopdeur.touchTime TO TimeSource.startTime
+		#ROUTE TimeSource.fraction_changed TO Deuropen.set_fraction
+		#ROUTE Deuropen.value_changed TO deur.rotation
+		#deur2
+		Transform {
+			children [
+				USE dwarslat
+				USE ruitje
+				#deur
+				DEF deurkeukengang Transform {
+					center -.4 0 0
+					children [
+						DEF klikopdeur2 TouchSensor {
+						}
+						DEF TimeSource2 TimeSensor {
+							cycleInterval 20
+						}
+						# Run once for 20 sec.
+						# Animeer het openzwaaien van de deur rond de Y as:
+						DEF Deuropen2 OrientationInterpolator {
+							key [
+								0 .025 .05 .95 .975 1
+							]
+							keyValue [
+								0 1 0 0 0 1 0 -1 0 1 0 -2 0 1 0 -2 0 1 0 -1 0 1 0 0
+							]
+						}
+						USE deurklink
+						USE deurvorm
 					]
+					translation 0 1.005 0
 				}
-				normal            NULL
-				texCoord          NULL
-				ccw               TRUE
-				colorIndex        []
-				colorPerVertex    TRUE
-				convex            TRUE
-				coordIndex  [
-		0, 4, 12, 15, -1,
-
-		0, 15, 14, 59, -1,
-
-		14, 13, 61, 59,-1,
-
-
-		4, 7, 13, 12, -1,
-
-        13, 11, 61, -1,
-
-		11, 10, 61, -1,
-
-		9, 1, 61, 10, -1, 
-
-		5, 1, 9, 8, -1,
-
-		5, 8, 11, 6, -1,
-
-
-		0, 59, 63, 24, -1,
-
-		1, 28, 65, 61, -1,
-
-		28, 29, 30, 31, -1,
-
-		28, 31, 69, 65, -1,
-
-		33, 24, 63, 67, -1,
-
-		5, 6, 37, 36, -1,
-
-		6, 7, 38, 37, -1,
-
-		4, 35, 38, 7, -1,
-
-		12, 13, 40, 39, -1,
-
-		13, 14, 41, 40, -1,
-
-		15, 42, 41, 14, -1,
-
-		12, 39, 42, 15, -1
-
-		8, 9, 44, 43, -1,
-
-		9, 10 , 45, 44, -1,
-
-		10, 11, 46, 45, -1,
-
-		11, 8, 43, 46, -1,
-
-		29, 53, 54, 30, -1,
-
-		30, 54, 55, 31, -1, 
-
-		31, 55, 70, 69, -1,
-
-		33, 67, 68, 57, -1,
-
-		59, 61, 62, 60, -1,
-
-		59, 60, 64, 63, -1,
-
-		61, 65, 66, 62, -1,
-
-		65, 69, 70, 66, -1,
-
-		64, 68, 67, 63, -1,
-
-
-
-]     #default []
-				creaseAngle       0
-				normalIndex       []
-				normalPerVertex   TRUE
-				solid             FALSE
-				texCoordIndex     []
-			}
+			]
+			translation 3.155 0 -2.96
+			rotation 0 1 0 1.570796
 		}
-	]
-}
-
-Transform{#schuurtje
-children [
-
-DEF schuurvloer Transform {
-	children [
-		Shape {
-appearance Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      1 0.5 0.3
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry IndexedFaceSet {
-				color             NULL
-				coord  Coordinate {	#default NULL
-					point [
-						0.1	0	-0.1,
-						2.1	0	-0.1,
-						2.1	0	-3.1,
-						0.1	0	-3.1,
+		#moved to end
+		#ROUTE klikopdeur2.touchTime TO TimeSource2.startTime
+		#ROUTE TimeSource2.fraction_changed TO Deuropen2.set_fraction
+		#ROUTE Deuropen2.value_changed TO deurkeukengang.rotation
+		#deur3
+		Transform {
+			children [
+				USE dwarslat
+				USE ruitje
+				#deur
+				DEF deurwoonkamergang Transform {
+					center -.4 0 0
+					children [
+						DEF klikopdeur3 TouchSensor {
+						}
+						DEF TimeSource3 TimeSensor {
+							cycleInterval 20
+						}
+						# Run once for 20 sec.
+						# Animeer het openzwaaien van de deur rond de Y as: deze deur draait tegengesteld aan de andere
+						DEF Deuropen3 OrientationInterpolator {
+							key [
+								0 .025 .05 .95 .975 1
+							]
+							keyValue [
+								0 1 0 0 0 1 0 1 0 1 0 2 0 1 0 2 0 1 0 1 0 1 0 0
+							]
+						}
+						USE deurklink
+						USE deurvorm
 					]
+					translation 0 1.005 0
 				}
-				normal            NULL
-				texCoord          NULL
-				ccw               TRUE
-				colorIndex        []
-				colorPerVertex    TRUE
-				convex            TRUE
-				coordIndex  [
-	0, 1, 2, 3, -1,
-	
-]     #default []
-				creaseAngle       0
-				normalIndex       []
-				normalPerVertex   TRUE
-				solid             FALSE
-				texCoordIndex     []
-			}
+			]
+			translation 3.59 0 -3.395
+			rotation 0 1 0 0
 		}
-	]
-}
-
-
-Transform {
-children [
-Shape {
-appearance USE steen
-geometry Box {	size	2.2	2.6	0.1	}
-}
-]
-translation 1.1 1.3 -0.05
-}
-
-Transform{
-children [
-Shape {
-appearance USE steen
-geometry Box {	size	2.2	2.6	0.1	}
-}
-]
-translation	1.1	1.3	-3.15
-}
-
-Transform{
-children [
-Shape {
-appearance USE steen
-geometry Box {	size	0.1	2.6	1.3	}
-}
-]
-translation		0.05	1.3	-0.75
-}
-
-Transform{
-children [
-Shape {
-appearance USE steen
-geometry Box {	size	0.1	2.6	0.75	}
-}
-]
-translation		0.05	1.3	-2.725
-}
-
-Transform{
-children [
-Shape {
-appearance USE steen
-geometry Box {	size	0.1	2.6	3	}
-}
-]
-translation		2.15	1.3	-1.6
-}
-
-Transform{
-children [
-Shape {
-appearance DEF blauw Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      0.3 0.4 0.7
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-geometry Box {	size	0.05	0.44	0.85	}
-}
-]
-translation		0.05	2.38	-1.875
-}
-
-Transform{#drempel van schuurdeur
-children [
-
-Transform{#deurpost
-children [
-
-DEF deurpost Shape {
-		appearance 	DEF grijs Appearance {
-			material 	Material {
-	ambientIntensity  0.2
-	diffuseColor      0.4 0.4 0.4
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-					}	
-				}
-		geometry 	Box {
-	size	0.05 2.56 0.05
-				}
-	}
-]
-translation 0 1.3 0.45
-}
-
-Transform{#deurpost
-children [
-
-Shape {
-		appearance USE grijs
-		geometry 	Box {
-	size	0.05 0.05 0.85
-				}
-	}
-]
-translation 0 2.135 0
-}
-
-
-Transform{#deurpost
-children [
-
-USE deurpost
-]
-translation 0 1.3 -0.45
-}
-
-Shape {
-		appearance 	USE grijs
-		geometry 	Box {
-	size	0.1 0.04 0.95
-				}
-
-	}
-]
-translation		0.05	0.02	-1.875
-}
-
-
-]
-translation 3.48	0	7.8
-}
-
-# /buitmuur.wrl
-
-
-# trapbeneden.wrl
-
-
-
-
-DEF trapbeneden Transform {
-	children [
-		Shape {
-appearance Appearance {
-	material          Material {
-	ambientIntensity  0.2
-	diffuseColor      1 0.5 0.3
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry DEF trap IndexedFaceSet {
-				color             NULL
-				coord  Coordinate {	#default NULL
-					point [
-	-0.2	0	1, #0
-	0	0.2	1,
-	0	0.2	0,
-	-0.2	0	0, #3
-
-	0.28	0.4	1, #4
-	0.6	0.6	1,
-	0.98	0.8	1,
-	0.98	1	0.45, #7
-
-	0.98	1.2	0.25, #8
-	0.98	1.4	0, 
-	0.98	1.6	-0.25, 
-	0.98	1.8	-0.45, #11
-
-	0.98	2.0	-1, #12
-	0.6	2.2	-1,
-	0.28	2.4	-1,
-	0	2.6	-1, #15
-
-	0	0.6	0, #16
-	0	0.8	0,
-	0	1	0, #18
-	0	1.2	0, #19
-
-	0	1.4	0, #20
-	0	1.6	0,
-	0	1.8	0, #22
-	0	2	0, #23
-
-	0	2.2	0, #24
-	0	2.4	0, 
-	0	2.6	0,  
-	0	2.8	0,  #27
-
-	-0.2	0.2	1, #28
-	0	0.4	1,
-	0	0.4	0,
-	-0.2	0.2	0, #31
-
-	0.28	0.6	1, #32
-	0.6	0.8	1,
-	0.98	1	1,
-	0.98	1.2	0.45, #35
-
-	0.98	1.4	0.25, #36
-	0.98	1.6	0, 
-	0.98	1.8	-0.25, 
-	0.98	2	-0.45, #39
-
-	0.98	2.2	-1, #40
-	0.6	2.4	-1,
-	0.28	2.6	-1,
-	0	2.8	-1, #43
-
-	0	0	1,
-	0	0	0, #45
-	0	0.4	0, #46
-
+		#deur3
+		#moved to end
+		#ROUTE klikopdeur3.touchTime TO TimeSource3.startTime
+		#ROUTE TimeSource3.fraction_changed TO Deuropen3.set_fraction
+		#ROUTE Deuropen3.value_changed TO deurwoonkamergang.rotation
+		#deur4
+		Transform {
+			children [
+				DEF dwarslatafw Transform {
+					children [
+						Shape {
+							appearance USE kozijn
+							geometry Box {
+								size .93 .05 .05
+							}
+						}
+					]
+					translation 0 2.035 0
+				}
+				DEF ruitjeafw Transform {
+					children [
+						Shape {
+							appearance USE kozijn
+							geometry Box {
+								size .93 .64 .01
+							}
+						}
+					]
+					translation 0 2.38 0
+				}
+				#ruit boven de deur#deur
+				DEF deurwoonkamertrapkast Transform {
+					center -.4 0 0
+					children [
+						DEF klikopdeur4 TouchSensor {
+						}
+						DEF TimeSource4 TimeSensor {
+							cycleInterval 20
+						}
+						# Run once for 20 sec.
+						# Animeer het openzwaaien van de deur rond de Y as:
+						DEF Deuropen4 OrientationInterpolator {
+							key [
+								0 .025 .05 .95 .975 1
+							]
+							keyValue [
+								0 1 0 0 0 1 0 -1 0 1 0 -2 0 1 0 -2 0 1 0 -1 0 1 0 0
+							]
+						}
+						USE deurklink
+						Shape {
+							#afwijkende deurmaat
+							appearance USE deurkleur
+							geometry Box {
+								size .93 2 .05
+							}
+						}
 					]
+					translation 0 1.005 0
 				}
-				normal            NULL
-				texCoord          NULL
-				ccw               TRUE
-				colorIndex        []
-				colorPerVertex    TRUE
-				convex            TRUE
-				coordIndex  [
-
-	28, 1, 2, 31, -1, #1e_treevlak
-	29, 4, 46, -1, #2e
-	32, 5, 16, -1,
-	33, 6, 17, -1,
-	34, 7, 18, -1, 
-	35, 8, 19, -1, 
-	36, 9, 20, -1, 
-	37, 10, 21, -1,
-	38, 11, 22, -1,
-	39, 12, 23, -1,
-	40, 13, 24, -1,
-	41, 14, 25, -1,
-	42, 15, 26, -1, #13e_treevlak
-
-	0, 28, 31, 3, -1, #voor_en_zijvlakken_van_de_eerste_tree
-	0, 44, 1, 28, -1,
-	3, 31, 2, 45, -1,
-
-	2, 1, 29, 30, -1, #alle_voorvlakken
-	46, 4, 32, 16, -1,
-	16, 5, 33, 17, -1,
-	17, 6, 34, 18, -1,
-	18, 7, 35, 19, -1, 
-	19, 8, 36, 20, -1,
-	20, 9, 37, 21, -1,
-	21, 10, 38, 22, -1,
-	22, 11, 39, 23, -1,
-	23, 12, 40, 24, -1,
-	24, 13, 41, 25, -1,
-	25, 14, 42, 26, -1,
-	26, 15, 43, 27, -1,
-
-
-	
-
-]     #default []
-				creaseAngle       0
-				normalIndex       []
-				normalPerVertex   TRUE
-				solid             FALSE
-				texCoordIndex     []
-			}
+			]
+			translation 4.395 0 -3.895
+			rotation 0 1 0 -1.570796
 		}
-	]
-translation 4.42	0	-3.36
-}
-
-
-
-
-
-# /trapbeneden.wrl
-
-# deuren.wrl
-
-
-
-Transform {
-children [
-DEF deurgroep Group {#DEURKEUKENWOONKAMER
-children[
-#dwarslat boven de deur
-DEF dwarslat Transform {
-	children [
-		Shape {
-appearance DEF kozijn Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      0.95 0.95 0.9
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry Box { size	0.8 0.05 0.05 }
-}
-
-]
-translation	0 2.035 0
-}
-
-
-
-
-DEF ruitje Transform {
-	children [
-		Shape {
-appearance DEF glas Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      0.6 0.6 0.9
-	emissiveColor     0 0 0
-	shininess         0.8
-	specularColor     1 1 1 
-	transparency      0.7
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry Box { size	0.8 0.64 0.01 }
-}
-
-]
-translation	0 2.38 0
-}#ruit boven de deur
-
-#deur
-DEF deur Transform {
-center -0.4 0 0
-	children [
-
-
-
-DEF klikopdeur TouchSensor {}
-  DEF TimeSource TimeSensor { cycleInterval 20.0 } # Run once for 20 sec.
-  # Animeer het openzwaaien van de deur rond de Y as:
-  DEF Deuropen OrientationInterpolator {
-       key      [ 0,      0.025,	0.05,	0.95,	0.975,       1.0 ]
-       keyValue [ 0 1 0 0, 0 1 0 -1, 0 1 0 -2, 0 1 0 -2, 0 1 0 -1, 0 1 0 0 ]
-  }
-
-
-
-# ../boven/deurklink.wrl
-
-
-
-
-
-DEF deurklink Transform {
-	children [
-	    DEF enehelft	Shape {
-            appearance DEF aluminium Appearance {
-                material         Material {
-                ambientIntensity  0.2
-                diffuseColor      0.4 0.4 0.5
-                emissiveColor     0 0 0
-                shininess         0.8
-                specularColor     0.4 0.4 0.5
-                }
-                texture           NULL
-                textureTransform  NULL
-            }
-		    geometry IndexedFaceSet {
-				color             NULL
-				coord  Coordinate {
-					point [
-                        -0.015	0.02	0, #0
-                        0.015		0.02	0,
-                        0.02		-0.02	0,
-                        -0.02		-0.02	0, #3
-
-                        -0.01		-0.015	0.06, #4
-                        0.01		-0.015	0.06,
-                        -0.01		0.015		0.03,
-                        0.01		0.015		0.03,
-
-                        0.005		0.1		0.035, #8
-                        -0.005	0.1		0.035,
-                        -0.005	0.1		0.055,
-                        0.005		0.1		0.055,
-
-
-
+		#deur4
+		#moved to end
+		#ROUTE klikopdeur4.touchTime TO TimeSource4.startTime
+		#ROUTE TimeSource4.fraction_changed TO Deuropen4.set_fraction
+		#ROUTE Deuropen4.value_changed TO deurwoonkamertrapkast.rotation
+		#deur5
+		Transform {
+			children [
+				DEF dwarslatafw2 Transform {
+					children [
+						Shape {
+							appearance USE kozijn
+							geometry Box {
+								size .74 .05 .05
+							}
+						}
 					]
+					translation 0 2.035 0
 				}
-				normal            NULL
-				texCoord          NULL
-				ccw               TRUE
-				colorIndex        []
-				colorPerVertex    TRUE
-				convex            TRUE
-				coordIndex  [
-	
-2, 3, 4, 5, -1,
-2, 5, 4, 3, -1,
-
-4, 5, 11, 10, -1, 
-4, 10, 11, 5, -1,
-
-0, 1, 7, 6, -1, 
-0, 6, 7, 1, -1,
-
-6, 7, 8, 9, -1, 
-6, 9, 8, 7, -1,
-
-8, 9, 10, 11, -1, 
-8, 11, 10, 9, -1,
-
-0, 6, 4, 3, -1,
-0, 3, 4, 6, -1,
-
-6, 9, 10, 4, -1, 
-6, 4, 10, 9, -1,
-
-1, 2, 5, 7, -1,
-1, 7, 5, 2, -1,
-
-7, 5, 11, 8, -1,
-7, 8, 11, 5, -1,
-
-]     #default []
-				creaseAngle       0
-				normalIndex       []
-				normalPerVertex   TRUE
-				solid             TRUE
-				#texCoordIndex     []
-			}
-		}#enehelft
-
-	Transform {
-		children [
-
-			USE enehelft
-		]
-	rotation 0 1 0 3.1415927
-	translation	0 0 -0.07
-	}
-	Transform {
-
-		children [
-		DEF vlakdeel Shape {
-			appearance USE aluminium
-			geometry Box { size 0.18 0.07 0.01 }
-		}#shape
-		]
-	translation -0.03 0 -0.005
-	}
-
-	Transform {
-
-		children [
-		USE vlakdeel 
-		]
-	translation -0.03 0 -0.065
-	}
-
-
-
-	]
-
-translation 0.35 0 0.035
-rotation 0 0 1 1.5707963
-}#deurklink
-
-
-
-# /../boven/deurklink.wrl
-
-DEF deurvorm Shape {
-	appearance DEF deurkleur Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      0.8 0.8 0.8
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry Box { size	0.8 2 0.05 }
-}
-
-]
-translation	0 1.005 0
-}
-
-
-
-
-
-]
-}#deurgroep
-
-]
-translation 1.38 0 -3.395
-}
-#ROUTE klikopdeur.touchTime TO TimeSource.startTime
-#ROUTE TimeSource.fraction_changed TO Deuropen.set_fraction
-#ROUTE Deuropen.value_changed TO deur.rotation
-
-
-#deur2
-Transform {
-children[ 	USE dwarslat
-		USE ruitje
-
-#deur
-DEF deurkeukengang Transform {
-center -0.4 0 0
-	children [
-
-
-
-	DEF klikopdeur2 TouchSensor {}
-  DEF TimeSource2 TimeSensor { cycleInterval 20.0 } # Run once for 20 sec.
-  # Animeer het openzwaaien van de deur rond de Y as:
-   DEF Deuropen2 OrientationInterpolator {
-       key      [ 0,      0.025,	0.05,	0.95,	0.975,       1.0 ]
-       keyValue [ 0 1 0 0, 0 1 0 -1, 0 1 0 -2, 0 1 0 -2, 0 1 0 -1, 0 1 0 0 ]
-  }
-USE deurklink
-USE deurvorm
-]
-translation	0 1.005 0
-}
-		
-]
-translation 3.155 0 -2.96
-rotation 0 1 0 1.5707963
-}
-
-#ROUTE klikopdeur2.touchTime TO TimeSource2.startTime
-#ROUTE TimeSource2.fraction_changed TO Deuropen2.set_fraction
-#ROUTE Deuropen2.value_changed TO deurkeukengang.rotation
-
-
-#deur3
-Transform {
-children[ 	USE dwarslat
-		USE ruitje
-#deur
-DEF deurwoonkamergang Transform {
-center -0.4 0 0
-	children [
-
-
-
-	DEF klikopdeur3 TouchSensor {}
-  DEF TimeSource3 TimeSensor { cycleInterval 20.0 } # Run once for 20 sec.
-  # Animeer het openzwaaien van de deur rond de Y as: deze deur draait tegengesteld aan de andere
-   DEF Deuropen3 OrientationInterpolator {
-       key      [ 0,      0.025,	0.05,	0.95,	0.975,       1.0 ]
-       keyValue [ 0 1 0 0, 0 1 0 1, 0 1 0 2, 0 1 0 2, 0 1 0 1, 0 1 0 0 ]
-  }
-USE deurklink
-USE deurvorm
-]
-translation	0 1.005 0
-}
-		
-]
-translation 3.59 0 -3.395
-rotation 0 1 0 0
-}#deur3
-
-#ROUTE klikopdeur3.touchTime TO TimeSource3.startTime
-#ROUTE TimeSource3.fraction_changed TO Deuropen3.set_fraction
-#ROUTE Deuropen3.value_changed TO deurwoonkamergang.rotation
-
-
-#deur4
-Transform {
-children[ DEF dwarslatafw Transform {
-	children [
-		Shape {
-appearance USE kozijn
-			geometry Box { size	0.93 0.05 0.05 }
-}
-
-]
-translation	0 2.035 0
-}
-
-
-
-
-DEF ruitjeafw Transform {
-	children [
-		Shape {
-appearance USE kozijn 
-			geometry Box { size	0.93 0.64 0.01 }
-}
-
-]
-translation	0 2.38 0
-}#ruit boven de deur#deur
-DEF deurwoonkamertrapkast Transform {
-center -0.4 0 0
-	children [
-
-
-
-	DEF klikopdeur4 TouchSensor {}
-  DEF TimeSource4 TimeSensor { cycleInterval 20.0 } # Run once for 20 sec.
-  # Animeer het openzwaaien van de deur rond de Y as:
-   DEF Deuropen4 OrientationInterpolator {
-       key      [ 0,      0.025,	0.05,	0.95,	0.975,       1.0 ]
-       keyValue [ 0 1 0 0, 0 1 0 -1, 0 1 0 -2, 0 1 0 -2, 0 1 0 -1, 0 1 0 0 ]
-  }
-USE deurklink
-Shape { #afwijkende deurmaat
-	appearance USE deurkleur 
-			geometry Box { size	0.93 2 0.05 }
-}
-]
-translation	0 1.005 0
-}
-		
-]
-translation 4.395 0 -3.895
-rotation 0 1 0 -1.5707963
-}#deur4
-
-#ROUTE klikopdeur4.touchTime TO TimeSource4.startTime
-#ROUTE TimeSource4.fraction_changed TO Deuropen4.set_fraction
-#ROUTE Deuropen4.value_changed TO deurwoonkamertrapkast.rotation
-
-
-
-#deur5
-Transform {
-children[ DEF dwarslatafw2 Transform {
-	children [
-		Shape {
-appearance USE kozijn
-			geometry Box { size	0.74 0.05 0.05 }
-}
-
-]
-translation	0 2.035 0
-}
-
-
-
-
-DEF ruitjeafw2 Transform {
-	children [
-		Shape {
-appearance USE kozijn 
-			geometry Box { size	0.74 0.64 0.01 }
-}
-
-]
-translation	0 2.38 0
-}#ruit boven de deur#deur
-
-DEF deurgangmeterkast Transform {
-center -0.4 0 0
-	children [
-
-
-
-	DEF klikopdeur5 TouchSensor {}
-  DEF TimeSource5 TimeSensor { cycleInterval 20.0 } # Run once for 20 sec.
-  # Animeer het openzwaaien van de deur rond de Y as:
-   DEF Deuropen5 OrientationInterpolator {
-       key      [ 0,      0.025,	0.05,	0.95,	0.975,       1.0 ]
-       keyValue [ 0 1 0 0, 0 1 0 -0.7, 0 1 0 -1.5, 0 1 0 -1.5, 0 1 0 -0.7, 0 1 0 0 ]
-  }
-DEF deurklinkafw Transform {
-	children [
-	USE enehelft
-	Transform {
-		children [
-
-			USE enehelft
-		]
-	rotation 0 1 0 3.1415927
-	translation	0 0 -0.07
-	}
-	Transform {
-
-		children [
-		DEF vlakdeel Shape {
-			appearance USE aluminium
-			geometry Box { size 0.18 0.07 0.01 }
-		}#shape
-		]
-	translation -0.03 0 -0.005
-	}
-
-	Transform {
-
-		children [
-		USE vlakdeel 
-		]
-	translation -0.03 0 -0.065
-	}
-
-
-
-	]
-
-translation 0.32 0 0.035
-rotation 0 0 1 1.5707963
-}#deurklink
-Shape { #afwijkende deurmaat
-	appearance USE deurkleur 
-			geometry Box { size	0.74 2 0.05 }
-}
-]
-translation	0 1.005 0
-}
-		
-]
-translation 4.455 0 -1.92
-rotation 0 1 0 -1.5707963
-}#deur5
-
-#ROUTE klikopdeur5.touchTime TO TimeSource5.startTime
-#ROUTE TimeSource5.fraction_changed TO Deuropen5.set_fraction
-#ROUTE Deuropen5.value_changed TO deurgangmeterkast.rotation
-
-
-#deur6
-Transform {
-children[ 	USE dwarslat
-		USE ruitje
-#deur
-DEF deurtoiletgang Transform {
-center -0.4 0 0
-	children [
-
-
-
-	DEF klikopdeur6 TouchSensor {}
-  DEF TimeSource6 TimeSensor { cycleInterval 20.0 } # Run once for 20 sec.
-  # Animeer het openzwaaien van de deur rond de Y as: 
-   DEF Deuropen6 OrientationInterpolator {
-       key      [ 0,      0.025,	0.05,	0.95,	0.975,       1.0 ]
-       keyValue [ 0 1 0 0, 0 1 0 -1, 0 1 0 -2, 0 1 0 -2, 0 1 0 -1, 0 1 0 0 ]
-  }
-USE deurklink
-USE deurvorm
-]
-translation	0 1.005 0
-}
-		
-]
-translation 4.455 0 -1.08
-rotation 0 1 0 -1.5707963
-}#deur6
-
-#ROUTE klikopdeur6.touchTime TO TimeSource6.startTime
-#ROUTE TimeSource6.fraction_changed TO Deuropen6.set_fraction
-#ROUTE Deuropen6.value_changed TO deurtoiletgang.rotation
-
-
-# voordeur.wrl
-
-
-
-
-DEF voordeur Transform {
-center 1.11 0 0 
-	children [
-
-		Shape {
-appearance DEF deurkleur Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      0.8 0.8 0.8
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry IndexedFaceSet {
-				color             NULL
-				coord  Coordinate {	#default NULL
-					point [
-
-	0	0	0.025, #0
-	1.11	0	0.025, #
-	1.11	2.19	0.025, #
-	0	2.19	0.025, #3
-				
-	0.71	0.49	0.025, #4
-	0.91	0.49	0.025, #
-	0.91	1.99	0.025, #
-	0.71	1.99	0.025, #7
-
-	0	0	-0.025, #8
-	1.11	0	-0.025, #
-	1.11	2.19	-0.025, #
-	0	2.19	-0.025, #11
-				
-	0.71	0.49	-0.025, #12
-	0.91	0.49	-0.025, #
-	0.91	1.99	-0.025, #
-	0.71	1.99	-0.025, #15
-	]
+				DEF ruitjeafw2 Transform {
+					children [
+						Shape {
+							appearance USE kozijn
+							geometry Box {
+								size .74 .64 .01
+							}
+						}
+					]
+					translation 0 2.38 0
+				}
+				#ruit boven de deur#deur
+				DEF deurgangmeterkast Transform {
+					center -.4 0 0
+					children [
+						DEF klikopdeur5 TouchSensor {
+						}
+						DEF TimeSource5 TimeSensor {
+							cycleInterval 20
+						}
+						# Run once for 20 sec.
+						# Animeer het openzwaaien van de deur rond de Y as:
+						DEF Deuropen5 OrientationInterpolator {
+							key [
+								0 .025 .05 .95 .975 1
+							]
+							keyValue [
+								0 1 0 0 0 1 0 -.7 0 1 0 -1.5 0 1 0 -1.5 0 1 0 -.7 0 1 0 0
+							]
+						}
+						DEF deurklinkafw Transform {
+							children [
+								USE enehelft
+								Transform {
+									children [
+										USE enehelft
+									]
+									rotation 0 1 0 3.141592
+									translation 0 0 -.07
+								}
+								Transform {
+									children [
+										DEF vlakdeel Shape {
+											appearance USE aluminium
+											geometry Box {
+												size .18 .07 .01
+											}
+										}
+										#shape
+									]
+									translation -.03 0 -.005
+								}
+								Transform {
+									children [
+										USE vlakdeel
+									]
+									translation -.03 0 -.065
+								}
+							]
+							translation .32 0 .035
+							rotation 0 0 1 1.570796
+						}
+						#deurklink
+						Shape {
+							#afwijkende deurmaat
+							appearance USE deurkleur
+							geometry Box {
+								size .74 2 .05
+							}
+						}
+					]
+					translation 0 1.005 0
 				}
-				normal            NULL
-				texCoord          NULL
-				ccw               TRUE
-				colorIndex        []
-				colorPerVertex    TRUE
-				convex            TRUE
-				coordIndex  [
-	
-	0, 1, 5, 4, -1, 
-
-	1, 2, 6, 5, -1,
-
-	6, 2, 3, 7, -1,
-
-	0, 4, 7, 3, -1, 
-
-
-	1, 0, 8, 9, -1,
-
-	3, 2, 10, 11, -1,
-
-	0, 3, 11, 8, -1,
-
-	2, 1, 9, 10, -1,
-
-
-	5, 6, 14, 13, -1,
-
-	4, 5, 13, 12, -1,
-
-	6, 7, 15, 14, -1,
-
-	7, 4, 12, 15, -1,
-
-	
-	9, 8, 12, 13, -1,
-	
-	10, 9, 13, 14, -1,
-
-	11, 10, 14, 15, -1, 
-
-	12, 8, 11, 15, -1,
-
-
-
-
-
-]     #default []
-				creaseAngle       0
-				normalIndex       []
-				normalPerVertex   TRUE
-				solid             TRUE
-				texCoordIndex     []
-			}
+			]
+			translation 4.455 0 -1.92
+			rotation 0 1 0 -1.570796
 		}
-
-DEF klikopvoordeur TouchSensor {}
-  DEF TimeSourcevoor TimeSensor { cycleInterval 20.0 } # Run once for 20 sec.
-  # Animeer het openzwaaien van de deur rond de Y as:
-  DEF VoorDeuropen OrientationInterpolator {
-       key      [ 0,      0.025,	0.05,	0.95,	0.975,       1.0 ]
-       keyValue [ 0 1 0 0, 0 1 0 -0.7, 0 1 0 -1.5, 0 1 0 -1.5, 0 1 0 -0.7, 0 1 0 0 ]
-  }
-
-DEF deurgreep Transform{
-children[
-		Shape {
-	appearance DEF aluminium Appearance {
-		material         Material {
-		ambientIntensity  0.2
-		diffuseColor      0.4 0.4 0.4
-		emissiveColor     0 0 0
-		shininess         0.8
-		specularColor     0.9 0.9 0.9
-		transparency      0
+		#deur5
+		#moved to end
+		#ROUTE klikopdeur5.touchTime TO TimeSource5.startTime
+		#ROUTE TimeSource5.fraction_changed TO Deuropen5.set_fraction
+		#ROUTE Deuropen5.value_changed TO deurgangmeterkast.rotation
+		#deur6
+		Transform {
+			children [
+				USE dwarslat
+				USE ruitje
+				#deur
+				DEF deurtoiletgang Transform {
+					center -.4 0 0
+					children [
+						DEF klikopdeur6 TouchSensor {
+						}
+						DEF TimeSource6 TimeSensor {
+							cycleInterval 20
+						}
+						# Run once for 20 sec.
+						# Animeer het openzwaaien van de deur rond de Y as: 
+						DEF Deuropen6 OrientationInterpolator {
+							key [
+								0 .025 .05 .95 .975 1
+							]
+							keyValue [
+								0 1 0 0 0 1 0 -1 0 1 0 -2 0 1 0 -2 0 1 0 -1 0 1 0 0
+							]
+						}
+						USE deurklink
+						USE deurvorm
+					]
+					translation 0 1.005 0
+				}
+			]
+			translation 4.455 0 -1.08
+			rotation 0 1 0 -1.570796
+		}
+		#deur6
+		#moved to end
+		#ROUTE klikopdeur6.touchTime TO TimeSource6.startTime
+		#ROUTE TimeSource6.fraction_changed TO Deuropen6.set_fraction
+		#ROUTE Deuropen6.value_changed TO deurtoiletgang.rotation
+		# voordeur.wrl
+		DEF voordeur Transform {
+			center 1.11 0 0
+			children [
+				Shape {
+					appearance DEF deurkleur Appearance {
+						material Material {
+							ambientIntensity .2
+							diffuseColor .8 .8 .8
+							emissiveColor 0 0 0
+							shininess .1
+							specularColor 0 0 0
+							transparency 0
+						}
+						texture NULL
+						textureTransform NULL
+					}
+					geometry IndexedFaceSet {
+						color NULL
+						coord Coordinate {
+							#default NULL
+							point [
+								0 0 .025, #0
+								1.11 0 .025, #
+								1.11 2.19 .025, #
+								0 2.19 .025, #3
+								.71 .49 .025, #4
+								.91 .49 .025, #
+								.91 1.99 .025, #
+								.71 1.99 .025, #7
+								0 0 -.025, #8
+								1.11 0 -.025, #
+								1.11 2.19 -.025, #
+								0 2.19 -.025, #11
+								.71 .49 -.025, #12
+								.91 .49 -.025, #
+								.91 1.99 -.025, #
+								.71 1.99 -.025, #15
+							]
+						}
+						normal NULL
+						texCoord NULL
+						ccw TRUE
+						colorIndex [
+						]
+						colorPerVertex TRUE
+						convex TRUE
+						coordIndex [
+							0 1 5 4 -1, 1 2 6 5 -1, 6 2 3 7 -1, 0 4 7 3 -1, 1 0 8 9 -1, 3 2 10 11 -1,
+							0 3 11 8 -1, 2 1 9 10 -1, 5 6 14 13 -1, 4 5 13 12 -1, 6 7 15 14 -1, 7 4 12
+							15 -1, 9 8 12 13 -1, 10 9 13 14 -1, 11 10 14 15 -1, 12 8 11 15 -1,
+						]
+						#default []
+						creaseAngle 0
+						normalIndex [
+						]
+						normalPerVertex TRUE
+						solid TRUE
+						texCoordIndex [
+						]
+					}
+				}
+				DEF klikopvoordeur TouchSensor {
+				}
+				DEF TimeSourcevoor TimeSensor {
+					cycleInterval 20
+				}
+				# Run once for 20 sec.
+				# Animeer het openzwaaien van de deur rond de Y as:
+				DEF VoorDeuropen OrientationInterpolator {
+					key [
+						0 .025 .05 .95 .975 1
+					]
+					keyValue [
+						0 1 0 0 0 1 0 -.7 0 1 0 -1.5 0 1 0 -1.5 0 1 0 -.7 0 1 0 0
+					]
+				}
+				DEF deurgreep Transform {
+					children [
+						Shape {
+							appearance DEF aluminium Appearance {
+								material Material {
+									ambientIntensity .2
+									diffuseColor .4 .4 .4
+									emissiveColor 0 0 0
+									shininess .8
+									specularColor .9 .9 .9
+									transparency 0
+								}
+								texture NULL
+								textureTransform NULL
+							}
+							geometry Box {
+								size .2 .2 .004
+							}
+						}
+					]
+					translation .15 .9 .067
+				}
+				DEF steunblokje Transform {
+					children [
+						Shape {
+							appearance DEF aluminium Appearance {
+								material Material {
+									ambientIntensity .2
+									diffuseColor .4 .4 .4
+									emissiveColor 0 0 0
+									shininess .8
+									specularColor .9 .9 .9
+									transparency 0
+								}
+								texture NULL
+								textureTransform NULL
+							}
+							geometry Box {
+								size .14 .14 .04
+							}
+						}
+					]
+					translation .15 .9 .045
+				}
+				DEF ruitjeindeur Transform {
+					children [
+						Shape {
+							appearance DEF glas Appearance {
+								material Material {
+									ambientIntensity .2
+									diffuseColor .6 .6 .9
+									emissiveColor 0 0 0
+									shininess .8
+									specularColor 1 1 1
+									transparency .7
+								}
+								texture NULL
+								textureTransform NULL
+							}
+							geometry Box {
+								size .2 1.5 .01
+							}
+						}
+					]
+					translation .81 1.24 0
+				}
+			]
+			translation 3.25 .05 -.14
 		}
-		texture           NULL
-		textureTransform  NULL
+		#moved to end
+		#ROUTE klikopvoordeur.touchTime TO TimeSourcevoor.startTime
+		#ROUTE TimeSourcevoor.fraction_changed TO VoorDeuropen.set_fraction
+		#ROUTE VoorDeuropen.value_changed TO voordeur.rotation
+		# /voordeur.wrl
+		# achterdeur.wrl
+		#bevat ook schuurdeur
+		DEF achterdeur Transform {
+			center 0 0 0
+			children [
+				Shape {
+					appearance DEF deurkleur Appearance {
+						material Material {
+							ambientIntensity .2
+							diffuseColor .8 .8 .8
+							emissiveColor 0 0 0
+							shininess .1
+							specularColor 0 0 0
+							transparency 0
+						}
+						texture NULL
+						textureTransform NULL
+					}
+					geometry DEF deurInd IndexedFaceSet {
+						color NULL
+						coord Coordinate {
+							#default NULL
+							point [
+								.93 0 -.025, #0
+								0 0 -.025, #
+								0 2.09 -.025, #
+								.93 2.09 -.025, #3
+								.765 .6 -.025, #4
+								.165 .6 -.025, #
+								.165 1.9 -.025, #
+								.765 1.9 -.025, #7
+								.93 0 .025, #0
+								0 0 .025, #
+								0 2.09 .025, #
+								.93 2.09 .025, #3
+								.765 .6 .025, #4
+								.165 .6 .025, #
+								.165 1.9 .025, #
+								.765 1.9 .025, #7
+							]
+						}
+						normal NULL
+						texCoord NULL
+						ccw TRUE
+						colorIndex [
+						]
+						colorPerVertex TRUE
+						convex TRUE
+						coordIndex [
+							0 1 5 4 -1, 1 2 6 5 -1, 6 2 3 7 -1, 0 4 7 3 -1, 1 0 8 9 -1, 3 2 10 11 -1,
+							0 3 11 8 -1, 2 1 9 10 -1, 5 6 14 13 -1, 4 5 13 12 -1, 6 7 15 14 -1, 7 4 12
+							15 -1, 9 8 12 13 -1, 10 9 13 14 -1, 11 10 14 15 -1, 12 8 11 15 -1,
+						]
+						#default []
+						creaseAngle 0
+						normalIndex [
+						]
+						normalPerVertex TRUE
+						solid TRUE
+						texCoordIndex [
+						]
+					}
+				}
+				DEF klikopachterdeur TouchSensor {
+				}
+				DEF TimeSourceachter TimeSensor {
+					cycleInterval 20
+				}
+				# Run once for 20 sec.
+				# Animeer het openzwaaien van de deur rond de Y as:
+				DEF achterDeuropen OrientationInterpolator {
+					key [
+						0 .025 .05 .95 .975 1
+					]
+					keyValue [
+						0 1 0 0 0 1 0 .7 0 1 0 1.5 0 1 0 1.5 0 1 0 .7 0 1 0 0
+					]
+				}
+				Transform {
+					# ../boven/deurklink.wrl
+					children [
+						DEF deurklink Transform {
+							children [
+								DEF enehelft Shape {
+									appearance DEF aluminium Appearance {
+										material Material {
+											ambientIntensity .2
+											diffuseColor .4 .4 .5
+											emissiveColor 0 0 0
+											shininess .8
+											specularColor .4 .4 .5
+										}
+										texture NULL
+										textureTransform NULL
+									}
+									geometry IndexedFaceSet {
+										color NULL
+										coord Coordinate {
+											point [
+												-.015 .02 0, #0
+												.015 .02 0, .02 -.02 0, -.02 -.02 0, #3
+												-.01 -.015 .06, #4
+												.01 -.015 .06, -.01 .015 .03, .01 .015 .03, .005 .1 .035,
+												#8
+												-.005 .1 .035, -.005 .1 .055, .005 .1 .055,
+											]
+										}
+										normal NULL
+										texCoord NULL
+										ccw TRUE
+										colorIndex [
+										]
+										colorPerVertex TRUE
+										convex TRUE
+										coordIndex [
+											2 3 4 5 -1, 2 5 4 3 -1, 4 5 11 10 -1, 4 10 11 5 -1, 0 1 7 6 -1, 0 6 7 1 -1,
+											6 7 8 9 -1, 6 9 8 7 -1, 8 9 10 11 -1, 8 11 10 9 -1, 0 6 4 3 -1, 0 3 4 6 -1,
+											6 9 10 4 -1, 6 4 10 9 -1, 1 2 5 7 -1, 1 7 5 2 -1, 7 5 11 8 -1, 7 8 11 5 -1,
+											
+										]
+										#default []
+										creaseAngle 0
+										normalIndex [
+										]
+										normalPerVertex TRUE
+										solid TRUE #texCoordIndex     []
+									}
+								}
+								#enehelft
+								Transform {
+									children [
+										USE enehelft
+									]
+									rotation 0 1 0 3.141592
+									translation 0 0 -.07
+								}
+								Transform {
+									children [
+										DEF vlakdeel Shape {
+											appearance USE aluminium
+											geometry Box {
+												size .18 .07 .01
+											}
+										}
+										#shape
+									]
+									translation -.03 0 -.005
+								}
+								Transform {
+									children [
+										USE vlakdeel
+									]
+									translation -.03 0 -.065
+								}
+							]
+							translation .35 0 .035
+							rotation 0 0 1 1.570796
+						}
+						#deurklink
+					]
+					# /../boven/deurklink.wrl
+					translation .5 1 0
+				}
+				DEF ruitindeur Transform {
+					children [
+						Shape {
+							appearance DEF glas Appearance {
+								material Material {
+									ambientIntensity .2
+									diffuseColor .6 .6 .9
+									emissiveColor 0 0 0
+									shininess .8
+									specularColor 1 1 1
+									transparency .7
+								}
+								texture NULL
+								textureTransform NULL
+							}
+							geometry Box {
+								size .6 1.3 .01
+							}
+						}
+					]
+					translation .465 1.25 0
+				}
+			]
+			translation 1.26 .05 -8.86
 		}
-			geometry Box { size	0.2	0.2	0.004	}
-}
-
-]
-translation	0.15	0.9	0.067
-}
-
-
-DEF steunblokje Transform{
-children[
-		Shape {
-	appearance DEF aluminium Appearance {
-		material         Material {
-		ambientIntensity  0.2
-		diffuseColor      0.4 0.4 0.4
-		emissiveColor     0 0 0
-		shininess         0.8
-		specularColor     0.9 0.9 0.9
-		transparency      0
+		#moved to end
+		#ROUTE klikopachterdeur.touchTime TO TimeSourceachter.startTime
+		#ROUTE TimeSourceachter.fraction_changed TO achterDeuropen.set_fraction
+		#ROUTE achterDeuropen.value_changed TO achterdeur.rotation
+		#schuurdeur
+		DEF schuurdeur Transform {
+			children [
+				DEF klikopschuurdeur TouchSensor {
+				}
+				DEF TimeSourceschuur TimeSensor {
+					cycleInterval 20
+				}
+				# Run once for 20 sec.
+				# Animeer het openzwaaien van de deur rond de Y as:
+				DEF schuurDeuropen OrientationInterpolator {
+					key [
+						0 .025 .05 .95 .975 1
+					]
+					keyValue [
+						0 1 0 1.570796 0 1 0 2.4 0 1 0 3.4 0 1 0 3.4 0 1 0 2.4 0 1 0 1.570796
+					]
+				}
+				Transform {
+					children [
+						Shape {
+							appearance USE deurkleur
+							geometry USE deurInd
+						}
+					]
+					scale .913978 1 1 #maakt de deur op maat
+				}
+				USE ruitindeur
+				Transform {
+					children USE deurklink
+					translation .43 1 0
+				}
+			]
+			translation 3.53 .05 6.35
+			rotation 0 1 0 1.570796
 		}
-		texture           NULL
-		textureTransform  NULL
+		#moved to end
+		#ROUTE klikopschuurdeur.touchTime TO TimeSourceschuur.startTime
+		#ROUTE TimeSourceschuur.fraction_changed TO schuurDeuropen.set_fraction
+		#ROUTE schuurDeuropen.value_changed TO schuurdeur.rotation
+		# /achterdeur.wrl
+		# /deuren.wrl
+		# ramen.wrl
+		Transform {
+			children [
+				Shape {
+					appearance DEF kozijn Appearance {
+						material Material {
+							ambientIntensity .2
+							diffuseColor .95 .95 .9
+							emissiveColor 0 0 0
+							shininess .1
+							specularColor 0 0 0
+							transparency 0
+						}
+						texture NULL
+						textureTransform NULL
+					}
+					geometry Box {
+						size .05 1.3 .05
+					}
+				}
+			]
+			translation .625 1.6 -.14
 		}
-			geometry Box { size	0.14	0.14	0.04	}
-}
-
-]
-translation	0.15	0.9	0.045
-}
-
-DEF ruitjeindeur Transform{
-children[
-		Shape {
-	appearance DEF glas Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      0.6 0.6 0.9
-	emissiveColor     0 0 0
-	shininess         0.8
-	specularColor     1 1 1 
-	transparency      0.7
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry Box { size	0.2	1.5	0.01	}
-}
-
-]
-translation	0.81	1.24	0
-}
-
-	]
-translation 3.25	0.05	-0.14
-}
-
-#ROUTE klikopvoordeur.touchTime TO TimeSourcevoor.startTime
-#ROUTE TimeSourcevoor.fraction_changed TO VoorDeuropen.set_fraction
-#ROUTE VoorDeuropen.value_changed TO voordeur.rotation
-
-# /voordeur.wrl
-
-# achterdeur.wrl
-
-
-
-#bevat ook schuurdeur
-
-
-DEF achterdeur Transform {
-center 0 0 0 
-	children [
-
-
-		Shape {
-appearance DEF deurkleur Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      0.8 0.8 0.8
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry DEF deurInd IndexedFaceSet {
-				color             NULL
-				coord  Coordinate {	#default NULL
-					point [
-
-	0.93	0	-0.025, #0
-	0	0	-0.025, #
-	0	2.09	-0.025, #
-	0.93	2.09	-0.025, #3
-
-	0.765	0.6	-0.025, #4
-	0.165	0.6	-0.025, #
-	0.165	1.9	-0.025, #
-	0.765	1.9	-0.025, #7
-
-	0.93	0	0.025, #0
-	0	0	0.025, #
-	0	2.09	0.025, #
-	0.93	2.09	0.025, #3
-
-	0.765	0.6	0.025, #4
-	0.165	0.6	0.025, #
-	0.165	1.9	0.025, #
-	0.765	1.9	0.025, #7
-
-	]
+		Transform {
+			children [
+				Shape {
+					appearance USE kozijn
+					geometry Box {
+						size .05 1.3 .05
+					}
 				}
-				normal            NULL
-				texCoord          NULL
-				ccw               TRUE
-				colorIndex        []
-				colorPerVertex    TRUE
-				convex            TRUE
-				coordIndex  [
-	
-	0, 1, 5, 4, -1, 
-
-	1, 2, 6, 5, -1,
-
-	6, 2, 3, 7, -1,
-
-	0, 4, 7, 3, -1, 
-
-
-	1, 0, 8, 9, -1,
-
-	3, 2, 10, 11, -1,
-
-	0, 3, 11, 8, -1,
-
-	2, 1, 9, 10, -1,
-
-
-	5, 6, 14, 13, -1,
-
-	4, 5, 13, 12, -1,
-
-	6, 7, 15, 14, -1,
-
-	7, 4, 12, 15, -1,
-
-	
-	9, 8, 12, 13, -1,
-	
-	10, 9, 13, 14, -1,
-
-	11, 10, 14, 15, -1, 
-
-	12, 8, 11, 15, -1,
-
-
-
-
-
-]     #default []
-				creaseAngle       0
-				normalIndex       []
-				normalPerVertex   TRUE
-				solid             TRUE
-				texCoordIndex     []
-			}
+			]
+			translation 2.575 1.6 -.14
 		}
-
-DEF klikopachterdeur TouchSensor {}
-  DEF TimeSourceachter TimeSensor { cycleInterval 20.0 } # Run once for 20 sec.
-  # Animeer het openzwaaien van de deur rond de Y as:
-  DEF achterDeuropen OrientationInterpolator {
-       key      [ 0,      0.025,	0.05,	0.95,	0.975,       1.0 ]
-       keyValue [ 0 1 0 0, 0 1 0 0.7, 0 1 0 1.5, 0 1 0 1.5, 0 1 0 0.7, 0 1 0 0 ]
-  }
-
-
-
-Transform {
-    # ../boven/deurklink.wrl
-
-
-
-
-
-DEF deurklink Transform {
-	children [
-	    DEF enehelft	Shape {
-            appearance DEF aluminium Appearance {
-                material         Material {
-                ambientIntensity  0.2
-                diffuseColor      0.4 0.4 0.5
-                emissiveColor     0 0 0
-                shininess         0.8
-                specularColor     0.4 0.4 0.5
-                }
-                texture           NULL
-                textureTransform  NULL
-            }
-		    geometry IndexedFaceSet {
-				color             NULL
-				coord  Coordinate {
-					point [
-                        -0.015	0.02	0, #0
-                        0.015		0.02	0,
-                        0.02		-0.02	0,
-                        -0.02		-0.02	0, #3
-
-                        -0.01		-0.015	0.06, #4
-                        0.01		-0.015	0.06,
-                        -0.01		0.015		0.03,
-                        0.01		0.015		0.03,
-
-                        0.005		0.1		0.035, #8
-                        -0.005	0.1		0.035,
-                        -0.005	0.1		0.055,
-                        0.005		0.1		0.055,
-
-
-
+		Transform {
+			children [
+				Shape {
+					appearance USE kozijn
+					geometry Box {
+						size .05 1.3 .05
+					}
+				}
+			]
+			translation 1.475 1.6 -.14
+		}
+		Transform {
+			children [
+				Shape {
+					appearance USE kozijn
+					geometry Box {
+						size .05 1.3 .05
+					}
+				}
+			]
+			translation 1.725 1.6 -.14
+		}
+		Transform {
+			children [
+				Shape {
+					appearance USE kozijn
+					geometry Box {
+						size 2 .05 .05
+					}
+				}
+			]
+			translation 1.6 .925 -.14
+		}
+		Transform {
+			children [
+				Shape {
+					appearance USE kozijn
+					geometry Box {
+						size 2 .05 .05
+					}
+				}
+			]
+			translation 1.6 2.275 -.14
+		}
+		#einde keukenraam
+		#begin toiletraam
+		Transform {
+			children [
+				Shape {
+					appearance USE kozijn
+					geometry Box {
+						size .05 .7 .05
+					}
+				}
+			]
+			translation 4.865 1.95 -.14
+		}
+		Transform {
+			children [
+				Shape {
+					appearance USE kozijn
+					geometry Box {
+						size .05 .7 .05
+					}
+				}
+			]
+			translation 5.015 1.95 -.14
+		}
+		Transform {
+			children [
+				Shape {
+					appearance USE kozijn
+					geometry Box {
+						size .1 .05 .05
+					}
+				}
+			]
+			translation 4.94 1.625 -.14
+		}
+		Transform {
+			children [
+				Shape {
+					appearance USE kozijn
+					geometry Box {
+						size .1 .05 .05
+					}
+				}
+			]
+			translation 4.94 2.275 -.14
+		}
+		#einde toiletraam
+		#voordeur posten
+		Transform {
+			children [
+				Shape {
+					appearance USE kozijn
+					geometry Box {
+						size .05 2.26 .05
+					}
+				}
+			]
+			translation 3.215 1.17 -.14
+		}
+		Transform {
+			children [
+				Shape {
+					appearance USE kozijn
+					geometry Box {
+						size .05 2.26 .05
+					}
+				}
+			]
+			translation 4.395 1.17 -.14
+		}
+		Transform {
+			children [
+				Shape {
+					appearance USE kozijn
+					geometry Box {
+						size 1.13 .05 .05
+					}
+				}
+			]
+			translation 3.805 2.275 -.14
+		}
+		#einde deurposten
+		#begin kozijnen achter
+		Transform {
+			children [
+				Shape {
+					appearance USE kozijn
+					geometry Box {
+						size .05 2.1 .05
+					}
+				}
+			]
+			translation 3.215 1.65 -8.86
+		}
+		Transform {
+			children [
+				Shape {
+					appearance USE kozijn
+					geometry Box {
+						size .05 2.1 .05
+					}
+				}
+			]
+			translation 4.775 1.65 -8.86
+		}
+		Transform {
+			children [
+				Shape {
+					appearance DEF blauw Appearance {
+						material Material {
+							ambientIntensity .2
+							diffuseColor .3 .4 .7
+							emissiveColor 0 0 0
+							shininess .1
+							specularColor 0 0 0
+							transparency 0
+						}
+						texture NULL
+						textureTransform NULL
+					}
+					geometry Box {
+						size 1.51 .5 .05
+					}
+				}
+			]
+			translation 3.995 2.45 -8.86
+		}
+		Transform {
+			children [
+				Shape {
+					appearance USE kozijn
+					geometry Box {
+						size 1.51 .05 .05
+					}
+				}
+			]
+			translation 3.995 .625 -8.86
+		}
+		#1
+		Transform {
+			children [
+				Shape {
+					appearance USE kozijn
+					geometry Box {
+						size 1.51 .05 .05
+					}
+				}
+			]
+			translation 3.995 2.175 -8.86
+		}
+		#2
+		Transform {
+			children [
+				Shape {
+					appearance USE kozijn
+					geometry Box {
+						size .94 .05 .05
+					}
+				}
+			]
+			translation 2.72 .625 -8.86
+		}
+		Transform {
+			children [
+				Shape {
+					appearance USE kozijn
+					geometry Box {
+						size 1.99 .05 .05
+					}
+				}
+			]
+			translation 2.195 2.675 -8.86
+		}
+		Transform {
+			children [
+				Shape {
+					appearance USE kozijn
+					geometry Box {
+						size 1 .05 .05
+					}
+				}
+			]
+			translation 1.725 2.175 -8.86
+		}
+		Transform {
+			children [
+				Shape {
+					appearance USE kozijn
+					geometry Box {
+						size .05 2.61 .05
+					}
+				}
+			]
+			translation 1.225 1.345 -8.86
+		}
+		Transform {
+			children [
+				Shape {
+					appearance USE kozijn
+					geometry Box {
+						size .05 2.61 .05
+					}
+				}
+			]
+			translation 2.225 1.345 -8.86
+		}
+		Transform {
+			children [
+				Shape {
+					appearance USE kozijn
+					geometry Box {
+						size .05 1.5 .05
+					}
+				}
+			]
+			translation 3.565 1.4 -8.86
+		}
+		#einde ramen achter
+		# /ramen.wrl
+		# ruiten.wrl
+		#begin vensterglas
+		Transform {
+			children [
+				Shape {
+					appearance DEF glas Appearance {
+						material Material {
+							ambientIntensity .2
+							diffuseColor .6 .6 .9
+							emissiveColor 0 0 0
+							shininess .8
+							specularColor 1 1 1
+							transparency .7
+						}
+						texture NULL
+						textureTransform NULL
+					}
+					geometry Box {
+						size .94 2 .01
+					}
+				}
+			]
+			translation 2.72 1.65 -8.86
+		}
+		#ruit 5 achter
+		#ruit1 keuken
+		Transform {
+			children [
+				Shape {
+					appearance USE glas
+					geometry Box {
+						size .8 1.3 .01
+					}
+				}
+			]
+			translation 1.05 1.6 -.14
+		}
+		#ruit 1 keuken
+		#ruit3 keuken
+		Transform {
+			children [
+				Shape {
+					appearance USE glas
+					geometry Box {
+						size .8 1.3 .01
+					}
+				}
+			]
+			translation 2.15 1.6 -.14
+		}
+		#ruit 3 keuken
+		#ruit2 keuken
+		Transform {
+			children [
+				Shape {
+					appearance USE glas
+					geometry Box {
+						size .2 1.3 .01
+					}
+				}
+			]
+			translation 1.6 1.6 -.14
+		}
+		#ruit 2 keuken
+		#toiletruit
+		Transform {
+			children [
+				Shape {
+					appearance USE glas
+					geometry Box {
+						size .1 .6 .01
+					}
+				}
+			]
+			translation 4.94 1.95 -.14
+		}
+		#ruit van toiletraam
+		#ramen achter
+		Transform {
+			children [
+				Shape {
+					appearance USE glas
+					geometry Box {
+						size 1.16 1.5 .01
+					}
+				}
+			]
+			translation 4.17 1.4 -8.86
+		}
+		#ruit 3 achter
+		Transform {
+			children [
+				Shape {
+					appearance USE glas
+					geometry Box {
+						size .3 1.5 .01
+					}
+				}
+			]
+			translation 3.39 1.4 -8.86
+		}
+		#ruit 4 achter
+		Transform {
+			children [
+				Shape {
+					appearance USE glas
+					geometry Box {
+						size .95 .45 .01
+					}
+				}
+			]
+			translation 1.725 2.425 -8.86
+		}
+		#ruit 6 achter
+		# /ruiten.wrl
+		# /beneden/beneden.wrl
+		DEF boven Transform {
+			children [
+				Transform {
+					children [
+						Transform {
+							children [
+								Shape {
+									appearance DEF groen Appearance {
+										material Material {
+											ambientIntensity 1
+											diffuseColor 0 1 0
+											emissiveColor 0 1 0
+											shininess .1
+											specularColor 0 0 0
+											transparency 0
+										}
+										texture NULL
+										textureTransform NULL
+									}
+									geometry DEF pijl IndexedFaceSet {
+										color NULL
+										coord Coordinate {
+											#default NULL
+											point [
+												0 0 0, .2 .2 0, .2 -.2 0,
+											]
+										}
+										normal NULL
+										texCoord NULL
+										ccw TRUE
+										colorIndex [
+										]
+										colorPerVertex TRUE
+										convex TRUE
+										coordIndex [
+											0 1 2 -1,
+										]
+										#default []
+										creaseAngle 0
+										normalIndex [
+										]
+										normalPerVertex TRUE
+										solid FALSE
+										texCoordIndex [
+										]
+									}
+								}
+								#shape
+							]
+							rotation 0 1 0 3.141592
+						}
+						DEF schuifboven TouchSensor {
+						}
 					]
+					translation .15 2.95 .3
 				}
-				normal            NULL
-				texCoord          NULL
-				ccw               TRUE
-				colorIndex        []
-				colorPerVertex    TRUE
-				convex            TRUE
-				coordIndex  [
-	
-2, 3, 4, 5, -1,
-2, 5, 4, 3, -1,
-
-4, 5, 11, 10, -1, 
-4, 10, 11, 5, -1,
-
-0, 1, 7, 6, -1, 
-0, 6, 7, 1, -1,
-
-6, 7, 8, 9, -1, 
-6, 9, 8, 7, -1,
-
-8, 9, 10, 11, -1, 
-8, 11, 10, 9, -1,
-
-0, 6, 4, 3, -1,
-0, 3, 4, 6, -1,
-
-6, 9, 10, 4, -1, 
-6, 4, 10, 9, -1,
-
-1, 2, 5, 7, -1,
-1, 7, 5, 2, -1,
-
-7, 5, 11, 8, -1,
-7, 8, 11, 5, -1,
-
-]     #default []
-				creaseAngle       0
-				normalIndex       []
-				normalPerVertex   TRUE
-				solid             TRUE
-				#texCoordIndex     []
-			}
-		}#enehelft
-
-	Transform {
-		children [
-
-			USE enehelft
-		]
-	rotation 0 1 0 3.1415927
-	translation	0 0 -0.07
-	}
-	Transform {
-
-		children [
-		DEF vlakdeel Shape {
-			appearance USE aluminium
-			geometry Box { size 0.18 0.07 0.01 }
-		}#shape
-		]
-	translation -0.03 0 -0.005
-	}
-
-	Transform {
-
-		children [
-		USE vlakdeel 
-		]
-	translation -0.03 0 -0.065
-	}
-
-
-
-	]
-
-translation 0.35 0 0.035
-rotation 0 0 1 1.5707963
-}#deurklink
-
-
-
-# /../boven/deurklink.wrl
-    translation 0.50 1 0
-}
-
-
-
-
-DEF ruitindeur Transform{
-children[
-		Shape {
-	appearance DEF glas Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      0.6 0.6 0.9
-	emissiveColor     0 0 0
-	shininess         0.8
-	specularColor     1 1 1 
-	transparency      0.7
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry Box { size	0.6	1.3	0.01	}
-}
-
-]
-translation	0.465	1.25	0
-}
-
-	]
-translation 1.26	0.05	-8.86
-}
-
-#ROUTE klikopachterdeur.touchTime TO TimeSourceachter.startTime
-#ROUTE TimeSourceachter.fraction_changed TO achterDeuropen.set_fraction
-#ROUTE achterDeuropen.value_changed TO achterdeur.rotation
-
-#schuurdeur
-DEF schuurdeur Transform {
-children [
-
-DEF klikopschuurdeur TouchSensor {}
-  DEF TimeSourceschuur TimeSensor { cycleInterval 20.0 } # Run once for 20 sec.
-  # Animeer het openzwaaien van de deur rond de Y as:
-  DEF schuurDeuropen OrientationInterpolator {
-       key      [ 0,      0.025,	0.05,	0.95,	0.975,       1.0 ]
-       keyValue [ 0 1 0 1.5707963, 0 1 0 2.4, 0 1 0 3.4, 0 1 0 3.4, 0 1 0 2.4, 0 1 0 1.5707963 ]
-  }
-
-Transform{
-    children[
-        Shape{
-            appearance 	USE deurkleur
-            geometry	USE deurInd
-        }
-    ]
-    scale 0.9139785	1	1   #maakt de deur op maat
-}
-
-USE ruitindeur
-
-Transform {
-    children USE deurklink
-    translation 0.43 1 0
-}
-
-
-]
-translation 3.53	0.05	6.35
-rotation 0 1 0 1.5707963
-}
-
-#ROUTE klikopschuurdeur.touchTime TO TimeSourceschuur.startTime
-#ROUTE TimeSourceschuur.fraction_changed TO schuurDeuropen.set_fraction
-#ROUTE schuurDeuropen.value_changed TO schuurdeur.rotation
-
-# /achterdeur.wrl
-
-
-
-
-# /deuren.wrl
-
-# ramen.wrl
-
-
-
-
-Transform {
-	children [
-		Shape {
-appearance DEF kozijn Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      0.95 0.95 0.9
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry Box { size	0.05 1.3 0.05 }
-}
-
-]
-translation	0.625 1.6 -0.14
-}
-
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	0.05 1.3 0.05 }
-}
-
-]
-translation	2.575 1.6 -0.14
-}
-
-
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	0.05 1.3 0.05 }
-}
-
-]
-translation	1.475 1.6 -0.14
-}
-
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	0.05 1.3 0.05 }
-}
-
-]
-translation	1.725 1.6 -0.14
-}
-
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	2 0.05 0.05 }
-}
-
-]
-translation	1.6 0.925 -0.14
-}
-
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	2 0.05 0.05 }
-}
-
-]
-translation	1.6 2.275 -0.14
-}
-
-#einde keukenraam
-
-#begin toiletraam
-
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	0.05 0.7 0.05 }
-}
-
-]
-translation	4.865 1.95 -0.14
-}
-
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	0.05 0.7 0.05 }
-}
-
-]
-translation	5.015 1.95 -0.14
-}
-
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	0.1 0.05 0.05 }
-}
-
-]
-translation	4.94 1.625 -0.14
-}
-
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	0.1 0.05 0.05 }
-}
-
-]
-translation	4.94 2.275 -0.14
-}
-
-#einde toiletraam
-#voordeur posten
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	0.05 2.26 0.05 }
-}
-
-]
-translation	3.215 1.17 -0.14
-}
-
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	0.05 2.26 0.05 }
-}
-
-]
-translation	4.395 1.17 -0.14
-}
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	1.13 0.05 0.05 }
-}
-
-]
-translation	3.805 2.275 -0.14
-}
-#einde deurposten
-#begin kozijnen achter
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	0.05 2.1 0.05 }
-}
-
-]
-translation	3.215 1.65 -8.86
-}
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	0.05 2.1 0.05 }
-}
-
-]
-translation	4.775	1.65 -8.86
-}
-
-Transform {
-	children [
-		Shape {
-appearance		DEF blauw Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      0.3 0.4 0.7
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-
-geometry	Box { size	1.51 0.5 0.05 }
-}
-
-]
-translation	3.995 2.45 -8.86
-}
-
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	1.51 0.05 0.05 }
-}
-
-]
-translation	3.995 0.625 -8.86
-}#1
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	1.51 0.05 0.05 }
-}
-
-]
-translation	3.995 2.175 -8.86
-}#2
-
-
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	0.94 0.05 0.05 }
-}
-
-]
-translation	2.72 0.625 -8.86
-}
-
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	1.99 0.05 0.05 }
-}
-
-]
-translation	2.195 2.675 -8.86
-}
-
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	1 0.05 0.05 }
-}
-
-]
-translation	1.725 2.175 -8.86
-}
-
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	0.05 2.61 0.05 }
-}
-
-]
-translation	1.225 1.345 -8.86
-}
-
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	0.05 2.61 0.05 }
-}
-
-]
-translation	2.225 1.345 -8.86
-}
-
-
-
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	0.05 1.5 0.05 }
-}
-
-]
-translation	3.565 1.4 -8.86
-}
-
-#einde ramen achter
-
-
-
-# /ramen.wrl
-
-# ruiten.wrl
-
-
-
-
-#begin vensterglas
-
-Transform {
-	children [
-		Shape {
-appearance DEF glas Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      0.6 0.6 0.9
-	emissiveColor     0 0 0
-	shininess         0.8
-	specularColor     1 1 1 
-	transparency      0.7
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry Box { size	0.94 2 0.01 }
-}
-
-]
-translation	2.72 1.65 -8.86
-}#ruit 5 achter
-
-#ruit1 keuken
-Transform {
-	children [
-		Shape {
-appearance USE glas
-geometry Box { size	0.8 1.3 0.01 }
-}
-
-]
-translation	1.05 1.6 -0.14
-}#ruit 1 keuken
-
-#ruit3 keuken
-Transform {
-	children [
-		Shape {
-appearance USE glas
-			geometry Box { size	0.8 1.3 0.01 }
-}
-
-]
-translation	2.15 1.6 -0.14
-}#ruit 3 keuken
-
-#ruit2 keuken
-Transform {
-	children [
-		Shape {
-appearance USE glas
-			geometry Box { size	0.2 1.3 0.01 }
-}
-
-]
-translation	1.6 1.6 -0.14
-}#ruit 2 keuken
-
-
-#toiletruit
-Transform {
-	children [
-		Shape {
-appearance USE glas
-			geometry Box { size	0.1 0.6 0.01 }
-}
-
-]
-translation	4.94 1.95 -0.14
-}#ruit van toiletraam
-
-#ramen achter
-
-
-
-
-Transform {
-	children [
-		Shape {
-appearance USE glas
-			geometry Box { size	1.16 1.5 0.01 }
-}
-
-]
-translation	4.17 1.4 -8.86
-}#ruit 3 achter
-
-Transform {
-	children [
-		Shape {
-appearance USE glas
-			geometry Box { size	0.3 1.5 0.01 }
-}
-
-]
-translation	3.39 1.4 -8.86
-}#ruit 4 achter
-
-Transform {
-	children [
-		Shape {
-appearance USE glas
-			geometry Box { size	0.95 0.45 0.01 }
-}
-
-]
-translation	1.725 2.425 -8.86
-}#ruit 6 achter
-
-# /ruiten.wrl
-
-
-# /beneden/beneden.wrl
-
-
-DEF boven Transform {
-children[
-
-Transform {
-children[
-
-Transform {
-children[
-	Shape {
-appearance DEF groen Appearance {
-	material         Material {
-	ambientIntensity  1
-	diffuseColor      0 1 0
-	emissiveColor     0 1 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry DEF pijl IndexedFaceSet {
-				color             NULL
-				coord  Coordinate {	#default NULL
-					point [
-						0 0 0,
-						0.2 0.2 0,
-						0.2 -0.2 0,
-						
+				Transform {
+					children [
+						Shape {
+							appearance DEF rood Appearance {
+								material Material {
+									ambientIntensity 1
+									diffuseColor 1 0 0
+									emissiveColor 1 0 0
+									shininess .1
+									specularColor 0 0 0
+									transparency 0
+								}
+								texture NULL
+								textureTransform NULL
+							}
+							geometry USE pijl
+						}
+						DEF schuifboven2 TouchSensor {
+						}
+					]
+					translation 5.48 2.95 .3
+				}
+				# boven/boven.wrl
+				Viewpoint {
+					fieldOfView 1
+					jump TRUE
+					orientation 1 0 0 0
+					position 2.5 3.75 -2.5
+					description "Ouderslaapkamer"
+				}
+				Viewpoint {
+					fieldOfView 1
+					jump TRUE
+					orientation 1 0 0 0
+					position 2.5 3.75 -5
+					description "Tweede slaapkamer"
+				}
+				Viewpoint {
+					fieldOfView 1
+					jump TRUE
+					orientation 1 0 0 0
+					position 4.5 3.75 -7
+					description "Kinderkamer"
+				}
+				Viewpoint {
+					fieldOfView 1
+					jump TRUE
+					orientation 1 0 0 0
+					position 4.5 3.75 -1.5
+					description "Badkamer"
+				}
+				#dak van schuur
+				Transform {
+					children [
+						Shape {
+							appearance DEF appdak Appearance {
+								material Material {
+									ambientIntensity 0
+									diffuseColor .2 .2 .2
+									emissiveColor 0 0 0
+									shininess 0
+									specularColor 0 0 0
+									transparency 0
+								}
+								texture ImageTexture {
+									url [
+										""
+									]
+									repeatS TRUE
+									repeatT TRUE
+								}
+							}
+							geometry Box {
+								size 2.24 .04 3.24
+							}
+						}
+					]
+					translation 4.6 2.62 6.2
+				}
+				DEF plafond Transform {
+					children [
+						Shape {
+							appearance Appearance {
+								material Material {
+									ambientIntensity .2
+									diffuseColor 1 1 1
+									emissiveColor 0 0 0
+									shininess .1
+									specularColor 0 0 0
+									transparency 0
+								}
+								texture NULL
+								textureTransform NULL
+							}
+							geometry IndexedFaceSet {
+								color NULL
+								coord Coordinate {
+									#default NULL
+									point [
+										.14 2.7 -.14, 5.54 2.7 -.14, 5.54 2.7 -8.86, .14 2.7 -8.86,
+										5.54 2.7 -2.36, #-4
+										5.54 2.7 -4.36, 4.42 2.7 -4.36, 4.42 2.7 -2.36,
+									]
+								}
+								normal NULL
+								texCoord NULL
+								ccw TRUE
+								colorIndex [
+								]
+								colorPerVertex TRUE
+								convex TRUE
+								coordIndex [
+									0 1 4 7 -1, 0 7 4 1 -1, 0 7 6 3 -1, 0 3 6 7 -1, 5 2 3 6 -1, 5 6 3 2 -1,
+								]
+								#default []
+								creaseAngle 0
+								normalIndex [
+								]
+								normalPerVertex TRUE
+								solid TRUE
+								texCoordIndex [
+								]
+							}
+						}
+					]
+				}
+				DEF vloerboven Transform {
+					children [
+						Shape {
+							appearance Appearance {
+								material Material {
+									ambientIntensity .2
+									diffuseColor 1 .5 .3
+									emissiveColor 0 0 0
+									shininess .1
+									specularColor 0 0 0
+									transparency 0
+								}
+								texture NULL
+								textureTransform NULL
+							}
+							geometry IndexedFaceSet {
+								color NULL
+								coord Coordinate {
+									#default NULL
+									point [
+										.14 2.8 -.14, 5.54 2.8 -.14, 5.54 2.8 -8.86, .14 2.8 -8.86,
+										5.54 2.8 -2.36, #-4
+										5.54 2.8 -4.36, 4.42 2.8 -4.36, 4.42 2.8 -2.36,
+									]
+								}
+								normal NULL
+								texCoord NULL
+								ccw TRUE
+								colorIndex [
+								]
+								colorPerVertex TRUE
+								convex TRUE
+								coordIndex [
+									0 1 4 7 -1, 0 7 4 1 -1, 0 7 6 3 -1, 0 3 6 7 -1, 5 2 3 6 -1, 5 6 3 2 -1,
+								]
+								#default []
+								creaseAngle 0
+								normalIndex [
+								]
+								normalPerVertex TRUE
+								solid TRUE
+								texCoordIndex [
+								]
+							}
+						}
+					]
+				}
+				DEF stukmuur1 Transform {
+					children [
+						Shape {
+							appearance DEF wandkleur Appearance {
+								material Material {
+									ambientIntensity .2
+									diffuseColor 1 .9 .7
+									emissiveColor 0 0 0
+									shininess .1
+									specularColor 0 0 0
+									transparency 0
+								}
+								texture NULL
+								textureTransform NULL
+							}
+							geometry Box {
+								size 2.84 2.5 .07
+							}
+						}
+					]
+					translation 1.7 4.05 -4.565
+				}
+				DEF stukmuur2 Transform {
+					children [
+						Shape {
+							appearance USE wandkleur
+							geometry Box {
+								size .07 2.5 .7
+							}
+						}
+					]
+					translation 3.155 4.05 -4.28
+				}
+				DEF stukmuur3 Transform {
+					children [
+						Shape {
+							appearance USE wandkleur
+							geometry Box {
+								size .07 2.68 3.57
+							}
+						}
 					]
+					translation 3.155 4.05 -7.215
 				}
-				normal            NULL
-				texCoord          NULL
-				ccw               TRUE
-				colorIndex        []
-				colorPerVertex    TRUE
-				convex            TRUE
-				coordIndex  [	0,1,2,-1, 
-				]     #default []
-				creaseAngle       0
-				normalIndex       []
-				normalPerVertex   TRUE
-				solid             FALSE
-				texCoordIndex     []
-			}
-}#shape
-]
-rotation 0 1 0 3.1415927
-}
-
-DEF schuifboven TouchSensor {}
-]
-translation 0.15 2.95 0.3
-}
-
-Transform {
-children[
-
-	Shape {
-appearance DEF rood Appearance {
-	material         Material {
-	ambientIntensity  1
-	diffuseColor      1 0 0
-	emissiveColor     1 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-
-geometry USE pijl
-}
-
-DEF schuifboven2 TouchSensor {}
-]
-
-translation 5.48 2.95 0.3
-}
-
-# boven/boven.wrl
-
-
-
-
-Viewpoint {
-	fieldOfView    1
-	jump           TRUE
-	orientation    1 0 0  0
-	position       2.5 3.75 -2.5
-
-	description    "Ouderslaapkamer"
-}
-
-Viewpoint {
-	fieldOfView    1
-	jump           TRUE
-	orientation    1 0 0  0
-	position       2.5 3.75 -5
-
-	description    "Tweede slaapkamer"
-}
-
-Viewpoint {
-	fieldOfView    1
-	jump           TRUE
-	orientation    1 0 0  0
-	position       4.5 3.75 -7
-
-	description    "Kinderkamer"
-}
-
-Viewpoint {
-	fieldOfView    1
-	jump           TRUE
-	orientation    1 0 0  0
-	position       4.5 3.75 -1.5
-
-	description    "Badkamer"
-}
-
-
-
-#dak van schuur
-
-Transform {
-children [
-Shape {
-appearance  DEF appdak Appearance {
-	 material          Material {
-  	ambientIntensity  0
-  	diffuseColor      0.2 0.2 0.2
-  	emissiveColor     0 0 0
-  	shininess         0
-  	specularColor     0 0 0 
-  	transparency      0
-			  }
-
-  texture           ImageTexture {
-  			  url     [""]
-  			  repeatS TRUE
-  			  repeatT TRUE
- 			  }
-}
-
-geometry Box { size 2.24 0.04 3.24	}
-}
-]
-translation 4.6 2.62 6.2
-}
-
-
-DEF plafond Transform {
-	children [
-		Shape {
-appearance Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      1 1 1
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry IndexedFaceSet {
-				color             NULL
-				coord  Coordinate {	#default NULL
-					point [
-						0.14	2.70	-0.14,
-						5.54	2.70	-0.14,
-						5.54	2.70	-8.86,
-						0.14	2.70	-8.86,
-
-						5.54	2.70	-2.36, #-4
-						5.54	2.70	-4.36,
-						4.42	2.70	-4.36,
-						4.42	2.70	-2.36,
-
+				DEF stukmuur4 Transform {
+					children [
+						Shape {
+							appearance USE wandkleur
+							geometry Box {
+								size .07 2.5 2.85
+							}
+						}
 					]
+					translation 3.155 4.05 -1.705
 				}
-				normal            NULL
-				texCoord          NULL
-				ccw               TRUE
-				colorIndex        []
-				colorPerVertex    TRUE
-				convex            TRUE
-				coordIndex  [
-		0, 1, 4, 7, -1, 
-		0, 7, 4, 1, -1, 
-
-		0, 7, 6, 3, -1,
-		0, 3, 6, 7, -1, 
-
-		5, 2, 3, 6, -1, 
-		5, 6, 3, 2, -1,
-]     #default []
-				creaseAngle       0
-				normalIndex       []
-				normalPerVertex   TRUE
-				solid             TRUE
-				texCoordIndex     []
-			}
-		}
-	]
-}
-
-
-
-DEF vloerboven Transform {
-	children [
-		Shape {
-appearance Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      1 0.5 0.3
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry IndexedFaceSet {
-				color             NULL
-				coord  Coordinate {	#default NULL
-					point [
-						0.14	2.80	-0.14,
-						5.54	2.80	-0.14,
-						5.54	2.80	-8.86,
-						0.14	2.80	-8.86,
-
-						5.54	2.80	-2.36, #-4
-						5.54	2.8	-4.36,
-						4.42	2.8	-4.36,
-						4.42	2.8	-2.36,
-
+				DEF stukmuur5 Transform {
+					children [
+						Shape {
+							appearance USE wandkleur
+							geometry Box {
+								size .42 2.5 .07
+							}
+						}
 					]
+					translation 3.4 4.05 -2.325
 				}
-				normal            NULL
-				texCoord          NULL
-				ccw               TRUE
-				colorIndex        []
-				colorPerVertex    TRUE
-				convex            TRUE
-				coordIndex  [
-		0, 1, 4, 7, -1, 
-		0, 7, 4, 1, -1, 
-
-		0, 7, 6, 3, -1,
-		0, 3, 6, 7, -1, 
-
-		5, 2, 3, 6, -1, 
-		5, 6, 3, 2, -1,
-]     #default []
-				creaseAngle       0
-				normalIndex       []
-				normalPerVertex   TRUE
-				solid             TRUE
-				texCoordIndex     []
-			}
-		}
-	]
-}
-
-
-
-
-DEF stukmuur1 Transform {
-children[
-	Shape {
-	appearance DEF wandkleur Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      1 0.9 0.7
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-		geometry 	Box {
-	size	2.84 2.50 0.07
+				DEF stukmuur6 Transform {
+					children [
+						Shape {
+							appearance USE wandkleur
+							geometry Box {
+								size .98 2.5 .07
+							}
+						}
+					]
+					translation 4.91 4.05 -2.325
 				}
-
-	}
- ]
-translation		1.7	4.05 -4.565
-}
-
-DEF stukmuur2 Transform {
-children[
-	Shape {
-	appearance USE wandkleur
-		geometry 	Box {
-	size	0.07 2.50 0.7
-				}
-
-	}
- ]
-translation		3.155	4.05 -4.28
-}
-
-
-DEF stukmuur3 Transform {
-children[
-	Shape {
-	appearance USE wandkleur
-		geometry 	Box {
-	size	0.07 2.68 3.57
-				}
-
-	}
- ]
-translation		3.155	4.05 -7.215
-}
-
-DEF stukmuur4 Transform {
-children[
-	Shape {
-	appearance USE wandkleur
-		geometry 	Box {
-	size	0.07 2.50 2.85
-				}
-
-	}
- ]
-translation		3.155	4.05 -1.705
-}
-
-DEF stukmuur5 Transform {
-children[
-	Shape {
-	appearance USE wandkleur
-		geometry 	Box {
-	size	0.42 2.50 0.07
-				}
-
-	}
- ]
-translation		3.4	4.05 -2.325
-}
-
-DEF stukmuur6 Transform {
-children[
-	Shape {
-	appearance USE wandkleur
-		geometry 	Box {
-	size	0.98 2.50 0.07
-				}
-
-	}
- ]
-translation		4.91	4.05 -2.325
-}
-
-DEF stukmuur7 Transform {
-children[
-	Shape {
-	appearance USE wandkleur
-		geometry 	Box {
-	size	1.34 2.50 0.07
-				}
-
-	}
- ]
-translation		4.73	4.05 -4.395
-}
-
-
-DEF stukmuur8 Transform {
-children[
-	Shape {
-	appearance USE wandkleur
-		geometry 	Box {
-	size	0.07 2.50 1.2
-				}
-
-	}
- ]
-translation		4.025	4.05 -4.96
-}
-
-DEF vulstukvoortrap Transform {
-	children [
-		Shape {
-appearance USE wandkleur
-
-			geometry IndexedFaceSet {
-				color             NULL
-				coord  Coordinate {	#default NULL
-					point [
-						4.42	2.7	-2.36,
-						4.42	2.7	-3.36,
-						4.42	2.8	-3.36,
-						4.42	2.8	-2.36,
+				DEF stukmuur7 Transform {
+					children [
+						Shape {
+							appearance USE wandkleur
+							geometry Box {
+								size 1.34 2.5 .07
+							}
+						}
 					]
+					translation 4.73 4.05 -4.395
 				}
-				normal            NULL
-				texCoord          NULL
-				ccw               TRUE
-				colorIndex        []
-				colorPerVertex    TRUE
-				convex            TRUE
-				coordIndex  [
-	0, 1, 2, 3, -1,
-	0, 3, 2, 1, -1,
-]     #default []
-				creaseAngle       0
-				normalIndex       []
-				normalPerVertex   TRUE
-				solid             TRUE
-				texCoordIndex     []
-			}
-		}
-	]
-}
-
-
-
-DEF paalvoortrap Transform {
-children[
-Shape {
-appearance 	USE wandkleur
-geometry	Box { size	0.07	2.50	0.07	}
-}
-]
-translation 4.385	4.05	-3.36
-}
-
-# deuren.wrl
-
-
-
-
-
-#Deuren boven
-
-#deur7
-Transform {
-children[ 
-
-#dwarslat boven de deur
-DEF dwarslat Transform {
-	children [
-		Shape {
-appearance DEF kozijn Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      0.95 0.95 0.9
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry Box { size	0.8 0.05 0.05 }
-}
-
-]
-translation	0 2.035 0
-}
-
-
-
-DEF ruitjeboven Transform {
-	children [
-		Shape {
-appearance DEF glas Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      0.6 0.6 0.9
-	emissiveColor     0 0 0
-	shininess         0.8
-	specularColor     1 1 1 
-	transparency      0.7
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry Box { size	0.8 0.44 0.01 }
-}
-
-]
-translation	0 2.28 0
-}#ruit boven de deur
-
-#deur
-DEF deuroudersgang Transform {
-center -0.4 0 0
-	children [
-
-
-
-	DEF klikopdeur7 TouchSensor {}
-  DEF TimeSource7 TimeSensor { cycleInterval 20.0 } # Run once for 20 sec.
-  # Animeer het openzwaaien van de deur rond de Y as:
-   DEF Deuropen7 OrientationInterpolator {
-       key      [ 0,      0.025,	0.05,	0.95,	0.975,       1.0 ]
-       keyValue [ 0 1 0 0, 0 1 0 -1, 0 1 0 -2, 0 1 0 -2, 0 1 0 -1, 0 1 0 0 ]
-  }
-
-
-DEF deurklink # deurklink.wrl
-
-
-
-
-
-DEF deurklink Transform {
-	children [
-	    DEF enehelft	Shape {
-            appearance DEF aluminium Appearance {
-                material         Material {
-                ambientIntensity  0.2
-                diffuseColor      0.4 0.4 0.5
-                emissiveColor     0 0 0
-                shininess         0.8
-                specularColor     0.4 0.4 0.5
-                }
-                texture           NULL
-                textureTransform  NULL
-            }
-		    geometry IndexedFaceSet {
-				color             NULL
-				coord  Coordinate {
-					point [
-                        -0.015	0.02	0, #0
-                        0.015		0.02	0,
-                        0.02		-0.02	0,
-                        -0.02		-0.02	0, #3
-
-                        -0.01		-0.015	0.06, #4
-                        0.01		-0.015	0.06,
-                        -0.01		0.015		0.03,
-                        0.01		0.015		0.03,
-
-                        0.005		0.1		0.035, #8
-                        -0.005	0.1		0.035,
-                        -0.005	0.1		0.055,
-                        0.005		0.1		0.055,
-
-
-
+				DEF stukmuur8 Transform {
+					children [
+						Shape {
+							appearance USE wandkleur
+							geometry Box {
+								size .07 2.5 1.2
+							}
+						}
 					]
+					translation 4.025 4.05 -4.96
 				}
-				normal            NULL
-				texCoord          NULL
-				ccw               TRUE
-				colorIndex        []
-				colorPerVertex    TRUE
-				convex            TRUE
-				coordIndex  [
-	
-2, 3, 4, 5, -1,
-2, 5, 4, 3, -1,
-
-4, 5, 11, 10, -1, 
-4, 10, 11, 5, -1,
-
-0, 1, 7, 6, -1, 
-0, 6, 7, 1, -1,
-
-6, 7, 8, 9, -1, 
-6, 9, 8, 7, -1,
-
-8, 9, 10, 11, -1, 
-8, 11, 10, 9, -1,
-
-0, 6, 4, 3, -1,
-0, 3, 4, 6, -1,
-
-6, 9, 10, 4, -1, 
-6, 4, 10, 9, -1,
-
-1, 2, 5, 7, -1,
-1, 7, 5, 2, -1,
-
-7, 5, 11, 8, -1,
-7, 8, 11, 5, -1,
-
-]     #default []
-				creaseAngle       0
-				normalIndex       []
-				normalPerVertex   TRUE
-				solid             TRUE
-				#texCoordIndex     []
-			}
-		}#enehelft
-
-	Transform {
-		children [
-
-			USE enehelft
-		]
-	rotation 0 1 0 3.1415927
-	translation	0 0 -0.07
-	}
-	Transform {
-
-		children [
-		DEF vlakdeel Shape {
-			appearance USE aluminium
-			geometry Box { size 0.18 0.07 0.01 }
-		}#shape
-		]
-	translation -0.03 0 -0.005
-	}
-
-	Transform {
-
-		children [
-		USE vlakdeel 
-		]
-	translation -0.03 0 -0.065
-	}
-
-
-
-	]
-
-translation 0.35 0 0.035
-rotation 0 0 1 1.5707963
-}#deurklink
-
-
-
-# /deurklink.wrl
-
-
-DEF deurvorm Shape {
-	appearance DEF deurkleur Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      0.8 0.8 0.8
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry Box { size	0.8 2 0.05 }
-}]
-translation	0 1.005 0
-}
-		
-]
-translation 3.155 2.8 -3.53
-rotation 0 1 0 1.5707963
-}
-
-#ROUTE klikopdeur7.touchTime TO TimeSource7.startTime
-#ROUTE TimeSource7.fraction_changed TO Deuropen7.set_fraction
-#ROUTE Deuropen7.value_changed TO deuroudersgang.rotation
-
-#deur8
-Transform {
-children[ 	USE dwarslat
-		USE ruitjeboven 
-
-#deur
-DEF deurtweedeslaapkamergang Transform {
-center -0.4 0 0
-	children [
-
-
-
-	DEF klikopdeur8 TouchSensor {}
-  DEF TimeSource8 TimeSensor { cycleInterval 20.0 } # Run once for 20 sec.
-  # Animeer het openzwaaien van de deur rond de Y as:
-   DEF Deuropen8 OrientationInterpolator {
-       key      [ 0,      0.025,	0.05,	0.95,	0.975,       1.0 ]
-       keyValue [ 0 1 0 0, 0 1 0 -1, 0 1 0 -2, 0 1 0 -2, 0 1 0 -1, 0 1 0 0 ]
-  }
-USE deurklink
-USE deurvorm
-]
-translation	0 1.005 0
-}
-		
-]
-translation 3.155 2.8 -5.03
-rotation 0 1 0 -1.5707963
-}
-
-#ROUTE klikopdeur8.touchTime TO TimeSource8.startTime
-#ROUTE TimeSource8.fraction_changed TO Deuropen8.set_fraction
-#ROUTE Deuropen8.value_changed TO deurtweedeslaapkamergang.rotation
-
-
-#deur9
-Transform {
-children[ 	USE dwarslat
-		USE ruitjeboven 
-
-#deur
-DEF deurkinderkamergang Transform {
-center -0.4 0 0
-	children [
-
-
-
-	DEF klikopdeur9 TouchSensor {}
-  DEF TimeSource9 TimeSensor { cycleInterval 20.0 } # Run once for 20 sec.
-  # Animeer het openzwaaien van de deur rond de Y as:
-   DEF Deuropen9 OrientationInterpolator {
-       key      [ 0,      0.025,	0.05,	0.95,	0.975,       1.0 ]
-       keyValue [ 0 1 0 0, 0 1 0 -1, 0 1 0 -2, 0 1 0 -2, 0 1 0 -1, 0 1 0 0 ]
-  }
-USE deurklink
-USE deurvorm
-]
-translation	0 1.005 0
-}
-		
-]
-translation 3.59 2.8 -5.465
-rotation 0 1 0 3.1415927
-}
-
-#ROUTE klikopdeur9.touchTime TO TimeSource9.startTime
-#ROUTE TimeSource9.fraction_changed TO Deuropen9.set_fraction
-#ROUTE Deuropen9.value_changed TO deurkinderkamergang.rotation
-
-
-#deur10
-Transform {
-children[ 	USE dwarslat
-		USE ruitjeboven 
-
-#deur
-DEF deurbadkamergang Transform {
-center -0.4 0 0
-	children [
-
-
-
-	DEF klikopdeur10 TouchSensor {}
-  DEF TimeSource10 TimeSensor { cycleInterval 20.0 } # Run once for 20 sec.
-  # Animeer het openzwaaien van de deur rond de Y as:
-   DEF Deuropen10 OrientationInterpolator {
-       key      [ 0,      0.025,	0.05,	0.95,	0.975,       1.0 ]
-       keyValue [ 0 1 0 0, 0 1 0 -1, 0 1 0 -2, 0 1 0 -2, 0 1 0 -1, 0 1 0 0 ]
-  }
-USE deurklink
-USE deurvorm
-]
-translation	0 1.005 0
-}
-		
-]
-translation 4.01 2.8 -2.325
-rotation 0 1 0 0
-}
-
-
-
-#ROUTE klikopdeur10.touchTime TO TimeSource10.startTime
-#ROUTE TimeSource10.fraction_changed TO Deuropen10.set_fraction
-#ROUTE Deuropen10.value_changed TO deurbadkamergang.rotation
-
-
-# /deuren.wrl
-
-# trapboven.wrl
-
-
-
-
-
-
-
-
-DEF trapboven Transform {
-	children [
-		Shape {
-appearance Appearance {
-	material          Material {
-	ambientIntensity  0.2
-	diffuseColor      1 0.5 0.3
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry DEF trap2 IndexedFaceSet {
-				color             NULL
-				coord  Coordinate {	#default NULL
-					point [
-	-0.2	0	1, #0
-	0	0.2	1,
-	0	0.2	0,
-	-0.2	0	0, #3
-
-	0.28	0.4	1, #4
-	0.6	0.6	1,
-	0.98	0.8	1,
-	0.98	1	0.45, #7
-
-	0.98	1.2	0.25, #8
-	0.98	1.4	0, 
-	0.98	1.6	-0.25, 
-	0.98	1.8	-0.45, #11
-
-	0.98	2.0	-1, #12
-	0.6	2.2	-1,
-	0.28	2.4	-1,
-	0	2.6	-1, #15
-
-	0	0.6	0, #16
-	0	0.8	0,
-	0	1	0, #18
-	0	1.2	0, #19
-
-	0	1.4	0, #20
-	0	1.6	0,
-	0	1.8	0, #22
-	0	2	0, #23
-
-	0	2.2	0, #24
-	0	2.4	0, 
-	0	2.6	0,  
-	0	2.8	0,  #27
-
-	-0.2	0.2	1, #28
-	0	0.4	1,
-	0	0.4	0,
-	-0.2	0.2	0, #31
-
-	0.28	0.6	1, #32
-	0.6	0.8	1,
-	0.98	1	1,
-	0.98	1.2	0.45, #35
-
-	0.98	1.4	0.25, #36
-	0.98	1.6	0, 
-	0.98	1.8	-0.25, 
-	0.98	2	-0.45, #39
-
-	0.98	2.2	-1, #40
-	0.6	2.4	-1,
-	0.28	2.6	-1,
-	0	2.8	-1, #43
-
-	0	0	1,
-	0	0	0, #45
-	0	0.4	0, #46
-
+				DEF vulstukvoortrap Transform {
+					children [
+						Shape {
+							appearance USE wandkleur
+							geometry IndexedFaceSet {
+								color NULL
+								coord Coordinate {
+									#default NULL
+									point [
+										4.42 2.7 -2.36, 4.42 2.7 -3.36, 4.42 2.8 -3.36, 4.42 2.8 -2.36,
+										
+									]
+								}
+								normal NULL
+								texCoord NULL
+								ccw TRUE
+								colorIndex [
+								]
+								colorPerVertex TRUE
+								convex TRUE
+								coordIndex [
+									0 1 2 3 -1, 0 3 2 1 -1,
+								]
+								#default []
+								creaseAngle 0
+								normalIndex [
+								]
+								normalPerVertex TRUE
+								solid TRUE
+								texCoordIndex [
+								]
+							}
+						}
 					]
 				}
-				normal            NULL
-				texCoord          NULL
-				ccw               TRUE
-				colorIndex        []
-				colorPerVertex    TRUE
-				convex            TRUE
-				coordIndex  [
-
-	28, 1, 2, 31, -1, #1e_treevlak
-	29, 4, 46, -1, #2e
-	32, 5, 16, -1,
-	33, 6, 17, -1,
-	34, 7, 18, -1, 
-	35, 8, 19, -1, 
-	36, 9, 20, -1, 
-	37, 10, 21, -1,
-	38, 11, 22, -1,
-	39, 12, 23, -1,
-	40, 13, 24, -1,
-	41, 14, 25, -1,
-	42, 15, 26, -1, #13e_treevlak
-
-#	0, 28, 31, 3, -1, #voor_en_zijvlakken_van_de_eerste_tree_komt_boven_niet_voor
-#	0, 44, 1, 28, -1,
-#	3, 31, 2, 45, -1,
-
-	2, 1, 29, 30, -1, #alle_voorvlakken
-	46, 4, 32, 16, -1,
-	16, 5, 33, 17, -1,
-	17, 6, 34, 18, -1,
-	18, 7, 35, 19, -1, 
-	19, 8, 36, 20, -1,
-	20, 9, 37, 21, -1,
-	21, 10, 38, 22, -1,
-	22, 11, 39, 23, -1,
-	23, 12, 40, 24, -1,
-	24, 13, 41, 25, -1,
-	25, 14, 42, 26, -1,
-	26, 15, 43, 27, -1,
-
-
-	
-
-]     #default []
-				creaseAngle       0
-				normalIndex       []
-				normalPerVertex   TRUE
-				solid             FALSE
-				texCoordIndex     []
-			}
-		}
-	]
-translation 4.42	2.6	-3.36
-}
-
-
-# /trapboven.wrl
-
-# buitmuur.wrl
-
-
-
-
-Transform {
-	children [
-		Shape {
-appearance DEF steen Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      0.8 0.4 0.3
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry IndexedFaceSet {
-				color             NULL
-				coord  Coordinate {	#default NULL
-					point [
-						0	0	0, #linkerbenedenhoek voorgevel
-						5.68	0	0,
-						5.68	5.40	0,
-						0	5.40	0, #linkerbovenhoek voorgevel
-
-						3.19	0	0, #voordeur
-						4.42	0	0,
-						4.42	2.30	0,
-						3.19	2.30	0, #voordeur
-
-						4.84	1.60	0, #toiletraam-8
-						5.04	1.60	0,
-						5.04	2.30	0,
-						4.84	2.30	0, 
-
-						2.60	0.90	0, #keukenraam-12
-						2.60	2.30	0,
-						0.60	2.30	0,
-						0.60	0.90	0,
-
-						0.60	3.60	0, #bovenraam-16
-						1.50	3.60	0,
-						1.50	5.0	0,
-						4.42	5.0	0,
-						4.42	5.40	0, 
-						0.60	5.40	0,
-
-						0	8.555	-3.15, #linkergevel-22
-						0	2.7	-9.0,
-						0	0	-9.0,
-
-						5.68	8.555	-3.15, #rechtergevel-25
-						5.68	5.40	-6.3,
-						5.68	5.40	-9,
-						5.68	0	-9.0,
-
-						2.25	0	-9.0, #achtergevel-29
-						2.25	0.6	-9.0,
-						4.8	0.6	-9.0,
-						4.8	5.40	-9.0,
-						1.2	0	-9.0,
-						1.2	2.7	-9,
-
-
-						3.19	0	-0.14, #diepte van de voordeur-35
-						4.42	0	-0.14,
-						4.42	2.30	-0.14,
-						3.19	2.30	-0.14, #diepte van de voordeur-38
-
-						2.60	0.90	-0.14, # diepte van het keukenraam-39
-						2.60	2.30	-0.14,
-						0.60	2.30	-0.14,
-						0.60	0.90	-0.14,
-
-						4.84	1.60	-0.14, #diepte van het toiletraam-43
-						5.04	1.60	-0.14,
-						5.04	2.30	-0.14,
-						4.84	2.30	-0.14, 
-
-						0.60	3.60	-0.14, #diepte van het bovenraam-47
-						1.50	3.60	-0.14,
-						1.50	5.0	-0.14,
-						4.42	5.0	-0.14,
-						4.42	5.40	-0.14, 
-						0.60	5.40	-0.14, #52
-
-						2.25	0	-8.86, #diepte van de achtergevel-53
-						2.25	0.6	-8.86,
-						4.8	0.6	-8.86,
-						4.8	5.40	-8.86,
-						1.2	0	-8.86,
-						1.2	2.7	-8.86,	#58
-
-						0	2.7	0, #59 extra punten voor segmentering beneden
-						0.14	2.7	-0.14,
-
-						5.68	2.7	0, #61
-						5.54	2.7	-0.14, #
-
-						0	2.7	-9, #63
-						0.14	2.7	-8.86, #
-
-						5.68	2.7	-9, #65
-						5.54	2.7	-8.86, #
-
-						1.2	2.7	-9, #67
-						1.2	2.7	-8.86, #
-
-						4.8	2.7	-9, #69
-						4.8	2.7	-8.86, #
-
-						0.14	5.4	-0.14, #71
-						5.54	5.4	-0.14, #72
-						5.54	5.4	-8.86, #73
-						0.14	2.7	-9, #74
-						0.14	5.4	-6.3, #75
-						0	5.4	-6.3, #76
-
+				DEF paalvoortrap Transform {
+					children [
+						Shape {
+							appearance USE wandkleur
+							geometry Box {
+								size .07 2.5 .07
+							}
+						}
 					]
+					translation 4.385 4.05 -3.36
 				}
-				normal            NULL
-				texCoord          NULL
-				ccw               TRUE
-				colorIndex        []
-				colorPerVertex    TRUE
-				convex            TRUE
-				coordIndex  [
-		16, 21, 3, 59, -1,
-
-		19, 2, 20, -1,
-
-		2, 19, 61, -1,
-
-		65, 27, 2, 61, -1, 
-
-		59, 3, 76, 23, -1,
-
-		17, 48, 47, 16, -1,
-
-		18, 49, 48, 17, -1,
-
-		19, 50, 49, 18, -1,
-
-		20, 51, 50, 19, -1,
-
-		16, 47, 52, 21, -1,
-
-		3, 21, 52, 71, -1, 
-
-		20, 2, 72, 51, -1,
-
-		2, 27, 73, 72, -1,
-
-		27, 32, 56, 73, -1,
-
-		63, 64, 75, 76, -1,
-
-		3, 76, 75, 71, -1,
-
-		#27, 32, 69, 65, -1,
-		27, 65, 69, 32, -1,
-
-		32, 69, 70, 56, -1,
-
-		59, 17, 16, -1,
-
-		59, 61, 17, -1,
-
-		17, 61 , 18. -1,
-
-		18, 61, 19, -1,
-
-
-]     #default []
-				creaseAngle       0
-				normalIndex       []
-				normalPerVertex   TRUE
-				solid             FALSE
-				texCoordIndex     []
-			}
-		}
-	]
-}
-
-
-
-# /buitmuur.wrl
-
-# binmuur.wrl
-
-
-
-
-Transform {
-	children [
-		Shape {
-appearance Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      1 0.9 0.7
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry IndexedFaceSet {
-				color             NULL
-				coord  Coordinate {	#default NULL
-					point [
-						0.28	0	-0.28, #0 linkerbenedenhoek voorgevel
-						5.40	0	-0.28,
-						5.40	5.40	-0.28,
-						0.28	5.40	-0.28, #3 linkerbovenhoek voorgevel
-
-						3.19	0	-0.28, #4 voordeur
-						4.42	0	-0.28,
-						4.42	2.30	-0.28,
-						3.19	2.30	-0.28, #7 voordeur
-
-						4.84	1.60	-0.28, #toiletraam-8
-						5.04	1.60	-0.28,
-						5.04	2.30	-0.28,
-						4.84	2.30	-0.28, 
-
-						2.60	0.90	-0.28, #keukenraam-12
-						2.60	2.30	-0.28,
-						0.60	2.30	-0.28,
-						0.60	0.90	-0.28,
-
-						0.60	3.60	-0.28, #bovenraam-16
-						1.50	3.60	-0.28,
-						1.50	5.0	-0.28,
-						4.42	5.0	-0.28,
-						4.42	5.40	-0.28, 
-						0.60	5.40	-0.28,
-
-						0.28	8.55	-3.15, #linkergevel-22
-						0.28	2.70	-8.72,
-						0.28	0	-8.72,
-
-						5.40	8.55	-3.15, #rechtergevel-25
-						5.40	5.40	-6.30,
-						5.40	5.40	-8.72,
-						5.40	0	-8.72,
-
-						2.25	0	-8.72, #achtergevel-29
-						2.25	0.6	-8.72,
-						4.8	0.6	-8.72,
-						4.8	5.40	-8.72,
-						1.2	0	-8.72,
-						1.2	2.70	-8.72,
-
-
-						3.19	0	-0.14, #diepte van de voordeur-35
-						4.42	0	-0.14,
-						4.42	2.30	-0.14,
-						3.19	2.30	-0.14, #diepte van de voordeur-38
-
-						2.60	0.90	-0.14, # diepte van het keukenraam-39
-						2.60	2.30	-0.14,
-						0.60	2.30	-0.14,
-						0.60	0.90	-0.14,
-
-						4.84	1.60	-0.14, #diepte van het toiletraam-43
-						5.04	1.60	-0.14,
-						5.04	2.30	-0.14,
-						4.84	2.30	-0.14, 
-
-						0.60	3.60	-0.14, #diepte van het bovenraam-47
-						1.50	3.60	-0.14,
-						1.50	5.0	-0.14,
-						4.42	5.0	-0.14,
-						4.42	5.40	-0.14, 
-						0.60	5.40	-0.14, #52
-
-						2.25	0	-8.86, #diepte van de achtergevel-53
-						2.25	0.6	-8.86,
-						4.8	0.6	-8.86,
-						4.8	5.40	-8.86,
-						1.2	0	-8.86,
-						1.2	2.70	-8.86,	#58
-
-						0.28	5.40	0,	#59 hoekpunt voor dakvorm zolder
-						5.40	5.40	0,
-						0.28	5.40	-6.30, #61
-						0.28	2.70	-9.0,  #62 hoekpunt voor dakvorm 1e verdieping
-
-						0.28	2.7	-0.28, #63 extra punten voor segmentering boven
-						0.14	2.7	-0.14,
-
-						5.4	2.7	-0.28, #65
-						5.54	2.7	-0.14, #
-
-						0.28	2.7	-8.72, #67
-						0.14	2.7	-8.86, #
-
-						5.4	2.7	-8.72, #69
-						5.54	2.7	-8.86, #
-
-						1.2	2.7	-8.72, #71
-						1.2	2.7	-8.86, #
-
-						4.8	2.7	-8.72, #73
-						4.8	2.7	-8.86, #
-
-						0.14	5.4	-0.14, #75
-						5.54	5.4	-0.14, #76
-						5.54	5.4	-8.86, #77
-						0.14	2.7	-9, #78
-						0.14	5.4	-6.3, #79
-
+				# deuren.wrl
+				#Deuren boven
+				#deur7
+				Transform {
+					children [
+						#dwarslat boven de deur
+						DEF dwarslat Transform {
+							children [
+								Shape {
+									appearance DEF kozijn Appearance {
+										material Material {
+											ambientIntensity .2
+											diffuseColor .95 .95 .9
+											emissiveColor 0 0 0
+											shininess .1
+											specularColor 0 0 0
+											transparency 0
+										}
+										texture NULL
+										textureTransform NULL
+									}
+									geometry Box {
+										size .8 .05 .05
+									}
+								}
+							]
+							translation 0 2.035 0
+						}
+						DEF ruitjeboven Transform {
+							children [
+								Shape {
+									appearance DEF glas Appearance {
+										material Material {
+											ambientIntensity .2
+											diffuseColor .6 .6 .9
+											emissiveColor 0 0 0
+											shininess .8
+											specularColor 1 1 1
+											transparency .7
+										}
+										texture NULL
+										textureTransform NULL
+									}
+									geometry Box {
+										size .8 .44 .01
+									}
+								}
+							]
+							translation 0 2.28 0
+						}
+						#ruit boven de deur
+						#deur
+						DEF deuroudersgang Transform {
+							center -.4 0 0
+							children [
+								DEF klikopdeur7 TouchSensor {
+								}
+								DEF TimeSource7 TimeSensor {
+									cycleInterval 20
+								}
+								# Run once for 20 sec.
+								# Animeer het openzwaaien van de deur rond de Y as:
+								DEF Deuropen7 OrientationInterpolator {
+									key [
+										0 .025 .05 .95 .975 1
+									]
+									keyValue [
+										0 1 0 0 0 1 0 -1 0 1 0 -2 0 1 0 -2 0 1 0 -1 0 1 0 0
+									]
+								}
+								DEF deurklink Transform {
+									children [
+										DEF enehelft Shape {
+											appearance DEF aluminium Appearance {
+												material Material {
+													ambientIntensity .2
+													diffuseColor .4 .4 .5
+													emissiveColor 0 0 0
+													shininess .8
+													specularColor .4 .4 .5
+												}
+												texture NULL
+												textureTransform NULL
+											}
+											geometry IndexedFaceSet {
+												color NULL
+												coord Coordinate {
+													point [
+														-.015 .02 0, #0
+														.015 .02 0, .02 -.02 0, -.02 -.02 0, #3
+														-.01 -.015 .06, #4
+														.01 -.015 .06, -.01 .015 .03, .01 .015 .03, .005 .1 .035,
+														#8
+														-.005 .1 .035, -.005 .1 .055, .005 .1 .055,
+													]
+												}
+												normal NULL
+												texCoord NULL
+												ccw TRUE
+												colorIndex [
+												]
+												colorPerVertex TRUE
+												convex TRUE
+												coordIndex [
+													2 3 4 5 -1, 2 5 4 3 -1, 4 5 11 10 -1, 4 10 11 5 -1, 0 1 7 6 -1, 0 6 7 1 -1,
+													6 7 8 9 -1, 6 9 8 7 -1, 8 9 10 11 -1, 8 11 10 9 -1, 0 6 4 3 -1, 0 3 4 6 -1,
+													6 9 10 4 -1, 6 4 10 9 -1, 1 2 5 7 -1, 1 7 5 2 -1, 7 5 11 8 -1, 7 8 11 5 -1,
+													
+												]
+												#default []
+												creaseAngle 0
+												normalIndex [
+												]
+												normalPerVertex TRUE
+												solid TRUE #texCoordIndex     []
+											}
+										}
+										#enehelft
+										Transform {
+											children [
+												USE enehelft
+											]
+											rotation 0 1 0 3.141592
+											translation 0 0 -.07
+										}
+										Transform {
+											children [
+												DEF vlakdeel Shape {
+													appearance USE aluminium
+													geometry Box {
+														size .18 .07 .01
+													}
+												}
+												#shape
+											]
+											translation -.03 0 -.005
+										}
+										Transform {
+											children [
+												USE vlakdeel
+											]
+											translation -.03 0 -.065
+										}
+									]
+									translation .35 0 .035
+									rotation 0 0 1 1.570796
+								}
+								#deurklink
+								# /deurklink.wrl
+								DEF deurvorm Shape {
+									appearance DEF deurkleur Appearance {
+										material Material {
+											ambientIntensity .2
+											diffuseColor .8 .8 .8
+											emissiveColor 0 0 0
+											shininess .1
+											specularColor 0 0 0
+											transparency 0
+										}
+										texture NULL
+										textureTransform NULL
+									}
+									geometry Box {
+										size .8 2 .05
+									}
+								}
+							]
+							translation 0 1.005 0
+						}
 					]
+					translation 3.155 2.8 -3.53
+					rotation 0 1 0 1.570796
 				}
-				normal            NULL
-				texCoord          NULL
-				ccw               TRUE
-				colorIndex        []
-				colorPerVertex    TRUE
-				convex            TRUE
-				coordIndex  [
-
-
-
-		16, 21, 3, 63, -1,
-
-		19, 2, 20, -1,
-
-		63, 16, 17, 65, -1,
-
-		17, 18, 19, 65, -1,
-
-		2, 19, 65, -1,
-
-		69, 27, 2, 65, -1, 
-
-		63, 3, 61, 62, -1,
-
-		16, 47, 48, 17, -1,
-
-		17, 48, 49, 18, -1,
-
-		18, 49, 50, 19, -1, 
-
-		19, 50, 51, 20, -1, 
-
-		21, 52, 47, 16, -1,
-
-		73, 74, 56, 32, -1,
-
-		69, 73, 32, 27, -1,
-
-		3, 21, 52, 75 -1,
-
-		20, 2, 76, 51, -1,
-
-		3, 61, 79, 75, -1,
-
-		2, 27, 77, 76, -1,
-
-		62, 61, 79, 78, -1,
-
-		27, 32, 56, 77, -1,
-
-
-
-]     #default []
-				creaseAngle       0
-				normalIndex       []
-				normalPerVertex   TRUE
-				solid             FALSE
-				texCoordIndex     []
-			}
-		}
-	]
-}
-
-
-
-# /binmuur.wrl
-
-# ramen.wrl
-
-
-
-
-
-
-#begin bovenraam
-
-Transform {
-	children [
-		Shape {
-appearance DEF kozijn Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      0.95 0.95 0.9
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-
-geometry	Box { size	3.82 0.05 0.05 }
-}
-
-]
-translation	2.51 5.025 -0.14
-}
-
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	3.82 0.1 0.05 }
-}
-
-]
-translation	2.51 5.35 -0.14
-}
-
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	0.05 1.8 0.05 }
-}
-
-]
-translation	0.625 4.5 -0.14
-}
-
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	0.05 1.8 0.05 }
-}
-
-]
-translation	1.475 4.5 -0.14
-}
-
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	0.05 0.25 0.05 }
-}
-
-]
-translation	4.395 5.175 -0.14
-}
-
-Transform {
-	children [
-		Shape {
-appearance DEF blauw Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      0.3 0.4 0.7
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-
-geometry	Box { size	0.9 0.25 0.05 }
-}
-
-]
-translation	3.05 5.175 -0.14
-}
-
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	0.9 0.05 0.05 }
-}
-
-]
-translation	1.05 3.625 -0.14
-}
-
-#einde bovenraam
-#begin kozijnen achter
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	0.05 2.4 0.05 }
-}
-
-]
-translation	3.215 3.9 -8.86
-}
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	0.05 2.4 0.05 }
-}
-
-]
-translation	4.775 3.9 -8.86
-}
-Transform {
-	children [
-		Shape {
-appearance	USE blauw 
-geometry	Box { size	1.61 0.3 0.05 }
-}
-
-]
-translation	3.995 5.25 -8.86
-}
-Transform {
-	children [
-		Shape {
-appearance	USE blauw 
-geometry	Box { size	1.51 0.8 0.05 }
-}
-
-]
-translation	3.995 3.1 -8.86
-}
-
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	1.51 0.05 0.05 }
-}
-
-]
-translation	3.995 3.525 -8.86
-}#3
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	1.51 0.05 0.05 }
-}
-
-]
-translation	3.995 5.075 -8.86
-}#4
-
-
-
-
-
-
-
-Transform {
-	children [
-		Shape {
-appearance	USE kozijn 
-geometry	Box { size	0.05 1.5 0.05 }
-}
-
-]
-translation	3.565 4.3 -8.86
-}
-
-
-
-#einde ramen achter
-
-
-
-# /ramen.wrl
-
-# ruiten.wrl
-
-
-
-
-
-
-#bovenruiten
-Transform {
-	children [
-		Shape {
-appearance DEF glas Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      0.6 0.6 0.9
-	emissiveColor     0 0 0
-	shininess         0.8
-	specularColor     1 1 1 
-	transparency      0.7
-}	texture           NULL
-	textureTransform  NULL
-}
-
-			geometry Box { size	0.8 1.35 0.01 }
-}
-
-]
-translation	1.05 4.325 -0.14
-}#ruit 1 boven
-
-Transform {
-	children [
-		Shape {
-appearance USE glas
-			geometry Box { size	0.8 0.3 0.01 }
-}
-
-]
-translation	1.05 5.2 -0.14
-}#ruit 2 boven
-
-Transform {
-	children [
-		Shape {
-appearance USE glas
-			geometry Box { size	1.1 0.3 0.01 }
-}
-
-]
-translation	2.05 5.2 -0.14
-}#ruit 3 boven
-
-Transform {
-	children [
-		Shape {
-appearance USE glas
-			geometry Box { size	0.85 0.3 0.01 }
-}
-
-]
-translation	3.935 5.2 -0.14
-}#ruit 4 boven
-
-
-
-#ramen achter
-Transform {
-	children [
-		Shape {
-appearance USE glas
-			geometry Box { size	1.16 1.5 0.01 }
-}
-
-]
-translation	4.17 4.3 -8.86
-}#ruit 1 achter
-
-Transform {
-	children [
-		Shape {
-appearance USE glas
-			geometry Box { size	0.3 1.5 0.01 }
-}
-
-]
-translation	3.39 4.3 -8.86
-}#ruit 2 achter
-
-
-
-# /ruiten.wrl
-
-# /boven/boven.wrl
-
-
-
-DEF zolder Transform {
-children[
-
-Transform {
-children[
-
-Transform{
-children[
-	Shape {
-appearance USE groen
-geometry USE pijl
-}
-]
-rotation 0 1 0 3.1415927
-}
-
-DEF schuifzolder TouchSensor {}
-]
-translation 0.15 5.4 0.3
-}
-
-Transform {
-children[
-
-	Shape {
-appearance USE rood
-geometry USE pijl
-}
-
-DEF schuifzolder2 TouchSensor {}
-]
-translation 5.48 5.4 0.3
-}
-
-DEF dak Transform {
-children [
-# dak/dak.wrl
-
-
-
-
-Transform {
-	children [
-		Shape {
-appearance Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      0.3 0.4 0.5
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry IndexedFaceSet {
-				color             NULL
-				coord  Coordinate {	#default NULL
-					point [
-					0	5.4	0, #dakranden-0
-					5.68	5.4	0,
-					5.68	8.55	-3.15,
-					0	8.55	-3.15,
-					0	2.7	-9,
-					3.12	2.7	-9,
-					3.12	5.4	-6.30,
-					5.68	5.4	-6.30, #7
-
-					1.5	3.7	-8, #dakraam1-8
-					2.3	3.7	-8,
-					2.3	4.7	-7,
-					1.5	4.7	-7,
-
-					4.1	7.3	-1.9,  #dakraam2-12
-					3.5	7.3	-1.9, 
-					3.5	7.7	-2.3, 
-					4.1	7.7	-2.3, #15
-
-					0	5.44	0.04, #dikte van dakranden-16
-					5.68	5.44	0.04,
-					5.68	8.6065685	-3.15,
-					0	8.6065685	-3.15,
-					0	2.74	-9.04,
-					3.12	2.74	-9.04,
-					3.12	5.44	-6.34,
-					5.68	5.44	-6.34, #23	
-
-					1.5	3.74	-8.04, #dikte van het dakraam1-24
-					2.3	3.74	-8.04,
-					2.3	4.74	-7.04,
-					1.5	4.74	-7.04, #27	
-
-					4.1	7.34	-1.86,  #dikte van het dakraam2-28
-					3.5	7.34	-1.86, 
-					3.5	7.74	-2.26,
-					4.1	7.74	-2.26, #31
-			
+				#moved to end
+				#ROUTE klikopdeur7.touchTime TO TimeSource7.startTime
+				#ROUTE TimeSource7.fraction_changed TO Deuropen7.set_fraction
+				#ROUTE Deuropen7.value_changed TO deuroudersgang.rotation
+				#deur8
+				Transform {
+					children [
+						USE dwarslat
+						USE ruitjeboven
+						#deur
+						DEF deurtweedeslaapkamergang Transform {
+							center -.4 0 0
+							children [
+								DEF klikopdeur8 TouchSensor {
+								}
+								DEF TimeSource8 TimeSensor {
+									cycleInterval 20
+								}
+								# Run once for 20 sec.
+								# Animeer het openzwaaien van de deur rond de Y as:
+								DEF Deuropen8 OrientationInterpolator {
+									key [
+										0 .025 .05 .95 .975 1
+									]
+									keyValue [
+										0 1 0 0 0 1 0 -1 0 1 0 -2 0 1 0 -2 0 1 0 -1 0 1 0 0
+									]
+								}
+								USE deurklink
+								USE deurvorm
+							]
+							translation 0 1.005 0
+						}
 					]
+					translation 3.155 2.8 -5.03
+					rotation 0 1 0 -1.570796
 				}
-				normal            NULL
-				texCoord          NULL
-				ccw               TRUE
-				colorIndex        []
-				colorPerVertex    TRUE
-				convex            TRUE
-				coordIndex  [
-
-
-	0, 13, 14, 3, -1,
-	0, 3, 14, 13, -1,
-
-	16, 29, 30, 19, -1,
-	16, 19, 30, 29, -1,
-
-	0, 1, 12, 13, -1, 
-	0, 13, 12, 1, -1,
-
-	16, 17, 28, 29, -1,
-	16, 29, 28, 17, -1,
-
-	1, 12, 15, 2, -1, 
-	1, 2, 15, 12, -1,
-
-	17, 28, 31, 18, -1,
-	17, 18, 31, 28, -1,
-
-	15, 2, 3, 14, -1, 
-	15, 14, 3, 2, -1,
-
-	31, 18, 19, 30, -1,
-	31, 30, 19, 18, -1,
-	
-	4, 8, 11, 3, -1, 
-	4, 3, 11, 8, -1, 
-
-	20, 24, 27, 19, -1,
-	20, 19, 27, 24, -1,
-
-	5, 4, 8, 9, -1, 
-	5, 9, 8, 4, -1, 
-
-	21, 20, 24, 25, -1,
-	21, 25, 24, 20, -1, 
-
-	5, 9, 10, 6, -1,
-	5, 6, 10, 9, -1,
-
-	21, 25, 26, 22, -1,
-	21, 22, 26, 25, -1,
-
-	7, 6, 2, -1, 
-	7, 2, 6, -1,
-
-	23, 22, 18, -1,
-	23, 18, 22, -1,
-
-	6, 10, 11, 3, 2, -1,
-	6, 2, 3, 11, 10, -1,
-
-	22, 26, 18, -1,
-	22, 18, 26, -1,
-
-	26, 27, 19, -1,
-	26, 19, 27, -1, 
-
-	26, 19, 18, -1,
-	26, 18, 19, -1,
-
-	0, 1, 17, 16, -1,
-	0, 16, 17, 1, -1,
-
-	1, 2, 18, 17, -1,
-	1, 17, 18, 2, -1, 
-
-	3, 0, 16, 19, -1, 
-	3, 19, 16, 0, -1,
-
-	2, 7, 23, 18, -1,
-	2, 18, 23, 7, -1, 
-
-	7, 6, 22, 23, -1, 
-	7, 23, 22, 6, -1,
-
-	5, 6, 22, 21, -1, 
-	5, 21, 22, 6, -1,
-
-	5, 4, 20, 21, -1,
-	5, 21, 20, 4, -1,
-
-	4, 3, 19, 20, -1, 
-	4, 20, 19, 3, -1,
-
-	9, 8, 24, 25, -1,
-	9, 25, 24, 8, -1,
-
-	8, 11, 27, 24, -1,
-	8, 24, 27, 11, -1,
-
-	10, 11, 27, 26, -1,
-	10, 26, 27, 11, -1,
-
-	9, 10, 26, 25, -1, 
-	9, 25, 26, 10, -1,
-
-	12, 13, 29, 28, -1,
-	12, 28, 29, 13, -1,
-
-	12, 15, 31, 28, -1, 
-	12, 28, 31, 15, -1,
-
-	14, 15, 31, 30, -1, 
-	14, 30, 31, 15, -1,
-
-	13, 14, 30, 29, -1,
-	13, 29, 30, 14, -1,
-
-
-
-
-]     #default []
-				creaseAngle       0
-				normalIndex       []
-				normalPerVertex   TRUE
-				solid             TRUE
-				texCoordIndex     []
-			}
-		}
-	]
-}
-
-
-#schoorsteen
-
-Transform {
-	children [
-		Shape {
-appearance Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      0.1 0.1 0.1
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0.3 0.3 0.3
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry IndexedFaceSet {
-				color             NULL
-				coord  Coordinate {	#default NULL
-					point [
-		4.8	8	-2.6,
-		5.3	8	-2.6,
-		5.3	8.4	-3.0,
-		4.8	8.4	-3.0,
-
-		4.9	9.4	-2.65,
-		5.2	9.4	-2.65,
-		5.2	9.4	-2.95,	
-		4.9	9.4	-2.95, ]
-	}
-				normal            NULL
-				texCoord          NULL
-				ccw               TRUE
-				colorIndex        []
-				colorPerVertex    TRUE
-				convex            TRUE
-				coordIndex  [
-		0, 1, 5, 4, -1, 
-		0, 4, 5, 1, -1, 
-
-		1, 2, 6, 5, -1, 
-		1, 5, 6, 2, -1,
-
-		2, 3, 7, 6, -1,
-		2, 6, 7, 3, -1,
-
-		0, 3, 7, 4, -1,
-		0, 4, 7, 3, -1, 
-
-		4, 5, 6, 7, -1, 
-		4, 7, 6, 5, -1,
-
-
-]     #default []
-				creaseAngle       0
-				normalIndex       []
-				normalPerVertex   TRUE
-				solid             TRUE
-				texCoordIndex     []
-			}
-		}
-	]
-}
-
-
-
-
-
-
-# /dak/dak.wrl
-
-Transform {
-children[
-
-
-Transform{
-children[
-
-	Shape {
-appearance USE groen
-geometry USE pijl
-}
-
-]
-rotation 0 1 0 3.1415927
-}
-
-DEF schuifdak TouchSensor {}
-
-]
-translation 0.15 6 0.3
-}
-
-
-Transform {
-children[
-
-	Shape {
-appearance USE rood
-geometry USE pijl
-}
-
-DEF schuifdak2 TouchSensor {}
-]
-translation 5.48 6 0.3
-}
-
-DEF tijd1 TimeSensor {
-	cycleInterval 4
-	enabled       TRUE
-	loop          FALSE
-	startTime     0
-	stopTime      0
-}
-
-DEF plaats1 PositionInterpolator {
-	key           [0, 1]
-	keyValue      [0 0 0 ,6 0 0]
-}
-
-DEF tijd1a TimeSensor {
-	cycleInterval 4
-	enabled       TRUE
-	loop          FALSE
-	startTime     0
-	stopTime      0
-}
-
-DEF plaats1a PositionInterpolator {
-	key           [0, 1]
-	keyValue      [6 0 0 ,0 0 0]
-}
-
-
-
-]
-}#dak
-
-# zolder/zolder.wrl
-
-
-
-Viewpoint {
-	fieldOfView    1
-	jump           TRUE
-	orientation    1 0 0  0
-	position       2.5 7 -3.15
-
-	description    "op zolder"
-}
-
-#kleine platte dakje
-
-Transform {
-children [
-Shape {
-appearance DEF appdak Appearance {
-	 material          Material {
-  	ambientIntensity  0
-  	diffuseColor      0.2 0.2 0.2
-  	emissiveColor     0 0 0
-  	shininess         0
-  	specularColor     0 0 0 
-  	transparency      0
-			  }
-
-  texture           ImageTexture {
-  			  url     [""]
-  			  repeatS TRUE
-  			  repeatT TRUE
- 			  }
-}
-geometry Box { size 2.6 0.04 2.74	}
-}
-]
-translation 4.39 5.40 -7.67
-}
-
-
-DEF zoldervloer Transform {
-	children [
-		Shape {
-appearance Appearance {
-	material          Material {
-	ambientIntensity  0.2
-	diffuseColor      1 0.5 0.3
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry IndexedFaceSet {
-				color             NULL
-				coord  Coordinate {	#default NULL
-					point [
-						0.14	5.40	0,
-						5.54	5.40	0,
-						5.54	5.40	-6.30,
-						0.14	5.40	-6.30,
-
-						5.54	5.40	-2.36, #-4
-						5.54	5.40	-4.36,
-						4.42	5.40	-4.36,
-						4.42	5.40	-2.36,
-
-
+				#moved to end
+				#ROUTE klikopdeur8.touchTime TO TimeSource8.startTime
+				#ROUTE TimeSource8.fraction_changed TO Deuropen8.set_fraction
+				#ROUTE Deuropen8.value_changed TO deurtweedeslaapkamergang.rotation
+				#deur9
+				Transform {
+					children [
+						USE dwarslat
+						USE ruitjeboven
+						#deur
+						DEF deurkinderkamergang Transform {
+							center -.4 0 0
+							children [
+								DEF klikopdeur9 TouchSensor {
+								}
+								DEF TimeSource9 TimeSensor {
+									cycleInterval 20
+								}
+								# Run once for 20 sec.
+								# Animeer het openzwaaien van de deur rond de Y as:
+								DEF Deuropen9 OrientationInterpolator {
+									key [
+										0 .025 .05 .95 .975 1
+									]
+									keyValue [
+										0 1 0 0 0 1 0 -1 0 1 0 -2 0 1 0 -2 0 1 0 -1 0 1 0 0
+									]
+								}
+								USE deurklink
+								USE deurvorm
+							]
+							translation 0 1.005 0
+						}
 					]
+					translation 3.59 2.8 -5.465
+					rotation 0 1 0 3.141592
 				}
-				normal            NULL
-				texCoord          NULL
-				ccw               TRUE
-				colorIndex        []
-				colorPerVertex    TRUE
-				convex            TRUE
-				coordIndex  [
-		0, 1, 4, 7, -1, 
-		0, 7, 4, 1, -1, 
-
-		0, 7, 6, 3, -1,
-		0, 3, 6, 7, -1, 
-
-		5, 2, 3, 6, -1, 
-		5, 6, 3, 2, -1,
-]     #default []
-				creaseAngle       0
-				normalIndex       []
-				normalPerVertex   TRUE
-				solid             TRUE
-				texCoordIndex     []
-			}
-		}
-	]
-}
-
-DEF plafondboven Transform {
-	children [
-		Shape {
-appearance Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      1 1 1 
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry IndexedFaceSet {
-				color             NULL
-				coord  Coordinate {	#default NULL
-					point [
-						0.14	5.30	-0.14,
-						5.54	5.30	-0.14,
-						5.54	5.30	-8.86,
-						3.19	5.30	-8.86,
-
-						5.54	5.30	-2.36, #-4
-						5.54	5.30	-4.36,
-						4.42	5.30	-4.36,
-						4.42	5.30	-2.36,
-
-						3.19	5.30	-6.40,
-						0.14	5.30	-6.40,
+				#moved to end
+				#ROUTE klikopdeur9.touchTime TO TimeSource9.startTime
+				#ROUTE TimeSource9.fraction_changed TO Deuropen9.set_fraction
+				#ROUTE Deuropen9.value_changed TO deurkinderkamergang.rotation
+				#deur10
+				Transform {
+					children [
+						USE dwarslat
+						USE ruitjeboven
+						#deur
+						DEF deurbadkamergang Transform {
+							center -.4 0 0
+							children [
+								DEF klikopdeur10 TouchSensor {
+								}
+								DEF TimeSource10 TimeSensor {
+									cycleInterval 20
+								}
+								# Run once for 20 sec.
+								# Animeer het openzwaaien van de deur rond de Y as:
+								DEF Deuropen10 OrientationInterpolator {
+									key [
+										0 .025 .05 .95 .975 1
+									]
+									keyValue [
+										0 1 0 0 0 1 0 -1 0 1 0 -2 0 1 0 -2 0 1 0 -1 0 1 0 0
+									]
+								}
+								USE deurklink
+								USE deurvorm
+							]
+							translation 0 1.005 0
+						}
 					]
+					translation 4.01 2.8 -2.325
+					rotation 0 1 0 0
 				}
-				normal            NULL
-				texCoord          NULL
-				ccw               TRUE
-				colorIndex        []
-				colorPerVertex    TRUE
-				convex            TRUE
-				coordIndex  [
-		0, 1, 4, 7, -1, 
-		0, 7, 4, 1, -1, 
-
-		0, 7, 6, 8, 9, -1,
-		0, 9, 8, 6, 7, -1, 
-
-		5, 2, 3, 8, 6, -1, 
-		5, 6, 8, 3, 2, -1,
-]     #default []
-				creaseAngle       0
-				normalIndex       []
-				normalPerVertex   TRUE
-				solid             TRUE
-				texCoordIndex     []
-			}
-		}
-	]
-}
-
-
-
-DEF vulstukvoortrap Transform {
-	children [
-		Shape {
-appearance DEF wandkleur Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      1 0.9 0.7
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-
-
-			geometry IndexedFaceSet {
-				color             NULL
-				coord  Coordinate {	#default NULL
-					point [
-						4.42	5.3	-2.36, #0
-						4.42	5.3	-3.36, 
-						4.42	5.4	-3.36,
-						4.42	5.4	-2.36, #3
-
-						5.4	5.3	-2.36, #4
-						5.4	5.4	-2.36,
-
-						5.4	5.3	-4.36, #6
-						5.4	5.4	-4.36,
-						4.42	5.3	-4.36, #8
-						4.42	5.4	-4.36,
-				
-				
+				#moved to end
+				#ROUTE klikopdeur10.touchTime TO TimeSource10.startTime
+				#ROUTE TimeSource10.fraction_changed TO Deuropen10.set_fraction
+				#ROUTE Deuropen10.value_changed TO deurbadkamergang.rotation
+				# /deuren.wrl
+				# trapboven.wrl
+				DEF trapboven Transform {
+					children [
+						Shape {
+							appearance Appearance {
+								material Material {
+									ambientIntensity .2
+									diffuseColor 1 .5 .3
+									emissiveColor 0 0 0
+									shininess .1
+									specularColor 0 0 0
+									transparency 0
+								}
+								texture NULL
+								textureTransform NULL
+							}
+							geometry DEF trap2 IndexedFaceSet {
+								color NULL
+								coord Coordinate {
+									#default NULL
+									point [
+										-.2 0 1, #0
+										0 .2 1, 0 .2 0, -.2 0 0, #3
+										.28 .4 1, #4
+										.6 .6 1, .98 .8 1, .98 1 .45, #7
+										.98 1.2 .25, #8
+										.98 1.4 0, .98 1.6 -.25, .98 1.8 -.45, #11
+										.98 2 -1, #12
+										.6 2.2 -1, .28 2.4 -1, 0 2.6 -1, #15
+										0 .6 0, #16
+										0 .8 0, 0 1 0, #18
+										0 1.2 0, #19
+										0 1.4 0, #20
+										0 1.6 0, 0 1.8 0, #22
+										0 2 0, #23
+										0 2.2 0, #24
+										0 2.4 0, 0 2.6 0, 0 2.8 0, #27
+										-.2 .2 1, #28
+										0 .4 1, 0 .4 0, -.2 .2 0, #31
+										.28 .6 1, #32
+										.6 .8 1, .98 1 1, .98 1.2 .45, #35
+										.98 1.4 .25, #36
+										.98 1.6 0, .98 1.8 -.25, .98 2 -.45, #39
+										.98 2.2 -1, #40
+										.6 2.4 -1, .28 2.6 -1, 0 2.8 -1, #43
+										0 0 1, 0 0 0, #45
+										0 .4 0, #46
+									]
+								}
+								normal NULL
+								texCoord NULL
+								ccw TRUE
+								colorIndex [
+								]
+								colorPerVertex TRUE
+								convex TRUE
+								coordIndex [
+									28 1 2 31 -1, #1e_treevlak
+									29 4 46 -1, #2e
+									32 5 16 -1, 33 6 17 -1, 34 7 18 -1, 35 8 19 -1, 36 9 20 -1, 37 10 21 -1, 38
+									11 22 -1, 39 12 23 -1, 40 13 24 -1, 41 14 25 -1, 42 15 26 -1, #13e_treevlak
+									# 0, 28, 31, 3, -1, #voor_en_zijvlakken_van_de_eerste_tree_komt_boven_niet_voor
+									# 0, 44, 1, 28, -1,
+									# 3, 31, 2, 45, -1,
+									2 1 29 30 -1, #alle_voorvlakken
+									46 4 32 16 -1, 16 5 33 17 -1, 17 6 34 18 -1, 18 7 35 19 -1, 19 8 36 20 -1,
+									20 9 37 21 -1, 21 10 38 22 -1, 22 11 39 23 -1, 23 12 40 24 -1, 24 13 41 25
+									-1, 25 14 42 26 -1, 26 15 43 27 -1,
+								]
+								#default []
+								creaseAngle 0
+								normalIndex [
+								]
+								normalPerVertex TRUE
+								solid FALSE
+								texCoordIndex [
+								]
+							}
+						}
 					]
+					translation 4.42 2.6 -3.36
 				}
-				normal            NULL
-				texCoord          NULL
-				ccw               TRUE
-				colorIndex        []
-				colorPerVertex    TRUE
-				convex            TRUE
-				coordIndex  [
-	0, 1, 2, 3, -1,
-	0, 3, 2, 1, -1,
-	0, 3, 5, 4, -1,
-	9, 8, 6, 7, -1,
-
-]     #default []
-				creaseAngle       0
-				normalIndex       []
-				normalPerVertex   TRUE
-				solid             FALSE
-				texCoordIndex     []
-			}
-		}
-
-]
-}
-
-# ballustrade.wrl
-
-
-
-Transform {
-children[
-
-DEF spijlen Group {
-children [
-Transform{
-children [
-DEF spijl Shape {
-appearance DEF kozijn Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      0.95 0.95 0.9
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-geometry  Cylinder {
-				bottom  FALSE
-				height  0.8
-				radius  0.015
-				side    TRUE
-				top     FALSE
-			}
-}
-]
-translation -0.025	0.4	0.05
-}
-
-Transform{
-children USE spijl
-translation -0.025	0.4	0.15
-}
-Transform{
-children USE spijl
-translation -0.025	0.4	0.25
-}
-Transform{
-children USE spijl
-translation -0.025	0.4	0.35
-}
-Transform{
-children USE spijl
-translation -0.025	0.4	0.45
-}
-Transform{
-children USE spijl
-translation -0.025	0.4	0.55
-}
-Transform{
-children USE spijl
-translation -0.025	0.4	0.65
-}
-Transform{
-children USE spijl
-translation -0.025	0.4	0.75
-}
-Transform{
-children USE spijl
-translation -0.025	0.4	0.85
-}
-Transform{
-children USE spijl
-translation -0.025	0.4	0.95
-}
-
-]
-}#spijlengroup
-
-Transform{
-translation 0 0 1
-rotation 0 1 0 1.5707963
-children USE spijlen
-}
-
-Transform{
-children [
-Shape {
-appearance USE  kozijn
-geometry  Box { size 0.05	0.03	1.05	}
-}
-]
-translation -0.025	0.815	0.525
-}
-
-Transform{
-children [
-Shape {
-appearance USE  kozijn
-geometry  Box { size 1	0.03	0.05	}
-}
-]
-translation 0.5	0.815	1.025
-}
-
-
-]
-translation	4.42	5.4	-3.36
-}
-
-# /ballustrade.wrl
-
-# binmuur.wrl
-
-
-
-
-Transform {
-	children [
-		Shape {
-appearance Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      1 0.9 0.7
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry IndexedFaceSet {
-				color             NULL
-				coord  Coordinate {	#default NULL
-					point [
-						0.28	0	-0.28, #0 linkerbenedenhoek voorgevel
-						5.40	0	-0.28,
-						5.40	5.40	-0.28,
-						0.28	5.40	-0.28, #3 linkerbovenhoek voorgevel
-
-						3.19	0	-0.28, #4 voordeur
-						4.42	0	-0.28,
-						4.42	2.30	-0.28,
-						3.19	2.30	-0.28, #7 voordeur
-
-						4.84	1.60	-0.28, #toiletraam-8
-						5.04	1.60	-0.28,
-						5.04	2.30	-0.28,
-						4.84	2.30	-0.28, 
-
-						2.60	0.90	-0.28, #keukenraam-12
-						2.60	2.30	-0.28,
-						0.60	2.30	-0.28,
-						0.60	0.90	-0.28,
-
-						0.60	3.60	-0.28, #bovenraam-16
-						1.50	3.60	-0.28,
-						1.50	5.0	-0.28,
-						4.42	5.0	-0.28,
-						4.42	5.40	-0.28, 
-						0.60	5.40	-0.28,
-
-						0.28	8.55	-3.15, #linkergevel-22
-						0.28	2.70	-8.72,
-						0.28	0	-8.72,
-
-						5.40	8.55	-3.15, #rechtergevel-25
-						5.40	5.40	-6.30,
-						5.40	5.40	-8.72,
-						5.40	0	-8.72,
-
-						2.25	0	-8.72, #achtergevel-29
-						2.25	0.6	-8.72,
-						4.8	0.6	-8.72,
-						4.8	5.40	-8.72,
-						1.2	0	-8.72,
-						1.2	2.70	-8.72,
-
-
-						3.19	0	-0.14, #diepte van de voordeur-35
-						4.42	0	-0.14,
-						4.42	2.30	-0.14,
-						3.19	2.30	-0.14, #diepte van de voordeur-38
-
-						2.60	0.90	-0.14, # diepte van het keukenraam-39
-						2.60	2.30	-0.14,
-						0.60	2.30	-0.14,
-						0.60	0.90	-0.14,
-
-						4.84	1.60	-0.14, #diepte van het toiletraam-43
-						5.04	1.60	-0.14,
-						5.04	2.30	-0.14,
-						4.84	2.30	-0.14, 
-
-						0.60	3.60	-0.14, #diepte van het bovenraam-47
-						1.50	3.60	-0.14,
-						1.50	5.0	-0.14,
-						4.42	5.0	-0.14,
-						4.42	5.40	-0.14, 
-						0.60	5.40	-0.14, #52
-
-						2.25	0	-8.86, #diepte van de achtergevel-53
-						2.25	0.6	-8.86,
-						4.8	0.6	-8.86,
-						4.8	5.40	-8.86,
-						1.2	0	-8.86,
-						1.2	2.70	-8.86,	#58
-
-						0.28	5.40	0,	#59 hoekpunt voor dakvorm zolder
-						5.40	5.40	0,
-						0.28	5.40	-6.30, #61
-						0.28	2.70	-9.0,  #62 hoekpunt voor dakvorm 1e verdieping
-
-						0.14	5.40	0,	#63 extra punten voor segmentering
-						5.54	5.40	0,
-						0.14	5.40	-6.30, 
-						5.54	5.40	-6.3,  #66
-						5.54	8.55	-3.15, #rechtergevel-67
-						0.14	8.55	-3.15, #linkergevel-68
+				# /trapboven.wrl
+				# buitmuur.wrl
+				Transform {
+					children [
+						Shape {
+							appearance DEF steen Appearance {
+								material Material {
+									ambientIntensity .2
+									diffuseColor .8 .4 .3
+									emissiveColor 0 0 0
+									shininess .1
+									specularColor 0 0 0
+									transparency 0
+								}
+								texture NULL
+								textureTransform NULL
+							}
+							geometry IndexedFaceSet {
+								color NULL
+								coord Coordinate {
+									#default NULL
+									point [
+										0 0 0, #linkerbenedenhoek voorgevel
+										5.68 0 0, 5.68 5.4 0, 0 5.4 0, #linkerbovenhoek voorgevel
+										3.19 0 0, #voordeur
+										4.42 0 0, 4.42 2.3 0, 3.19 2.3 0, #voordeur
+										4.84 1.6 0, #toiletraam-8
+										5.04 1.6 0, 5.04 2.3 0, 4.84 2.3 0, 2.6 .9 0, #keukenraam-12
+										2.6 2.3 0, .6 2.3 0, .6 .9 0, .6 3.6 0, #bovenraam-16
+										1.5 3.6 0, 1.5 5 0, 4.42 5 0, 4.42 5.4 0, .6 5.4 0, 0 8.555 -3.15,
+										#linkergevel-22
+										0 2.7 -9, 0 0 -9, 5.68 8.555 -3.15, #rechtergevel-25
+										5.68 5.4 -6.3, 5.68 5.4 -9, 5.68 0 -9, 2.25 0 -9, #achtergevel-29
+										2.25 .6 -9, 4.8 .6 -9, 4.8 5.4 -9, 1.2 0 -9, 1.2 2.7 -9, 3.19 0 -.14,
+										#diepte van de voordeur-35
+										4.42 0 -.14, 4.42 2.3 -.14, 3.19 2.3 -.14, #diepte van de voordeur-38
+										2.6 .9 -.14, # diepte van het keukenraam-39
+										2.6 2.3 -.14, .6 2.3 -.14, .6 .9 -.14, 4.84 1.6 -.14, #diepte van het toiletraam-43
+										5.04 1.6 -.14, 5.04 2.3 -.14, 4.84 2.3 -.14, .6 3.6 -.14,
+										#diepte van het bovenraam-47
+										1.5 3.6 -.14, 1.5 5 -.14, 4.42 5 -.14, 4.42 5.4 -.14, .6 5.4 -.14,
+										#52
+										2.25 0 -8.86, #diepte van de achtergevel-53
+										2.25 .6 -8.86, 4.8 .6 -8.86, 4.8 5.4 -8.86, 1.2 0 -8.86, 1.2 2.7 -8.86,
+										#58
+										0 2.7 0, #59 extra punten voor segmentering beneden
+										.14 2.7 -.14, 5.68 2.7 0, #61
+										5.54 2.7 -.14, #
+										0 2.7 -9, #63
+										.14 2.7 -8.86, #
+										5.68 2.7 -9, #65
+										5.54 2.7 -8.86, #
+										1.2 2.7 -9, #67
+										1.2 2.7 -8.86, #
+										4.8 2.7 -9, #69
+										4.8 2.7 -8.86, #
+										.14 5.4 -.14, #71
+										5.54 5.4 -.14, #72
+										5.54 5.4 -8.86, #73
+										.14 2.7 -9, #74
+										.14 5.4 -6.3, #75
+										0 5.4 -6.3, #76
+									]
+								}
+								normal NULL
+								texCoord NULL
+								ccw TRUE
+								colorIndex [
+								]
+								colorPerVertex TRUE
+								convex TRUE
+								coordIndex [
+									16 21 3 59 -1, 19 2 20 -1, 2 19 61 -1, 65 27 2 61 -1, 59 3 76 23 -1, 17 48
+									47 16 -1, 18 49 48 17 -1, 19 50 49 18 -1, 20 51 50 19 -1, 16 47 52 21 -1,
+									3 21 52 71 -1, 20 2 72 51 -1, 2 27 73 72 -1, 27 32 56 73 -1, 63 64 75 76 -1,
+									3 76 75 71 -1, #27, 32, 69, 65, -1,
+									27 65 69 32 -1, 32 69 70 56 -1, 59 17 16 -1, 59 61 17 -1, 17 61 18 -1, 18
+									61 19 -1,
+								]
+								#default []
+								creaseAngle 0
+								normalIndex [
+								]
+								normalPerVertex TRUE
+								solid FALSE
+								texCoordIndex [
+								]
+							}
+						}
 					]
 				}
-				normal            NULL
-				texCoord          NULL
-				ccw               TRUE
-				colorIndex        []
-				colorPerVertex    TRUE
-				convex            TRUE
-				coordIndex  [
-	
-		59, 22, 61, -1,
-		60, 25, 26, -1,
-
-		59, 63, 68, 22, -1,
-		68, 22, 61, 65, -1,
-
-		60, 64, 67, 25, -1, 
-		25, 67, 66, 26, -1,
-
-		
-
-]     #default []
-				creaseAngle       0
-				normalIndex       []
-				normalPerVertex   TRUE
-				solid             FALSE
-				texCoordIndex     []
-			}
-		}
-	]
-}
-
-
-
-# /binmuur.wrl
-
-# buitmuur.wrl
-
-
-
-
-Transform {
-	children [
-		Shape {
-appearance DEF steen Appearance {
-	material         Material {
-	ambientIntensity  0.2
-	diffuseColor      0.8 0.4 0.3
-	emissiveColor     0 0 0
-	shininess         0.1
-	specularColor     0 0 0
-	transparency      0
-}	texture           NULL
-	textureTransform  NULL
-}
-			geometry IndexedFaceSet {
-				color             NULL
-				coord  Coordinate {	#default NULL
-					point [
-						0	0	0, #linkerbenedenhoek voorgevel
-						5.68	0	0,
-						5.68	5.40	0,
-						0	5.40	0, #linkerbovenhoek voorgevel
-
-						3.19	0	0, #voordeur
-						4.42	0	0,
-						4.42	2.30	0,
-						3.19	2.30	0, #voordeur
-
-						4.84	1.60	0, #toiletraam-8
-						5.04	1.60	0,
-						5.04	2.30	0,
-						4.84	2.30	0, 
-
-						2.60	0.90	0, #keukenraam-12
-						2.60	2.30	0,
-						0.60	2.30	0,
-						0.60	0.90	0,
-
-						0.60	3.60	0, #bovenraam-16
-						1.50	3.60	0,
-						1.50	5.0	0,
-						4.42	5.0	0,
-						4.42	5.40	0, 
-						0.60	5.40	0,
-
-						0	8.555	-3.15, #linkergevel-22
-						0	2.7	-9.0,
-						0	0	-9.0,
-
-						5.68	8.555	-3.15, #rechtergevel-25
-						5.68	5.40	-6.3,
-						5.68	5.40	-9,
-						5.68	0	-9.0,
-
-						2.25	0	-9.0, #achtergevel-29
-						2.25	0.6	-9.0,
-						4.8	0.6	-9.0,
-						4.8	5.40	-9.0,
-						1.2	0	-9.0,
-						1.2	2.7	-9,
-
-
-						3.19	0	-0.14, #diepte van de voordeur-35
-						4.42	0	-0.14,
-						4.42	2.30	-0.14,
-						3.19	2.30	-0.14, #diepte van de voordeur-38
-
-						2.60	0.90	-0.14, # diepte van het keukenraam-39
-						2.60	2.30	-0.14,
-						0.60	2.30	-0.14,
-						0.60	0.90	-0.14,
-
-						4.84	1.60	-0.14, #diepte van het toiletraam-43
-						5.04	1.60	-0.14,
-						5.04	2.30	-0.14,
-						4.84	2.30	-0.14, 
-
-						0.60	3.60	-0.14, #diepte van het bovenraam-47
-						1.50	3.60	-0.14,
-						1.50	5.0	-0.14,
-						4.42	5.0	-0.14,
-						4.42	5.40	-0.14, 
-						0.60	5.40	-0.14, #52
-
-						2.25	0	-8.86, #diepte van de achtergevel-53
-						2.25	0.6	-8.86,
-						4.8	0.6	-8.86,
-						4.8	5.40	-8.86,
-						1.2	0	-8.86,
-						1.2	2.7	-8.86,	#58
-
-						0.14	5.40	0,	#59 extra punten voor segmentering
-						5.54	5.40	0,
-						0.14	5.40	-6.30, 
-						5.54	5.40	-6.3,  #62
-						5.54	8.55	-3.15, #rechtergevel-63
-						0.14	8.55	-3.15, #linkergevel-64
-						0 	5.4	-6.3,
+				# /buitmuur.wrl
+				# binmuur.wrl
+				Transform {
+					children [
+						Shape {
+							appearance Appearance {
+								material Material {
+									ambientIntensity .2
+									diffuseColor 1 .9 .7
+									emissiveColor 0 0 0
+									shininess .1
+									specularColor 0 0 0
+									transparency 0
+								}
+								texture NULL
+								textureTransform NULL
+							}
+							geometry IndexedFaceSet {
+								color NULL
+								coord Coordinate {
+									#default NULL
+									point [
+										.28 0 -.28, #0 linkerbenedenhoek voorgevel
+										5.4 0 -.28, 5.4 5.4 -.28, .28 5.4 -.28, #3 linkerbovenhoek voorgevel
+										3.19 0 -.28, #4 voordeur
+										4.42 0 -.28, 4.42 2.3 -.28, 3.19 2.3 -.28, #7 voordeur
+										4.84 1.6 -.28, #toiletraam-8
+										5.04 1.6 -.28, 5.04 2.3 -.28, 4.84 2.3 -.28, 2.6 .9 -.28,
+										#keukenraam-12
+										2.6 2.3 -.28, .6 2.3 -.28, .6 .9 -.28, .6 3.6 -.28, #bovenraam-16
+										1.5 3.6 -.28, 1.5 5 -.28, 4.42 5 -.28, 4.42 5.4 -.28, .6 5.4 -.28,
+										.28 8.55 -3.15, #linkergevel-22
+										.28 2.7 -8.72, .28 0 -8.72, 5.4 8.55 -3.15, #rechtergevel-25
+										5.4 5.4 -6.3, 5.4 5.4 -8.72, 5.4 0 -8.72, 2.25 0 -8.72, #achtergevel-29
+										2.25 .6 -8.72, 4.8 .6 -8.72, 4.8 5.4 -8.72, 1.2 0 -8.72, 1.2 2.7 -8.72,
+										3.19 0 -.14, #diepte van de voordeur-35
+										4.42 0 -.14, 4.42 2.3 -.14, 3.19 2.3 -.14, #diepte van de voordeur-38
+										2.6 .9 -.14, # diepte van het keukenraam-39
+										2.6 2.3 -.14, .6 2.3 -.14, .6 .9 -.14, 4.84 1.6 -.14, #diepte van het toiletraam-43
+										5.04 1.6 -.14, 5.04 2.3 -.14, 4.84 2.3 -.14, .6 3.6 -.14,
+										#diepte van het bovenraam-47
+										1.5 3.6 -.14, 1.5 5 -.14, 4.42 5 -.14, 4.42 5.4 -.14, .6 5.4 -.14,
+										#52
+										2.25 0 -8.86, #diepte van de achtergevel-53
+										2.25 .6 -8.86, 4.8 .6 -8.86, 4.8 5.4 -8.86, 1.2 0 -8.86, 1.2 2.7 -8.86,
+										#58
+										.28 5.4 0, #59 hoekpunt voor dakvorm zolder
+										5.4 5.4 0, .28 5.4 -6.3, #61
+										.28 2.7 -9, #62 hoekpunt voor dakvorm 1e verdieping
+										.28 2.7 -.28, #63 extra punten voor segmentering boven
+										.14 2.7 -.14, 5.4 2.7 -.28, #65
+										5.54 2.7 -.14, #
+										.28 2.7 -8.72, #67
+										.14 2.7 -8.86, #
+										5.4 2.7 -8.72, #69
+										5.54 2.7 -8.86, #
+										1.2 2.7 -8.72, #71
+										1.2 2.7 -8.86, #
+										4.8 2.7 -8.72, #73
+										4.8 2.7 -8.86, #
+										.14 5.4 -.14, #75
+										5.54 5.4 -.14, #76
+										5.54 5.4 -8.86, #77
+										.14 2.7 -9, #78
+										.14 5.4 -6.3, #79
+									]
+								}
+								normal NULL
+								texCoord NULL
+								ccw TRUE
+								colorIndex [
+								]
+								colorPerVertex TRUE
+								convex TRUE
+								coordIndex [
+									16 21 3 63 -1, 19 2 20 -1, 63 16 17 65 -1, 17 18 19 65 -1, 2 19 65 -1, 69
+									27 2 65 -1, 63 3 61 62 -1, 16 47 48 17 -1, 17 48 49 18 -1, 18 49 50 19 -1,
+									19 50 51 20 -1, 21 52 47 16 -1, 73 74 56 32 -1, 69 73 32 27 -1, 3 21 52 75
+									-1, 20 2 76 51 -1, 3 61 79 75 -1, 2 27 77 76 -1, 62 61 79 78 -1, 27 32 56
+									77 -1,
+								]
+								#default []
+								creaseAngle 0
+								normalIndex [
+								]
+								normalPerVertex TRUE
+								solid FALSE
+								texCoordIndex [
+								]
+							}
+						}
+					]
+				}
+				# /binmuur.wrl
+				# ramen.wrl
+				#begin bovenraam
+				Transform {
+					children [
+						Shape {
+							appearance DEF kozijn Appearance {
+								material Material {
+									ambientIntensity .2
+									diffuseColor .95 .95 .9
+									emissiveColor 0 0 0
+									shininess .1
+									specularColor 0 0 0
+									transparency 0
+								}
+								texture NULL
+								textureTransform NULL
+							}
+							geometry Box {
+								size 3.82 .05 .05
+							}
+						}
+					]
+					translation 2.51 5.025 -.14
+				}
+				Transform {
+					children [
+						Shape {
+							appearance USE kozijn
+							geometry Box {
+								size 3.82 .1 .05
+							}
+						}
+					]
+					translation 2.51 5.35 -.14
+				}
+				Transform {
+					children [
+						Shape {
+							appearance USE kozijn
+							geometry Box {
+								size .05 1.8 .05
+							}
+						}
+					]
+					translation .625 4.5 -.14
+				}
+				Transform {
+					children [
+						Shape {
+							appearance USE kozijn
+							geometry Box {
+								size .05 1.8 .05
+							}
+						}
+					]
+					translation 1.475 4.5 -.14
+				}
+				Transform {
+					children [
+						Shape {
+							appearance USE kozijn
+							geometry Box {
+								size .05 .25 .05
+							}
+						}
+					]
+					translation 4.395 5.175 -.14
+				}
+				Transform {
+					children [
+						Shape {
+							appearance DEF blauw Appearance {
+								material Material {
+									ambientIntensity .2
+									diffuseColor .3 .4 .7
+									emissiveColor 0 0 0
+									shininess .1
+									specularColor 0 0 0
+									transparency 0
+								}
+								texture NULL
+								textureTransform NULL
+							}
+							geometry Box {
+								size .9 .25 .05
+							}
+						}
+					]
+					translation 3.05 5.175 -.14
+				}
+				Transform {
+					children [
+						Shape {
+							appearance USE kozijn
+							geometry Box {
+								size .9 .05 .05
+							}
+						}
+					]
+					translation 1.05 3.625 -.14
+				}
+				#einde bovenraam
+				#begin kozijnen achter
+				Transform {
+					children [
+						Shape {
+							appearance USE kozijn
+							geometry Box {
+								size .05 2.4 .05
+							}
+						}
+					]
+					translation 3.215 3.9 -8.86
+				}
+				Transform {
+					children [
+						Shape {
+							appearance USE kozijn
+							geometry Box {
+								size .05 2.4 .05
+							}
+						}
+					]
+					translation 4.775 3.9 -8.86
+				}
+				Transform {
+					children [
+						Shape {
+							appearance USE blauw
+							geometry Box {
+								size 1.61 .3 .05
+							}
+						}
+					]
+					translation 3.995 5.25 -8.86
+				}
+				Transform {
+					children [
+						Shape {
+							appearance USE blauw
+							geometry Box {
+								size 1.51 .8 .05
+							}
+						}
+					]
+					translation 3.995 3.1 -8.86
+				}
+				Transform {
+					children [
+						Shape {
+							appearance USE kozijn
+							geometry Box {
+								size 1.51 .05 .05
+							}
+						}
+					]
+					translation 3.995 3.525 -8.86
+				}
+				#3
+				Transform {
+					children [
+						Shape {
+							appearance USE kozijn
+							geometry Box {
+								size 1.51 .05 .05
+							}
+						}
+					]
+					translation 3.995 5.075 -8.86
+				}
+				#4
+				Transform {
+					children [
+						Shape {
+							appearance USE kozijn
+							geometry Box {
+								size .05 1.5 .05
+							}
+						}
+					]
+					translation 3.565 4.3 -8.86
+				}
+				#einde ramen achter
+				# /ramen.wrl
+				# ruiten.wrl
+				#bovenruiten
+				Transform {
+					children [
+						Shape {
+							appearance DEF glas Appearance {
+								material Material {
+									ambientIntensity .2
+									diffuseColor .6 .6 .9
+									emissiveColor 0 0 0
+									shininess .8
+									specularColor 1 1 1
+									transparency .7
+								}
+								texture NULL
+								textureTransform NULL
+							}
+							geometry Box {
+								size .8 1.35 .01
+							}
+						}
+					]
+					translation 1.05 4.325 -.14
+				}
+				#ruit 1 boven
+				Transform {
+					children [
+						Shape {
+							appearance USE glas
+							geometry Box {
+								size .8 .3 .01
+							}
+						}
+					]
+					translation 1.05 5.2 -.14
+				}
+				#ruit 2 boven
+				Transform {
+					children [
+						Shape {
+							appearance USE glas
+							geometry Box {
+								size 1.1 .3 .01
+							}
+						}
+					]
+					translation 2.05 5.2 -.14
+				}
+				#ruit 3 boven
+				Transform {
+					children [
+						Shape {
+							appearance USE glas
+							geometry Box {
+								size .85 .3 .01
+							}
+						}
+					]
+					translation 3.935 5.2 -.14
+				}
+				#ruit 4 boven
+				#ramen achter
+				Transform {
+					children [
+						Shape {
+							appearance USE glas
+							geometry Box {
+								size 1.16 1.5 .01
+							}
+						}
+					]
+					translation 4.17 4.3 -8.86
+				}
+				#ruit 1 achter
+				Transform {
+					children [
+						Shape {
+							appearance USE glas
+							geometry Box {
+								size .3 1.5 .01
+							}
+						}
+					]
+					translation 3.39 4.3 -8.86
+				}
+				#ruit 2 achter
+				# /ruiten.wrl
+				# /boven/boven.wrl
+				DEF zolder Transform {
+					children [
+						Transform {
+							children [
+								Transform {
+									children [
+										Shape {
+											appearance USE groen
+											geometry USE pijl
+										}
+									]
+									rotation 0 1 0 3.141592
+								}
+								DEF schuifzolder TouchSensor {
+								}
+							]
+							translation .15 5.4 .3
+						}
+						Transform {
+							children [
+								Shape {
+									appearance USE rood
+									geometry USE pijl
+								}
+								DEF schuifzolder2 TouchSensor {
+								}
+							]
+							translation 5.48 5.4 .3
+						}
+						DEF dak Transform {
+							children [
+								# dak/dak.wrl
+								Transform {
+									children [
+										Shape {
+											appearance Appearance {
+												material Material {
+													ambientIntensity .2
+													diffuseColor .3 .4 .5
+													emissiveColor 0 0 0
+													shininess .1
+													specularColor 0 0 0
+													transparency 0
+												}
+												texture NULL
+												textureTransform NULL
+											}
+											geometry IndexedFaceSet {
+												color NULL
+												coord Coordinate {
+													#default NULL
+													point [
+														0 5.4 0, #dakranden-0
+														5.68 5.4 0, 5.68 8.55 -3.15, 0 8.55 -3.15, 0 2.7 -9, 3.12 2.7 -9,
+														3.12 5.4 -6.3, 5.68 5.4 -6.3, #7
+														1.5 3.7 -8, #dakraam1-8
+														2.3 3.7 -8, 2.3 4.7 -7, 1.5 4.7 -7, 4.1 7.3 -1.9, #dakraam2-12
+														3.5 7.3 -1.9, 3.5 7.7 -2.3, 4.1 7.7 -2.3, #15
+														0 5.44 .04, #dikte van dakranden-16
+														5.68 5.44 .04, 5.68 8.606568 -3.15, 0 8.606568 -3.15, 0 2.74 -9.04,
+														3.12 2.74 -9.04, 3.12 5.44 -6.34, 5.68 5.44 -6.34, #23 
+														1.5 3.74 -8.04, #dikte van het dakraam1-24
+														2.3 3.74 -8.04, 2.3 4.74 -7.04, 1.5 4.74 -7.04, #27 
+														4.1 7.34 -1.86, #dikte van het dakraam2-28
+														3.5 7.34 -1.86, 3.5 7.74 -2.26, 4.1 7.74 -2.26, #31
+													]
+												}
+												normal NULL
+												texCoord NULL
+												ccw TRUE
+												colorIndex [
+												]
+												colorPerVertex TRUE
+												convex TRUE
+												coordIndex [
+													0 13 14 3 -1, 0 3 14 13 -1, 16 29 30 19 -1, 16 19 30 29 -1, 0 1 12 13 -1,
+													0 13 12 1 -1, 16 17 28 29 -1, 16 29 28 17 -1, 1 12 15 2 -1, 1 2 15 12 -1,
+													17 28 31 18 -1, 17 18 31 28 -1, 15 2 3 14 -1, 15 14 3 2 -1, 31 18 19 30 -1,
+													31 30 19 18 -1, 4 8 11 3 -1, 4 3 11 8 -1, 20 24 27 19 -1, 20 19 27 24 -1,
+													5 4 8 9 -1, 5 9 8 4 -1, 21 20 24 25 -1, 21 25 24 20 -1, 5 9 10 6 -1, 5 6 10
+													9 -1, 21 25 26 22 -1, 21 22 26 25 -1, 7 6 2 -1, 7 2 6 -1, 23 22 18 -1, 23
+													18 22 -1, 6 10 11 3 2 -1, 6 2 3 11 10 -1, 22 26 18 -1, 22 18 26 -1, 26 27
+													19 -1, 26 19 27 -1, 26 19 18 -1, 26 18 19 -1, 0 1 17 16 -1, 0 16 17 1 -1,
+													1 2 18 17 -1, 1 17 18 2 -1, 3 0 16 19 -1, 3 19 16 0 -1, 2 7 23 18 -1, 2 18
+													23 7 -1, 7 6 22 23 -1, 7 23 22 6 -1, 5 6 22 21 -1, 5 21 22 6 -1, 5 4 20 21
+													-1, 5 21 20 4 -1, 4 3 19 20 -1, 4 20 19 3 -1, 9 8 24 25 -1, 9 25 24 8 -1,
+													8 11 27 24 -1, 8 24 27 11 -1, 10 11 27 26 -1, 10 26 27 11 -1, 9 10 26 25 -1,
+													9 25 26 10 -1, 12 13 29 28 -1, 12 28 29 13 -1, 12 15 31 28 -1, 12 28 31 15
+													-1, 14 15 31 30 -1, 14 30 31 15 -1, 13 14 30 29 -1, 13 29 30 14 -1,
+												]
+												#default []
+												creaseAngle 0
+												normalIndex [
+												]
+												normalPerVertex TRUE
+												solid TRUE
+												texCoordIndex [
+												]
+											}
+										}
+									]
+								}
+								#schoorsteen
+								Transform {
+									children [
+										Shape {
+											appearance Appearance {
+												material Material {
+													ambientIntensity .2
+													diffuseColor .1 .1 .1
+													emissiveColor 0 0 0
+													shininess .1
+													specularColor .3 .3 .3
+													transparency 0
+												}
+												texture NULL
+												textureTransform NULL
+											}
+											geometry IndexedFaceSet {
+												color NULL
+												coord Coordinate {
+													#default NULL
+													point [
+														4.8 8 -2.6, 5.3 8 -2.6, 5.3 8.4 -3, 4.8 8.4 -3, 4.9 9.4 -2.65,
+														5.2 9.4 -2.65, 5.2 9.4 -2.95, 4.9 9.4 -2.95,
+													]
+												}
+												normal NULL
+												texCoord NULL
+												ccw TRUE
+												colorIndex [
+												]
+												colorPerVertex TRUE
+												convex TRUE
+												coordIndex [
+													0 1 5 4 -1, 0 4 5 1 -1, 1 2 6 5 -1, 1 5 6 2 -1, 2 3 7 6 -1, 2 6 7 3 -1, 0
+													3 7 4 -1, 0 4 7 3 -1, 4 5 6 7 -1, 4 7 6 5 -1,
+												]
+												#default []
+												creaseAngle 0
+												normalIndex [
+												]
+												normalPerVertex TRUE
+												solid TRUE
+												texCoordIndex [
+												]
+											}
+										}
+									]
+								}
+								# /dak/dak.wrl
+								Transform {
+									children [
+										Transform {
+											children [
+												Shape {
+													appearance USE groen
+													geometry USE pijl
+												}
+											]
+											rotation 0 1 0 3.141592
+										}
+										DEF schuifdak TouchSensor {
+										}
+									]
+									translation .15 6 .3
+								}
+								Transform {
+									children [
+										Shape {
+											appearance USE rood
+											geometry USE pijl
+										}
+										DEF schuifdak2 TouchSensor {
+										}
+									]
+									translation 5.48 6 .3
+								}
+								DEF tijd1 TimeSensor {
+									cycleInterval 4
+									enabled TRUE
+									loop FALSE
+									startTime 0
+									stopTime 0
+								}
+								DEF plaats1 PositionInterpolator {
+									key [
+										0 1
+									]
+									keyValue [
+										0 0 0 6 0 0
+									]
+								}
+								DEF tijd1a TimeSensor {
+									cycleInterval 4
+									enabled TRUE
+									loop FALSE
+									startTime 0
+									stopTime 0
+								}
+								DEF plaats1a PositionInterpolator {
+									key [
+										0 1
+									]
+									keyValue [
+										6 0 0 0 0 0
+									]
+								}
+							]
+						}
+						#dak
+						# zolder/zolder.wrl
+						Viewpoint {
+							fieldOfView 1
+							jump TRUE
+							orientation 1 0 0 0
+							position 2.5 7 -3.15
+							description "op zolder"
+						}
+						#kleine platte dakje
+						Transform {
+							children [
+								Shape {
+									appearance DEF appdak Appearance {
+										material Material {
+											ambientIntensity 0
+											diffuseColor .2 .2 .2
+											emissiveColor 0 0 0
+											shininess 0
+											specularColor 0 0 0
+											transparency 0
+										}
+										texture ImageTexture {
+											url [
+												""
+											]
+											repeatS TRUE
+											repeatT TRUE
+										}
+									}
+									geometry Box {
+										size 2.6 .04 2.74
+									}
+								}
+							]
+							translation 4.39 5.4 -7.67
+						}
+						DEF zoldervloer Transform {
+							children [
+								Shape {
+									appearance Appearance {
+										material Material {
+											ambientIntensity .2
+											diffuseColor 1 .5 .3
+											emissiveColor 0 0 0
+											shininess .1
+											specularColor 0 0 0
+											transparency 0
+										}
+										texture NULL
+										textureTransform NULL
+									}
+									geometry IndexedFaceSet {
+										color NULL
+										coord Coordinate {
+											#default NULL
+											point [
+												.14 5.4 0, 5.54 5.4 0, 5.54 5.4 -6.3, .14 5.4 -6.3, 5.54 5.4 -2.36,
+												#-4
+												5.54 5.4 -4.36, 4.42 5.4 -4.36, 4.42 5.4 -2.36,
+											]
+										}
+										normal NULL
+										texCoord NULL
+										ccw TRUE
+										colorIndex [
+										]
+										colorPerVertex TRUE
+										convex TRUE
+										coordIndex [
+											0 1 4 7 -1, 0 7 4 1 -1, 0 7 6 3 -1, 0 3 6 7 -1, 5 2 3 6 -1, 5 6 3 2 -1,
+										]
+										#default []
+										creaseAngle 0
+										normalIndex [
+										]
+										normalPerVertex TRUE
+										solid TRUE
+										texCoordIndex [
+										]
+									}
+								}
+							]
+						}
+						DEF plafondboven Transform {
+							children [
+								Shape {
+									appearance Appearance {
+										material Material {
+											ambientIntensity .2
+											diffuseColor 1 1 1
+											emissiveColor 0 0 0
+											shininess .1
+											specularColor 0 0 0
+											transparency 0
+										}
+										texture NULL
+										textureTransform NULL
+									}
+									geometry IndexedFaceSet {
+										color NULL
+										coord Coordinate {
+											#default NULL
+											point [
+												.14 5.3 -.14, 5.54 5.3 -.14, 5.54 5.3 -8.86, 3.19 5.3 -8.86,
+												5.54 5.3 -2.36, #-4
+												5.54 5.3 -4.36, 4.42 5.3 -4.36, 4.42 5.3 -2.36, 3.19 5.3 -6.4,
+												.14 5.3 -6.4,
+											]
+										}
+										normal NULL
+										texCoord NULL
+										ccw TRUE
+										colorIndex [
+										]
+										colorPerVertex TRUE
+										convex TRUE
+										coordIndex [
+											0 1 4 7 -1, 0 7 4 1 -1, 0 7 6 8 9 -1, 0 9 8 6 7 -1, 5 2 3 8 6 -1, 5 6 8 3
+											2 -1,
+										]
+										#default []
+										creaseAngle 0
+										normalIndex [
+										]
+										normalPerVertex TRUE
+										solid TRUE
+										texCoordIndex [
+										]
+									}
+								}
+							]
+						}
+						DEF vulstukvoortrap Transform {
+							children [
+								Shape {
+									appearance DEF wandkleur Appearance {
+										material Material {
+											ambientIntensity .2
+											diffuseColor 1 .9 .7
+											emissiveColor 0 0 0
+											shininess .1
+											specularColor 0 0 0
+											transparency 0
+										}
+										texture NULL
+										textureTransform NULL
+									}
+									geometry IndexedFaceSet {
+										color NULL
+										coord Coordinate {
+											#default NULL
+											point [
+												4.42 5.3 -2.36, #0
+												4.42 5.3 -3.36, 4.42 5.4 -3.36, 4.42 5.4 -2.36, #3
+												5.4 5.3 -2.36, #4
+												5.4 5.4 -2.36, 5.4 5.3 -4.36, #6
+												5.4 5.4 -4.36, 4.42 5.3 -4.36, #8
+												4.42 5.4 -4.36,
+											]
+										}
+										normal NULL
+										texCoord NULL
+										ccw TRUE
+										colorIndex [
+										]
+										colorPerVertex TRUE
+										convex TRUE
+										coordIndex [
+											0 1 2 3 -1, 0 3 2 1 -1, 0 3 5 4 -1, 9 8 6 7 -1,
+										]
+										#default []
+										creaseAngle 0
+										normalIndex [
+										]
+										normalPerVertex TRUE
+										solid FALSE
+										texCoordIndex [
+										]
+									}
+								}
+							]
+						}
+						# ballustrade.wrl
+						Transform {
+							children [
+								DEF spijlen Group {
+									children [
+										Transform {
+											children [
+												DEF spijl Shape {
+													appearance DEF kozijn Appearance {
+														material Material {
+															ambientIntensity .2
+															diffuseColor .95 .95 .9
+															emissiveColor 0 0 0
+															shininess .1
+															specularColor 0 0 0
+															transparency 0
+														}
+														texture NULL
+														textureTransform NULL
+													}
+													geometry Cylinder {
+														bottom FALSE
+														height .8
+														radius .015
+														side TRUE
+														top FALSE
+													}
+												}
+											]
+											translation -.025 .4 .05
+										}
+										Transform {
+											children USE spijl
+											translation -.025 .4 .15
+										}
+										Transform {
+											children USE spijl
+											translation -.025 .4 .25
+										}
+										Transform {
+											children USE spijl
+											translation -.025 .4 .35
+										}
+										Transform {
+											children USE spijl
+											translation -.025 .4 .45
+										}
+										Transform {
+											children USE spijl
+											translation -.025 .4 .55
+										}
+										Transform {
+											children USE spijl
+											translation -.025 .4 .65
+										}
+										Transform {
+											children USE spijl
+											translation -.025 .4 .75
+										}
+										Transform {
+											children USE spijl
+											translation -.025 .4 .85
+										}
+										Transform {
+											children USE spijl
+											translation -.025 .4 .95
+										}
+									]
+								}
+								#spijlengroup
+								Transform {
+									translation 0 0 1
+									rotation 0 1 0 1.570796
+									children USE spijlen
+								}
+								Transform {
+									children [
+										Shape {
+											appearance USE kozijn
+											geometry Box {
+												size .05 .03 1.05
+											}
+										}
+									]
+									translation -.025 .815 .525
+								}
+								Transform {
+									children [
+										Shape {
+											appearance USE kozijn
+											geometry Box {
+												size 1 .03 .05
+											}
+										}
+									]
+									translation .5 .815 1.025
+								}
+							]
+							translation 4.42 5.4 -3.36
+						}
+						# /ballustrade.wrl
+						# binmuur.wrl
+						Transform {
+							children [
+								Shape {
+									appearance Appearance {
+										material Material {
+											ambientIntensity .2
+											diffuseColor 1 .9 .7
+											emissiveColor 0 0 0
+											shininess .1
+											specularColor 0 0 0
+											transparency 0
+										}
+										texture NULL
+										textureTransform NULL
+									}
+									geometry IndexedFaceSet {
+										color NULL
+										coord Coordinate {
+											#default NULL
+											point [
+												.28 0 -.28, #0 linkerbenedenhoek voorgevel
+												5.4 0 -.28, 5.4 5.4 -.28, .28 5.4 -.28, #3 linkerbovenhoek voorgevel
+												3.19 0 -.28, #4 voordeur
+												4.42 0 -.28, 4.42 2.3 -.28, 3.19 2.3 -.28, #7 voordeur
+												4.84 1.6 -.28, #toiletraam-8
+												5.04 1.6 -.28, 5.04 2.3 -.28, 4.84 2.3 -.28, 2.6 .9 -.28,
+												#keukenraam-12
+												2.6 2.3 -.28, .6 2.3 -.28, .6 .9 -.28, .6 3.6 -.28, #bovenraam-16
+												1.5 3.6 -.28, 1.5 5 -.28, 4.42 5 -.28, 4.42 5.4 -.28, .6 5.4 -.28,
+												.28 8.55 -3.15, #linkergevel-22
+												.28 2.7 -8.72, .28 0 -8.72, 5.4 8.55 -3.15, #rechtergevel-25
+												5.4 5.4 -6.3, 5.4 5.4 -8.72, 5.4 0 -8.72, 2.25 0 -8.72, #achtergevel-29
+												2.25 .6 -8.72, 4.8 .6 -8.72, 4.8 5.4 -8.72, 1.2 0 -8.72, 1.2 2.7 -8.72,
+												3.19 0 -.14, #diepte van de voordeur-35
+												4.42 0 -.14, 4.42 2.3 -.14, 3.19 2.3 -.14, #diepte van de voordeur-38
+												2.6 .9 -.14, # diepte van het keukenraam-39
+												2.6 2.3 -.14, .6 2.3 -.14, .6 .9 -.14, 4.84 1.6 -.14, #diepte van het toiletraam-43
+												5.04 1.6 -.14, 5.04 2.3 -.14, 4.84 2.3 -.14, .6 3.6 -.14,
+												#diepte van het bovenraam-47
+												1.5 3.6 -.14, 1.5 5 -.14, 4.42 5 -.14, 4.42 5.4 -.14, .6 5.4 -.14,
+												#52
+												2.25 0 -8.86, #diepte van de achtergevel-53
+												2.25 .6 -8.86, 4.8 .6 -8.86, 4.8 5.4 -8.86, 1.2 0 -8.86, 1.2 2.7 -8.86,
+												#58
+												.28 5.4 0, #59 hoekpunt voor dakvorm zolder
+												5.4 5.4 0, .28 5.4 -6.3, #61
+												.28 2.7 -9, #62 hoekpunt voor dakvorm 1e verdieping
+												.14 5.4 0, #63 extra punten voor segmentering
+												5.54 5.4 0, .14 5.4 -6.3, 5.54 5.4 -6.3, #66
+												5.54 8.55 -3.15, #rechtergevel-67
+												.14 8.55 -3.15, #linkergevel-68
+											]
+										}
+										normal NULL
+										texCoord NULL
+										ccw TRUE
+										colorIndex [
+										]
+										colorPerVertex TRUE
+										convex TRUE
+										coordIndex [
+											59 22 61 -1, 60 25 26 -1, 59 63 68 22 -1, 68 22 61 65 -1, 60 64 67 25 -1,
+											25 67 66 26 -1,
+										]
+										#default []
+										creaseAngle 0
+										normalIndex [
+										]
+										normalPerVertex TRUE
+										solid FALSE
+										texCoordIndex [
+										]
+									}
+								}
+							]
+						}
+						# /binmuur.wrl
+						# buitmuur.wrl
+						Transform {
+							children [
+								Shape {
+									appearance DEF steen Appearance {
+										material Material {
+											ambientIntensity .2
+											diffuseColor .8 .4 .3
+											emissiveColor 0 0 0
+											shininess .1
+											specularColor 0 0 0
+											transparency 0
+										}
+										texture NULL
+										textureTransform NULL
+									}
+									geometry IndexedFaceSet {
+										color NULL
+										coord Coordinate {
+											#default NULL
+											point [
+												0 0 0, #linkerbenedenhoek voorgevel
+												5.68 0 0, 5.68 5.4 0, 0 5.4 0, #linkerbovenhoek voorgevel
+												3.19 0 0, #voordeur
+												4.42 0 0, 4.42 2.3 0, 3.19 2.3 0, #voordeur
+												4.84 1.6 0, #toiletraam-8
+												5.04 1.6 0, 5.04 2.3 0, 4.84 2.3 0, 2.6 .9 0, #keukenraam-12
+												2.6 2.3 0, .6 2.3 0, .6 .9 0, .6 3.6 0, #bovenraam-16
+												1.5 3.6 0, 1.5 5 0, 4.42 5 0, 4.42 5.4 0, .6 5.4 0, 0 8.555 -3.15,
+												#linkergevel-22
+												0 2.7 -9, 0 0 -9, 5.68 8.555 -3.15, #rechtergevel-25
+												5.68 5.4 -6.3, 5.68 5.4 -9, 5.68 0 -9, 2.25 0 -9, #achtergevel-29
+												2.25 .6 -9, 4.8 .6 -9, 4.8 5.4 -9, 1.2 0 -9, 1.2 2.7 -9, 3.19 0 -.14,
+												#diepte van de voordeur-35
+												4.42 0 -.14, 4.42 2.3 -.14, 3.19 2.3 -.14, #diepte van de voordeur-38
+												2.6 .9 -.14, # diepte van het keukenraam-39
+												2.6 2.3 -.14, .6 2.3 -.14, .6 .9 -.14, 4.84 1.6 -.14, #diepte van het toiletraam-43
+												5.04 1.6 -.14, 5.04 2.3 -.14, 4.84 2.3 -.14, .6 3.6 -.14,
+												#diepte van het bovenraam-47
+												1.5 3.6 -.14, 1.5 5 -.14, 4.42 5 -.14, 4.42 5.4 -.14, .6 5.4 -.14,
+												#52
+												2.25 0 -8.86, #diepte van de achtergevel-53
+												2.25 .6 -8.86, 4.8 .6 -8.86, 4.8 5.4 -8.86, 1.2 0 -8.86, 1.2 2.7 -8.86,
+												#58
+												.14 5.4 0, #59 extra punten voor segmentering
+												5.54 5.4 0, .14 5.4 -6.3, 5.54 5.4 -6.3, #62
+												5.54 8.55 -3.15, #rechtergevel-63
+												.14 8.55 -3.15, #linkergevel-64
+												0 5.4 -6.3,
+											]
+										}
+										normal NULL
+										texCoord NULL
+										ccw TRUE
+										colorIndex [
+										]
+										colorPerVertex TRUE
+										convex TRUE
+										coordIndex [
+											3 22 65 -1, 2 26 25 -1, 3 59 64 22 -1, 61 65 22 64 -1, 60 2 25 63 -1, 63 25
+											26 62 -1,
+										]
+										#default []
+										creaseAngle 0
+										normalIndex [
+										]
+										normalPerVertex TRUE
+										solid FALSE
+										texCoordIndex [
+										]
+									}
+								}
+							]
+						}
+						# /buitmuur.wrl
+						# /zolder/zolder.wrl
+						DEF tijd2 TimeSensor {
+							cycleInterval 4
+							enabled TRUE
+							loop FALSE
+							startTime 0
+							stopTime 0
+						}
+						DEF plaats2 PositionInterpolator {
+							key [
+								0 1
+							]
+							keyValue [
+								0 0 0 6 0 0
+							]
+						}
+						DEF tijd2a TimeSensor {
+							cycleInterval 4
+							enabled TRUE
+							loop FALSE
+							startTime 0
+							stopTime 0
+						}
+						DEF plaats2a PositionInterpolator {
+							key [
+								0 1
+							]
+							keyValue [
+								6 0 0 0 0 0
+							]
+						}
+					]
+				}
+				#zolder
+				DEF tijd3 TimeSensor {
+					cycleInterval 4
+					enabled TRUE
+					loop FALSE
+					startTime 0
+					stopTime 0
+				}
+				DEF plaats3 PositionInterpolator {
+					key [
+						0 1
+					]
+					keyValue [
+						0 0 0 6 0 0
+					]
+				}
+				DEF tijd3a TimeSensor {
+					cycleInterval 4
+					enabled TRUE
+					loop FALSE
+					startTime 0
+					stopTime 0
+				}
+				DEF plaats3a PositionInterpolator {
+					key [
+						0 1
+					]
+					keyValue [
+						6 0 0 0 0 0
 					]
 				}
-				normal            NULL
-				texCoord          NULL
-				ccw               TRUE
-				colorIndex        []
-				colorPerVertex    TRUE
-				convex            TRUE
-				coordIndex  [
-	3, 22, 65, -1,
-	2, 26, 25, -1,
-
-	3, 59, 64, 22, -1,
-	61, 65, 22, 64, -1,
-
-	60, 2, 25, 63, -1,
-	63, 25, 26, 62, -1,
-
-
-]     #default []
-				creaseAngle       0
-				normalIndex       []
-				normalPerVertex   TRUE
-				solid             FALSE
-				texCoordIndex     []
-			}
+			]
 		}
+		#boven
 	]
 }
-
-
-
-# /buitmuur.wrl
-
-# /zolder/zolder.wrl
-
-DEF tijd2 TimeSensor {
-	cycleInterval 4
-	enabled       TRUE
-	loop          FALSE
-	startTime     0
-	stopTime      0
-}
-
-DEF plaats2 PositionInterpolator {
-	key           [0, 1]
-	keyValue      [0 0 0 ,6 0 0]
-}
-
-DEF tijd2a TimeSensor {
-	cycleInterval 4
-	enabled       TRUE
-	loop          FALSE
-	startTime     0
-	stopTime      0
-}
-
-DEF plaats2a PositionInterpolator {
-	key           [0, 1]
-	keyValue      [6 0 0 ,0 0 0]
-}
-
-
-
-]
-}#zolder
-
-DEF tijd3 TimeSensor {
-	cycleInterval 4
-	enabled       TRUE
-	loop          FALSE
-	startTime     0
-	stopTime      0
-}
-
-DEF plaats3 PositionInterpolator {
-	key           [0, 1]
-	keyValue      [0 0 0 ,6 0 0]
-}
-
-DEF tijd3a TimeSensor {
-	cycleInterval 4
-	enabled       TRUE
-	loop          FALSE
-	startTime     0
-	stopTime      0
-}
-
-DEF plaats3a PositionInterpolator {
-	key           [0, 1]
-	keyValue      [6 0 0 ,0 0 0]
-}
-
-
-]
-}#boven
-
-
-
-]
-}
-
-#ROUTE schuifdak.touchTime TO tijd1.startTime
-#ROUTE tijd1.fraction_changed TO plaats1.set_fraction
-#ROUTE plaats1.value_changed TO dak.translation
-
-#ROUTE schuifzolder.touchTime TO tijd2.startTime
-#ROUTE tijd2.fraction_changed TO plaats2.set_fraction
-#ROUTE plaats2.value_changed TO zolder.translation
-
-#ROUTE schuifboven.touchTime TO tijd3.startTime
-#ROUTE tijd3.fraction_changed TO plaats3.set_fraction
-#ROUTE plaats3.value_changed TO boven.translation
-
-#ROUTE schuifdak2.touchTime TO tijd1a.startTime
-#ROUTE tijd1a.fraction_changed TO plaats1a.set_fraction
-#ROUTE plaats1a.value_changed TO dak.translation
-
-#ROUTE schuifzolder2.touchTime TO tijd2a.startTime
-#ROUTE tijd2a.fraction_changed TO plaats2a.set_fraction
-#ROUTE plaats2a.value_changed TO zolder.translation
-
-#ROUTE schuifboven2.touchTime TO tijd3a.startTime
-#ROUTE tijd3a.fraction_changed TO plaats3a.set_fraction
-#ROUTE plaats3a.value_changed TO boven.translation
-
+#moved from above
+ROUTE klikopdeur.touchTime TO TimeSource.startTime
+ROUTE TimeSource.fraction_changed TO Deuropen.set_fraction
+ROUTE Deuropen.value_changed TO deur.rotation
+ROUTE klikopdeur2.touchTime TO TimeSource2.startTime
+ROUTE TimeSource2.fraction_changed TO Deuropen2.set_fraction
+ROUTE Deuropen2.value_changed TO deurkeukengang.rotation
+ROUTE klikopdeur3.touchTime TO TimeSource3.startTime
+ROUTE TimeSource3.fraction_changed TO Deuropen3.set_fraction
+ROUTE Deuropen3.value_changed TO deurwoonkamergang.rotation
+ROUTE klikopdeur4.touchTime TO TimeSource4.startTime
+ROUTE TimeSource4.fraction_changed TO Deuropen4.set_fraction
+ROUTE Deuropen4.value_changed TO deurwoonkamertrapkast.rotation
+ROUTE klikopdeur5.touchTime TO TimeSource5.startTime
+ROUTE TimeSource5.fraction_changed TO Deuropen5.set_fraction
+ROUTE Deuropen5.value_changed TO deurgangmeterkast.rotation
+ROUTE klikopdeur6.touchTime TO TimeSource6.startTime
+ROUTE TimeSource6.fraction_changed TO Deuropen6.set_fraction
+ROUTE Deuropen6.value_changed TO deurtoiletgang.rotation
+ROUTE klikopvoordeur.touchTime TO TimeSourcevoor.startTime
+ROUTE TimeSourcevoor.fraction_changed TO VoorDeuropen.set_fraction
+ROUTE VoorDeuropen.value_changed TO voordeur.rotation
+ROUTE klikopachterdeur.touchTime TO TimeSourceachter.startTime
+ROUTE TimeSourceachter.fraction_changed TO achterDeuropen.set_fraction
+ROUTE achterDeuropen.value_changed TO achterdeur.rotation
+ROUTE klikopschuurdeur.touchTime TO TimeSourceschuur.startTime
+ROUTE TimeSourceschuur.fraction_changed TO schuurDeuropen.set_fraction
+ROUTE schuurDeuropen.value_changed TO schuurdeur.rotation
+ROUTE klikopdeur7.touchTime TO TimeSource7.startTime
+ROUTE TimeSource7.fraction_changed TO Deuropen7.set_fraction
+ROUTE Deuropen7.value_changed TO deuroudersgang.rotation
+ROUTE klikopdeur8.touchTime TO TimeSource8.startTime
+ROUTE TimeSource8.fraction_changed TO Deuropen8.set_fraction
+ROUTE Deuropen8.value_changed TO deurtweedeslaapkamergang.rotation
+ROUTE klikopdeur9.touchTime TO TimeSource9.startTime
+ROUTE TimeSource9.fraction_changed TO Deuropen9.set_fraction
+ROUTE Deuropen9.value_changed TO deurkinderkamergang.rotation
+ROUTE klikopdeur10.touchTime TO TimeSource10.startTime
+ROUTE TimeSource10.fraction_changed TO Deuropen10.set_fraction
+ROUTE Deuropen10.value_changed TO deurbadkamergang.rotation
+#uncommented
+ROUTE schuifdak.touchTime TO tijd1.startTime
+ROUTE tijd1.fraction_changed TO plaats1.set_fraction
+ROUTE plaats1.value_changed TO dak.translation
+ROUTE schuifzolder.touchTime TO tijd2.startTime
+ROUTE tijd2.fraction_changed TO plaats2.set_fraction
+ROUTE plaats2.value_changed TO zolder.translation
+ROUTE schuifboven.touchTime TO tijd3.startTime
+ROUTE tijd3.fraction_changed TO plaats3.set_fraction
+ROUTE plaats3.value_changed TO boven.translation
+ROUTE schuifdak2.touchTime TO tijd1a.startTime
+ROUTE tijd1a.fraction_changed TO plaats1a.set_fraction
+ROUTE plaats1a.value_changed TO dak.translation
+ROUTE schuifzolder2.touchTime TO tijd2a.startTime
+ROUTE tijd2a.fraction_changed TO plaats2a.set_fraction
+ROUTE plaats2a.value_changed TO zolder.translation
+ROUTE schuifboven2.touchTime TO tijd3a.startTime
+ROUTE tijd3a.fraction_changed TO plaats3a.set_fraction
+ROUTE plaats3a.value_changed TO boven.translation

+ 3 - 3
examples/webgl_geometry_extrude_shapes2.html

@@ -289,7 +289,7 @@ var addGeoObject = function( group, svgObject ) {
 	len = thePaths.length;
 	for (i = 0; i < len; ++i) {
 		path = $d3g.transformSVGPath( thePaths[i] );
-		color = new THREE.Color( theColors[i] ); 
+		color = new THREE.Color( theColors[i] );
 		material = new THREE.MeshLambertMaterial({
 			color: color,
 			emissive: color
@@ -342,7 +342,7 @@ var init3d = function(){
 	scene.add( ambientLight );
 
 	/// backgroup grids
-	var helper = new THREE.GridHelper( 80, 10 );
+	var helper = new THREE.GridHelper( 160, 10 );
 	helper.rotation.x = Math.PI / 2;
 	group.add( helper );
 
@@ -371,7 +371,7 @@ var initSVGObject = function() {
 		"L350.9772,115.1221 L354.5759,112.5371 L354.5667,110.6949 L357.4098,105.7489 L362.3963,101.8443 " +
 		"L364.4415,101.0819 L364.5314,101.0828 L364.6209,101.1230 L364.7698,101.2029 L368.1221,101.5115 " +
 		"L371.7216,104.1338 L372.2958,106.7261 L375.5949,109.6971 L377.0415,108.8875 L377.0737,108.6526 " +
-		"L377.4037,108.6165 L376.8840,109.7091 L376.7323,109.9037 L377.9416,112.0705 L371.7970,114.8736 " + 
+		"L377.4037,108.6165 L376.8840,109.7091 L376.7323,109.9037 L377.9416,112.0705 L371.7970,114.8736 " +
 		"L374.0935,119.4031 L380.7848,122.7963 L382.6529,121.9897 L381.5792,117.8256 L385.0339,117.3069 " +
 		"L385.4082,115.6247 L388.7014,116.3969 L389.8697,116.6024 L390.0206,116.4860 L391.0396,116.6118 " +
 		"L394.6665,116.9929 L394.4694,119.2255 L394.3172,119.4987 L395.3792,121.8977 L395.2728,124.0526 " +

+ 1 - 1
examples/webgl_geometry_spline_editor.html

@@ -89,7 +89,7 @@
 				plane.receiveShadow = true;
 				scene.add( plane );
 
-				var helper = new THREE.GridHelper( 1000, 100 );
+				var helper = new THREE.GridHelper( 2000, 100 );
 				helper.position.y = - 199;
 				helper.material.opacity = 0.25;
 				helper.material.transparent = true;

+ 1 - 1
examples/webgl_helpers.html

@@ -45,7 +45,7 @@
 
 				scene.add( new THREE.PointLightHelper( light, 5 ) );
 
-				var gridHelper = new THREE.GridHelper( 200, 40, 0x0000ff, 0x808080 );
+				var gridHelper = new THREE.GridHelper( 400, 40, 0x0000ff, 0x808080 );
 				gridHelper.position.y = - 150;
 				gridHelper.position.x = - 150;
 				scene.add( gridHelper );

+ 1 - 1
examples/webgl_loader_amf.html

@@ -74,7 +74,7 @@
 
 				scene.add( camera );
 
-				var grid = new THREE.GridHelper( 25, 50, 0xffffff, 0x555555 );
+				var grid = new THREE.GridHelper( 50, 50, 0xffffff, 0x555555 );
 				grid.rotateOnAxis( new THREE.Vector3( 1, 0, 0 ), 90 * ( Math.PI/180 ) );
 				scene.add( grid );
 

+ 1 - 1
examples/webgl_loader_bvh.html

@@ -71,7 +71,7 @@
 
 				scene = new THREE.Scene();
 
-				scene.add( new THREE.GridHelper( 200, 10 ) );
+				scene.add( new THREE.GridHelper( 400, 10 ) );
 
 				// renderer
 				renderer = new THREE.WebGLRenderer( { antialias: true } );

+ 1 - 1
examples/webgl_loader_fbx.html

@@ -64,7 +64,7 @@
 				scene = new THREE.Scene();
 
 				// grid
-				var gridHelper = new THREE.GridHelper( 14, 28, 0x303030, 0x303030 );
+				var gridHelper = new THREE.GridHelper( 28, 28, 0x303030, 0x303030 );
 				gridHelper.position.set( 0, - 0.04, 0 );
 				scene.add( gridHelper );
 

+ 74 - 94
examples/webgl_loader_gltf.html

@@ -31,98 +31,67 @@
 			}
 
 			#controls {
-				position:absolute;
-				width:250px;
-				bottom:0%;
-				right:0%;
-				height:132px;
-				background-color:White;
-				opacity:.9;
-				font: 13px/1.231 "Lucida Grande", Lucida, Verdana, sans-serif;
-			}
-
-			#status {
-				position:absolute;
-				width:25%;
-				left:2%;
-				top:95%;
-				height:5%;
-				opacity:.9;
-				font: 13px/1.231 "Lucida Grande", Lucida, Verdana, sans-serif;
-			}
-
-			.control {
-				position:absolute;
-				margin-left:12px;
-				width:100%;
-				font-weight:bold;
-			}
-
-			.controlValue {
-				position:absolute;
-				left:36%;
-				top:0%;
-			}
-
-			#scenes_control {
-				position:absolute;
-				top:8px;
+				position: absolute;
+				width: 200px;
+				bottom: 0px;
+				left: 0px;
+				padding: 10px;
+				background-color: White;
+				font: 13px "Lucida Grande", Lucida, Verdana, sans-serif;
 			}
 
-			#cameras_control {
-				position:absolute;
-				top:40px;
+			#controls > div {
+				margin-bottom: 8px;
 			}
 
-			#animations_control {
-				position:absolute;
-				top:72px;
+			#controls hr {
+				border: 0px;
+				height: 1px;
+				margin-bottom: 10px;
+				background-color: #bbb;
 			}
 
-			#materials_extension_control {
-				position:absolute;
-				top:104px;
+			#info a, .button {
+				color: #f00;
+				font-weight: bold;
+				text-decoration: underline;
+				cursor: pointer
 			}
-
-			#info a, .button { color: #f00; font-weight: bold; text-decoration: underline; cursor: pointer }
 		</style>
 	</head>
 
 	<body>
 		<div id="info">
 		<a href="http://threejs.org" target="_blank">three.js</a> -
-		<a href="https://github.com/KhronosGroup/glTF" target="_blank">glTF</a> loader -
+		<a href="https://github.com/KhronosGroup/glTF" target="_blank">glTF</a> loader
 		<br>
-		monster by <a href="http://www.3drt.com/downloads.htm" target="_blank">3drt</a> -
-		COLLADA duck by Sony - Cesium models courtesy <a href="http://cesiumjs.org/" target="_blank">Cesium</a>
+		monster by <a href="http://www.3drt.com/downloads.htm" target="_blank">3drt</a> - COLLADA duck by Sony -
+		Cesium models by <a href="http://cesiumjs.org/" target="_blank">Cesium</a>
 		</div>
-	<div id="container">
-	</div>
-	<div id="status">
-	</div>
+	<div id="container"></div>
 	<div id="controls">
-		<div class="control" id="scenes_control">
-		Model
-		<select class="controlValue" id="scenes_list" size="1" onchange="selectScene();" ondblclick="selectScene();">
-		</select>
+		<div id="status">Loading...</div>
+		<hr />
+		<div>
+			Model
+			<select id="scenes_list" size="1" onchange="selectScene();" ondblclick="selectScene();"></select>
 		</div>
-
-		<div class="control" id="cameras_control">
-		Camera
-		<select class="controlValue" id="cameras_list" size="1" onchange="selectCamera();" ondblclick="selectCamera();">
-		</select>
+		<div>
+			Camera
+			<select id="cameras_list" size="1" onchange="selectCamera();" ondblclick="selectCamera();"></select>
 		</div>
-		<div class="control" id="animations_control">
-		Animations
-		<div class="controlValue"><input type="checkbox" checked onclick="toggleAnimations();">Play</input></div>
+		<div>
+			Animations
+			<input type="checkbox" checked onclick="toggleAnimations();">Play</input>
 		</div>
-		<div class="control" id="materials_extension_control">
-			Shaders
-			<div class="controlValue">
-			<input type="checkbox" id="materials_extension_checkbox" checked onclick="toggleMaterialsExtension();">Use built-in</input>
-			</div>
+		<div>
+			Extension
+			<select id="extensions_list" onchange="selectExtension();">
+				<option value="glTF">None</option>
+				<option value="glTF-MaterialsCommon">Built-in shaders</option>
+				<option value="glTF-Binary">Binary</option>
+			</select>
 		</div>
-
 	</div>
 		<script src="../build/three.js"></script>
 		<script src="js/controls/OrbitControls.js"></script>
@@ -235,28 +204,34 @@
 
 				THREE.GLTFLoader.Shaders.removeAll(); // remove all previous shaders
 				loader = new THREE.GLTFLoader;
-				var loadStartTime = Date.now();
-				var status = document.getElementById("status");
-				status.innerHTML = "Loading...";
+
+				for (var i = 0; i < extensionSelect.children.length; i++) {
+					var child = extensionSelect.children[i];
+					child.disabled = sceneInfo.extensions.indexOf(child.value) === -1;
+					if (child.disabled && child.selected) {
+						extensionSelect.value = extension = 'glTF';
+					}
+				}
+
 				var url = sceneInfo.url;
 				var r = eval("/" + '\%s' + "/g");
-				var dir = useMaterialsExtension ? 'glTF-MaterialsCommon' :  'glTF';
-				url = url.replace(r, dir);
+				url = url.replace(r, extension);
+
+				if (extension === 'glTF-Binary') {
+					url = url.replace('.gltf', '.glb');
+				}
 
-				var loadStartTime = Date.now();
+				var loadStartTime = performance.now();
 				var status = document.getElementById("status");
 				status.innerHTML = "Loading...";
+
 				loader.load( url, function(data) {
 
 					gltf = data;
 
 					var object = gltf.scene !== undefined ? gltf.scene : gltf.scenes[ 0 ];
 
-					var loadEndTime = Date.now();
-
-					var loadTime = (loadEndTime - loadStartTime) / 1000;
-
-					status.innerHTML = "Load time: " + loadTime.toFixed(2) + " seconds.";
+					status.innerHTML = "Load time: " + ( performance.now() - loadStartTime ).toFixed( 2 ) + " ms.";
 
 					if (sceneInfo.cameraPos)
 						defaultCamera.position.copy(sceneInfo.cameraPos);
@@ -405,14 +380,16 @@
 					animationTime: 3,
 					addLights:true,
 					shadows:true,
-					addGround:true
+					addGround:true,
+					extensions: ["glTF", "glTF-MaterialsCommon", "glTF-Binary"]
 				},
 				{
 					name : "Duck", url : "./models/gltf/duck/%s/duck.gltf",
 					cameraPos: new THREE.Vector3(0, 3, 5),
 					addLights:true,
 					addGround:true,
-					shadows:true
+					shadows:true,
+					extensions: ["glTF", "glTF-MaterialsCommon", "glTF-Binary"]
 				},
 				{
 					name : "Cesium Man", url : "./models/gltf/CesiumMan/%s/Cesium_Man.gltf",
@@ -420,7 +397,8 @@
 					 objectRotation: new THREE.Euler(0, 0, 0),
 					 addLights:true,
 					 addGround:true,
-					 shadows:true
+					 shadows:true,
+					 extensions: ["glTF", "glTF-MaterialsCommon", "glTF-Binary"]
 				},
 				{
 					name : "Cesium Milk Truck",
@@ -428,7 +406,8 @@
 					cameraPos: new THREE.Vector3(0, 3, 10),
 					addLights:true,
 					addGround:true,
-					shadows:true
+					shadows:true,
+					extensions: ["glTF", "glTF-MaterialsCommon", "glTF-Binary"]
 				},
 				{
 					name : "Snowflake",
@@ -438,7 +417,8 @@
 					objectPosition: new THREE.Vector3(0, 0, 0),
 					addLights:false,
 					addGround:false,
-					shadows:false
+					shadows:false,
+					extensions: ["glTF"]
 				},
 				{
 					name : "Snowflakes",
@@ -447,7 +427,8 @@
 					objectPosition: new THREE.Vector3(-1200, -1200, 0),
 					addLights:false,
 					addGround:false,
-					shadows:false
+					shadows:false,
+					extensions: ["glTF"]
 				}
 			];
 
@@ -558,15 +539,14 @@
 
 			}
 
-			var useextmaterials = document.getElementById("materials_extension_checkbox");
-			var useMaterialsExtension = useextmaterials.hasAttribute("checked");
-			function toggleMaterialsExtension()
+			var extensionSelect = document.getElementById("extensions_list");
+			var extension = extensionSelect.value;
+			function selectExtension()
 			{
-				useMaterialsExtension = !useMaterialsExtension;
+				extension = extensionSelect.value;
 				selectScene();
 			}
 
-
 			function cleanup() {
 
 				if (container && renderer) {

+ 1 - 1
examples/webgl_loader_msgpack.html

@@ -86,7 +86,7 @@ https://github.com/creationix/msgpack-js-browser
 			function setupScene( result ) {
 
 				scene = result;
-				scene.add( new THREE.GridHelper( 10, 8 ) );
+				scene.add( new THREE.GridHelper( 20, 8 ) );
 
 				threePointLight();
 

+ 1 - 1
examples/webgl_shaders_sky.html

@@ -141,7 +141,7 @@
 
 				scene = new THREE.Scene();
 
-				var helper = new THREE.GridHelper( 5000, 2, 0xffffff, 0xffffff );
+				var helper = new THREE.GridHelper( 10000, 2, 0xffffff, 0xffffff );
 				scene.add( helper );
 
 				renderer = new THREE.WebGLRenderer();

+ 1 - 1
examples/webvr_vive_paint.html

@@ -114,7 +114,7 @@
 				floor.receiveShadow = true;
 				scene.add( floor );
 
-				scene.add( new THREE.GridHelper( 10, 40, 0x111111, 0x111111 ) );
+				scene.add( new THREE.GridHelper( 20, 40, 0x111111, 0x111111 ) );
 
 				scene.add( new THREE.HemisphereLight( 0x888877, 0x777788 ) );
 

+ 1 - 1
examples/webvr_vive_sculpt.html

@@ -95,7 +95,7 @@
 				floor.receiveShadow = true;
 				scene.add( floor );
 
-				scene.add( new THREE.GridHelper( 10, 40, 0x111111, 0x111111 ) );
+				scene.add( new THREE.GridHelper( 20, 40, 0x111111, 0x111111 ) );
 
 				scene.add( new THREE.HemisphereLight( 0x888877, 0x777788 ) );
 

+ 180 - 9
src/core/Geometry.js

@@ -20,7 +20,7 @@ import { _Math } from '../math/Math';
  */
 
 var count = 0;
-function GeometryIdCount() { return count++; };
+function GeometryIdCount() { return count++; }
 
 function Geometry() {
 
@@ -1200,36 +1200,59 @@ Geometry.prototype = {
 
 	copy: function ( source ) {
 
+		var i, il, j, jl, k, kl;
+
+		// reset
+
 		this.vertices = [];
-		this.faces = [];
-		this.faceVertexUvs = [ [] ];
 		this.colors = [];
+		this.faces = [];
+		this.faceVertexUvs = [[]];
+		this.morphTargets = [];
+		this.morphNormals = [];
+		this.skinWeights = [];
+		this.skinIndices = [];
+		this.lineDistances = [];
+		this.boundingBox = null;
+		this.boundingSphere = null;
+
+		// name
+
+		this.name = source.name;
+
+		// vertices
 
 		var vertices = source.vertices;
 
-		for ( var i = 0, il = vertices.length; i < il; i ++ ) {
+		for ( i = 0, il = vertices.length; i < il; i ++ ) {
 
 			this.vertices.push( vertices[ i ].clone() );
 
 		}
 
+		// colors
+
 		var colors = source.colors;
 
-		for ( var i = 0, il = colors.length; i < il; i ++ ) {
+		for ( i = 0, il = colors.length; i < il; i ++ ) {
 
 			this.colors.push( colors[ i ].clone() );
 
 		}
 
+		// faces
+
 		var faces = source.faces;
 
-		for ( var i = 0, il = faces.length; i < il; i ++ ) {
+		for ( i = 0, il = faces.length; i < il; i ++ ) {
 
 			this.faces.push( faces[ i ].clone() );
 
 		}
 
-		for ( var i = 0, il = source.faceVertexUvs.length; i < il; i ++ ) {
+		// face vertex uvs
+
+		for ( i = 0, il = source.faceVertexUvs.length; i < il; i ++ ) {
 
 			var faceVertexUvs = source.faceVertexUvs[ i ];
 
@@ -1239,11 +1262,11 @@ Geometry.prototype = {
 
 			}
 
-			for ( var j = 0, jl = faceVertexUvs.length; j < jl; j ++ ) {
+			for ( j = 0, jl = faceVertexUvs.length; j < jl; j ++ ) {
 
 				var uvs = faceVertexUvs[ j ], uvsCopy = [];
 
-				for ( var k = 0, kl = uvs.length; k < kl; k ++ ) {
+				for ( k = 0, kl = uvs.length; k < kl; k ++ ) {
 
 					var uv = uvs[ k ];
 
@@ -1257,6 +1280,154 @@ Geometry.prototype = {
 
 		}
 
+		// morph targets
+
+		var morphTargets = source.morphTargets;
+
+		for ( i = 0, il = morphTargets.length; i < il; i ++ ) {
+
+			var morphTarget = {};
+			morphTarget.name = morphTargets[ i ].name;
+
+			// vertices
+
+			if ( morphTargets[ i ].vertices !== undefined ) {
+
+				morphTarget.vertices = [];
+
+				for ( j = 0, jl = morphTargets[ i ].vertices.length; j < jl; j ++ ) {
+
+					morphTarget.vertices.push( morphTargets[ i ].vertices[ j ].clone() );
+
+				}
+
+			}
+
+			// normals
+
+			if ( morphTargets[ i ].normals !== undefined ) {
+
+				morphTarget.normals = [];
+
+				for ( j = 0, jl = morphTargets[ i ].normals.length; j < jl; j ++ ) {
+
+					morphTarget.normals.push( morphTargets[ i ].normals[ j ].clone() );
+
+				}
+
+			}
+
+			this.morphTargets.push( morphTarget );
+
+		}
+
+		// morph normals
+
+		var morphNormals = source.morphNormals;
+
+		for ( i = 0, il = morphNormals.length; i < il; i ++ ) {
+
+			var morphNormal = {};
+
+			// vertex normals
+
+			if ( morphNormals[ i ].vertexNormals !== undefined ) {
+
+				morphNormal.vertexNormals = [];
+
+				for ( j = 0, jl = morphNormals[ i ].vertexNormals.length; j < jl; j ++ ) {
+
+					var srcVertexNormal = morphNormals[ i ].vertexNormals[ j ];
+					var destVertexNormal = {};
+
+					destVertexNormal.a = srcVertexNormal.a.clone();
+					destVertexNormal.b = srcVertexNormal.b.clone();
+					destVertexNormal.c = srcVertexNormal.c.clone();
+
+					morphNormal.vertexNormals.push( destVertexNormal );
+
+				}
+
+			}
+
+			// face normals
+
+			if ( morphNormals[ i ].faceNormals !== undefined ) {
+
+				morphNormal.faceNormals = [];
+
+				for ( j = 0, jl = morphNormals[ i ].faceNormals.length; j < jl; j ++ ) {
+
+					morphNormal.faceNormals.push( morphNormals[ i ].faceNormals[ j ].clone() );
+
+				}
+
+			}
+
+			this.morphNormals.push( morphNormal );
+
+		}
+
+		// skin weights
+
+		var skinWeights = source.skinWeights;
+
+		for ( i = 0, il = skinWeights.length; i < il; i ++ ) {
+
+			this.skinWeights.push( skinWeights[ i ].clone() );
+
+		}
+
+		// skin indices
+
+		var skinIndices = source.skinIndices;
+
+		for ( i = 0, il = skinIndices.length; i < il; i ++ ) {
+
+			this.skinIndices.push( skinIndices[ i ].clone() );
+
+		}
+
+		// line distances
+
+		var lineDistances = source.lineDistances;
+
+		for ( i = 0, il = lineDistances.length; i < il; i ++ ) {
+
+			this.lineDistances.push( lineDistances[ i ] );
+
+		}
+
+		// bounding box
+
+		var boundingBox = source.boundingBox;
+
+		if ( boundingBox !== null ) {
+
+			this.boundingBox = boundingBox.clone();
+
+		}
+
+		// bounding sphere
+
+		var boundingSphere = source.boundingSphere;
+
+		if ( boundingSphere !== null ) {
+
+			this.boundingSphere = boundingSphere.clone();
+
+		}
+
+		// update flags
+
+		this.elementsNeedUpdate = source.elementsNeedUpdate;
+		this.verticesNeedUpdate = source.verticesNeedUpdate;
+		this.uvsNeedUpdate = source.uvsNeedUpdate;
+		this.normalsNeedUpdate = source.normalsNeedUpdate;
+		this.colorsNeedUpdate = source.colorsNeedUpdate;
+		this.lineDistancesNeedUpdate = source.lineDistancesNeedUpdate;
+		this.groupsNeedUpdate = source.groupsNeedUpdate;
+
 		return this;
 
 	},

+ 40 - 71
src/geometries/BoxGeometry.js

@@ -32,7 +32,7 @@ BoxGeometry.prototype.constructor = BoxGeometry;
  * @author Mugen87 / https://github.com/Mugen87
  */
 
-import { BufferAttribute } from '../core/BufferAttribute';
+import { Float32BufferAttribute, Uint16BufferAttribute, Uint32BufferAttribute } from '../core/BufferAttribute';
 import { BufferGeometry } from '../core/BufferGeometry';
 import { Vector3 } from '../math/Vector3';
 
@@ -54,30 +54,25 @@ function BoxBufferGeometry( width, height, depth, widthSegments, heightSegments,
 	var scope = this;
 
 	// segments
+
 	widthSegments = Math.floor( widthSegments ) || 1;
 	heightSegments = Math.floor( heightSegments ) || 1;
 	depthSegments = Math.floor( depthSegments ) || 1;
 
-	// these are used to calculate buffer length
-	var vertexCount = calculateVertexCount( widthSegments, heightSegments, depthSegments );
-	var indexCount = calculateIndexCount( widthSegments, heightSegments, depthSegments );
-
 	// buffers
-	var indices = new ( indexCount > 65535 ? Uint32Array : Uint16Array )( indexCount );
-	var vertices = new Float32Array( vertexCount * 3 );
-	var normals = new Float32Array( vertexCount * 3 );
-	var uvs = new Float32Array( vertexCount * 2 );
-
-	// offset variables
-	var vertexBufferOffset = 0;
-	var uvBufferOffset = 0;
-	var indexBufferOffset = 0;
-	var numberOfVertices = 0;
 
-	// group variables
+	var indices = [];
+	var vertices = [];
+	var normals = [];
+	var uvs = [];
+
+	// helper variables
+
+	var numberOfVertices = 0;
 	var groupStart = 0;
 
 	// build each side of the box geometry
+
 	buildPlane( 'z', 'y', 'x', - 1, - 1, depth, height,   width,  depthSegments, heightSegments, 0 ); // px
 	buildPlane( 'z', 'y', 'x',   1, - 1, depth, height, - width,  depthSegments, heightSegments, 1 ); // nx
 	buildPlane( 'x', 'z', 'y',   1,   1, width, depth,    height, widthSegments, depthSegments,  2 ); // py
@@ -86,38 +81,11 @@ function BoxBufferGeometry( width, height, depth, widthSegments, heightSegments,
 	buildPlane( 'x', 'y', 'z', - 1, - 1, width, height, - depth,  widthSegments, heightSegments, 5 ); // nz
 
 	// build geometry
-	this.setIndex( new BufferAttribute( indices, 1 ) );
-	this.addAttribute( 'position', new BufferAttribute( vertices, 3 ) );
-	this.addAttribute( 'normal', new BufferAttribute( normals, 3 ) );
-	this.addAttribute( 'uv', new BufferAttribute( uvs, 2 ) );
-
-	// helper functions
-
-	function calculateVertexCount( w, h, d ) {
-
-		var vertices = 0;
-
-		// calculate the amount of vertices for each side (plane)
-		vertices += (w + 1) * (h + 1) * 2; // xy
-		vertices += (w + 1) * (d + 1) * 2; // xz
-		vertices += (d + 1) * (h + 1) * 2; // zy
-
-		return vertices;
-
-	}
-
-	function calculateIndexCount( w, h, d ) {
-
-		var index = 0;
 
-		// calculate the amount of squares for each side
-		index += w * h * 2; // xy
-		index += w * d * 2; // xz
-		index += d * h * 2; // zy
-
-		return index * 6; // two triangles per square => six vertices per square
-
-	}
+	this.setIndex( new ( indices.length > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 ) );
+	this.addAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );
+	this.addAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );
+	this.addAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );
 
 	function buildPlane( u, v, w, udir, vdir, width, height, depth, gridX, gridY, materialIndex ) {
 
@@ -134,51 +102,55 @@ function BoxBufferGeometry( width, height, depth, widthSegments, heightSegments,
 		var vertexCounter = 0;
 		var groupCount = 0;
 
+		var ix, iy;
+
 		var vector = new Vector3();
 
 		// generate vertices, normals and uvs
 
-		for ( var iy = 0; iy < gridY1; iy ++ ) {
+		for ( iy = 0; iy < gridY1; iy ++ ) {
 
 			var y = iy * segmentHeight - heightHalf;
 
-			for ( var ix = 0; ix < gridX1; ix ++ ) {
+			for ( ix = 0; ix < gridX1; ix ++ ) {
 
 				var x = ix * segmentWidth - widthHalf;
 
 				// set values to correct vector component
+
 				vector[ u ] = x * udir;
 				vector[ v ] = y * vdir;
 				vector[ w ] = depthHalf;
 
 				// now apply vector to vertex buffer
-				vertices[ vertexBufferOffset ] = vector.x;
-				vertices[ vertexBufferOffset + 1 ] = vector.y;
-				vertices[ vertexBufferOffset + 2 ] = vector.z;
+
+				vertices.push( vector.x, vector.y, vector.z );
 
 				// set values to correct vector component
+
 				vector[ u ] = 0;
 				vector[ v ] = 0;
 				vector[ w ] = depth > 0 ? 1 : - 1;
 
 				// now apply vector to normal buffer
-				normals[ vertexBufferOffset ] = vector.x;
-				normals[ vertexBufferOffset + 1 ] = vector.y;
-				normals[ vertexBufferOffset + 2 ] = vector.z;
+
+				normals.push( vector.x, vector.y, vector.z );
 
 				// uvs
-				uvs[ uvBufferOffset ] = ix / gridX;
-				uvs[ uvBufferOffset + 1 ] = 1 - ( iy / gridY );
 
-				// update offsets and counters
-				vertexBufferOffset += 3;
-				uvBufferOffset += 2;
+				uvs.push( ix / gridX );
+				uvs.push( 1 - ( iy / gridY ) );
+
+				// counters
+
 				vertexCounter += 1;
 
 			}
 
 		}
 
+		// indices
+
 		// 1. you need three indices to draw a single face
 		// 2. a single segment consists of two faces
 		// 3. so we need to generate six (2*3) indices per segment
@@ -187,24 +159,18 @@ function BoxBufferGeometry( width, height, depth, widthSegments, heightSegments,
 
 			for ( ix = 0; ix < gridX; ix ++ ) {
 
-				// indices
 				var a = numberOfVertices + ix + gridX1 * iy;
 				var b = numberOfVertices + ix + gridX1 * ( iy + 1 );
 				var c = numberOfVertices + ( ix + 1 ) + gridX1 * ( iy + 1 );
 				var d = numberOfVertices + ( ix + 1 ) + gridX1 * iy;
 
-				// face one
-				indices[ indexBufferOffset ] = a;
-				indices[ indexBufferOffset + 1 ] = b;
-				indices[ indexBufferOffset + 2 ] = d;
+				// faces
+
+				indices.push( a, b, d );
+				indices.push( b, c, d );
 
-				// face two
-				indices[ indexBufferOffset + 3 ] = b;
-				indices[ indexBufferOffset + 4 ] = c;
-				indices[ indexBufferOffset + 5 ] = d;
+				// increase counter
 
-				// update offsets and counters
-				indexBufferOffset += 6;
 				groupCount += 6;
 
 			}
@@ -212,12 +178,15 @@ function BoxBufferGeometry( width, height, depth, widthSegments, heightSegments,
 		}
 
 		// add a group to the geometry. this will ensure multi material support
+
 		scope.addGroup( groupStart, groupCount, materialIndex );
 
 		// calculate new start value for groups
+
 		groupStart += groupCount;
 
 		// update total number of vertices
+
 		numberOfVertices += vertexCounter;
 
 	}

+ 42 - 23
src/geometries/CircleGeometry.js

@@ -26,12 +26,13 @@ CircleGeometry.prototype.constructor = CircleGeometry;
 
 /**
  * @author benaadams / https://twitter.com/ben_a_adams
+ * @author Mugen87 / https://github.com/Mugen87
  */
 
+import { Float32BufferAttribute, Uint16BufferAttribute, Uint32BufferAttribute } from '../core/BufferAttribute';
 import { BufferGeometry } from '../core/BufferGeometry';
 import { Vector3 } from '../math/Vector3';
-import { Sphere } from '../math/Sphere';
-import { BufferAttribute } from '../core/BufferAttribute';
+import { Vector2 } from '../math/Vector2';
 
 function CircleBufferGeometry( radius, segments, thetaStart, thetaLength ) {
 
@@ -52,45 +53,63 @@ function CircleBufferGeometry( radius, segments, thetaStart, thetaLength ) {
 	thetaStart = thetaStart !== undefined ? thetaStart : 0;
 	thetaLength = thetaLength !== undefined ? thetaLength : Math.PI * 2;
 
-	var vertices = segments + 2;
+	// buffers
 
-	var positions = new Float32Array( vertices * 3 );
-	var normals = new Float32Array( vertices * 3 );
-	var uvs = new Float32Array( vertices * 2 );
+	var indices = [];
+	var vertices = [];
+	var normals = [];
+	var uvs = [];
+
+	// helper variables
+
+	var i, s;
+	var vertex = new Vector3();
+	var uv = new Vector2();
 
-	// center data is already zero, but need to set a few extras
-	normals[ 2 ] = 1.0;
-	uvs[ 0 ] = 0.5;
-	uvs[ 1 ] = 0.5;
+	// center point
 
-	for ( var s = 0, i = 3, ii = 2 ; s <= segments; s ++, i += 3, ii += 2 ) {
+	vertices.push( 0, 0, 0 );
+	normals.push( 0, 0, 1 );
+	uvs.push( 0.5, 0.5 );
+
+	for ( s = 0, i = 3; s <= segments; s ++, i += 3 ) {
 
 		var segment = thetaStart + s / segments * thetaLength;
 
-		positions[ i ] = radius * Math.cos( segment );
-		positions[ i + 1 ] = radius * Math.sin( segment );
+		// vertex
+
+		vertex.x = radius * Math.cos( segment );
+		vertex.y = radius * Math.sin( segment );
 
-		normals[ i + 2 ] = 1; // normal z
+		vertices.push( vertex.x, vertex.y, vertex.z );
 
-		uvs[ ii ] = ( positions[ i ] / radius + 1 ) / 2;
-		uvs[ ii + 1 ] = ( positions[ i + 1 ] / radius + 1 ) / 2;
+		// normal
+
+		normals.push( 0, 0, 1 );
+
+		// uvs
+
+		uv.x = ( vertices[ i ] / radius + 1 ) / 2;
+		uv.y = ( vertices[ i + 1 ] / radius + 1 ) / 2;
+
+		uvs.push( uv.x, uv.y );
 
 	}
 
-	var indices = [];
+	// indices
 
-	for ( var i = 1; i <= segments; i ++ ) {
+	for ( i = 1; i <= segments; i ++ ) {
 
 		indices.push( i, i + 1, 0 );
 
 	}
 
-	this.setIndex( new BufferAttribute( new Uint16Array( indices ), 1 ) );
-	this.addAttribute( 'position', new BufferAttribute( positions, 3 ) );
-	this.addAttribute( 'normal', new BufferAttribute( normals, 3 ) );
-	this.addAttribute( 'uv', new BufferAttribute( uvs, 2 ) );
+	// build geometry
 
-	this.boundingSphere = new Sphere( new Vector3(), radius );
+	this.setIndex( new ( indices.length > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 ) );
+	this.addAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );
+	this.addAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );
+	this.addAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );
 
 }
 

+ 57 - 96
src/geometries/CylinderGeometry.js

@@ -33,10 +33,10 @@ CylinderGeometry.prototype.constructor = CylinderGeometry;
  * @author Mugen87 / https://github.com/Mugen87
  */
 
+import { Float32BufferAttribute, Uint16BufferAttribute, Uint32BufferAttribute } from '../core/BufferAttribute';
 import { BufferGeometry } from '../core/BufferGeometry';
 import { Vector3 } from '../math/Vector3';
 import { Vector2 } from '../math/Vector2';
-import { BufferAttribute } from '../core/BufferAttribute';
 
 function CylinderBufferGeometry( radiusTop, radiusBottom, height, radialSegments, heightSegments, openEnded, thetaStart, thetaLength ) {
 
@@ -68,35 +68,19 @@ function CylinderBufferGeometry( radiusTop, radiusBottom, height, radialSegments
 	thetaStart = thetaStart !== undefined ? thetaStart : 0.0;
 	thetaLength = thetaLength !== undefined ? thetaLength : 2.0 * Math.PI;
 
-	// used to calculate buffer length
-
-	var nbCap = 0;
-
-	if ( openEnded === false ) {
-
-		if ( radiusTop > 0 ) nbCap ++;
-		if ( radiusBottom > 0 ) nbCap ++;
-
-	}
-
-	var vertexCount = calculateVertexCount();
-	var indexCount = calculateIndexCount();
-
 	// buffers
 
-	var indices = new BufferAttribute( new ( indexCount > 65535 ? Uint32Array : Uint16Array )( indexCount ), 1 );
-	var vertices = new BufferAttribute( new Float32Array( vertexCount * 3 ), 3 );
-	var normals = new BufferAttribute( new Float32Array( vertexCount * 3 ), 3 );
-	var uvs = new BufferAttribute( new Float32Array( vertexCount * 2 ), 2 );
+	var indices = [];
+	var vertices = [];
+	var normals = [];
+	var uvs = [];
 
 	// helper variables
 
-	var index = 0,
-	    indexOffset = 0,
-	    indexArray = [],
-	    halfHeight = height / 2;
-
-	// group variables
+	var index = 0;
+	var indexOffset = 0;
+	var indexArray = [];
+	var halfHeight = height / 2;
 	var groupStart = 0;
 
 	// generate geometry
@@ -112,40 +96,10 @@ function CylinderBufferGeometry( radiusTop, radiusBottom, height, radialSegments
 
 	// build geometry
 
-	this.setIndex( indices );
-	this.addAttribute( 'position', vertices );
-	this.addAttribute( 'normal', normals );
-	this.addAttribute( 'uv', uvs );
-
-	// helper functions
-
-	function calculateVertexCount() {
-
-		var count = ( radialSegments + 1 ) * ( heightSegments + 1 );
-
-		if ( openEnded === false ) {
-
-			count += ( ( radialSegments + 1 ) * nbCap ) + ( radialSegments * nbCap );
-
-		}
-
-		return count;
-
-	}
-
-	function calculateIndexCount() {
-
-		var count = radialSegments * heightSegments * 2 * 3;
-
-		if ( openEnded === false ) {
-
-			count += radialSegments * nbCap * 3;
-
-		}
-
-		return count;
-
-	}
+	this.setIndex( new ( indices.length > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 ) );
+	this.addAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );
+	this.addAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );
+	this.addAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );
 
 	function generateTorso() {
 
@@ -167,6 +121,7 @@ function CylinderBufferGeometry( radiusTop, radiusBottom, height, radialSegments
 			var v = y / heightSegments;
 
 			// calculate the radius of the current row
+
 			var radius = v * ( radiusBottom - radiusTop ) + radiusTop;
 
 			for ( x = 0; x <= radialSegments; x ++ ) {
@@ -179,27 +134,29 @@ function CylinderBufferGeometry( radiusTop, radiusBottom, height, radialSegments
 				var cosTheta = Math.cos( theta );
 
 				// vertex
+
 				vertex.x = radius * sinTheta;
 				vertex.y = - v * height + halfHeight;
 				vertex.z = radius * cosTheta;
-				vertices.setXYZ( index, vertex.x, vertex.y, vertex.z );
+				vertices.push( vertex.x, vertex.y, vertex.z );
 
 				// normal
+
 				normal.set( sinTheta, slope, cosTheta ).normalize();
-				normals.setXYZ( index, normal.x, normal.y, normal.z );
+				normals.push( normal.x, normal.y, normal.z );
 
 				// uv
-				uvs.setXY( index, u, 1 - v );
+
+				uvs.push( u, 1 - v );
 
 				// save index of vertex in respective row
-				indexRow.push( index );
 
-				// increase index
-				index ++;
+				indexRow.push( index ++ );
 
 			}
 
 			// now save vertices of the row in our index array
+
 			indexArray.push( indexRow );
 
 		}
@@ -211,22 +168,19 @@ function CylinderBufferGeometry( radiusTop, radiusBottom, height, radialSegments
 			for ( y = 0; y < heightSegments; y ++ ) {
 
 				// we use the index array to access the correct indices
-				var i1 = indexArray[ y ][ x ];
-				var i2 = indexArray[ y + 1 ][ x ];
-				var i3 = indexArray[ y + 1 ][ x + 1 ];
-				var i4 = indexArray[ y ][ x + 1 ];
-
-				// face one
-				indices.setX( indexOffset, i1 ); indexOffset ++;
-				indices.setX( indexOffset, i2 ); indexOffset ++;
-				indices.setX( indexOffset, i4 ); indexOffset ++;
-
-				// face two
-				indices.setX( indexOffset, i2 ); indexOffset ++;
-				indices.setX( indexOffset, i3 ); indexOffset ++;
-				indices.setX( indexOffset, i4 ); indexOffset ++;
-
-				// update counters
+
+				var a = indexArray[ y ][ x ];
+				var b = indexArray[ y + 1 ][ x ];
+				var c = indexArray[ y + 1 ][ x + 1 ];
+				var d = indexArray[ y ][ x + 1 ];
+
+				// faces
+
+				indices.push( a, b, d );
+				indices.push( b, c, d );
+
+				// update group counter
+
 				groupCount += 6;
 
 			}
@@ -234,9 +188,11 @@ function CylinderBufferGeometry( radiusTop, radiusBottom, height, radialSegments
 		}
 
 		// add a group to the geometry. this will ensure multi material support
+
 		scope.addGroup( groupStart, groupCount, 0 );
 
 		// calculate new start value for groups
+
 		groupStart += groupCount;
 
 	}
@@ -263,23 +219,25 @@ function CylinderBufferGeometry( radiusTop, radiusBottom, height, radialSegments
 		for ( x = 1; x <= radialSegments; x ++ ) {
 
 			// vertex
-			vertices.setXYZ( index, 0, halfHeight * sign, 0 );
+
+			vertices.push( 0, halfHeight * sign, 0 );
 
 			// normal
-			normals.setXYZ( index, 0, sign, 0 );
+
+			normals.push( 0, sign, 0 );
 
 			// uv
-			uv.x = 0.5;
-			uv.y = 0.5;
 
-			uvs.setXY( index, uv.x, uv.y );
+			uvs.push( 0.5, 0.5 );
 
 			// increase index
+
 			index ++;
 
 		}
 
 		// save the index of the last center vertex
+
 		centerIndexEnd = index;
 
 		// now we generate the surrounding vertices, normals and uvs
@@ -293,20 +251,24 @@ function CylinderBufferGeometry( radiusTop, radiusBottom, height, radialSegments
 			var sinTheta = Math.sin( theta );
 
 			// vertex
+
 			vertex.x = radius * sinTheta;
 			vertex.y = halfHeight * sign;
 			vertex.z = radius * cosTheta;
-			vertices.setXYZ( index, vertex.x, vertex.y, vertex.z );
+			vertices.push( vertex.x, vertex.y, vertex.z );
 
 			// normal
-			normals.setXYZ( index, 0, sign, 0 );
+
+			normals.push( 0, sign, 0 );
 
 			// uv
+
 			uv.x = ( cosTheta * 0.5 ) + 0.5;
 			uv.y = ( sinTheta * 0.5 * sign ) + 0.5;
-			uvs.setXY( index, uv.x, uv.y );
+			uvs.push( uv.x, uv.y );
 
 			// increase index
+
 			index ++;
 
 		}
@@ -321,28 +283,27 @@ function CylinderBufferGeometry( radiusTop, radiusBottom, height, radialSegments
 			if ( top === true ) {
 
 				// face top
-				indices.setX( indexOffset, i ); indexOffset ++;
-				indices.setX( indexOffset, i + 1 ); indexOffset ++;
-				indices.setX( indexOffset, c ); indexOffset ++;
+
+				indices.push( i, i + 1, c );
 
 			} else {
 
 				// face bottom
-				indices.setX( indexOffset, i + 1 ); indexOffset ++;
-				indices.setX( indexOffset, i ); indexOffset ++;
-				indices.setX( indexOffset, c ); indexOffset ++;
+
+				indices.push( i + 1, i, c );
 
 			}
 
-			// update counters
 			groupCount += 3;
 
 		}
 
 		// add a group to the geometry. this will ensure multi material support
+
 		scope.addGroup( groupStart, groupCount, top === true ? 1 : 2 );
 
 		// calculate new start value for groups
+
 		groupStart += groupCount;
 
 	}

+ 27 - 26
src/geometries/LatheGeometry.js

@@ -34,10 +34,10 @@ function LatheGeometry( points, segments, phiStart, phiLength ) {
 LatheGeometry.prototype = Object.create( Geometry.prototype );
 LatheGeometry.prototype.constructor = LatheGeometry;
 
+import { Float32BufferAttribute, Uint16BufferAttribute, Uint32BufferAttribute } from '../core/BufferAttribute';
 import { BufferGeometry } from '../core/BufferGeometry';
 import { Vector3 } from '../math/Vector3';
 import { Vector2 } from '../math/Vector2';
-import { BufferAttribute } from '../core/BufferAttribute';
 import { _Math } from '../math/Math';
 
 /**
@@ -62,19 +62,19 @@ function LatheBufferGeometry( points, segments, phiStart, phiLength ) {
 	phiLength = phiLength || Math.PI * 2;
 
 	// clamp phiLength so it's in range of [ 0, 2PI ]
+	
 	phiLength = _Math.clamp( phiLength, 0, Math.PI * 2 );
 
-	// these are used to calculate buffer length
-	var vertexCount = ( segments + 1 ) * points.length;
-	var indexCount = segments * points.length * 2 * 3;
 
 	// buffers
-	var indices = new BufferAttribute( new ( indexCount > 65535 ? Uint32Array : Uint16Array )( indexCount ) , 1 );
-	var vertices = new BufferAttribute( new Float32Array( vertexCount * 3 ), 3 );
-	var uvs = new BufferAttribute( new Float32Array( vertexCount * 2 ), 2 );
+
+	var indices = [];
+	var vertices = [];
+	var uvs = [];
 
 	// helper variables
-	var index = 0, indexOffset = 0, base;
+
+	var base;
 	var inverseSegments = 1.0 / segments;
 	var vertex = new Vector3();
 	var uv = new Vector2();
@@ -92,24 +92,26 @@ function LatheBufferGeometry( points, segments, phiStart, phiLength ) {
 		for ( j = 0; j <= ( points.length - 1 ); j ++ ) {
 
 			// vertex
+
 			vertex.x = points[ j ].x * sin;
 			vertex.y = points[ j ].y;
 			vertex.z = points[ j ].x * cos;
-			vertices.setXYZ( index, vertex.x, vertex.y, vertex.z );
+
+			vertices.push( vertex.x, vertex.y, vertex.z );
 
 			// uv
+
 			uv.x = i / segments;
 			uv.y = j / ( points.length - 1 );
-			uvs.setXY( index, uv.x, uv.y );
 
-			// increase index
-			index ++;
+			uvs.push( uv.x, uv.y );
+
 
 		}
 
 	}
 
-	// generate indices
+	// indices
 
 	for ( i = 0; i < segments; i ++ ) {
 
@@ -117,21 +119,15 @@ function LatheBufferGeometry( points, segments, phiStart, phiLength ) {
 
 			base = j + i * points.length;
 
-			// indices
 			var a = base;
 			var b = base + points.length;
 			var c = base + points.length + 1;
 			var d = base + 1;
 
-			// face one
-			indices.setX( indexOffset, a ); indexOffset ++;
-			indices.setX( indexOffset, b ); indexOffset ++;
-			indices.setX( indexOffset, d ); indexOffset ++;
+			// faces
 
-			// face two
-			indices.setX( indexOffset, b ); indexOffset ++;
-			indices.setX( indexOffset, c ); indexOffset ++;
-			indices.setX( indexOffset, d ); indexOffset ++;
+			indices.push( a, b, d );
+			indices.push( b, c, d );
 
 		}
 
@@ -139,9 +135,9 @@ function LatheBufferGeometry( points, segments, phiStart, phiLength ) {
 
 	// build geometry
 
-	this.setIndex( indices );
-	this.addAttribute( 'position', vertices );
-	this.addAttribute( 'uv', uvs );
+	this.setIndex( new ( indices.length > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 ) );
+	this.addAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );
+	this.addAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );
 
 	// generate normals
 
@@ -158,29 +154,34 @@ function LatheBufferGeometry( points, segments, phiStart, phiLength ) {
 		var n = new Vector3();
 
 		// this is the buffer offset for the last line of vertices
+
 		base = segments * points.length * 3;
 
 		for ( i = 0, j = 0; i < points.length; i ++, j += 3 ) {
 
 			// select the normal of the vertex in the first line
+
 			n1.x = normals[ j + 0 ];
 			n1.y = normals[ j + 1 ];
 			n1.z = normals[ j + 2 ];
 
 			// select the normal of the vertex in the last line
+
 			n2.x = normals[ base + j + 0 ];
 			n2.y = normals[ base + j + 1 ];
 			n2.z = normals[ base + j + 2 ];
 
 			// average normals
+
 			n.addVectors( n1, n2 ).normalize();
 
 			// assign the new values to both normals
+
 			normals[ j + 0 ] = normals[ base + j + 0 ] = n.x;
 			normals[ j + 1 ] = normals[ base + j + 1 ] = n.y;
 			normals[ j + 2 ] = normals[ base + j + 2 ] = n.z;
 
-		} // next row
+		}
 
 	}
 

+ 3 - 1
src/geometries/ParametricGeometry.js

@@ -49,7 +49,7 @@ function ParametricBufferGeometry( func, slices, stacks ) {
 		stacks: stacks
 	};
 
-	// generate vertices and uvs
+	// buffers
 
 	var vertices = [];
 	var uvs = [];
@@ -57,6 +57,8 @@ function ParametricBufferGeometry( func, slices, stacks ) {
 	var i, j, p;
 	var u, v;
 
+	// generate vertices and uvs
+
 	var sliceCount = slices + 1;
 
 	for ( i = 0; i <= stacks; i ++ ) {

+ 30 - 33
src/geometries/PlaneGeometry.js

@@ -27,10 +27,12 @@ PlaneGeometry.prototype.constructor = PlaneGeometry;
 
 /**
  * @author mrdoob / http://mrdoob.com/
+ * @author Mugen87 / https://github.com/Mugen87
+ *
  * based on http://papervision3d.googlecode.com/svn/trunk/as3/trunk/src/org/papervision3d/objects/primitives/Plane.as
  */
 
-import { BufferAttribute } from '../core/BufferAttribute';
+import { Float32BufferAttribute, Uint16BufferAttribute, Uint32BufferAttribute } from '../core/BufferAttribute';
 import { BufferGeometry } from '../core/BufferGeometry';
 
 function PlaneBufferGeometry( width, height, widthSegments, heightSegments ) {
@@ -58,67 +60,62 @@ function PlaneBufferGeometry( width, height, widthSegments, heightSegments ) {
 	var segment_width = width / gridX;
 	var segment_height = height / gridY;
 
-	var vertices = new Float32Array( gridX1 * gridY1 * 3 );
-	var normals = new Float32Array( gridX1 * gridY1 * 3 );
-	var uvs = new Float32Array( gridX1 * gridY1 * 2 );
+	var ix, iy;
 
-	var offset = 0;
-	var offset2 = 0;
+	// buffers
 
-	for ( var iy = 0; iy < gridY1; iy ++ ) {
+	var indices = [];
+	var vertices = [];
+	var normals = [];
+	var uvs = [];
+
+	// generate vertices, normals and uvs
+
+	for ( iy = 0; iy < gridY1; iy ++ ) {
 
 		var y = iy * segment_height - height_half;
 
-		for ( var ix = 0; ix < gridX1; ix ++ ) {
+		for ( ix = 0; ix < gridX1; ix ++ ) {
 
 			var x = ix * segment_width - width_half;
 
-			vertices[ offset ] = x;
-			vertices[ offset + 1 ] = - y;
-
-			normals[ offset + 2 ] = 1;
+			vertices.push( x, - y, 0 );
 
-			uvs[ offset2 ] = ix / gridX;
-			uvs[ offset2 + 1 ] = 1 - ( iy / gridY );
+			normals.push( 0, 0, 1 );
 
-			offset += 3;
-			offset2 += 2;
+			uvs.push( ix / gridX );
+			uvs.push( 1 - ( iy / gridY ) );
 
 		}
 
 	}
 
-	offset = 0;
+	// indices
 
-	var indices = new ( ( vertices.length / 3 ) > 65535 ? Uint32Array : Uint16Array )( gridX * gridY * 6 );
+	for ( iy = 0; iy < gridY; iy ++ ) {
 
-	for ( var iy = 0; iy < gridY; iy ++ ) {
-
-		for ( var ix = 0; ix < gridX; ix ++ ) {
+		for ( ix = 0; ix < gridX; ix ++ ) {
 
 			var a = ix + gridX1 * iy;
 			var b = ix + gridX1 * ( iy + 1 );
 			var c = ( ix + 1 ) + gridX1 * ( iy + 1 );
 			var d = ( ix + 1 ) + gridX1 * iy;
 
-			indices[ offset ] = a;
-			indices[ offset + 1 ] = b;
-			indices[ offset + 2 ] = d;
-
-			indices[ offset + 3 ] = b;
-			indices[ offset + 4 ] = c;
-			indices[ offset + 5 ] = d;
+			// faces
 
-			offset += 6;
+			indices.push( a, b, d );
+			indices.push( b, c, d );
 
 		}
 
 	}
 
-	this.setIndex( new BufferAttribute( indices, 1 ) );
-	this.addAttribute( 'position', new BufferAttribute( vertices, 3 ) );
-	this.addAttribute( 'normal', new BufferAttribute( normals, 3 ) );
-	this.addAttribute( 'uv', new BufferAttribute( uvs, 2 ) );
+	// build geometry
+
+	this.setIndex( new ( indices.length > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 ) );
+	this.addAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );
+	this.addAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );
+	this.addAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );
 
 }
 

+ 26 - 31
src/geometries/RingGeometry.js

@@ -30,10 +30,10 @@ RingGeometry.prototype.constructor = RingGeometry;
  * @author Mugen87 / https://github.com/Mugen87
  */
 
+import { Float32BufferAttribute, Uint16BufferAttribute, Uint32BufferAttribute } from '../core/BufferAttribute';
 import { BufferGeometry } from '../core/BufferGeometry';
 import { Vector2 } from '../math/Vector2';
 import { Vector3 } from '../math/Vector3';
-import { BufferAttribute } from '../core/BufferAttribute';
 
 function RingBufferGeometry( innerRadius, outerRadius, thetaSegments, phiSegments, thetaStart, thetaLength ) {
 
@@ -59,18 +59,16 @@ function RingBufferGeometry( innerRadius, outerRadius, thetaSegments, phiSegment
 	thetaSegments = thetaSegments !== undefined ? Math.max( 3, thetaSegments ) : 8;
 	phiSegments = phiSegments !== undefined ? Math.max( 1, phiSegments ) : 1;
 
-	// these are used to calculate buffer length
-	var vertexCount = ( thetaSegments + 1 ) * ( phiSegments + 1 );
-	var indexCount = thetaSegments * phiSegments * 2 * 3;
-
 	// buffers
-	var indices = new BufferAttribute( new ( indexCount > 65535 ? Uint32Array : Uint16Array )( indexCount ), 1 );
-	var vertices = new BufferAttribute( new Float32Array( vertexCount * 3 ), 3 );
-	var normals = new BufferAttribute( new Float32Array( vertexCount * 3 ), 3 );
-	var uvs = new BufferAttribute( new Float32Array( vertexCount * 2 ), 2 );
+
+	var indices = [];
+	var vertices = [];
+	var normals = [];
+	var uvs = [];
 
 	// some helper variables
-	var index = 0, indexOffset = 0, segment;
+
+	var segment;
 	var radius = innerRadius;
 	var radiusStep = ( ( outerRadius - innerRadius ) / phiSegments );
 	var vertex = new Vector3();
@@ -79,38 +77,41 @@ function RingBufferGeometry( innerRadius, outerRadius, thetaSegments, phiSegment
 
 	// generate vertices, normals and uvs
 
-	// values are generate from the inside of the ring to the outside
-
 	for ( j = 0; j <= phiSegments; j ++ ) {
 
 		for ( i = 0; i <= thetaSegments; i ++ ) {
 
+			// values are generate from the inside of the ring to the outside
+
 			segment = thetaStart + i / thetaSegments * thetaLength;
 
 			// vertex
+
 			vertex.x = radius * Math.cos( segment );
 			vertex.y = radius * Math.sin( segment );
-			vertices.setXYZ( index, vertex.x, vertex.y, vertex.z );
+
+			vertices.push( vertex.x, vertex.y, vertex.z );
 
 			// normal
-			normals.setXYZ( index, 0, 0, 1 );
+
+			normals.push( 0, 0, 1 );
 
 			// uv
+			
 			uv.x = ( vertex.x / outerRadius + 1 ) / 2;
 			uv.y = ( vertex.y / outerRadius + 1 ) / 2;
-			uvs.setXY( index, uv.x, uv.y );
 
-			// increase index
-			index ++;
+			uvs.push( uv.x, uv.y );
 
 		}
 
 		// increase the radius for next row of vertices
+
 		radius += radiusStep;
 
 	}
 
-	// generate indices
+	// indices
 
 	for ( j = 0; j < phiSegments; j ++ ) {
 
@@ -120,21 +121,15 @@ function RingBufferGeometry( innerRadius, outerRadius, thetaSegments, phiSegment
 
 			segment = i + thetaSegmentLevel;
 
-			// indices
 			var a = segment;
 			var b = segment + thetaSegments + 1;
 			var c = segment + thetaSegments + 2;
 			var d = segment + 1;
 
-			// face one
-			indices.setX( indexOffset, a ); indexOffset ++;
-			indices.setX( indexOffset, b ); indexOffset ++;
-			indices.setX( indexOffset, c ); indexOffset ++;
+			// faces
 
-			// face two
-			indices.setX( indexOffset, a ); indexOffset ++;
-			indices.setX( indexOffset, c ); indexOffset ++;
-			indices.setX( indexOffset, d ); indexOffset ++;
+			indices.push( a, b, d );
+			indices.push( b, c, d );
 
 		}
 
@@ -142,10 +137,10 @@ function RingBufferGeometry( innerRadius, outerRadius, thetaSegments, phiSegment
 
 	// build geometry
 
-	this.setIndex( indices );
-	this.addAttribute( 'position', vertices );
-	this.addAttribute( 'normal', normals );
-	this.addAttribute( 'uv', uvs );
+	this.setIndex( new ( indices.length > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 ) );
+	this.addAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );
+	this.addAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );
+	this.addAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );
 
 }
 

+ 5 - 1
src/geometries/ShapeGeometry.js

@@ -52,10 +52,14 @@ function ShapeBufferGeometry( shapes, curveSegments ) {
 
 	curveSegments = curveSegments || 12;
 
+	// buffers
+
+	var indices = [];
 	var vertices = [];
 	var normals = [];
 	var uvs = [];
-	var indices = [];
+
+	// helper variables
 
 	var groupStart = 0;
 	var groupCount = 0;

+ 49 - 35
src/geometries/SphereGeometry.js

@@ -29,12 +29,12 @@ SphereGeometry.prototype.constructor = SphereGeometry;
 
 /**
  * @author benaadams / https://twitter.com/ben_a_adams
+ * @author Mugen87 / https://github.com/Mugen87
  */
 
-import { Uint16BufferAttribute, Uint32BufferAttribute, BufferAttribute } from '../core/BufferAttribute';
+import { Float32BufferAttribute, Uint16BufferAttribute, Uint32BufferAttribute } from '../core/BufferAttribute';
 import { BufferGeometry } from '../core/BufferGeometry';
 import { Vector3 } from '../math/Vector3';
-import { Sphere } from '../math/Sphere';
 
 function SphereBufferGeometry( radius, widthSegments, heightSegments, phiStart, phiLength, thetaStart, thetaLength ) {
 
@@ -65,68 +65,82 @@ function SphereBufferGeometry( radius, widthSegments, heightSegments, phiStart,
 
 	var thetaEnd = thetaStart + thetaLength;
 
-	var vertexCount = ( ( widthSegments + 1 ) * ( heightSegments + 1 ) );
+	var ix, iy;
 
-	var positions = new BufferAttribute( new Float32Array( vertexCount * 3 ), 3 );
-	var normals = new BufferAttribute( new Float32Array( vertexCount * 3 ), 3 );
-	var uvs = new BufferAttribute( new Float32Array( vertexCount * 2 ), 2 );
+	var index = 0;
+	var grid = [];
 
-	var index = 0, vertices = [], normal = new Vector3();
+	var vertex = new Vector3();
+	var normal = new Vector3();
 
-	for ( var y = 0; y <= heightSegments; y ++ ) {
+	// buffers
+
+	var indices = [];
+	var vertices = [];
+	var normals = [];
+	var uvs = [];
+
+	// generate vertices, normals and uvs
+
+	for ( iy = 0; iy <= heightSegments; iy ++ ) {
 
 		var verticesRow = [];
 
-		var v = y / heightSegments;
+		var v = iy / heightSegments;
 
-		for ( var x = 0; x <= widthSegments; x ++ ) {
+		for ( ix = 0; ix <= widthSegments; ix ++ ) {
 
-			var u = x / widthSegments;
+			var u = ix / widthSegments;
 
-			var px = - radius * Math.cos( phiStart + u * phiLength ) * Math.sin( thetaStart + v * thetaLength );
-			var py = radius * Math.cos( thetaStart + v * thetaLength );
-			var pz = radius * Math.sin( phiStart + u * phiLength ) * Math.sin( thetaStart + v * thetaLength );
+			// vertex
 
-			normal.set( px, py, pz ).normalize();
+			vertex.x = - radius * Math.cos( phiStart + u * phiLength ) * Math.sin( thetaStart + v * thetaLength );
+			vertex.y = radius * Math.cos( thetaStart + v * thetaLength );
+			vertex.z = radius * Math.sin( phiStart + u * phiLength ) * Math.sin( thetaStart + v * thetaLength );
 
-			positions.setXYZ( index, px, py, pz );
-			normals.setXYZ( index, normal.x, normal.y, normal.z );
-			uvs.setXY( index, u, 1 - v );
+			vertices.push( vertex.x, vertex.y, vertex.z );
 
-			verticesRow.push( index );
+			// normal
 
-			index ++;
+			normal.set( vertex.x, vertex.y, vertex.z ).normalize();
+			normals.push( normal.x, normal.y, normal.z );
+
+			// uv
+
+			uvs.push( u, 1 - v );
+
+			verticesRow.push( index ++ );
 
 		}
 
-		vertices.push( verticesRow );
+		grid.push( verticesRow );
 
 	}
 
-	var indices = [];
+	// indices
 
-	for ( var y = 0; y < heightSegments; y ++ ) {
+	for ( iy = 0; iy < heightSegments; iy ++ ) {
 
-		for ( var x = 0; x < widthSegments; x ++ ) {
+		for ( ix = 0; ix < widthSegments; ix ++ ) {
 
-			var v1 = vertices[ y ][ x + 1 ];
-			var v2 = vertices[ y ][ x ];
-			var v3 = vertices[ y + 1 ][ x ];
-			var v4 = vertices[ y + 1 ][ x + 1 ];
+			var a = grid[ iy ][ ix + 1 ];
+			var b = grid[ iy ][ ix ];
+			var c = grid[ iy + 1 ][ ix ];
+			var d = grid[ iy + 1 ][ ix + 1 ];
 
-			if ( y !== 0 || thetaStart > 0 ) indices.push( v1, v2, v4 );
-			if ( y !== heightSegments - 1 || thetaEnd < Math.PI ) indices.push( v2, v3, v4 );
+			if ( iy !== 0 || thetaStart > 0 ) indices.push( a, b, d );
+			if ( iy !== heightSegments - 1 || thetaEnd < Math.PI ) indices.push( b, c, d );
 
 		}
 
 	}
 
-	this.setIndex( new ( positions.count > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 ) );
-	this.addAttribute( 'position', positions );
-	this.addAttribute( 'normal', normals );
-	this.addAttribute( 'uv', uvs );
+	// build geometry
 
-	this.boundingSphere = new Sphere( new Vector3(), radius );
+	this.setIndex( new ( indices.length > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 ) );
+	this.addAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );
+	this.addAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );
+	this.addAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );
 
 }
 

+ 22 - 42
src/geometries/TorusGeometry.js

@@ -31,7 +31,7 @@ TorusGeometry.prototype.constructor = TorusGeometry;
  * @author Mugen87 / https://github.com/Mugen87
  */
 
-import { BufferAttribute } from '../core/BufferAttribute';
+import { Float32BufferAttribute, Uint16BufferAttribute, Uint32BufferAttribute } from '../core/BufferAttribute';
 import { BufferGeometry } from '../core/BufferGeometry';
 import { Vector3 } from '../math/Vector3';
 
@@ -55,22 +55,15 @@ function TorusBufferGeometry( radius, tube, radialSegments, tubularSegments, arc
 	tubularSegments = Math.floor( tubularSegments ) || 6;
 	arc = arc || Math.PI * 2;
 
-	// used to calculate buffer length
-	var vertexCount = ( ( radialSegments + 1 ) * ( tubularSegments + 1 ) );
-	var indexCount = radialSegments * tubularSegments * 2 * 3;
-
 	// buffers
-	var indices = new ( indexCount > 65535 ? Uint32Array : Uint16Array )( indexCount );
-	var vertices = new Float32Array( vertexCount * 3 );
-	var normals = new Float32Array( vertexCount * 3 );
-	var uvs = new Float32Array( vertexCount * 2 );
 
-	// offset variables
-	var vertexBufferOffset = 0;
-	var uvBufferOffset = 0;
-	var indexBufferOffset = 0;
+	var indices = [];
+	var vertices = [];
+	var normals = [];
+	var uvs = [];
 
 	// helper variables
+
 	var center = new Vector3();
 	var vertex = new Vector3();
 	var normal = new Vector3();
@@ -87,32 +80,25 @@ function TorusBufferGeometry( radius, tube, radialSegments, tubularSegments, arc
 			var v = j / radialSegments * Math.PI * 2;
 
 			// vertex
+
 			vertex.x = ( radius + tube * Math.cos( v ) ) * Math.cos( u );
 			vertex.y = ( radius + tube * Math.cos( v ) ) * Math.sin( u );
 			vertex.z = tube * Math.sin( v );
 
-			vertices[ vertexBufferOffset ] = vertex.x;
-			vertices[ vertexBufferOffset + 1 ] = vertex.y;
-			vertices[ vertexBufferOffset + 2 ] = vertex.z;
+			vertices.push( vertex.x, vertex.y, vertex.z );
+
+			// normal
 
-			// this vector is used to calculate the normal
 			center.x = radius * Math.cos( u );
 			center.y = radius * Math.sin( u );
-
-			// normal
 			normal.subVectors( vertex, center ).normalize();
 
-			normals[ vertexBufferOffset ] = normal.x;
-			normals[ vertexBufferOffset + 1 ] = normal.y;
-			normals[ vertexBufferOffset + 2 ] = normal.z;
+			normals.push( normal.x, normal.y, normal.z );
 
 			// uv
-			uvs[ uvBufferOffset ] = i / tubularSegments;
-			uvs[ uvBufferOffset + 1 ] = j / radialSegments;
 
-			// update offsets
-			vertexBufferOffset += 3;
-			uvBufferOffset += 2;
+			uvs.push( i / tubularSegments );
+			uvs.push( j / radialSegments );
 
 		}
 
@@ -125,33 +111,27 @@ function TorusBufferGeometry( radius, tube, radialSegments, tubularSegments, arc
 		for ( i = 1; i <= tubularSegments; i ++ ) {
 
 			// indices
+
 			var a = ( tubularSegments + 1 ) * j + i - 1;
 			var b = ( tubularSegments + 1 ) * ( j - 1 ) + i - 1;
 			var c = ( tubularSegments + 1 ) * ( j - 1 ) + i;
 			var d = ( tubularSegments + 1 ) * j + i;
 
-			// face one
-			indices[ indexBufferOffset ] = a;
-			indices[ indexBufferOffset + 1 ] = b;
-			indices[ indexBufferOffset + 2 ] = d;
+			// faces
 
-			// face two
-			indices[ indexBufferOffset + 3 ] = b;
-			indices[ indexBufferOffset + 4 ] = c;
-			indices[ indexBufferOffset + 5 ] = d;
-
-			// update offset
-			indexBufferOffset += 6;
+			indices.push( a, b, d );
+			indices.push( b, c, d );
 
 		}
 
 	}
 
 	// build geometry
-	this.setIndex( new BufferAttribute( indices, 1 ) );
-	this.addAttribute( 'position', new BufferAttribute( vertices, 3 ) );
-	this.addAttribute( 'normal', new BufferAttribute( normals, 3 ) );
-	this.addAttribute( 'uv', new BufferAttribute( uvs, 2 ) );
+
+	this.setIndex( new ( indices.length > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 ) );
+	this.addAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );
+	this.addAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );
+	this.addAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );
 
 }
 

+ 22 - 30
src/geometries/TorusKnotGeometry.js

@@ -34,7 +34,7 @@ TorusKnotGeometry.prototype.constructor = TorusKnotGeometry;
  * see: http://www.blackpawn.com/texts/pqtorus/
  */
 
-import { BufferAttribute } from '../core/BufferAttribute';
+import { Float32BufferAttribute, Uint16BufferAttribute, Uint32BufferAttribute } from '../core/BufferAttribute';
 import { BufferGeometry } from '../core/BufferGeometry';
 import { Vector3 } from '../math/Vector3';
 import { Vector2 } from '../math/Vector2';
@@ -61,18 +61,16 @@ function TorusKnotBufferGeometry( radius, tube, tubularSegments, radialSegments,
 	p = p || 2;
 	q = q || 3;
 
-	// used to calculate buffer length
-	var vertexCount = ( ( radialSegments + 1 ) * ( tubularSegments + 1 ) );
-	var indexCount = radialSegments * tubularSegments * 2 * 3;
-
 	// buffers
-	var indices = new BufferAttribute( new ( indexCount > 65535 ? Uint32Array : Uint16Array )( indexCount ), 1 );
-	var vertices = new BufferAttribute( new Float32Array( vertexCount * 3 ), 3 );
-	var normals = new BufferAttribute( new Float32Array( vertexCount * 3 ), 3 );
-	var uvs = new BufferAttribute( new Float32Array( vertexCount * 2 ), 2 );
+
+	var indices = [];
+	var vertices = [];
+	var normals = [];
+	var uvs = [];
 
 	// helper variables
-	var i, j, index = 0, indexOffset = 0;
+
+	var i, j;
 
 	var vertex = new Vector3();
 	var normal = new Vector3();
@@ -127,20 +125,18 @@ function TorusKnotBufferGeometry( radius, tube, tubularSegments, radialSegments,
 			vertex.y = P1.y + ( cx * N.y + cy * B.y );
 			vertex.z = P1.z + ( cx * N.z + cy * B.z );
 
-			// vertex
-			vertices.setXYZ( index, vertex.x, vertex.y, vertex.z );
+			vertices.push( vertex.x, vertex.y, vertex.z );
 
 			// normal (P1 is always the center/origin of the extrusion, thus we can use it to calculate the normal)
+
 			normal.subVectors( vertex, P1 ).normalize();
-			normals.setXYZ( index, normal.x, normal.y, normal.z );
+
+			normals.push( normal.x, normal.y, normal.z );
 
 			// uv
-			uv.x = i / tubularSegments;
-			uv.y = j / radialSegments;
-			uvs.setXY( index, uv.x, uv.y );
 
-			// increase index
-			index ++;
+			uvs.push( i / tubularSegments );
+			uvs.push( j / radialSegments );
 
 		}
 
@@ -153,20 +149,16 @@ function TorusKnotBufferGeometry( radius, tube, tubularSegments, radialSegments,
 		for ( i = 1; i <= radialSegments; i ++ ) {
 
 			// indices
+
 			var a = ( radialSegments + 1 ) * ( j - 1 ) + ( i - 1 );
 			var b = ( radialSegments + 1 ) * j + ( i - 1 );
 			var c = ( radialSegments + 1 ) * j + i;
 			var d = ( radialSegments + 1 ) * ( j - 1 ) + i;
 
-			// face one
-			indices.setX( indexOffset, a ); indexOffset ++;
-			indices.setX( indexOffset, b ); indexOffset ++;
-			indices.setX( indexOffset, d ); indexOffset ++;
+			// faces
 
-			// face two
-			indices.setX( indexOffset, b ); indexOffset ++;
-			indices.setX( indexOffset, c ); indexOffset ++;
-			indices.setX( indexOffset, d ); indexOffset ++;
+			indices.push( a, b, d );
+			indices.push( b, c, d );
 
 		}
 
@@ -174,10 +166,10 @@ function TorusKnotBufferGeometry( radius, tube, tubularSegments, radialSegments,
 
 	// build geometry
 
-	this.setIndex( indices );
-	this.addAttribute( 'position', vertices );
-	this.addAttribute( 'normal', normals );
-	this.addAttribute( 'uv', uvs );
+	this.setIndex( new ( indices.length > 65535 ? Uint32BufferAttribute : Uint16BufferAttribute )( indices, 1 ) );
+	this.addAttribute( 'position', new Float32BufferAttribute( vertices, 3 ) );
+	this.addAttribute( 'normal', new Float32BufferAttribute( normals, 3 ) );
+	this.addAttribute( 'uv', new Float32BufferAttribute( uvs, 2 ) );
 
 	// this function calculates the current position on the torus curve
 

+ 6 - 4
src/helpers/GridHelper.js

@@ -17,13 +17,15 @@ function GridHelper( size, divisions, color1, color2 ) {
 	color2 = new Color( color2 !== undefined ? color2 : 0x888888 );
 
 	var center = divisions / 2;
-	var step = ( size * 2 ) / divisions;
+	var step = size / divisions;
+	var halfSize = size / 2;
+
 	var vertices = [], colors = [];
 
-	for ( var i = 0, j = 0, k = - size; i <= divisions; i ++, k += step ) {
+	for ( var i = 0, j = 0, k = - halfSize; i <= divisions; i ++, k += step ) {
 
-		vertices.push( - size, 0, k, size, 0, k );
-		vertices.push( k, 0, - size, k, 0, size );
+		vertices.push( - halfSize, 0, k, halfSize, 0, k );
+		vertices.push( k, 0, - halfSize, k, 0, halfSize );
 
 		var color = i === center ? color1 : color2;
 

+ 70 - 60
src/math/Box3.js

@@ -57,6 +57,8 @@ Box3.prototype = {
 		this.min.set( minX, minY, minZ );
 		this.max.set( maxX, maxY, maxZ );
 
+		return this;
+
 	},
 
 	setFromBufferAttribute: function ( attribute ) {
@@ -88,6 +90,8 @@ Box3.prototype = {
 		this.min.set( minX, minY, minZ );
 		this.max.set( maxX, maxY, maxZ );
 
+		return this;
+
 	},
 
 	setFromPoints: function ( points ) {
@@ -121,69 +125,13 @@ Box3.prototype = {
 
 	}(),
 
-	setFromObject: function () {
-
-		// Computes the world-axis-aligned bounding box of an object (including its children),
-		// accounting for both the object's, and children's, world transforms
-
-		var v1 = new Vector3();
-
-		return function setFromObject( object ) {
-
-			var scope = this;
-
-			object.updateMatrixWorld( true );
-
-			this.makeEmpty();
-
-			object.traverse( function ( node ) {
-
-				var i, l;
-
-				var geometry = node.geometry;
-
-				if ( geometry !== undefined ) {
-
-					if ( geometry.isGeometry ) {
-
-						var vertices = geometry.vertices;
-
-						for ( i = 0, l = vertices.length; i < l; i ++ ) {
-
-							v1.copy( vertices[ i ] );
-							v1.applyMatrix4( node.matrixWorld );
-
-							scope.expandByPoint( v1 );
-
-						}
-
-					} else if ( geometry.isBufferGeometry ) {
-
-						var attribute = geometry.attributes.position;
-
-						if ( attribute !== undefined ) {
-
-							for ( i = 0, l = attribute.count; i < l; i ++ ) {
-
-								v1.fromBufferAttribute( attribute, i ).applyMatrix4( node.matrixWorld );
+	setFromObject: function ( object ) {
 
-								scope.expandByPoint( v1 );
-
-							}
-
-						}
-
-					}
-
-				}
-
-			} );
-
-			return this;
+		this.makeEmpty();
 
-		};
+		return this.expandByObject( object );
 
-	}(),
+	},
 
 	clone: function () {
 
@@ -258,6 +206,68 @@ Box3.prototype = {
 
 	},
 
+	expandByObject: function () {
+
+		// Computes the world-axis-aligned bounding box of an object (including its children),
+		// accounting for both the object's, and children's, world transforms
+
+		var v1 = new Vector3();
+
+		return function expandByObject( object ) {
+
+			var scope = this;
+
+			object.updateMatrixWorld( true );
+
+			object.traverse( function ( node ) {
+
+				var i, l;
+
+				var geometry = node.geometry;
+
+				if ( geometry !== undefined ) {
+
+					if ( geometry.isGeometry ) {
+
+						var vertices = geometry.vertices;
+
+						for ( i = 0, l = vertices.length; i < l; i ++ ) {
+
+							v1.copy( vertices[ i ] );
+							v1.applyMatrix4( node.matrixWorld );
+
+							scope.expandByPoint( v1 );
+
+						}
+
+					} else if ( geometry.isBufferGeometry ) {
+
+						var attribute = geometry.attributes.position;
+
+						if ( attribute !== undefined ) {
+
+							for ( i = 0, l = attribute.count; i < l; i ++ ) {
+
+								v1.fromBufferAttribute( attribute, i ).applyMatrix4( node.matrixWorld );
+
+								scope.expandByPoint( v1 );
+
+							}
+
+						}
+
+					}
+
+				}
+
+			} );
+
+			return this;
+
+		};
+
+	}(),
+
 	containsPoint: function ( point ) {
 
 		return point.x < this.min.x || point.x > this.max.x ||

+ 3 - 1
src/math/Sphere.js

@@ -28,10 +28,12 @@ Sphere.prototype = {
 
 	setFromPoints: function () {
 
-		var box = new Box3();
+		var box;
 
 		return function setFromPoints( points, optionalCenter ) {
 
+			if ( box === undefined ) box = new Box3(); // see #10547
+
 			var center = this.center;
 
 			if ( optionalCenter !== undefined ) {

+ 1 - 1
src/renderers/webgl/WebGLUniforms.js

@@ -467,7 +467,7 @@ function WebGLUniforms( gl, program, renderer ) {
 
 	var n = gl.getProgramParameter( program, gl.ACTIVE_UNIFORMS );
 
-	for ( var i = 0; i !== n; ++ i ) {
+	for ( var i = 0; i < n; ++ i ) {
 
 		var info = gl.getActiveUniform( program, i ),
 			path = info.name,

Some files were not shown because too many files changed in this diff