@codellyson/framely 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AbsoluteFill.d.ts +18 -0
- package/dist/AbsoluteFill.d.ts.map +1 -0
- package/dist/AbsoluteFill.js +25 -0
- package/dist/AbsoluteFill.js.map +1 -0
- package/dist/Audio.d.ts +80 -0
- package/dist/Audio.d.ts.map +1 -0
- package/dist/Audio.js +221 -0
- package/dist/Audio.js.map +1 -0
- package/dist/Composition.d.ts +208 -0
- package/dist/Composition.d.ts.map +1 -0
- package/dist/Composition.js +210 -0
- package/dist/Composition.js.map +1 -0
- package/dist/Easing.d.ts +88 -0
- package/dist/Easing.d.ts.map +1 -0
- package/dist/Easing.js +266 -0
- package/dist/Easing.js.map +1 -0
- package/dist/ErrorBoundary.d.ts +35 -0
- package/dist/ErrorBoundary.d.ts.map +1 -0
- package/dist/ErrorBoundary.js +74 -0
- package/dist/ErrorBoundary.js.map +1 -0
- package/dist/Folder.d.ts +46 -0
- package/dist/Folder.d.ts.map +1 -0
- package/dist/Folder.js +44 -0
- package/dist/Folder.js.map +1 -0
- package/dist/Freeze.d.ts +35 -0
- package/dist/Freeze.d.ts.map +1 -0
- package/dist/Freeze.js +40 -0
- package/dist/Freeze.js.map +1 -0
- package/dist/IFrame.d.ts +28 -0
- package/dist/IFrame.d.ts.map +1 -0
- package/dist/IFrame.js +57 -0
- package/dist/IFrame.js.map +1 -0
- package/dist/Img.d.ts +36 -0
- package/dist/Img.d.ts.map +1 -0
- package/dist/Img.js +91 -0
- package/dist/Img.js.map +1 -0
- package/dist/Loop.d.ts +66 -0
- package/dist/Loop.d.ts.map +1 -0
- package/dist/Loop.js +79 -0
- package/dist/Loop.js.map +1 -0
- package/dist/Player.d.ts +118 -0
- package/dist/Player.d.ts.map +1 -0
- package/dist/Player.js +311 -0
- package/dist/Player.js.map +1 -0
- package/dist/Sequence.d.ts +25 -0
- package/dist/Sequence.d.ts.map +1 -0
- package/dist/Sequence.js +37 -0
- package/dist/Sequence.js.map +1 -0
- package/dist/Series.d.ts +52 -0
- package/dist/Series.d.ts.map +1 -0
- package/dist/Series.js +86 -0
- package/dist/Series.js.map +1 -0
- package/dist/Text.d.ts +129 -0
- package/dist/Text.d.ts.map +1 -0
- package/dist/Text.js +211 -0
- package/dist/Text.js.map +1 -0
- package/dist/Video.d.ts +75 -0
- package/dist/Video.d.ts.map +1 -0
- package/dist/Video.js +136 -0
- package/dist/Video.js.map +1 -0
- package/dist/config.d.ts +128 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +243 -0
- package/dist/config.js.map +1 -0
- package/dist/context.d.ts +84 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +131 -0
- package/dist/context.js.map +1 -0
- package/dist/delayRender.d.ts +130 -0
- package/dist/delayRender.d.ts.map +1 -0
- package/dist/delayRender.js +197 -0
- package/dist/delayRender.js.map +1 -0
- package/dist/getInputProps.d.ts +118 -0
- package/dist/getInputProps.d.ts.map +1 -0
- package/dist/getInputProps.js +181 -0
- package/dist/getInputProps.js.map +1 -0
- package/dist/hooks/useDelayRender.d.ts +52 -0
- package/dist/hooks/useDelayRender.d.ts.map +1 -0
- package/dist/hooks/useDelayRender.js +92 -0
- package/dist/hooks/useDelayRender.js.map +1 -0
- package/dist/hooks.d.ts +19 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/hooks.js +17 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.d.ts +71 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +65 -0
- package/dist/index.js.map +1 -0
- package/dist/interpolate.d.ts +80 -0
- package/dist/interpolate.d.ts.map +1 -0
- package/dist/interpolate.js +108 -0
- package/dist/interpolate.js.map +1 -0
- package/dist/interpolateColors.d.ts +50 -0
- package/dist/interpolateColors.d.ts.map +1 -0
- package/dist/interpolateColors.js +300 -0
- package/dist/interpolateColors.js.map +1 -0
- package/dist/makeTransform.d.ts +98 -0
- package/dist/makeTransform.d.ts.map +1 -0
- package/dist/makeTransform.js +287 -0
- package/dist/makeTransform.js.map +1 -0
- package/dist/measureSpring.d.ts +75 -0
- package/dist/measureSpring.d.ts.map +1 -0
- package/dist/measureSpring.js +108 -0
- package/dist/measureSpring.js.map +1 -0
- package/dist/noise.d.ts +110 -0
- package/dist/noise.d.ts.map +1 -0
- package/dist/noise.js +228 -0
- package/dist/noise.js.map +1 -0
- package/dist/preload.d.ts +145 -0
- package/dist/preload.d.ts.map +1 -0
- package/dist/preload.js +225 -0
- package/dist/preload.js.map +1 -0
- package/dist/registerRoot.d.ts +140 -0
- package/dist/registerRoot.d.ts.map +1 -0
- package/dist/registerRoot.js +238 -0
- package/dist/registerRoot.js.map +1 -0
- package/dist/shapes/Circle.d.ts +15 -0
- package/dist/shapes/Circle.d.ts.map +1 -0
- package/dist/shapes/Circle.js +11 -0
- package/dist/shapes/Circle.js.map +1 -0
- package/dist/shapes/Ellipse.d.ts +16 -0
- package/dist/shapes/Ellipse.d.ts.map +1 -0
- package/dist/shapes/Ellipse.js +11 -0
- package/dist/shapes/Ellipse.js.map +1 -0
- package/dist/shapes/Line.d.ts +15 -0
- package/dist/shapes/Line.d.ts.map +1 -0
- package/dist/shapes/Line.js +11 -0
- package/dist/shapes/Line.js.map +1 -0
- package/dist/shapes/Path.d.ts +20 -0
- package/dist/shapes/Path.d.ts.map +1 -0
- package/dist/shapes/Path.js +14 -0
- package/dist/shapes/Path.js.map +1 -0
- package/dist/shapes/Polygon.d.ts +15 -0
- package/dist/shapes/Polygon.d.ts.map +1 -0
- package/dist/shapes/Polygon.js +16 -0
- package/dist/shapes/Polygon.js.map +1 -0
- package/dist/shapes/Rect.d.ts +18 -0
- package/dist/shapes/Rect.d.ts.map +1 -0
- package/dist/shapes/Rect.js +11 -0
- package/dist/shapes/Rect.js.map +1 -0
- package/dist/shapes/Svg.d.ts +16 -0
- package/dist/shapes/Svg.d.ts.map +1 -0
- package/dist/shapes/Svg.js +15 -0
- package/dist/shapes/Svg.js.map +1 -0
- package/dist/shapes/index.d.ts +16 -0
- package/dist/shapes/index.d.ts.map +1 -0
- package/dist/shapes/index.js +9 -0
- package/dist/shapes/index.js.map +1 -0
- package/dist/shapes/usePathLength.d.ts +24 -0
- package/dist/shapes/usePathLength.d.ts.map +1 -0
- package/dist/shapes/usePathLength.js +32 -0
- package/dist/shapes/usePathLength.js.map +1 -0
- package/dist/staticFile.d.ts +47 -0
- package/dist/staticFile.d.ts.map +1 -0
- package/dist/staticFile.js +105 -0
- package/dist/staticFile.js.map +1 -0
- package/dist/templates/api.d.ts +26 -0
- package/dist/templates/api.d.ts.map +1 -0
- package/dist/templates/api.js +142 -0
- package/dist/templates/api.js.map +1 -0
- package/dist/templates/index.d.ts +7 -0
- package/dist/templates/index.d.ts.map +1 -0
- package/dist/templates/index.js +7 -0
- package/dist/templates/index.js.map +1 -0
- package/dist/templates/mockData.d.ts +7 -0
- package/dist/templates/mockData.d.ts.map +1 -0
- package/dist/templates/mockData.js +262 -0
- package/dist/templates/mockData.js.map +1 -0
- package/dist/templates/types.d.ts +104 -0
- package/dist/templates/types.d.ts.map +1 -0
- package/dist/templates/types.js +16 -0
- package/dist/templates/types.js.map +1 -0
- package/dist/transitions/TransitionSeries.d.ts +127 -0
- package/dist/transitions/TransitionSeries.d.ts.map +1 -0
- package/dist/transitions/TransitionSeries.js +190 -0
- package/dist/transitions/TransitionSeries.js.map +1 -0
- package/dist/transitions/index.d.ts +52 -0
- package/dist/transitions/index.d.ts.map +1 -0
- package/dist/transitions/index.js +31 -0
- package/dist/transitions/index.js.map +1 -0
- package/dist/transitions/presets/fade.d.ts +45 -0
- package/dist/transitions/presets/fade.d.ts.map +1 -0
- package/dist/transitions/presets/fade.js +56 -0
- package/dist/transitions/presets/fade.js.map +1 -0
- package/dist/transitions/presets/flip.d.ts +99 -0
- package/dist/transitions/presets/flip.d.ts.map +1 -0
- package/dist/transitions/presets/flip.js +153 -0
- package/dist/transitions/presets/flip.js.map +1 -0
- package/dist/transitions/presets/slide.d.ts +61 -0
- package/dist/transitions/presets/slide.d.ts.map +1 -0
- package/dist/transitions/presets/slide.js +116 -0
- package/dist/transitions/presets/slide.js.map +1 -0
- package/dist/transitions/presets/wipe.d.ts +69 -0
- package/dist/transitions/presets/wipe.d.ts.map +1 -0
- package/dist/transitions/presets/wipe.js +136 -0
- package/dist/transitions/presets/wipe.js.map +1 -0
- package/dist/transitions/presets/zoom.d.ts +76 -0
- package/dist/transitions/presets/zoom.d.ts.map +1 -0
- package/dist/transitions/presets/zoom.js +110 -0
- package/dist/transitions/presets/zoom.js.map +1 -0
- package/dist/useAudioData.d.ts +112 -0
- package/dist/useAudioData.d.ts.map +1 -0
- package/dist/useAudioData.js +183 -0
- package/dist/useAudioData.js.map +1 -0
- package/dist/useSpring.d.ts +79 -0
- package/dist/useSpring.d.ts.map +1 -0
- package/dist/useSpring.js +140 -0
- package/dist/useSpring.js.map +1 -0
- package/package.json +51 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flip Transition
|
|
3
|
+
*
|
|
4
|
+
* 3D flip/rotation transition between scenes.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* <TransitionSeries.Transition
|
|
8
|
+
* presentation={flip()}
|
|
9
|
+
* timing={{ durationInFrames: 30 }}
|
|
10
|
+
* />
|
|
11
|
+
*
|
|
12
|
+
* // Flip vertically
|
|
13
|
+
* <TransitionSeries.Transition
|
|
14
|
+
* presentation={flip({ direction: 'vertical' })}
|
|
15
|
+
* timing={{ durationInFrames: 30 }}
|
|
16
|
+
* />
|
|
17
|
+
*/
|
|
18
|
+
import { Easing } from '../../Easing';
|
|
19
|
+
/**
|
|
20
|
+
* Create a flip transition presentation.
|
|
21
|
+
*/
|
|
22
|
+
export function flip(options = {}) {
|
|
23
|
+
const { direction = 'horizontal', perspective = 1000, easing = Easing.easeInOutCubic, } = options;
|
|
24
|
+
const axis = direction === 'horizontal' ? 'Y' : 'X';
|
|
25
|
+
return {
|
|
26
|
+
entering: (progress) => {
|
|
27
|
+
const easedProgress = easing(progress);
|
|
28
|
+
// Start at -90 degrees (hidden), rotate to 0
|
|
29
|
+
const rotation = -90 + 90 * easedProgress;
|
|
30
|
+
return {
|
|
31
|
+
transform: `perspective(${perspective}px) rotate${axis}(${rotation}deg)`,
|
|
32
|
+
backfaceVisibility: 'hidden',
|
|
33
|
+
// Only visible when rotation is past -90
|
|
34
|
+
opacity: progress > 0.5 ? 1 : 0,
|
|
35
|
+
};
|
|
36
|
+
},
|
|
37
|
+
exiting: (progress) => {
|
|
38
|
+
const easedProgress = easing(progress);
|
|
39
|
+
// Start at 0, rotate to 90 degrees (hidden)
|
|
40
|
+
const rotation = 90 * easedProgress;
|
|
41
|
+
return {
|
|
42
|
+
transform: `perspective(${perspective}px) rotate${axis}(${rotation}deg)`,
|
|
43
|
+
backfaceVisibility: 'hidden',
|
|
44
|
+
// Only visible when rotation is before 90
|
|
45
|
+
opacity: progress < 0.5 ? 1 : 0,
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Horizontal flip (around Y axis).
|
|
52
|
+
*/
|
|
53
|
+
export function flipHorizontal(options = {}) {
|
|
54
|
+
return flip({ ...options, direction: 'horizontal' });
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Vertical flip (around X axis).
|
|
58
|
+
*/
|
|
59
|
+
export function flipVertical(options = {}) {
|
|
60
|
+
return flip({ ...options, direction: 'vertical' });
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Card flip - like flipping a playing card.
|
|
64
|
+
*/
|
|
65
|
+
export function cardFlip(options = {}) {
|
|
66
|
+
const { flipDirection = 'left', perspective = 1000, easing = Easing.easeInOut, } = options;
|
|
67
|
+
const isHorizontal = flipDirection === 'left' || flipDirection === 'right';
|
|
68
|
+
const isNegative = flipDirection === 'left' || flipDirection === 'up';
|
|
69
|
+
const axis = isHorizontal ? 'Y' : 'X';
|
|
70
|
+
const sign = isNegative ? 1 : -1;
|
|
71
|
+
return {
|
|
72
|
+
entering: (progress) => {
|
|
73
|
+
const easedProgress = easing(progress);
|
|
74
|
+
const rotation = sign * (180 - 180 * easedProgress);
|
|
75
|
+
return {
|
|
76
|
+
transform: `perspective(${perspective}px) rotate${axis}(${rotation}deg)`,
|
|
77
|
+
backfaceVisibility: 'hidden',
|
|
78
|
+
transformStyle: 'preserve-3d',
|
|
79
|
+
};
|
|
80
|
+
},
|
|
81
|
+
exiting: (progress) => {
|
|
82
|
+
const easedProgress = easing(progress);
|
|
83
|
+
const rotation = sign * 180 * easedProgress;
|
|
84
|
+
return {
|
|
85
|
+
transform: `perspective(${perspective}px) rotate${axis}(${rotation}deg)`,
|
|
86
|
+
backfaceVisibility: 'hidden',
|
|
87
|
+
transformStyle: 'preserve-3d',
|
|
88
|
+
};
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Cube rotation - scenes appear on faces of a rotating cube.
|
|
94
|
+
*/
|
|
95
|
+
export function cube(options = {}) {
|
|
96
|
+
const { direction = 'left', perspective = 1000, easing = Easing.easeInOutCubic, } = options;
|
|
97
|
+
const isHorizontal = direction === 'left' || direction === 'right';
|
|
98
|
+
const isNegative = direction === 'left' || direction === 'up';
|
|
99
|
+
const axis = isHorizontal ? 'Y' : 'X';
|
|
100
|
+
const sign = isNegative ? 1 : -1;
|
|
101
|
+
return {
|
|
102
|
+
entering: (progress) => {
|
|
103
|
+
const easedProgress = easing(progress);
|
|
104
|
+
const rotation = sign * (-90 + 90 * easedProgress);
|
|
105
|
+
const translate = isHorizontal ? 'translateZ' : 'translateZ';
|
|
106
|
+
return {
|
|
107
|
+
transform: `perspective(${perspective}px) rotate${axis}(${rotation}deg) ${translate}(${50 * (1 - easedProgress)}%)`,
|
|
108
|
+
transformOrigin: isHorizontal
|
|
109
|
+
? (isNegative ? 'left center' : 'right center')
|
|
110
|
+
: (isNegative ? 'center top' : 'center bottom'),
|
|
111
|
+
};
|
|
112
|
+
},
|
|
113
|
+
exiting: (progress) => {
|
|
114
|
+
const easedProgress = easing(progress);
|
|
115
|
+
const rotation = sign * 90 * easedProgress;
|
|
116
|
+
const translate = isHorizontal ? 'translateZ' : 'translateZ';
|
|
117
|
+
return {
|
|
118
|
+
transform: `perspective(${perspective}px) rotate${axis}(${rotation}deg) ${translate}(${50 * easedProgress}%)`,
|
|
119
|
+
transformOrigin: isHorizontal
|
|
120
|
+
? (isNegative ? 'right center' : 'left center')
|
|
121
|
+
: (isNegative ? 'center bottom' : 'center top'),
|
|
122
|
+
};
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Door opening effect.
|
|
128
|
+
*/
|
|
129
|
+
export function door(options = {}) {
|
|
130
|
+
const { side = 'left', perspective = 1000, easing = Easing.easeOut, } = options;
|
|
131
|
+
const sign = side === 'left' ? 1 : -1;
|
|
132
|
+
const origin = side === 'left' ? 'left center' : 'right center';
|
|
133
|
+
return {
|
|
134
|
+
entering: (progress) => {
|
|
135
|
+
const easedProgress = easing(progress);
|
|
136
|
+
const rotation = sign * (-90 + 90 * easedProgress);
|
|
137
|
+
return {
|
|
138
|
+
transform: `perspective(${perspective}px) rotateY(${rotation}deg)`,
|
|
139
|
+
transformOrigin: origin,
|
|
140
|
+
};
|
|
141
|
+
},
|
|
142
|
+
exiting: (progress) => {
|
|
143
|
+
const easedProgress = easing(progress);
|
|
144
|
+
const rotation = sign * 90 * easedProgress;
|
|
145
|
+
return {
|
|
146
|
+
transform: `perspective(${perspective}px) rotateY(${rotation}deg)`,
|
|
147
|
+
transformOrigin: origin,
|
|
148
|
+
};
|
|
149
|
+
},
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
export default flip;
|
|
153
|
+
//# sourceMappingURL=flip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"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EAAE;YAClD,MAAM,aAAa,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;YACvC,MAAM,QAAQ,GAAW,IAAI,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,aAAa,CAAC,CAAC;YAE3D,OAAO;gBACL,SAAS,EAAE,eAAe,WAAW,eAAe,QAAQ,MAAM;gBAClE,eAAe,EAAE,MAAM;aACxB,CAAC;QACJ,CAAC;QAED,OAAO,EAAE,CAAC,QAAgB,EAAuB,EAAE;YACjD,MAAM,aAAa,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;YACvC,MAAM,QAAQ,GAAW,IAAI,GAAG,EAAE,GAAG,aAAa,CAAC;YAEnD,OAAO;gBACL,SAAS,EAAE,eAAe,WAAW,eAAe,QAAQ,MAAM;gBAClE,eAAe,EAAE,MAAM;aACxB,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slide Transition
|
|
3
|
+
*
|
|
4
|
+
* Slide scenes in and out from different directions.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* <TransitionSeries.Transition
|
|
8
|
+
* presentation={slide()}
|
|
9
|
+
* timing={{ durationInFrames: 30 }}
|
|
10
|
+
* />
|
|
11
|
+
*
|
|
12
|
+
* // Slide from bottom
|
|
13
|
+
* <TransitionSeries.Transition
|
|
14
|
+
* presentation={slide({ direction: 'from-bottom' })}
|
|
15
|
+
* timing={{ durationInFrames: 30 }}
|
|
16
|
+
* />
|
|
17
|
+
*/
|
|
18
|
+
import { EasingFunction } from '../../Easing';
|
|
19
|
+
export type SlideDirection = 'from-left' | 'from-right' | 'from-top' | 'from-bottom';
|
|
20
|
+
export interface TransitionPresentation {
|
|
21
|
+
style: React.CSSProperties;
|
|
22
|
+
transform?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface SlideOptions {
|
|
25
|
+
direction?: SlideDirection;
|
|
26
|
+
exitOpposite?: boolean;
|
|
27
|
+
easing?: EasingFunction;
|
|
28
|
+
}
|
|
29
|
+
export interface TransitionStyle {
|
|
30
|
+
transform: string;
|
|
31
|
+
}
|
|
32
|
+
export interface TransitionResult {
|
|
33
|
+
entering: (progress: number) => TransitionStyle;
|
|
34
|
+
exiting: (progress: number) => TransitionStyle;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Create a slide transition presentation.
|
|
38
|
+
*/
|
|
39
|
+
export declare function slide(options?: SlideOptions): TransitionResult;
|
|
40
|
+
/**
|
|
41
|
+
* Slide from left.
|
|
42
|
+
*/
|
|
43
|
+
export declare function slideFromLeft(options?: Omit<SlideOptions, 'direction'>): TransitionResult;
|
|
44
|
+
/**
|
|
45
|
+
* Slide from right.
|
|
46
|
+
*/
|
|
47
|
+
export declare function slideFromRight(options?: Omit<SlideOptions, 'direction'>): TransitionResult;
|
|
48
|
+
/**
|
|
49
|
+
* Slide from top.
|
|
50
|
+
*/
|
|
51
|
+
export declare function slideFromTop(options?: Omit<SlideOptions, 'direction'>): TransitionResult;
|
|
52
|
+
/**
|
|
53
|
+
* Slide from bottom.
|
|
54
|
+
*/
|
|
55
|
+
export declare function slideFromBottom(options?: Omit<SlideOptions, 'direction'>): TransitionResult;
|
|
56
|
+
/**
|
|
57
|
+
* Push transition - both scenes move in the same direction.
|
|
58
|
+
*/
|
|
59
|
+
export declare function push(options?: Omit<SlideOptions, 'exitOpposite'>): TransitionResult;
|
|
60
|
+
export default slide;
|
|
61
|
+
//# sourceMappingURL=slide.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slide.d.ts","sourceRoot":"","sources":["../../../src/transitions/presets/slide.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAU,cAAc,EAAE,MAAM,cAAc,CAAC;AAEtD,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,YAAY,GAAG,UAA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directions.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* <TransitionSeries.Transition
|
|
8
|
+
* presentation={slide()}
|
|
9
|
+
* timing={{ durationInFrames: 30 }}
|
|
10
|
+
* />
|
|
11
|
+
*
|
|
12
|
+
* // Slide from bottom
|
|
13
|
+
* <TransitionSeries.Transition
|
|
14
|
+
* presentation={slide({ direction: 'from-bottom' })}
|
|
15
|
+
* timing={{ durationInFrames: 30 }}
|
|
16
|
+
* />
|
|
17
|
+
*/
|
|
18
|
+
import { Easing } from '../../Easing';
|
|
19
|
+
/**
|
|
20
|
+
* Create a slide transition presentation.
|
|
21
|
+
*/
|
|
22
|
+
export function slide(options = {}) {
|
|
23
|
+
const { direction = 'from-right', exitOpposite = true, easing = Easing.easeInOutCubic, } = options;
|
|
24
|
+
// Calculate enter transform based on direction
|
|
25
|
+
const getEnterTransform = (progress) => {
|
|
26
|
+
const easedProgress = easing(progress);
|
|
27
|
+
const offset = (1 - easedProgress) * 100;
|
|
28
|
+
switch (direction) {
|
|
29
|
+
case 'from-left':
|
|
30
|
+
return `translateX(${-offset}%)`;
|
|
31
|
+
case 'from-right':
|
|
32
|
+
return `translateX(${offset}%)`;
|
|
33
|
+
case 'from-top':
|
|
34
|
+
return `translateY(${-offset}%)`;
|
|
35
|
+
case 'from-bottom':
|
|
36
|
+
return `translateY(${offset}%)`;
|
|
37
|
+
default:
|
|
38
|
+
return `translateX(${offset}%)`;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
// Calculate exit transform (opposite or same direction)
|
|
42
|
+
const getExitTransform = (progress) => {
|
|
43
|
+
const easedProgress = easing(progress);
|
|
44
|
+
const offset = easedProgress * 100;
|
|
45
|
+
if (exitOpposite) {
|
|
46
|
+
// Exit in opposite direction
|
|
47
|
+
switch (direction) {
|
|
48
|
+
case 'from-left':
|
|
49
|
+
return `translateX(${offset}%)`;
|
|
50
|
+
case 'from-right':
|
|
51
|
+
return `translateX(${-offset}%)`;
|
|
52
|
+
case 'from-top':
|
|
53
|
+
return `translateY(${offset}%)`;
|
|
54
|
+
case 'from-bottom':
|
|
55
|
+
return `translateY(${-offset}%)`;
|
|
56
|
+
default:
|
|
57
|
+
return `translateX(${-offset}%)`;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
// Exit in same direction (push effect)
|
|
62
|
+
switch (direction) {
|
|
63
|
+
case 'from-left':
|
|
64
|
+
return `translateX(${-offset}%)`;
|
|
65
|
+
case 'from-right':
|
|
66
|
+
return `translateX(${offset}%)`;
|
|
67
|
+
case 'from-top':
|
|
68
|
+
return `translateY(${-offset}%)`;
|
|
69
|
+
case 'from-bottom':
|
|
70
|
+
return `translateY(${offset}%)`;
|
|
71
|
+
default:
|
|
72
|
+
return `translateX(${offset}%)`;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
return {
|
|
77
|
+
entering: (progress) => ({
|
|
78
|
+
transform: getEnterTransform(progress),
|
|
79
|
+
}),
|
|
80
|
+
exiting: (progress) => ({
|
|
81
|
+
transform: getExitTransform(progress),
|
|
82
|
+
}),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Slide from left.
|
|
87
|
+
*/
|
|
88
|
+
export function slideFromLeft(options = {}) {
|
|
89
|
+
return slide({ ...options, direction: 'from-left' });
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Slide from right.
|
|
93
|
+
*/
|
|
94
|
+
export function slideFromRight(options = {}) {
|
|
95
|
+
return slide({ ...options, direction: 'from-right' });
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Slide from top.
|
|
99
|
+
*/
|
|
100
|
+
export function slideFromTop(options = {}) {
|
|
101
|
+
return slide({ ...options, direction: 'from-top' });
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Slide from bottom.
|
|
105
|
+
*/
|
|
106
|
+
export function slideFromBottom(options = {}) {
|
|
107
|
+
return slide({ ...options, direction: 'from-bottom' });
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Push transition - both scenes move in the same direction.
|
|
111
|
+
*/
|
|
112
|
+
export function push(options = {}) {
|
|
113
|
+
return slide({ ...options, exitOpposite: false });
|
|
114
|
+
}
|
|
115
|
+
export default slide;
|
|
116
|
+
//# sourceMappingURL=slide.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slide.js","sourceRoot":"","sources":["../../../src/transitions/presets/slide.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,MAAM,EAAkB,MAAM,cAAc,CAAC;AAwBtD;;GAEG;AACH,MAAM,UAAU,KAAK,CAAC,UAAwB,EAAE;IAC9C,MAAM,EACJ,SAAS,GAAG,YAAY,EACxB,YAAY,GAAG,IAAI,EACnB,MAAM,GAAG,MAAM,CAAC,cAAc,GAC/B,GAAG,OAAO,CAAC;IAEZ,+CAA+C;IAC/C,MAAM,iBAAiB,GAAG,CAAC,QAAgB,EAAU,EAAE;QACrD,MAAM,aAAa,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;QACvC,MAAM,MAAM,GAAG,CAAC,CAAC,GAAG,aAAa,CAAC,GAAG,GAAG,CAAC;QAEzC,QAAQ,SAAS,EAAE,CAAC;YAClB,KAAK,WAAW;gBACd,OAAO,cAAc,CAAC,MAAM,IAAI,CAAC;YACnC,KAAK,YAAY;gBACf,OAAO,cAAc,MAAM,IAAI,CAAC;YAClC,KAAK,UAAU;gBACb,OAAO,cAAc,CAAC,MAAM,IAAI,CAAC;YACnC,KAAK,aAAa;gBAChB,OAAO,cAAc,MAAM,IAAI,CAAC;YAClC;gBACE,OAAO,cAAc,MAAM,IAAI,CAAC;QACpC,CAAC;IACH,CAAC,CAAC;IAEF,wDAAwD;IACxD,MAAM,gBAAgB,GAAG,CAAC,QAAgB,EAAU,EAAE;QACpD,MAAM,aAAa,GAAG,MAAM,CAAC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ACvD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,UAA2C,EAAE;IAC1E,OAAO,KAAK,CAAC,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC,CAAC;AACxD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,UAA2C,EAAE;IACxE,OAAO,KAAK,CAAC,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,CAAC;AACtD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,UAA2C,EAAE;IAC3E,OAAO,KAAK,CAAC,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC,CAAC;AACzD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,IAAI,CAAC,UAA8C,EAAE;IACnE,OAAO,KAAK,CAAC,EAAE,GAAG,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC;AACpD,CAAC;AAED,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wipe Transition
|
|
3
|
+
*
|
|
4
|
+
* Reveals the new scene by "wiping" away the old one using clip-path.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* <TransitionSeries.Transition
|
|
8
|
+
* presentation={wipe()}
|
|
9
|
+
* timing={{ durationInFrames: 30 }}
|
|
10
|
+
* />
|
|
11
|
+
*
|
|
12
|
+
* // Wipe from top
|
|
13
|
+
* <TransitionSeries.Transition
|
|
14
|
+
* presentation={wipe({ direction: 'from-top' })}
|
|
15
|
+
* timing={{ durationInFrames: 30 }}
|
|
16
|
+
* />
|
|
17
|
+
*/
|
|
18
|
+
import { EasingFunction } from '../../Easing';
|
|
19
|
+
export type WipeDirection = 'from-left' | 'from-right' | 'from-top' | 'from-bottom' | 'clock' | 'counterclock';
|
|
20
|
+
export type DiagonalCorner = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
21
|
+
export interface TransitionPresentation {
|
|
22
|
+
style: React.CSSProperties;
|
|
23
|
+
transform?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface WipeOptions {
|
|
26
|
+
direction?: WipeDirection;
|
|
27
|
+
easing?: EasingFunction;
|
|
28
|
+
}
|
|
29
|
+
export interface DiagonalWipeOptions {
|
|
30
|
+
corner?: DiagonalCorner;
|
|
31
|
+
easing?: EasingFunction;
|
|
32
|
+
}
|
|
33
|
+
export interface WipeTransitionStyle {
|
|
34
|
+
clipPath: string;
|
|
35
|
+
}
|
|
36
|
+
export interface WipeTransitionResult {
|
|
37
|
+
entering: (progress: number) => WipeTransitionStyle;
|
|
38
|
+
exiting: (progress: number) => WipeTransitionStyle;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Create a wipe transition presentation.
|
|
42
|
+
*/
|
|
43
|
+
export declare function wipe(options?: WipeOptions): WipeTransitionResult;
|
|
44
|
+
/**
|
|
45
|
+
* Wipe from left to right.
|
|
46
|
+
*/
|
|
47
|
+
export declare function wipeLeft(options?: Omit<WipeOptions, 'direction'>): WipeTransitionResult;
|
|
48
|
+
/**
|
|
49
|
+
* Wipe from right to left.
|
|
50
|
+
*/
|
|
51
|
+
export declare function wipeRight(options?: Omit<WipeOptions, 'direction'>): WipeTransitionResult;
|
|
52
|
+
/**
|
|
53
|
+
* Wipe from top to bottom.
|
|
54
|
+
*/
|
|
55
|
+
export declare function wipeTop(options?: Omit<WipeOptions, 'direction'>): WipeTransitionResult;
|
|
56
|
+
/**
|
|
57
|
+
* Wipe from bottom to top.
|
|
58
|
+
*/
|
|
59
|
+
export declare function wipeBottom(options?: Omit<WipeOptions, 'direction'>): WipeTransitionResult;
|
|
60
|
+
/**
|
|
61
|
+
* Circular wipe (iris) from center.
|
|
62
|
+
*/
|
|
63
|
+
export declare function iris(options?: Omit<WipeOptions, 'direction'>): WipeTransitionResult;
|
|
64
|
+
/**
|
|
65
|
+
* Diagonal wipe using polygon clip-path.
|
|
66
|
+
*/
|
|
67
|
+
export declare function diagonalWipe(options?: DiagonalWipeOptions): WipeTransitionResult;
|
|
68
|
+
export default wipe;
|
|
69
|
+
//# sourceMappingURL=wipe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wipe.d.ts","sourceRoot":"","sources":["../../../src/transitions/presets/wipe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAU,cAAc,EAAE,MAAM,cAAc,CAAC;AAEtD,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,YAAY,GAAG,UAAU,GAAG,aAAa,GAAG,OAAO,GAAG,cAAc,CAAC;AAC/G,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,cAAc,CAAC;AAEvF,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,mBAAmB,CAAC;IACpD,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,mBAAmB,CAAC;CACpD;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,GAAE,WAAgB,GAAG,oBAAoB,CA0DpE;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,OAAO,GAAE,IAAI,CAAC,WAAW,EAAE,WAAW,CAAM,GAAG,oBAAoB,CAE3F;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,OAAO,GAAE,IAAI,CAAC,WAAW,EAAE,WAAW,CAAM,GAAG,oBAAoB,CAE5F;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,OAAO,GAAE,IAAI,CAAC,WAAW,EAAE,WAAW,CAAM,GAAG,oBAAoB,CAE1F;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,GAAE,IAAI,CAAC,WAAW,EAAE,WAAW,CAAM,GAAG,oBAAoB,CAE7F;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,GAAE,IAAI,CAAC,WAAW,EAAE,WAAW,CAAM,GAAG,oBAAoB,CAEvF;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,GAAE,mBAAwB,GAAG,oBAAoB,CA4CpF;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wipe Transition
|
|
3
|
+
*
|
|
4
|
+
* Reveals the new scene by "wiping" away the old one using clip-path.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* <TransitionSeries.Transition
|
|
8
|
+
* presentation={wipe()}
|
|
9
|
+
* timing={{ durationInFrames: 30 }}
|
|
10
|
+
* />
|
|
11
|
+
*
|
|
12
|
+
* // Wipe from top
|
|
13
|
+
* <TransitionSeries.Transition
|
|
14
|
+
* presentation={wipe({ direction: 'from-top' })}
|
|
15
|
+
* timing={{ durationInFrames: 30 }}
|
|
16
|
+
* />
|
|
17
|
+
*/
|
|
18
|
+
import { Easing } from '../../Easing';
|
|
19
|
+
/**
|
|
20
|
+
* Create a wipe transition presentation.
|
|
21
|
+
*/
|
|
22
|
+
export function wipe(options = {}) {
|
|
23
|
+
const { direction = 'from-left', easing = Easing.easeInOut, } = options;
|
|
24
|
+
const getClipPath = (progress, isEntering) => {
|
|
25
|
+
const p = easing(progress) * 100;
|
|
26
|
+
switch (direction) {
|
|
27
|
+
case 'from-left':
|
|
28
|
+
return isEntering
|
|
29
|
+
? `inset(0 ${100 - p}% 0 0)`
|
|
30
|
+
: `inset(0 0 0 ${p}%)`;
|
|
31
|
+
case 'from-right':
|
|
32
|
+
return isEntering
|
|
33
|
+
? `inset(0 0 0 ${100 - p}%)`
|
|
34
|
+
: `inset(0 ${p}% 0 0)`;
|
|
35
|
+
case 'from-top':
|
|
36
|
+
return isEntering
|
|
37
|
+
? `inset(0 0 ${100 - p}% 0)`
|
|
38
|
+
: `inset(${p}% 0 0 0)`;
|
|
39
|
+
case 'from-bottom':
|
|
40
|
+
return isEntering
|
|
41
|
+
? `inset(${100 - p}% 0 0 0)`
|
|
42
|
+
: `inset(0 0 ${p}% 0)`;
|
|
43
|
+
case 'clock':
|
|
44
|
+
// Circular wipe clockwise
|
|
45
|
+
return isEntering
|
|
46
|
+
? `circle(${p}% at 50% 50%)`
|
|
47
|
+
: `circle(${100 - p}% at 50% 50%)`;
|
|
48
|
+
case 'counterclock':
|
|
49
|
+
// Circular wipe counter-clockwise (same as clock visually)
|
|
50
|
+
return isEntering
|
|
51
|
+
? `circle(${p}% at 50% 50%)`
|
|
52
|
+
: `circle(${100 - p}% at 50% 50%)`;
|
|
53
|
+
default:
|
|
54
|
+
return isEntering
|
|
55
|
+
? `inset(0 ${100 - p}% 0 0)`
|
|
56
|
+
: `inset(0 0 0 ${p}%)`;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
return {
|
|
60
|
+
entering: (progress) => ({
|
|
61
|
+
clipPath: getClipPath(progress, true),
|
|
62
|
+
}),
|
|
63
|
+
exiting: (progress) => ({
|
|
64
|
+
clipPath: getClipPath(progress, false),
|
|
65
|
+
}),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Wipe from left to right.
|
|
70
|
+
*/
|
|
71
|
+
export function wipeLeft(options = {}) {
|
|
72
|
+
return wipe({ ...options, direction: 'from-left' });
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Wipe from right to left.
|
|
76
|
+
*/
|
|
77
|
+
export function wipeRight(options = {}) {
|
|
78
|
+
return wipe({ ...options, direction: 'from-right' });
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Wipe from top to bottom.
|
|
82
|
+
*/
|
|
83
|
+
export function wipeTop(options = {}) {
|
|
84
|
+
return wipe({ ...options, direction: 'from-top' });
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Wipe from bottom to top.
|
|
88
|
+
*/
|
|
89
|
+
export function wipeBottom(options = {}) {
|
|
90
|
+
return wipe({ ...options, direction: 'from-bottom' });
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Circular wipe (iris) from center.
|
|
94
|
+
*/
|
|
95
|
+
export function iris(options = {}) {
|
|
96
|
+
return wipe({ ...options, direction: 'clock' });
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Diagonal wipe using polygon clip-path.
|
|
100
|
+
*/
|
|
101
|
+
export function diagonalWipe(options = {}) {
|
|
102
|
+
const { corner = 'top-left', easing = Easing.easeInOut, } = options;
|
|
103
|
+
const getPolygon = (progress, isEntering) => {
|
|
104
|
+
const p = easing(progress) * 200; // 200% to ensure full coverage
|
|
105
|
+
switch (corner) {
|
|
106
|
+
case 'top-left':
|
|
107
|
+
return isEntering
|
|
108
|
+
? `polygon(0 0, ${p}% 0, 0 ${p}%)`
|
|
109
|
+
: `polygon(${100 - p}% 100%, 100% 100%, 100% ${100 - p}%)`;
|
|
110
|
+
case 'top-right':
|
|
111
|
+
return isEntering
|
|
112
|
+
? `polygon(100% 0, ${100 - p}% 0, 100% ${p}%)`
|
|
113
|
+
: `polygon(0 100%, ${p}% 100%, 0 ${100 - p}%)`;
|
|
114
|
+
case 'bottom-left':
|
|
115
|
+
return isEntering
|
|
116
|
+
? `polygon(0 100%, ${p}% 100%, 0 ${100 - p}%)`
|
|
117
|
+
: `polygon(${100 - p}% 0, 100% 0, 100% ${p}%)`;
|
|
118
|
+
case 'bottom-right':
|
|
119
|
+
return isEntering
|
|
120
|
+
? `polygon(100% 100%, ${100 - p}% 100%, 100% ${100 - p}%)`
|
|
121
|
+
: `polygon(0 0, ${p}% 0, 0 ${p}%)`;
|
|
122
|
+
default:
|
|
123
|
+
return 'polygon(0 0, 100% 0, 100% 100%, 0 100%)';
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
return {
|
|
127
|
+
entering: (progress) => ({
|
|
128
|
+
clipPath: getPolygon(progress, true),
|
|
129
|
+
}),
|
|
130
|
+
exiting: (progress) => ({
|
|
131
|
+
clipPath: getPolygon(progress, false),
|
|
132
|
+
}),
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
export default wipe;
|
|
136
|
+
//# sourceMappingURL=wipe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wipe.js","sourceRoot":"","sources":["../../../src/transitions/presets/wipe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,MAAM,EAAkB,MAAM,cAAc,CAAC;AA6BtD;;GAEG;AACH,MAAM,UAAU,IAAI,CAAC,UAAuB,EAAE;IAC5C,MAAM,EACJ,SAAS,GAAG,WAAW,EACvB,MAAM,GAAG,MAAM,CAAC,SAAS,GAC1B,GAAG,OAAO,CAAC;IAEZ,MAAM,WAAW,GAAG,CAAC,QAAgB,EAAE,UAAmB,EAAU,EAAE;QACpE,MAAM,CAAC,GAAW,MAAM,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC;QAEzC,QAAQ,SAAS,EAAE,CAAC;YAClB,KAAK,WAAW;gBACd,OAAO,UAAU;oBACf,CAAC,CAAC,WAAW,GAAG,GAAG,CAAC,QAAQ;oBAC5B,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC;YAE3B,KAAK,YAAY;gBACf,OAAO,UAAU;oBACf,CAAC,CAAC,eAAe,GAAG,GAAG,CAAC,IAA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EnD,KAAK,aAAa;gBAChB,OAAO,UAAU;oBACf,CAAC,CAAC,mBAAmB,CAAC,aAAa,GAAG,GAAG,CAAC,IAAI;oBAC9C,CAAC,CAAC,WAAW,GAAG,GAAG,CAAC,qBAAqB,CAAC,IAAI,CAAC;YAEnD,KAAK,cAAc;gBACjB,OAAO,UAAU;oBACf,CAAC,CAAC,sBAAsB,GAAG,GAAG,CAAC,gBAAgB,GAAG,GAAG,CAAC,IAAI;oBAC1D,CAAC,CAAC,gBAAgB,CAAC,UAAU,CAAC,IAAI,CAAC;YAEvC;gBACE,OAAO,yCAAyC,CAAC;QACrD,CAAC;IACH,CAAC,CAAC;IAEF,OAAO;QACL,QAAQ,EAAE,CAAC,QAAgB,EAAuB,EAAE,CAAC,CAAC;YACpD,QAAQ,EAAE,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC;SACrC,CAAC;QAEF,OAAO,EAAE,CAAC,QAAgB,EAAuB,EAAE,CAAC,CAAC;YACnD,QAAQ,EAAE,UAAU,CAAC,QAAQ,EAAE,KAAK,CAAC;SACtC,CAAC;KACH,CAAC;AACJ,CAAC;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zoom Transition
|
|
3
|
+
*
|
|
4
|
+
* Scale-based transition that zooms scenes in and out.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* <TransitionSeries.Transition
|
|
8
|
+
* presentation={zoom()}
|
|
9
|
+
* timing={{ durationInFrames: 30 }}
|
|
10
|
+
* />
|
|
11
|
+
*
|
|
12
|
+
* // Zoom out on exit
|
|
13
|
+
* <TransitionSeries.Transition
|
|
14
|
+
* presentation={zoom({ exitDirection: 'out' })}
|
|
15
|
+
* timing={{ durationInFrames: 30 }}
|
|
16
|
+
* />
|
|
17
|
+
*/
|
|
18
|
+
import { EasingFunction } from '../../Easing';
|
|
19
|
+
export type ZoomDirection = 'in' | 'out';
|
|
20
|
+
export interface TransitionPresentation {
|
|
21
|
+
style: React.CSSProperties;
|
|
22
|
+
transform?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface ZoomOptions {
|
|
25
|
+
enterDirection?: ZoomDirection;
|
|
26
|
+
exitDirection?: ZoomDirection;
|
|
27
|
+
scale?: number;
|
|
28
|
+
withFade?: boolean;
|
|
29
|
+
easing?: EasingFunction;
|
|
30
|
+
}
|
|
31
|
+
export interface KenBurnsOptions {
|
|
32
|
+
startScale?: number;
|
|
33
|
+
endScale?: number;
|
|
34
|
+
origin?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface ZoomRotateOptions {
|
|
37
|
+
scale?: number;
|
|
38
|
+
rotation?: number;
|
|
39
|
+
withFade?: boolean;
|
|
40
|
+
easing?: EasingFunction;
|
|
41
|
+
}
|
|
42
|
+
export interface ZoomTransitionStyle {
|
|
43
|
+
transform: string;
|
|
44
|
+
opacity?: number;
|
|
45
|
+
}
|
|
46
|
+
export interface ZoomTransitionResult {
|
|
47
|
+
entering: (progress: number) => ZoomTransitionStyle;
|
|
48
|
+
exiting: (progress: number) => ZoomTransitionStyle;
|
|
49
|
+
}
|
|
50
|
+
export interface KenBurnsStyle {
|
|
51
|
+
transform: string;
|
|
52
|
+
transformOrigin: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Create a zoom transition presentation.
|
|
56
|
+
*/
|
|
57
|
+
export declare function zoom(options?: ZoomOptions): ZoomTransitionResult;
|
|
58
|
+
/**
|
|
59
|
+
* Zoom in on enter, zoom out on exit.
|
|
60
|
+
*/
|
|
61
|
+
export declare function zoomInOut(options?: Omit<ZoomOptions, 'enterDirection' | 'exitDirection'>): ZoomTransitionResult;
|
|
62
|
+
/**
|
|
63
|
+
* Zoom out on enter, zoom in on exit.
|
|
64
|
+
*/
|
|
65
|
+
export declare function zoomOutIn(options?: Omit<ZoomOptions, 'enterDirection' | 'exitDirection'>): ZoomTransitionResult;
|
|
66
|
+
/**
|
|
67
|
+
* Ken Burns style zoom - subtle zoom during the entire sequence.
|
|
68
|
+
* Note: This is different from a transition, it's an effect.
|
|
69
|
+
*/
|
|
70
|
+
export declare function kenBurns(options?: KenBurnsOptions): (progress: number) => KenBurnsStyle;
|
|
71
|
+
/**
|
|
72
|
+
* Zoom with rotation.
|
|
73
|
+
*/
|
|
74
|
+
export declare function zoomRotate(options?: ZoomRotateOptions): ZoomTransitionResult;
|
|
75
|
+
export default zoom;
|
|
76
|
+
//# sourceMappingURL=zoom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zoom.d.ts","sourceRoot":"","sources":["../../../src/transitions/presets/zoom.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAU,cAAc,EAAE,MAAM,cAAc,CAAC;AAEtD,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,KAAK,CAAC;AAEzC,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,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