1 | import type { AnimationFunction, LayoutAnimationAndConfig } from './commonTypes';
|
2 | import { BaseAnimationBuilder } from './BaseAnimationBuilder';
|
3 | import type { StyleProps, EasingFunction } from '../../commonTypes';
|
4 | export declare class ComplexAnimationBuilder extends BaseAnimationBuilder {
|
5 | easingV?: EasingFunction;
|
6 | rotateV?: string;
|
7 | type?: AnimationFunction;
|
8 | dampingV?: number;
|
9 | dampingRatioV?: number;
|
10 | massV?: number;
|
11 | stiffnessV?: number;
|
12 | overshootClampingV?: number;
|
13 | restDisplacementThresholdV?: number;
|
14 | restSpeedThresholdV?: number;
|
15 | initialValues?: StyleProps;
|
16 | static createInstance: <T extends typeof BaseAnimationBuilder>(this: T) => InstanceType<T>;
|
17 | /**
|
18 | * Lets you change the easing curve of the animation. Can be chained alongside
|
19 | * other [layout animation
|
20 | * modifiers](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#layout-animation-modifier).
|
21 | *
|
22 | * @param easingFunction - An easing function which defines the animation
|
23 | * curve.
|
24 | */
|
25 | static easing<T extends typeof ComplexAnimationBuilder>(this: T, easingFunction: EasingFunction): InstanceType<T>;
|
26 | easing(easingFunction: EasingFunction): this;
|
27 | /**
|
28 | * Lets you rotate the element. Can be chained alongside other [layout
|
29 | * animation
|
30 | * modifiers](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#layout-animation-modifier).
|
31 | *
|
32 | * @param degree - The rotation degree.
|
33 | */
|
34 | static rotate<T extends typeof ComplexAnimationBuilder>(this: T, degree: string): InstanceType<T>;
|
35 | rotate(degree: string): this;
|
36 | /**
|
37 | * Enables the spring-based animation configuration. Can be chained alongside
|
38 | * other [layout animation
|
39 | * modifiers](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#layout-animation-modifier).
|
40 | *
|
41 | * @param duration - An optional duration of the spring animation (in
|
42 | * milliseconds).
|
43 | */
|
44 | static springify<T extends typeof ComplexAnimationBuilder>(this: T, duration?: number): ComplexAnimationBuilder;
|
45 | springify(duration?: number): this;
|
46 | /**
|
47 | * Lets you adjust the spring animation damping ratio. Can be chained
|
48 | * alongside other [layout animation
|
49 | * modifiers](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#layout-animation-modifier).
|
50 | *
|
51 | * @param dampingRatio - How damped the spring is.
|
52 | */
|
53 | static dampingRatio<T extends typeof ComplexAnimationBuilder>(this: T, dampingRatio: number): InstanceType<T>;
|
54 | dampingRatio(value: number): this;
|
55 | /**
|
56 | * Lets you adjust the spring animation damping. Can be chained alongside
|
57 | * other [layout animation
|
58 | * modifiers](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#layout-animation-modifier).
|
59 | *
|
60 | * @param value - Decides how quickly a spring stops moving. Higher damping
|
61 | * means the spring will come to rest faster.
|
62 | */
|
63 | static damping<T extends typeof ComplexAnimationBuilder>(this: T, damping: number): InstanceType<T>;
|
64 | damping(damping: number): this;
|
65 | /**
|
66 | * Lets you adjust the spring animation mass. Can be chained alongside other
|
67 | * [layout animation
|
68 | * modifiers](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#layout-animation-modifier).
|
69 | *
|
70 | * @param mass - The weight of the spring. Reducing this value makes the
|
71 | * animation faster.
|
72 | */
|
73 | static mass<T extends typeof ComplexAnimationBuilder>(this: T, mass: number): InstanceType<T>;
|
74 | mass(mass: number): this;
|
75 | /**
|
76 | * Lets you adjust the stiffness of the spring animation. Can be chained
|
77 | * alongside other [layout animation
|
78 | * modifiers](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#layout-animation-modifier).
|
79 | *
|
80 | * @param stiffness - How bouncy the spring is.
|
81 | */
|
82 | static stiffness<T extends typeof ComplexAnimationBuilder>(this: T, stiffness: number): InstanceType<T>;
|
83 | stiffness(stiffness: number): this;
|
84 | /**
|
85 | * Lets you adjust overshoot clamping of the spring. Can be chained alongside
|
86 | * other [layout animation
|
87 | * modifiers](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#layout-animation-modifier).
|
88 | *
|
89 | * @param overshootClamping - Whether a spring can bounce over the final
|
90 | * position.
|
91 | */
|
92 | static overshootClamping<T extends typeof ComplexAnimationBuilder>(this: T, overshootClamping: number): InstanceType<T>;
|
93 | overshootClamping(overshootClamping: number): this;
|
94 | /**
|
95 | * Lets you adjust the rest displacement threshold of the spring animation.
|
96 | * Can be chained alongside other [layout animation
|
97 | * modifiers](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#layout-animation-modifier).
|
98 | *
|
99 | * @param restDisplacementThreshold - The displacement below which the spring
|
100 | * will snap to the designated position without further oscillations.
|
101 | */
|
102 | static restDisplacementThreshold<T extends typeof ComplexAnimationBuilder>(this: T, restDisplacementThreshold: number): InstanceType<T>;
|
103 | restDisplacementThreshold(restDisplacementThreshold: number): this;
|
104 | /**
|
105 | * Lets you adjust the rest speed threshold of the spring animation. Can be
|
106 | * chained alongside other [layout animation
|
107 | * modifiers](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#layout-animation-modifier).
|
108 | *
|
109 | * @param restSpeedThreshold - The speed in pixels per second from which the
|
110 | * spring will snap to the designated position without further
|
111 | * oscillations.
|
112 | */
|
113 | static restSpeedThreshold<T extends typeof ComplexAnimationBuilder>(this: T, restSpeedThreshold: number): InstanceType<T>;
|
114 | restSpeedThreshold(restSpeedThreshold: number): this;
|
115 | /**
|
116 | * Lets you override the initial config of the animation
|
117 | *
|
118 | * @param values - An object containing the styles to override.
|
119 | */
|
120 | static withInitialValues<T extends typeof ComplexAnimationBuilder>(this: T, values: StyleProps): InstanceType<T>;
|
121 | withInitialValues(values: StyleProps): this;
|
122 | getAnimationAndConfig(): LayoutAnimationAndConfig;
|
123 | }
|
124 | //# sourceMappingURL=ComplexAnimationBuilder.d.ts.map |
\ | No newline at end of file |