Index: other-projects/nz-flag-design/trunk/render-3d/CSS/slider.css
===================================================================
--- other-projects/nz-flag-design/trunk/render-3d/CSS/slider.css	(revision 29693)
+++ other-projects/nz-flag-design/trunk/render-3d/CSS/slider.css	(revision 29693)
@@ -0,0 +1,45 @@
+#slider {
+	width: 50vw;
+	height: 50px;
+	position: relative;
+	margin: 0 auto;
+	margin-top: 20px;
+	background: url('../images/slider-graphics.png') no-repeat left top;
+	background-color: transparent;
+	border: none;
+	border-color: transparent;
+	outline: 0;
+	color: transparent;
+	z-index: 0;
+}  
+
+#speed {
+	position: absolute;
+	left: 24px;
+	margin: 0 auto;
+	height: 15px;
+	width: 300px;
+	background: url('../images/speed-empty.png') no-repeat left top;
+	border: none;
+	outline: 0;
+}
+
+#speed .ui-slider-range-min {
+	height: 15px;
+	position: absolute;
+	background: url('../images/speed-full.png') no-repeat left top;
+	opacity: 0.5; 
+	border: none;
+	outline: 0;
+}
+
+#speed .ui-slider-handle{
+	width: 38px;
+	height: 39px;
+	background: url('../images/slider-knob.png') no-repeat left top;
+	position: absolute;
+	margin-left: -15px;
+	margin-top: -8px;
+	border: none;
+	outline: 0;
+}
Index: other-projects/nz-flag-design/trunk/render-3d/Flag_files/Flag.js
===================================================================
--- other-projects/nz-flag-design/trunk/render-3d/Flag_files/Flag.js	(revision 29686)
+++ other-projects/nz-flag-design/trunk/render-3d/Flag_files/Flag.js	(revision 29693)
@@ -62,5 +62,5 @@
 
 var wind = true;
-var windStrength = 2;
+
 var windForce = new THREE.Vector3(0,0,0);
 
@@ -107,4 +107,5 @@
 // Performs verlet integration
 Particle.prototype.integrate = function(timesq) {
+
 	var newPos = this.tmp.subVectors(this.position, this.previous);
 	newPos.multiplyScalar(DRAG).add(this.position);
@@ -116,4 +117,5 @@
 
 	this.a.set(0, 0, 0);
+	
 }
 
@@ -122,4 +124,5 @@
 
 function satisifyConstrains(p1, p2, distance) {
+	
 	diff.subVectors(p2.position, p1.position);
 	var currentDist = diff.length();
@@ -129,10 +132,5 @@
 	p1.position.add(correctionHalf);
 	p2.position.sub(correctionHalf);
-
-	// float difference = (restingDistance - d) / d
-	// im1 = 1 / p1.mass // inverse mass quantities
-	// im2 = 1 / p2.mass
-	// p1.position += delta * (im1 / (im1 + im2)) * stiffness * difference
-
+	
 }
 
@@ -158,5 +156,5 @@
 
 	// Structural
-
+	
 	for (v=0;v<h;v++) {
 		for (u=0;u<w;u++) {
@@ -193,5 +191,5 @@
 		]);
 	}
-
+	
 
 	// While many system uses shear and bend springs,
@@ -219,54 +217,5 @@
 		}
 	}
-
-
-	// // Bend
-
-	// var wlen = restDistance * 2;
-	// var hlen = restDistance * 2;
-	// diagonalDist = Math.sqrt(wlen * wlen + hlen * hlen);
-
-	// for (v=0;v<h-1;v++) {
-	// 	for (u=0;u<w-1;u++) {
-	// 		constrains.push([
-	// 			particles[index(u, v)],
-	// 			particles[index(u+2, v)],
-	// 			wlen
-	// 		]);
-
-	// 		constrains.push([
-	// 			particles[index(u, v)],
-	// 			particles[index(u, v+2)],
-	// 			hlen
-	// 		]);
-
-	// 		constrains.push([
-	// 			particles[index(u, v)],
-	// 			particles[index(u+2, v+2)],
-	// 			diagonalDist
-	// 		]);
-
-	// 		constrains.push([
-	// 			particles[index(u, v+2)],
-	// 			particles[index(u+2, v+2)],
-	// 			wlen
-	// 		]);
-
-	// 		constrains.push([
-	// 			particles[index(u+2, v+2)],
-	// 			particles[index(u+2, v+2)],
-	// 			hlen
-	// 		]);
-
-	// 		constrains.push([
-	// 			particles[index(u+2, v)],
-	// 			particles[index(u, v+2)],
-	// 			diagonalDist
-	// 		]);
-
-	// 	}
-	// }
-
-
+	
 	this.particles = particles;
 	this.constrains = constrains;
@@ -320,7 +269,7 @@
 		particle.addForce(gravity);
 		//
