visualfries 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/LICENSE +21 -0
- package/README.md +213 -0
- package/dist/DIContainer.d.ts +4 -0
- package/dist/DIContainer.js +145 -0
- package/dist/SceneBuilder.svelte.d.ts +8574 -0
- package/dist/SceneBuilder.svelte.js +409 -0
- package/dist/adapters/subtitleHelpers.d.ts +2 -0
- package/dist/adapters/subtitleHelpers.js +187 -0
- package/dist/animations/AnimationContext.d.ts +17 -0
- package/dist/animations/AnimationContext.js +72 -0
- package/dist/animations/AnimationPresetsRegister.d.ts +362 -0
- package/dist/animations/AnimationPresetsRegister.js +20 -0
- package/dist/animations/AnimationSetup.d.ts +8 -0
- package/dist/animations/AnimationSetup.js +30 -0
- package/dist/animations/SplitTextCache.d.ts +28 -0
- package/dist/animations/SplitTextCache.js +68 -0
- package/dist/animations/animationBuilder.d.ts +31 -0
- package/dist/animations/animationBuilder.js +255 -0
- package/dist/animations/animationPreset.d.ts +7 -0
- package/dist/animations/animationPreset.js +31 -0
- package/dist/animations/builders/AnimationPresetFactory.d.ts +43 -0
- package/dist/animations/builders/AnimationPresetFactory.js +139 -0
- package/dist/animations/builders/LineHighlighterAnimationBuilder.d.ts +16 -0
- package/dist/animations/builders/LineHighlighterAnimationBuilder.js +183 -0
- package/dist/animations/builders/WordHighlighterAnimationBuilder.d.ts +15 -0
- package/dist/animations/builders/WordHighlighterAnimationBuilder.js +180 -0
- package/dist/animations/engines/AnimationEngineAdaptor.d.ts +107 -0
- package/dist/animations/engines/AnimationEngineAdaptor.js +1 -0
- package/dist/animations/engines/GSAPEngineAdaptor.d.ts +21 -0
- package/dist/animations/engines/GSAPEngineAdaptor.js +145 -0
- package/dist/animations/presets/index.d.ts +2 -0
- package/dist/animations/presets/index.js +3 -0
- package/dist/animations/presets/lines.d.ts +52 -0
- package/dist/animations/presets/lines.js +547 -0
- package/dist/animations/presets/words.d.ts +31 -0
- package/dist/animations/presets/words.js +268 -0
- package/dist/animations/transformers/AnimationReferenceTransformer.d.ts +9 -0
- package/dist/animations/transformers/AnimationReferenceTransformer.js +114 -0
- package/dist/builders/PixiComponentBuilder.d.ts +63 -0
- package/dist/builders/PixiComponentBuilder.js +112 -0
- package/dist/builders/_ComponentState.svelte.d.ts +795 -0
- package/dist/builders/_ComponentState.svelte.js +203 -0
- package/dist/builders/html/HtmlBuilder.d.ts +66 -0
- package/dist/builders/html/HtmlBuilder.js +171 -0
- package/dist/builders/html/HtmlBuilderFactory.d.ts +27 -0
- package/dist/builders/html/HtmlBuilderFactory.js +30 -0
- package/dist/builders/html/StyleBuilder.d.ts +13 -0
- package/dist/builders/html/StyleBuilder.js +133 -0
- package/dist/builders/html/StyleProcessor.d.ts +9 -0
- package/dist/builders/html/StyleProcessor.js +1 -0
- package/dist/builders/html/TextComponentHtmlBuilder.d.ts +16 -0
- package/dist/builders/html/TextComponentHtmlBuilder.js +93 -0
- package/dist/builders/html/TextShadowBuilder.d.ts +60 -0
- package/dist/builders/html/TextShadowBuilder.js +227 -0
- package/dist/builders/html/processors/AppearanceStyleProcessor.d.ts +5 -0
- package/dist/builders/html/processors/AppearanceStyleProcessor.js +57 -0
- package/dist/builders/html/processors/TextAppearanceStyleProcessor.d.ts +5 -0
- package/dist/builders/html/processors/TextAppearanceStyleProcessor.js +37 -0
- package/dist/builders/html/processors/TextEffectsStyleProcessor.d.ts +6 -0
- package/dist/builders/html/processors/TextEffectsStyleProcessor.js +68 -0
- package/dist/commands/Command.d.ts +6 -0
- package/dist/commands/Command.js +1 -0
- package/dist/commands/CommandRunner.d.ts +28 -0
- package/dist/commands/CommandRunner.js +81 -0
- package/dist/commands/CommandTypes.d.ts +11 -0
- package/dist/commands/CommandTypes.js +13 -0
- package/dist/commands/PauseCommand.d.ts +4 -0
- package/dist/commands/PauseCommand.js +5 -0
- package/dist/commands/PlayCommand.d.ts +4 -0
- package/dist/commands/PlayCommand.js +6 -0
- package/dist/commands/RenderCommand.d.ts +15 -0
- package/dist/commands/RenderCommand.js +18 -0
- package/dist/commands/RenderFrameCommand.d.ts +17 -0
- package/dist/commands/RenderFrameCommand.js +93 -0
- package/dist/commands/ReplaceSourceOnTimeCommand.d.ts +4 -0
- package/dist/commands/ReplaceSourceOnTimeCommand.js +22 -0
- package/dist/commands/SeekCommand.d.ts +15 -0
- package/dist/commands/SeekCommand.js +39 -0
- package/dist/commands/UpdateComponentCommand.d.ts +4 -0
- package/dist/commands/UpdateComponentCommand.js +17 -0
- package/dist/components/AnimatedGIF.d.ts +201 -0
- package/dist/components/AnimatedGIF.js +391 -0
- package/dist/components/Component.svelte.d.ts +33 -0
- package/dist/components/Component.svelte.js +152 -0
- package/dist/components/ComponentContext.svelte.d.ts +33 -0
- package/dist/components/ComponentContext.svelte.js +105 -0
- package/dist/components/hooks/AnimationHook.d.ts +25 -0
- package/dist/components/hooks/AnimationHook.js +180 -0
- package/dist/components/hooks/CanvasShapeHook.d.ts +12 -0
- package/dist/components/hooks/CanvasShapeHook.js +229 -0
- package/dist/components/hooks/HtmlAnimationHook.d.ts +8 -0
- package/dist/components/hooks/HtmlAnimationHook.js +70 -0
- package/dist/components/hooks/HtmlTextHook.d.ts +16 -0
- package/dist/components/hooks/HtmlTextHook.js +102 -0
- package/dist/components/hooks/HtmlToCanvasHook.d.ts +16 -0
- package/dist/components/hooks/HtmlToCanvasHook.js +148 -0
- package/dist/components/hooks/ImageHook.d.ts +10 -0
- package/dist/components/hooks/ImageHook.js +45 -0
- package/dist/components/hooks/MediaHook.d.ts +15 -0
- package/dist/components/hooks/MediaHook.js +252 -0
- package/dist/components/hooks/MediaSeekingHook.d.ts +12 -0
- package/dist/components/hooks/MediaSeekingHook.js +204 -0
- package/dist/components/hooks/PixiDisplayObjectHook.d.ts +15 -0
- package/dist/components/hooks/PixiDisplayObjectHook.js +77 -0
- package/dist/components/hooks/PixiGifHook.d.ts +15 -0
- package/dist/components/hooks/PixiGifHook.js +97 -0
- package/dist/components/hooks/PixiProgressShapeHook.d.ts +12 -0
- package/dist/components/hooks/PixiProgressShapeHook.js +128 -0
- package/dist/components/hooks/PixiSplitScreenDisplayObjectHook.d.ts +21 -0
- package/dist/components/hooks/PixiSplitScreenDisplayObjectHook.js +210 -0
- package/dist/components/hooks/PixiTextureHook.d.ts +7 -0
- package/dist/components/hooks/PixiTextureHook.js +29 -0
- package/dist/components/hooks/PixiVideoTextureHook.d.ts +10 -0
- package/dist/components/hooks/PixiVideoTextureHook.js +35 -0
- package/dist/components/hooks/SubtitlesHook.d.ts +88 -0
- package/dist/components/hooks/SubtitlesHook.js +199 -0
- package/dist/components/hooks/VerifyGifHook.d.ts +7 -0
- package/dist/components/hooks/VerifyGifHook.js +27 -0
- package/dist/components/hooks/VerifyImageHook.d.ts +7 -0
- package/dist/components/hooks/VerifyImageHook.js +27 -0
- package/dist/components/hooks/VerifyMediaHook.d.ts +7 -0
- package/dist/components/hooks/VerifyMediaHook.js +21 -0
- package/dist/components/hooks/shapes/progress/CustomProgressRenderer.d.ts +8 -0
- package/dist/components/hooks/shapes/progress/CustomProgressRenderer.js +53 -0
- package/dist/components/hooks/shapes/progress/DoubleProgressRenderer.d.ts +8 -0
- package/dist/components/hooks/shapes/progress/DoubleProgressRenderer.js +69 -0
- package/dist/components/hooks/shapes/progress/LinearProgressRenderer.d.ts +8 -0
- package/dist/components/hooks/shapes/progress/LinearProgressRenderer.js +60 -0
- package/dist/components/hooks/shapes/progress/PerimeterProgressRenderer.d.ts +9 -0
- package/dist/components/hooks/shapes/progress/PerimeterProgressRenderer.js +213 -0
- package/dist/components/hooks/shapes/progress/ProgressRenderer.d.ts +17 -0
- package/dist/components/hooks/shapes/progress/ProgressRenderer.js +75 -0
- package/dist/components/hooks/shapes/progress/RadialProgressRenderer.d.ts +8 -0
- package/dist/components/hooks/shapes/progress/RadialProgressRenderer.js +50 -0
- package/dist/components/hooks/shapes/progress/index.d.ts +6 -0
- package/dist/components/hooks/shapes/progress/index.js +6 -0
- package/dist/composers/componentComposer.d.ts +55 -0
- package/dist/composers/componentComposer.js +118 -0
- package/dist/composers/layerComposer.d.ts +46 -0
- package/dist/composers/layerComposer.js +79 -0
- package/dist/composers/sceneComposer.d.ts +48 -0
- package/dist/composers/sceneComposer.js +92 -0
- package/dist/constants.d.ts +12 -0
- package/dist/constants.js +14 -0
- package/dist/directors/ComponentDirector.d.ts +20 -0
- package/dist/directors/ComponentDirector.js +86 -0
- package/dist/factories/SceneBuilderFactory.d.ts +15 -0
- package/dist/factories/SceneBuilderFactory.js +51 -0
- package/dist/fonts/GoogleFontsProvider.d.ts +12 -0
- package/dist/fonts/GoogleFontsProvider.js +125 -0
- package/dist/fonts/fontLoader.d.ts +15 -0
- package/dist/fonts/fontLoader.js +41 -0
- package/dist/fonts/types.d.ts +1 -0
- package/dist/fonts/types.js +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +14 -0
- package/dist/layers/Layer.svelte.d.ts +8492 -0
- package/dist/layers/Layer.svelte.js +125 -0
- package/dist/managers/AppManager.svelte.d.ts +23 -0
- package/dist/managers/AppManager.svelte.js +89 -0
- package/dist/managers/ComponentsManager.svelte.d.ts +49 -0
- package/dist/managers/ComponentsManager.svelte.js +247 -0
- package/dist/managers/DomManager.d.ts +18 -0
- package/dist/managers/DomManager.js +73 -0
- package/dist/managers/EventManager.d.ts +7 -0
- package/dist/managers/EventManager.js +22 -0
- package/dist/managers/LayersManager.svelte.d.ts +8499 -0
- package/dist/managers/LayersManager.svelte.js +176 -0
- package/dist/managers/MediaManager.d.ts +32 -0
- package/dist/managers/MediaManager.js +243 -0
- package/dist/managers/RenderManager.d.ts +23 -0
- package/dist/managers/RenderManager.js +59 -0
- package/dist/managers/StateManager.svelte.d.ts +8746 -0
- package/dist/managers/StateManager.svelte.js +272 -0
- package/dist/managers/SubtitlesManager.svelte.d.ts +261 -0
- package/dist/managers/SubtitlesManager.svelte.js +1385 -0
- package/dist/managers/TimeManager.svelte.d.ts +6 -0
- package/dist/managers/TimeManager.svelte.js +18 -0
- package/dist/managers/TimelineManager.svelte.d.ts +25 -0
- package/dist/managers/TimelineManager.svelte.js +152 -0
- package/dist/registers.d.ts +12 -0
- package/dist/registers.js +29 -0
- package/dist/schemas/runtime/index.d.ts +3 -0
- package/dist/schemas/runtime/index.js +4 -0
- package/dist/schemas/runtime/types.d.ts +323 -0
- package/dist/schemas/runtime/types.js +12 -0
- package/dist/schemas/scene/animations.d.ts +89738 -0
- package/dist/schemas/scene/animations.js +211 -0
- package/dist/schemas/scene/components.js +515 -0
- package/dist/schemas/scene/core.js +160 -0
- package/dist/schemas/scene/index.d.ts +22 -0
- package/dist/schemas/scene/index.js +10 -0
- package/dist/schemas/scene/properties.d.ts +914 -0
- package/dist/schemas/scene/properties.js +398 -0
- package/dist/schemas/scene/subtitles.d.ts +1141 -0
- package/dist/schemas/scene/subtitles.js +111 -0
- package/dist/schemas/scene/utils.d.ts +1 -0
- package/dist/schemas/scene/utils.js +5 -0
- package/dist/seeds/SeedFactory.d.ts +59 -0
- package/dist/seeds/SeedFactory.js +99 -0
- package/dist/seeds/index.d.ts +8 -0
- package/dist/seeds/index.js +8 -0
- package/dist/transformers/ColorTransformer.d.ts +5 -0
- package/dist/transformers/ColorTransformer.js +67 -0
- package/dist/transformers/PixiColorTransformer.d.ts +22 -0
- package/dist/transformers/PixiColorTransformer.js +104 -0
- package/dist/utils/canvas.d.ts +6 -0
- package/dist/utils/canvas.js +18 -0
- package/dist/utils/document.d.ts +2 -0
- package/dist/utils/document.js +36 -0
- package/dist/utils/emoji.d.ts +10 -0
- package/dist/utils/emoji.js +51 -0
- package/dist/utils/html.d.ts +4 -0
- package/dist/utils/html.js +45 -0
- package/dist/utils/svgGenerator.d.ts +20 -0
- package/dist/utils/svgGenerator.js +103 -0
- package/dist/utils/utils.d.ts +5 -0
- package/dist/utils/utils.js +125 -0
- package/package.json +96 -0
|
@@ -0,0 +1,547 @@
|
|
|
1
|
+
export const linesHighlighter = {
|
|
2
|
+
id: 'lined-highlight',
|
|
3
|
+
presetId: 'lines-highlight',
|
|
4
|
+
description: 'Highlights individual lines with a custom color',
|
|
5
|
+
data: {},
|
|
6
|
+
setup: [{ type: 'splitText', by: 'lines' }],
|
|
7
|
+
timeline: [
|
|
8
|
+
{
|
|
9
|
+
target: 'lines',
|
|
10
|
+
tweens: [
|
|
11
|
+
{
|
|
12
|
+
method: 'to',
|
|
13
|
+
vars: {
|
|
14
|
+
color: 'yellow', // Default color that can be overridden
|
|
15
|
+
stagger: {
|
|
16
|
+
type: 'fromData',
|
|
17
|
+
dataKey: 'lineStartTimes'
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Lines reveal and fade preset
|
|
27
|
+
* Reveals lines one by one with a scale effect
|
|
28
|
+
*/
|
|
29
|
+
export const linesRevealAndFade = {
|
|
30
|
+
id: 'lines-reveal-and-fade',
|
|
31
|
+
description: 'Reveals and fades lines one by one with a nice scale effect',
|
|
32
|
+
data: {},
|
|
33
|
+
setup: [{ type: 'splitText', by: 'lines' }],
|
|
34
|
+
timeline: [
|
|
35
|
+
{
|
|
36
|
+
target: 'lines',
|
|
37
|
+
tweens: [
|
|
38
|
+
{
|
|
39
|
+
method: 'fromTo',
|
|
40
|
+
vars: {
|
|
41
|
+
from: {
|
|
42
|
+
position: 'absolute',
|
|
43
|
+
width: '100%',
|
|
44
|
+
opacity: 0,
|
|
45
|
+
scale: 0.3,
|
|
46
|
+
y: '50%',
|
|
47
|
+
yPercent: -50
|
|
48
|
+
},
|
|
49
|
+
opacity: 1,
|
|
50
|
+
scale: 1,
|
|
51
|
+
y: '50%',
|
|
52
|
+
yPercent: -50,
|
|
53
|
+
ease: 'back.out(5)',
|
|
54
|
+
stagger: 1
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
target: 'lines',
|
|
61
|
+
position: '>1', // 1 second after the first animation completes
|
|
62
|
+
tweens: [
|
|
63
|
+
{
|
|
64
|
+
method: 'to',
|
|
65
|
+
vars: {
|
|
66
|
+
opacity: 0,
|
|
67
|
+
scale: 3,
|
|
68
|
+
ease: 'power4.out',
|
|
69
|
+
stagger: 1
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Lines elastic preset
|
|
78
|
+
* Reveals lines with an elastic bounce effect
|
|
79
|
+
*/
|
|
80
|
+
export const linesElastic = {
|
|
81
|
+
id: 'lines-elastic',
|
|
82
|
+
description: 'Reveals lines with an elastic bounce effect',
|
|
83
|
+
data: {},
|
|
84
|
+
setup: [{ type: 'splitText', by: 'lines' }],
|
|
85
|
+
timeline: [
|
|
86
|
+
{
|
|
87
|
+
target: 'lines',
|
|
88
|
+
tweens: [
|
|
89
|
+
{
|
|
90
|
+
method: 'fromTo',
|
|
91
|
+
vars: {
|
|
92
|
+
from: {
|
|
93
|
+
position: 'absolute',
|
|
94
|
+
width: '100%',
|
|
95
|
+
opacity: 0,
|
|
96
|
+
scale: 2.2,
|
|
97
|
+
y: '50%',
|
|
98
|
+
yPercent: -50
|
|
99
|
+
},
|
|
100
|
+
opacity: 1,
|
|
101
|
+
scale: 1,
|
|
102
|
+
y: '50%',
|
|
103
|
+
yPercent: -50,
|
|
104
|
+
ease: 'elastic.out',
|
|
105
|
+
stagger: 1,
|
|
106
|
+
duration: 1.5
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
target: 'lines',
|
|
113
|
+
position: '>1',
|
|
114
|
+
tweens: [
|
|
115
|
+
{
|
|
116
|
+
method: 'to',
|
|
117
|
+
vars: {
|
|
118
|
+
opacity: 0,
|
|
119
|
+
scale: 0,
|
|
120
|
+
ease: 'power3.out',
|
|
121
|
+
stagger: 1,
|
|
122
|
+
duration: 0.5
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* Lines swipe left preset
|
|
131
|
+
* Lines slide in from right and out to left
|
|
132
|
+
*/
|
|
133
|
+
export const linesSwipeLeft = {
|
|
134
|
+
id: 'lines-swipe-left',
|
|
135
|
+
description: 'Lines slide in from right and out to left',
|
|
136
|
+
data: {},
|
|
137
|
+
setup: [{ type: 'splitText', by: 'lines' }],
|
|
138
|
+
timeline: [
|
|
139
|
+
{
|
|
140
|
+
target: 'lines',
|
|
141
|
+
tweens: [
|
|
142
|
+
{
|
|
143
|
+
method: 'fromTo',
|
|
144
|
+
vars: {
|
|
145
|
+
from: {
|
|
146
|
+
position: 'absolute',
|
|
147
|
+
width: '100%',
|
|
148
|
+
opacity: 0,
|
|
149
|
+
y: '50%',
|
|
150
|
+
yPercent: -50,
|
|
151
|
+
x: 100
|
|
152
|
+
},
|
|
153
|
+
opacity: 1,
|
|
154
|
+
y: '50%',
|
|
155
|
+
yPercent: -50,
|
|
156
|
+
x: 0,
|
|
157
|
+
ease: 'elastic.out',
|
|
158
|
+
stagger: 1
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
target: 'lines',
|
|
165
|
+
position: '>1',
|
|
166
|
+
tweens: [
|
|
167
|
+
{
|
|
168
|
+
method: 'to',
|
|
169
|
+
vars: {
|
|
170
|
+
opacity: 0,
|
|
171
|
+
x: -100,
|
|
172
|
+
ease: 'power3.out',
|
|
173
|
+
stagger: 1
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
};
|
|
180
|
+
/**
|
|
181
|
+
* Lines exchange preset
|
|
182
|
+
* Lines scale in and out with a smooth transition
|
|
183
|
+
*/
|
|
184
|
+
export const linesExchange = {
|
|
185
|
+
id: 'lines-exchange',
|
|
186
|
+
description: 'Lines scale in and out with a smooth transition',
|
|
187
|
+
data: {},
|
|
188
|
+
setup: [{ type: 'splitText', by: 'lines' }],
|
|
189
|
+
timeline: [
|
|
190
|
+
{
|
|
191
|
+
target: 'lines',
|
|
192
|
+
tweens: [
|
|
193
|
+
{
|
|
194
|
+
method: 'fromTo',
|
|
195
|
+
vars: {
|
|
196
|
+
from: {
|
|
197
|
+
position: 'absolute',
|
|
198
|
+
width: '100%',
|
|
199
|
+
opacity: 0,
|
|
200
|
+
y: '50%',
|
|
201
|
+
yPercent: -50,
|
|
202
|
+
scale: 0.5
|
|
203
|
+
},
|
|
204
|
+
opacity: 1,
|
|
205
|
+
y: '50%',
|
|
206
|
+
yPercent: -50,
|
|
207
|
+
scale: 1,
|
|
208
|
+
ease: 'back.out',
|
|
209
|
+
stagger: 1
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
target: 'lines',
|
|
216
|
+
position: '>1',
|
|
217
|
+
tweens: [
|
|
218
|
+
{
|
|
219
|
+
method: 'to',
|
|
220
|
+
vars: {
|
|
221
|
+
opacity: 0,
|
|
222
|
+
scale: 1.5,
|
|
223
|
+
ease: 'power2.out',
|
|
224
|
+
stagger: 1
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
}
|
|
229
|
+
]
|
|
230
|
+
};
|
|
231
|
+
/**
|
|
232
|
+
* Lines rolling preset
|
|
233
|
+
* Lines roll in with 3D rotation effect
|
|
234
|
+
*/
|
|
235
|
+
export const linesRolling = {
|
|
236
|
+
id: 'lines-rolling',
|
|
237
|
+
description: 'Lines roll in with 3D rotation effect',
|
|
238
|
+
data: {},
|
|
239
|
+
setup: [{ type: 'splitText', by: 'lines' }],
|
|
240
|
+
timeline: [
|
|
241
|
+
{
|
|
242
|
+
target: 'lines',
|
|
243
|
+
tweens: [
|
|
244
|
+
{
|
|
245
|
+
method: 'fromTo',
|
|
246
|
+
vars: {
|
|
247
|
+
from: {
|
|
248
|
+
position: 'absolute',
|
|
249
|
+
width: '100%',
|
|
250
|
+
y: '50%',
|
|
251
|
+
yPercent: 100,
|
|
252
|
+
rotateX: 360,
|
|
253
|
+
scale: 0
|
|
254
|
+
},
|
|
255
|
+
opacity: 1,
|
|
256
|
+
y: '50%',
|
|
257
|
+
yPercent: -50,
|
|
258
|
+
scale: 1,
|
|
259
|
+
rotateX: 0,
|
|
260
|
+
ease: 'power2.out',
|
|
261
|
+
stagger: 1
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
]
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
target: 'lines',
|
|
268
|
+
position: '>1',
|
|
269
|
+
tweens: [
|
|
270
|
+
{
|
|
271
|
+
method: 'to',
|
|
272
|
+
vars: {
|
|
273
|
+
y: '50%',
|
|
274
|
+
yPercent: -100,
|
|
275
|
+
rotateX: 180,
|
|
276
|
+
scale: 0,
|
|
277
|
+
ease: 'sine.out',
|
|
278
|
+
stagger: 1
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
]
|
|
282
|
+
}
|
|
283
|
+
]
|
|
284
|
+
};
|
|
285
|
+
/**
|
|
286
|
+
* Lines spiral preset
|
|
287
|
+
* Lines spiral in with 3D rotation effect
|
|
288
|
+
*/
|
|
289
|
+
export const linesDna = {
|
|
290
|
+
id: 'lines-spiral',
|
|
291
|
+
description: 'Lines spiral in with 3D rotation effect',
|
|
292
|
+
data: {},
|
|
293
|
+
setup: [{ type: 'splitText', by: 'lines' }],
|
|
294
|
+
timeline: [
|
|
295
|
+
{
|
|
296
|
+
target: 'lines',
|
|
297
|
+
tweens: [
|
|
298
|
+
{
|
|
299
|
+
method: 'fromTo',
|
|
300
|
+
vars: {
|
|
301
|
+
from: {
|
|
302
|
+
position: 'absolute',
|
|
303
|
+
width: '100%',
|
|
304
|
+
y: '50%',
|
|
305
|
+
yPercent: -300,
|
|
306
|
+
rotateY: 360,
|
|
307
|
+
scale: 1.5,
|
|
308
|
+
opacity: 0
|
|
309
|
+
},
|
|
310
|
+
opacity: 1,
|
|
311
|
+
y: '50%',
|
|
312
|
+
yPercent: -50,
|
|
313
|
+
rotateY: 0,
|
|
314
|
+
scale: 1,
|
|
315
|
+
ease: 'power2.out',
|
|
316
|
+
stagger: 1
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
]
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
target: 'lines',
|
|
323
|
+
position: '>1',
|
|
324
|
+
tweens: [
|
|
325
|
+
{
|
|
326
|
+
method: 'to',
|
|
327
|
+
vars: {
|
|
328
|
+
y: '50%',
|
|
329
|
+
yPercent: 300,
|
|
330
|
+
rotateY: 360,
|
|
331
|
+
scale: 1.5,
|
|
332
|
+
opacity: 0,
|
|
333
|
+
ease: 'sine.out',
|
|
334
|
+
stagger: 1
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
]
|
|
338
|
+
}
|
|
339
|
+
]
|
|
340
|
+
};
|
|
341
|
+
/**
|
|
342
|
+
* Lines bounce preset
|
|
343
|
+
* Lines bounce in from the top
|
|
344
|
+
*/
|
|
345
|
+
export const linesBounce = {
|
|
346
|
+
id: 'lines-bounce',
|
|
347
|
+
description: 'Lines bounce in from the top',
|
|
348
|
+
data: {},
|
|
349
|
+
setup: [{ type: 'splitText', by: 'lines' }],
|
|
350
|
+
timeline: [
|
|
351
|
+
{
|
|
352
|
+
target: 'lines',
|
|
353
|
+
tweens: [
|
|
354
|
+
{
|
|
355
|
+
method: 'fromTo',
|
|
356
|
+
vars: {
|
|
357
|
+
from: {
|
|
358
|
+
position: 'absolute',
|
|
359
|
+
width: '100%',
|
|
360
|
+
opacity: 0,
|
|
361
|
+
y: '-100%'
|
|
362
|
+
},
|
|
363
|
+
opacity: 1,
|
|
364
|
+
y: '0%',
|
|
365
|
+
ease: 'bounce.out',
|
|
366
|
+
stagger: 1
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
]
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
target: 'lines',
|
|
373
|
+
position: '>1',
|
|
374
|
+
tweens: [
|
|
375
|
+
{
|
|
376
|
+
method: 'to',
|
|
377
|
+
vars: {
|
|
378
|
+
opacity: 0,
|
|
379
|
+
y: '50%',
|
|
380
|
+
ease: 'back.in',
|
|
381
|
+
stagger: 1
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
]
|
|
385
|
+
}
|
|
386
|
+
]
|
|
387
|
+
};
|
|
388
|
+
/**
|
|
389
|
+
* Lines glitch preset
|
|
390
|
+
* Lines appear with glitchy rough animation
|
|
391
|
+
*/
|
|
392
|
+
export const linesJiggle = {
|
|
393
|
+
id: 'lines-glitch',
|
|
394
|
+
description: 'Lines appear with glitchy rough animation',
|
|
395
|
+
data: {},
|
|
396
|
+
setup: [{ type: 'splitText', by: 'lines' }],
|
|
397
|
+
timeline: [
|
|
398
|
+
{
|
|
399
|
+
target: 'lines',
|
|
400
|
+
tweens: [
|
|
401
|
+
{
|
|
402
|
+
method: 'fromTo',
|
|
403
|
+
vars: {
|
|
404
|
+
from: {
|
|
405
|
+
position: 'absolute',
|
|
406
|
+
width: '100%',
|
|
407
|
+
opacity: 0,
|
|
408
|
+
y: '-50%',
|
|
409
|
+
rotation: -40,
|
|
410
|
+
scale: 0.5
|
|
411
|
+
},
|
|
412
|
+
opacity: 1,
|
|
413
|
+
y: '0%',
|
|
414
|
+
rotation: 0,
|
|
415
|
+
scale: 1,
|
|
416
|
+
ease: 'rough({ strength: 2, points: 50, template: none.out, taper: none, randomize: true, clamp: false })',
|
|
417
|
+
stagger: 1
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
]
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
target: 'lines',
|
|
424
|
+
position: '>1',
|
|
425
|
+
tweens: [
|
|
426
|
+
{
|
|
427
|
+
method: 'to',
|
|
428
|
+
vars: {
|
|
429
|
+
opacity: 0,
|
|
430
|
+
rotation: -40,
|
|
431
|
+
scale: 1.5,
|
|
432
|
+
y: '50%',
|
|
433
|
+
ease: 'rough({ strength: 2, points: 50, template: none.out, taper: none, randomize: true, clamp: false })',
|
|
434
|
+
stagger: 1
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
]
|
|
438
|
+
}
|
|
439
|
+
]
|
|
440
|
+
};
|
|
441
|
+
/**
|
|
442
|
+
* Lines rotate preset
|
|
443
|
+
* Lines rotate in with scale effect
|
|
444
|
+
*/
|
|
445
|
+
export const rotatingWarpText = {
|
|
446
|
+
id: 'lines-rotate',
|
|
447
|
+
description: 'Lines rotate in with scale effect',
|
|
448
|
+
data: {},
|
|
449
|
+
setup: [{ type: 'splitText', by: 'lines' }],
|
|
450
|
+
timeline: [
|
|
451
|
+
{
|
|
452
|
+
target: 'lines',
|
|
453
|
+
tweens: [
|
|
454
|
+
{
|
|
455
|
+
method: 'fromTo',
|
|
456
|
+
vars: {
|
|
457
|
+
from: {
|
|
458
|
+
position: 'absolute',
|
|
459
|
+
width: '100%',
|
|
460
|
+
opacity: 0,
|
|
461
|
+
scale: 0,
|
|
462
|
+
rotation: -720
|
|
463
|
+
},
|
|
464
|
+
opacity: 1,
|
|
465
|
+
scale: 1,
|
|
466
|
+
rotation: 0,
|
|
467
|
+
ease: 'power3.out',
|
|
468
|
+
stagger: 2
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
]
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
target: 'lines',
|
|
475
|
+
position: '>1.5',
|
|
476
|
+
tweens: [
|
|
477
|
+
{
|
|
478
|
+
method: 'to',
|
|
479
|
+
vars: {
|
|
480
|
+
opacity: 0,
|
|
481
|
+
scale: 3,
|
|
482
|
+
rotation: 360,
|
|
483
|
+
ease: 'power3.in',
|
|
484
|
+
stagger: 2
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
]
|
|
488
|
+
}
|
|
489
|
+
]
|
|
490
|
+
};
|
|
491
|
+
/**
|
|
492
|
+
* Lines lift up preset
|
|
493
|
+
* Lines lift up with alternating rotation
|
|
494
|
+
*/
|
|
495
|
+
export const coolLinesAnimation = {
|
|
496
|
+
id: 'lines-lift-up',
|
|
497
|
+
description: 'Lines lift up with alternating rotation',
|
|
498
|
+
data: {},
|
|
499
|
+
setup: [{ type: 'splitText', by: 'lines' }],
|
|
500
|
+
timeline: [
|
|
501
|
+
{
|
|
502
|
+
target: 'lines',
|
|
503
|
+
tweens: [
|
|
504
|
+
{
|
|
505
|
+
method: 'fromTo',
|
|
506
|
+
vars: {
|
|
507
|
+
from: {
|
|
508
|
+
position: 'absolute',
|
|
509
|
+
width: '100%',
|
|
510
|
+
opacity: 0,
|
|
511
|
+
scale: 0.5,
|
|
512
|
+
rotation: -180,
|
|
513
|
+
y: '100%'
|
|
514
|
+
},
|
|
515
|
+
opacity: 1,
|
|
516
|
+
scale: 1,
|
|
517
|
+
rotation: 0,
|
|
518
|
+
y: '50%',
|
|
519
|
+
yPercent: -50,
|
|
520
|
+
ease: 'power2.out',
|
|
521
|
+
stagger: 1
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
]
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
target: 'lines',
|
|
528
|
+
position: '>0.5',
|
|
529
|
+
tweens: [
|
|
530
|
+
{
|
|
531
|
+
method: 'to',
|
|
532
|
+
vars: {
|
|
533
|
+
opacity: 0,
|
|
534
|
+
scale: 0.5,
|
|
535
|
+
// Note: The alternate rotation per line is approximated here
|
|
536
|
+
// V2 would need another way to handle dynamic per-element functions
|
|
537
|
+
rotation: 270,
|
|
538
|
+
y: '-30%',
|
|
539
|
+
ease: 'power2.in',
|
|
540
|
+
stagger: 1,
|
|
541
|
+
delay: 0.3
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
]
|
|
545
|
+
}
|
|
546
|
+
]
|
|
547
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { AnimationPreset } from '../..';
|
|
2
|
+
/**
|
|
3
|
+
* Words highlighter animation preset
|
|
4
|
+
* Highlights words within text
|
|
5
|
+
*/
|
|
6
|
+
export declare const wordsHighlighter: AnimationPreset;
|
|
7
|
+
/**
|
|
8
|
+
* Words animation preset 1
|
|
9
|
+
* Brings words in with a scale animation
|
|
10
|
+
*/
|
|
11
|
+
export declare const words1: AnimationPreset;
|
|
12
|
+
/**
|
|
13
|
+
* Words animation preset with no overflow
|
|
14
|
+
* Text animates from below with a sliding effect
|
|
15
|
+
*/
|
|
16
|
+
export declare const words2: AnimationPreset;
|
|
17
|
+
/**
|
|
18
|
+
* Subtitles rising back animation
|
|
19
|
+
* Words fade in with a nice back ease
|
|
20
|
+
*/
|
|
21
|
+
export declare const subtitlesRisingBack: AnimationPreset;
|
|
22
|
+
/**
|
|
23
|
+
* Words highlight animation preset
|
|
24
|
+
* Gradually highlights words one by one
|
|
25
|
+
*/
|
|
26
|
+
export declare const words3: AnimationPreset;
|
|
27
|
+
/**
|
|
28
|
+
* Words active color animation preset
|
|
29
|
+
* Reveals words one by one with individual highlighting
|
|
30
|
+
*/
|
|
31
|
+
export declare const words4: AnimationPreset;
|