Closed Pattentrick closed 10 years ago
Looks like you can pass in a custom shake function, otherwise it defaults to:
var value = this.shakeFunction ? this.shakeFunction() : ( this.shakeStrength * Math.pow(deltaPct, 2) );
More specifically:
in #shake: this.shakeFunction = fn || this.shakeFunction; in #updateShake: var value = this.shakeFunction ? this.shakeFunction() : ( this.shakeStrength * Math.pow(deltaPct, 2) );
@aroth Thanks for explaining. I will experiment with that. Glad to know that you are still around here.
@aroth is correct =)
Working on the camera tutorial right now. What's the idea behind the third parameter (fn) of the shake method? Is this for defining an own multiplier for the "shakiness"?