-		// var x = particle.position.x, y = particle.position.y, z = particle.position.z, t=Date.now() / 1000;
-		// windForce.set(Math.sin(x*y*t), Math.cos(z*t), Math.sin(Math.cos(5*x*y*z))).multiplyScalar(100);
-		// particle.addForce(windForce);
+		var x = particle.position.x, y = particle.position.y, z = particle.position.z, t=Date.now() / 1000;
+		//windForce.set(Math.sin(x*y*t), Math.cos(z*t), Math.sin(Math.cos(5*x*y*z))).multiplyScalar(0);
+		particle.addForce(windForce);
 		particle.integrate(TIMESTEP_SQ);
 	}
Index: other-projects/nz-flag-design/trunk/render-3d/Flag_files/slider.js
===================================================================
--- other-projects/nz-flag-design/trunk/render-3d/Flag_files/slider.js	(revision 29693)
+++ other-projects/nz-flag-design/trunk/render-3d/Flag_files/slider.js	(revision 29693)
@@ -0,0 +1,24 @@
+jQuery(document).ready(function ($) {
+	$("#speed").slider({
+		min: 0,
+		max: 100,
+		value: 0,
+		animate: true,
+		range: 'min',
+		slide: function(event, ui) {
+			setSpeed(ui.value/100);
+		}
+	});	
+	
+	$(".ui-slider").mouseenter(function(){
+		controls.enabled = false;
+	});
+	
+	$(".ui-slider").mouseleave(function(){
+		controls.enabled = true;
+	});
+	
+	function setSpeed(speed){
+		windForce.set(speed,100,speed);
+	}
+});
Index: other-projects/nz-flag-design/trunk/render-3d/flag.html
===================================================================
--- other-projects/nz-flag-design/trunk/render-3d/flag.html	(revision 29686)
+++ other-projects/nz-flag-design/trunk/render-3d/flag.html	(revision 29693)
@@ -4,5 +4,5 @@
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
-		<title>three.js webgl - 3D Flag hhh</title>
+		<title>3D Representation of Flag</title>
 		<meta charset="utf-8">
 		<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
@@ -61,6 +61,7 @@
 		</style>
 	<style type="text/css"></style></head>
-
+	
 	<body>
+		
 		<div id="menuContainer">
 			<div id="weatherMenu" style="color : white">
@@ -75,6 +76,19 @@
 		</div>
 		
+		<div id="slider">
+			<div id="speed"></div>
+		</div>
+		
+		<link rel="stylesheet" href="./CSS/slider.css" />
 		
 		<script type="text/javascript">
+			
+			/*			 	JQUERY SLIDER					*/
+			
+			
+			
+			
+			/*----------------------------------------------*/
+		
 			var open = false;
 			function openclose(){
@@ -103,7 +117,10 @@
 		<script type="text/javascript" src="./weather/sun.js"></script>
 		<script type="text/javascript" src="./Flag_files/ColladaLoader.js"></script>
+		<script type="text/javascript" src="./Flag_files/slider.js"></script>
 		
 		<script type="text/javascript" src="./Flag_files/KeyboardState.js"></script>
 
+		<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
+		
 		<script type="x-shader/x-fragment" id="fragmentShaderDepth">
 
@@ -330,15 +347,4 @@
 				mesh.castShadow = false;
 				scene.add( mesh );
-
-				/*var tmp = mesh.position
-				var gg = new THREE.BoxGeometry( 100, 100, 100 );
-				var mesh = new THREE.Mesh( gg, poleMat );
-				mesh.position.y = tmp.y - 740;
-				mesh.position.x = tmp.x; //125
-				mesh.position.z = tmp.z;
-				mesh.receiveShadow = true;
-				mesh.castShadow = false;
-				scene.add( mesh );*/
-
 
 				//
@@ -428,4 +434,5 @@
 					object.position.z = -165;
 					scene.add( object );
+					
 					initial = false;
 					object.customDepthMaterial = new THREE.ShaderMaterial( { uniforms: uniforms, vertexShader: vertexShader, fragmentShader: fragmentShader } );
@@ -475,16 +482,4 @@
 				
 				var timer = Date.now() * 0.0002;
-	
-				keyboard.update();
-				if( keyboard.down("A")) {
-					flagSelector--;
-					if(flagSelector < 0) flagSelector = flags.length-1;
-					createFlag();
-
-				}else if(keyboard.down("D")) {
-					flagSelector++;
-					if(flagSelector >= flags.length) flagSelector = 0;	
-					createFlag();
-				}
 				
 				var p = cloth.particles;
@@ -500,7 +495,5 @@
 				clothGeometry.normalsNeedUpdate = true;
 				clothGeometry.verticesNeedUpdate = true;
-				
-
-				
+
 				if(raining && weatherSystem.type != rainSystem){
 					snowing = false;
@@ -526,5 +519,6 @@
 
 			}
-
-		</script><div><canvas width="1366" height="600"></canvas>
+		
+		</script>
+		
 </body></html>
