浏览代码

Merge pull request #11130 from mghoffmann/patch-2

Update Cloth.js
Mr.doob 8 年之前
父节点
当前提交
7875cda2eb
共有 1 个文件被更改,包括 2 次插入3 次删除
  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.multiplyScalar( DRAG ).add( this.position );
 	newPos.add( this.a.multiplyScalar( timesq ) );
 	newPos.add( this.a.multiplyScalar( timesq ) );
 
 
-	this.tmp = this.previous;
 	this.previous = this.position;
 	this.previous = this.position;
 	this.position = newPos;
 	this.position = newPos;
 
 
@@ -101,7 +100,7 @@ Particle.prototype.integrate = function( timesq ) {
 
 
 var diff = new THREE.Vector3();
 var diff = new THREE.Vector3();
 
 
-function satisifyConstraints( p1, p2, distance ) {
+function satisfyConstraints( p1, p2, distance ) {
 
 
 	diff.subVectors( p2.position, p1.position );
 	diff.subVectors( p2.position, p1.position );
 	var currentDist = diff.length();
 	var currentDist = diff.length();
@@ -272,7 +271,7 @@ function simulate( time ) {
 	for ( i = 0; i < il; i ++ ) {
 	for ( i = 0; i < il; i ++ ) {
 
 
 		constraint = constraints[ i ];
 		constraint = constraints[ i ];
-		satisifyConstraints( constraint[ 0 ], constraint[ 1 ], constraint[ 2 ] );
+		satisfyConstraints( constraint[ 0 ], constraint[ 1 ], constraint[ 2 ] );
 
 
 	}
 	}