浏览代码

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) {
 		lerp: function lerp(x, y, t) {
 			return (1 - t) * x + t * y;
 			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
 		// http://en.wikipedia.org/wiki/Smoothstep
 		smoothstep: function smoothstep(x, min, max) {
 		smoothstep: function smoothstep(x, min, max) {
 			if (x <= min) return 0;
 			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
 	// http://en.wikipedia.org/wiki/Smoothstep
 
 
 	smoothstep: function ( x, min, max ) {
 	smoothstep: function ( x, min, max ) {

部分文件因为文件数量过多而无法显示