fixup! fix scrollview brake with large content size.

This commit is contained in:
zilongshanren
2016-01-11 17:23:37 +08:00
parent ec7111c900
commit 47b39fa2cb
+3 -1
View File
@@ -720,7 +720,9 @@ var ScrollView = cc.Class({
if(this.brake <= 0){
return (1 - this.brake);
}
var attenuatedFactor = (1 - this.brake) * (1 / (1 + distance * 0.0000014 + distance * distance * 0.000000008) );
//attenuate formula from: http://learnopengl.com/#!Lighting/Light-casters
var attenuatedFactor = (1 - this.brake) * (1 / (1 + distance * 0.000014 + distance * distance * 0.000000008) );
return attenuatedFactor;
},