Constructors
constructor
- new RafProgress(progressRafLoop: Function): RafProgress
-
Parameters
-
Optional progressRafLoop: Function
Properties
currentProgress
currentProgress: number
Methods
dampTo
- dampTo(targetProgress: number, easeAmount: number, damp: number, noClamp?: boolean): void
-
Parameters
-
targetProgress: number
-
easeAmount: number
-
damp: number
-
Default value noClamp: boolean = false
Returns void
easeTo
- easeTo(targetProgress: number, easeAmount: number, easingFunction?: Function, noClamp?: boolean): void
-
Parameters
-
targetProgress: number
-
easeAmount: number
-
Default value easingFunction: Function = EASE.linear
-
Default value noClamp: boolean = false
Returns void
getScrollDirection
- getScrollDirection(): number
setCurrentProgress
- setCurrentProgress(progress: number, noClamp?: boolean): void
-
Parameters
-
progress: number
-
Default value noClamp: boolean = true
Returns void
setFps
- setFps(fps: number): void
setPrecision
- setPrecision(value: number): void
unwatch
- unwatch(callbackToRemove: Function): void
-
Parameters
-
callbackToRemove: Function
Returns void
unwatchFor
- unwatchFor(callback: Function): void
watch
- watch(callback: Function): void
watchFor
- watchFor(range: number | Array<number>, callback: Function): void
-
Parameters
-
range: number | Array<number>
-
callback: Function
Returns void