소스 검색

Updated builds.

Mr.doob 4 년 전
부모
커밋
2fc8719ca3
3개의 변경된 파일16개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      build/three.js
  2. 0 0
      build/three.min.js
  3. 8 0
      build/three.module.js

+ 8 - 0
build/three.js

@@ -1147,6 +1147,14 @@
 		lerp: function lerp(x, y, t) {
 			return (1 - t) * x + t * y;
 		},
+		// https://www.desmos.com/calculator/vcsjnyz7x4
+		pingpong: function pingpong(x, length) {
+			if (length === void 0) {
+				length = 1;
+			}
+
+			return length - Math.abs(MathUtils.euclideanModulo(x, length * 2) - length);
+		},
 		// http://en.wikipedia.org/wiki/Smoothstep
 		smoothstep: function smoothstep(x, min, max) {
 			if (x <= min) return 0;

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
build/three.min.js


+ 8 - 0
build/three.module.js

@@ -349,6 +349,14 @@ const MathUtils = {
 
 	},
 
+	// https://www.desmos.com/calculator/vcsjnyz7x4
+
+	pingpong: function ( x, length = 1 ) {
+
+		return length - Math.abs( MathUtils.euclideanModulo( x, length * 2 ) - length );
+
+	},
+
 	// http://en.wikipedia.org/wiki/Smoothstep
 
 	smoothstep: function ( x, min, max ) {

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.