浏览代码

fixed uv wrapping (long animations goes past 1)

ncannasse 10 年之前
父节点
当前提交
34dc5f34a9
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      h3d/anim/LinearAnimation.hx

+ 2 - 0
h3d/anim/LinearAnimation.hx

@@ -105,6 +105,8 @@ class LinearAnimation extends Animation {
 	}
 
 	inline function uvLerp( v1 : Float, v2 : Float, k : Float ) {
+		v1 %= 1.;
+		v2 %= 1.;
 		if( v1 < v2 - 0.5 )
 			v1 += 1;
 		else if( v1 > v2 + 0.5 )