Browse Source

Update Cloth.js

Fixed a typo in a function name and removed an assignment that seems unnecessary.
Michael Hoffmann 8 years ago
parent
commit
ffaf396f0d
1 changed files with 2 additions and 3 deletions
  1. 2 3
      examples/js/Cloth.js

+ 2 - 3
examples/js/Cloth.js

@@ -90,7 +90,6 @@ Particle.prototype.integrate = function( timesq ) {
 	newPos.multiplyScalar( DRAG ).add( this.position );
 	newPos.add( this.a.multiplyScalar( timesq ) );
 
-	this.tmp = this.previous;
 	this.previous = this.position;
 	this.position = newPos;
 
@@ -101,7 +100,7 @@ Particle.prototype.integrate = function( timesq ) {
 
 var diff = new THREE.Vector3();
 
-function satisifyConstraints( p1, p2, distance ) {
+function satisfyConstraints( p1, p2, distance ) {
 
 	diff.subVectors( p2.position, p1.position );
 	var currentDist = diff.length();
@@ -272,7 +271,7 @@ function simulate( time ) {
 	for ( i = 0; i < il; i ++ ) {
 
 		constraint = constraints[ i ];
-		satisifyConstraints( constraint[ 0 ], constraint[ 1 ], constraint[ 2 ] );
+		satisfyConstraints( constraint[ 0 ], constraint[ 1 ], constraint[ 2 ] );
 
 	}