소스 검색

fix CatmullRomCurve3 end-point extrapolation

it used to choose the last point as extrapolant, which is of course not intended.
now correctly extrapolates beginning at last point.
Tobias Gurdan 10 년 전
부모
커밋
73880733d5
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/extras/curves/CatmullRomCurve3.js

+ 1 - 1
src/extras/curves/CatmullRomCurve3.js

@@ -131,7 +131,7 @@ THREE.CatmullRomCurve3 = ( function() {
 			} else {
 
 				// extrapolate last point
-				tmp.subVectors( points[ l - 1 ], points[ l - 2 ] ).add( points[ l - 2 ] );
+				tmp.subVectors( points[ l - 1 ], points[ l - 2 ] ).add( points[ l - 1 ] );
 				p3 = tmp;
 
 			}

粤ICP备19079148号