소스 검색

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.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 ] );
 
 	}