mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
fixup! fix scrollview brake with large content size.
This commit is contained in:
@@ -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;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user