-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtypes.d.ts
31 lines (30 loc) · 930 Bytes
/
types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
export interface SpringOptions {
value?: number | number[]
target?: number | number[]
tension?: number
friction?: number
mass?: number
precision?: number
fps?: number
onStart?: ((value: number | number[], spring: Spring) => void) | null
onFrame?: ((value: number | number[], spring: Spring) => void) | null
onRest?: ((value: number | number[], spring: Spring) => void) | null
onComplete?: ((value: number | number[], spring: Spring) => void) | null
}
export class Spring {
constructor(options?: SpringOptions)
set value(val: number | number[])
get value(): number | number[]
getValue(): number | number[]
set target(val: number | number[])
get target(): number | number[]
setTarget(val: number | number[]): this
start(): this
pause(): this
stop(): this
complete(): this
tick(t?: number): this
animateFrame(): void
get restingAtTarget(): boolean
get restingAtStart(): boolean
}