@clypra-studio/engine 1.0.5 → 1.0.6
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/TransitionDefinition-CQoSb4ZB.d.cts +158 -0
- package/dist/TransitionDefinition-CQoSb4ZB.d.ts +158 -0
- package/dist/index-Da47I6aX.d.cts +139 -0
- package/dist/index-Da47I6aX.d.ts +139 -0
- package/dist/index-lNWEWqab.d.cts +633 -0
- package/dist/index-lNWEWqab.d.ts +633 -0
- package/dist/index.d.cts +8884 -0
- package/dist/index.d.ts +8884 -0
- package/dist/textEffects/index.d.cts +1 -0
- package/dist/textEffects/index.d.ts +1 -0
- package/dist/transitions/index.d.cts +219 -0
- package/dist/transitions/index.d.ts +219 -0
- package/dist/v2/backends/index.d.cts +3 -0
- package/dist/v2/backends/index.d.ts +3 -0
- package/dist/v2/contract/index.d.cts +165 -0
- package/dist/v2/contract/index.d.ts +165 -0
- package/dist/videoEffects/index.d.cts +697 -0
- package/dist/videoEffects/index.d.ts +697 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { J as FontDescriptor, L as FontLoadResult, M as FontLoader, S as SceneDocument, T as TextEffectConfig, b as TextEffectDefinition, a1 as _buildConfig, a3 as builtInPresets, a6 as defaultConfig, a8 as ensureFontsLoaded, aa as evaluateScene, ab as getFontLoader, ai as renderTextEffectCore, aj as resetFontLoader, am as resolveFontFamilyName, an as sceneToConfig, aq as textEffectConfigToScene } from '../index-lNWEWqab.cjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { J as FontDescriptor, L as FontLoadResult, M as FontLoader, S as SceneDocument, T as TextEffectConfig, b as TextEffectDefinition, a1 as _buildConfig, a3 as builtInPresets, a6 as defaultConfig, a8 as ensureFontsLoaded, aa as evaluateScene, ab as getFontLoader, ai as renderTextEffectCore, aj as resetFontLoader, am as resolveFontFamilyName, an as sceneToConfig, aq as textEffectConfigToScene } from '../index-lNWEWqab.js';
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { i as TransitionDefinition } from '../TransitionDefinition-CQoSb4ZB.cjs';
|
|
2
|
+
import 'pixi.js';
|
|
3
|
+
|
|
4
|
+
declare const PushTransition: TransitionDefinition;
|
|
5
|
+
|
|
6
|
+
declare const IrisRevealTransition: TransitionDefinition;
|
|
7
|
+
|
|
8
|
+
declare const FoldTurnTransition: TransitionDefinition;
|
|
9
|
+
|
|
10
|
+
declare const ZoomTransition: TransitionDefinition;
|
|
11
|
+
|
|
12
|
+
declare const ChromaticPushTransition: TransitionDefinition;
|
|
13
|
+
|
|
14
|
+
declare const RefractionWarpTransition: TransitionDefinition;
|
|
15
|
+
|
|
16
|
+
declare const GlitchTransition: TransitionDefinition;
|
|
17
|
+
|
|
18
|
+
declare const StrobeCutTransition: TransitionDefinition;
|
|
19
|
+
|
|
20
|
+
declare const FrameHoldStutterTransition: TransitionDefinition;
|
|
21
|
+
|
|
22
|
+
declare const CrossDissolveTransition: TransitionDefinition;
|
|
23
|
+
|
|
24
|
+
declare const DirectionalDissolveTransition: TransitionDefinition;
|
|
25
|
+
|
|
26
|
+
declare const PixelateCollapseTransition: TransitionDefinition;
|
|
27
|
+
|
|
28
|
+
declare const LumaWipeTransition: TransitionDefinition;
|
|
29
|
+
|
|
30
|
+
declare const LightLeakSweepTransition: TransitionDefinition;
|
|
31
|
+
|
|
32
|
+
declare const FilmBurnWipeTransition: TransitionDefinition;
|
|
33
|
+
|
|
34
|
+
declare const DepthPushTransition: TransitionDefinition;
|
|
35
|
+
|
|
36
|
+
declare const RackFocusBlendTransition: TransitionDefinition;
|
|
37
|
+
|
|
38
|
+
declare const ParallaxLayerSplitTransition: TransitionDefinition;
|
|
39
|
+
|
|
40
|
+
declare const ShatterBurstTransition: TransitionDefinition;
|
|
41
|
+
|
|
42
|
+
declare const ElasticSnapCutTransition: TransitionDefinition;
|
|
43
|
+
|
|
44
|
+
declare const GravityDropTransition: TransitionDefinition;
|
|
45
|
+
|
|
46
|
+
declare const ALL_TRANSITIONS: TransitionDefinition[];
|
|
47
|
+
declare const transitionEffects: TransitionDefinition[];
|
|
48
|
+
declare const transitionEffectsById: {
|
|
49
|
+
[k: string]: TransitionDefinition;
|
|
50
|
+
};
|
|
51
|
+
declare function getTransitionEffect(id: string): TransitionDefinition;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Transition Types
|
|
55
|
+
* Type definitions for transition effects between video clips
|
|
56
|
+
*
|
|
57
|
+
* Part of @clypra-studio/engine - shared between clypra-studio and clypra app
|
|
58
|
+
*/
|
|
59
|
+
type TransitionRenderer$1 = "fade" | "dissolve" | "cut" | "canvas" | "zoom_in" | "zoom_out" | "zoom_blur" | "slide_left" | "slide_right" | "slide_up" | "slide_down" | "wipe_left" | "wipe_right" | "wipe_up" | "wipe_down" | "wipe_clockwise" | "wipe_center" | "circle_expand" | "circle_collapse" | "diamond_expand" | "rectangle_expand" | "blur_fade" | "directional_blur" | "glitch" | "rgb_split" | "chromatic" | "film_burn" | "light_leak" | "whip_pan";
|
|
60
|
+
type EasingFunction = "linear" | "ease" | "ease-in" | "ease-out" | "ease-in-out" | "ease-in-quad" | "ease-out-quad" | "ease-in-out-quad" | "ease-in-cubic" | "ease-out-cubic" | "ease-in-out-cubic" | "ease-in-quart" | "ease-out-quart" | "ease-in-out-quart" | "spring" | "bounce";
|
|
61
|
+
interface TransitionParameters {
|
|
62
|
+
easing?: EasingFunction;
|
|
63
|
+
direction?: "left" | "right" | "up" | "down";
|
|
64
|
+
angle?: number;
|
|
65
|
+
scale?: number;
|
|
66
|
+
centerX?: number;
|
|
67
|
+
centerY?: number;
|
|
68
|
+
blurAmount?: number;
|
|
69
|
+
feather?: number;
|
|
70
|
+
color?: string;
|
|
71
|
+
[key: string]: any;
|
|
72
|
+
}
|
|
73
|
+
type TransitionCategory = "fade" | "slide" | "wipe" | "zoom" | "dissolve" | "creative";
|
|
74
|
+
interface TransitionPreset {
|
|
75
|
+
id: string;
|
|
76
|
+
name: string;
|
|
77
|
+
category: TransitionCategory;
|
|
78
|
+
description: string;
|
|
79
|
+
tags: string[];
|
|
80
|
+
defaultDuration: number;
|
|
81
|
+
defaultDurationMs: number;
|
|
82
|
+
durationConstraints?: {
|
|
83
|
+
min: number;
|
|
84
|
+
max: number;
|
|
85
|
+
};
|
|
86
|
+
renderer: TransitionRenderer$1;
|
|
87
|
+
params: TransitionParameters;
|
|
88
|
+
isPremium?: boolean;
|
|
89
|
+
thumbnail?: string;
|
|
90
|
+
}
|
|
91
|
+
interface AppliedTransition {
|
|
92
|
+
id: string;
|
|
93
|
+
transitionId: string;
|
|
94
|
+
renderer: TransitionRenderer$1;
|
|
95
|
+
params: TransitionParameters;
|
|
96
|
+
duration: number;
|
|
97
|
+
easing?: EasingFunction;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Transition Renderer
|
|
102
|
+
*
|
|
103
|
+
* Applies transitions between two video frames.
|
|
104
|
+
* These are NOT video files - they are algorithmic blends.
|
|
105
|
+
*
|
|
106
|
+
* Examples:
|
|
107
|
+
* - fade: Crossfade opacity
|
|
108
|
+
* - zoom_in: Scale up during fade
|
|
109
|
+
* - wipe_left: Reveal next frame from left
|
|
110
|
+
*
|
|
111
|
+
* Part of @clypra-studio/engine - shared between clypra-studio and clypra app
|
|
112
|
+
*/
|
|
113
|
+
|
|
114
|
+
declare class TransitionRenderer {
|
|
115
|
+
/**
|
|
116
|
+
* Render a transition between two frames
|
|
117
|
+
*
|
|
118
|
+
* @param ctx - Canvas 2D context
|
|
119
|
+
* @param fromFrame - Canvas or image of the outgoing frame
|
|
120
|
+
* @param toFrame - Canvas or image of the incoming frame
|
|
121
|
+
* @param renderer - Transition type
|
|
122
|
+
* @param params - Transition parameters
|
|
123
|
+
* @param progress - Transition progress (0-1)
|
|
124
|
+
*/
|
|
125
|
+
static render(ctx: CanvasRenderingContext2D, fromFrame: HTMLCanvasElement | HTMLImageElement, toFrame: HTMLCanvasElement | HTMLImageElement, renderer: TransitionRenderer$1, params: TransitionParameters, progress: number): void;
|
|
126
|
+
/**
|
|
127
|
+
* Get the renderer function for a transition type
|
|
128
|
+
*/
|
|
129
|
+
private static getRenderer;
|
|
130
|
+
private static renderFade;
|
|
131
|
+
private static renderDissolve;
|
|
132
|
+
private static renderCut;
|
|
133
|
+
private static renderZoomIn;
|
|
134
|
+
private static renderZoomOut;
|
|
135
|
+
private static renderZoomBlur;
|
|
136
|
+
private static renderSlideLeft;
|
|
137
|
+
private static renderSlideRight;
|
|
138
|
+
private static renderSlideUp;
|
|
139
|
+
private static renderSlideDown;
|
|
140
|
+
private static renderWipeLeft;
|
|
141
|
+
private static renderWipeRight;
|
|
142
|
+
private static renderWipeUp;
|
|
143
|
+
private static renderWipeDown;
|
|
144
|
+
private static renderWipeClockwise;
|
|
145
|
+
private static renderWipeCenter;
|
|
146
|
+
private static renderCircleExpand;
|
|
147
|
+
private static renderCircleCollapse;
|
|
148
|
+
private static renderDiamondExpand;
|
|
149
|
+
private static renderRectangleExpand;
|
|
150
|
+
private static renderBlurFade;
|
|
151
|
+
private static renderDirectionalBlur;
|
|
152
|
+
private static renderGlitch;
|
|
153
|
+
private static renderRGBSplit;
|
|
154
|
+
private static renderChromatic;
|
|
155
|
+
private static renderFilmBurn;
|
|
156
|
+
private static renderLightLeak;
|
|
157
|
+
private static renderWhipPan;
|
|
158
|
+
private static applyEasing;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Transition Presets
|
|
163
|
+
* Professional transition definitions mapped to TransitionRenderer types
|
|
164
|
+
*
|
|
165
|
+
* Part of @clypra-studio/engine - shared between clypra-studio and clypra app
|
|
166
|
+
*/
|
|
167
|
+
|
|
168
|
+
declare const TRANSITION_CATEGORIES: TransitionCategory[];
|
|
169
|
+
declare const TRANSITION_PRESETS: TransitionPreset[];
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Transition Helpers
|
|
173
|
+
* Utility functions for working with transition presets
|
|
174
|
+
*
|
|
175
|
+
* Part of @clypra-studio/engine - shared between clypra-studio and clypra app
|
|
176
|
+
*/
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Get all available transition categories
|
|
180
|
+
*/
|
|
181
|
+
declare function getTransitionCategories(): TransitionCategory[];
|
|
182
|
+
/**
|
|
183
|
+
* Get transitions filtered by category
|
|
184
|
+
*/
|
|
185
|
+
declare function getTransitionsByCategory(category: TransitionCategory): TransitionPreset[];
|
|
186
|
+
/**
|
|
187
|
+
* Search transitions by query (name, description, or tags)
|
|
188
|
+
*/
|
|
189
|
+
declare function searchTransitions(query: string): TransitionPreset[];
|
|
190
|
+
/**
|
|
191
|
+
* Get a specific transition preset by ID
|
|
192
|
+
*/
|
|
193
|
+
declare function getTransitionById(id: string): TransitionPreset | undefined;
|
|
194
|
+
/**
|
|
195
|
+
* Get a transition preset by renderer type
|
|
196
|
+
*/
|
|
197
|
+
declare function getTransitionByRenderer(renderer: TransitionRenderer$1): TransitionPreset | undefined;
|
|
198
|
+
/**
|
|
199
|
+
* Get all transition presets
|
|
200
|
+
*/
|
|
201
|
+
declare function getAllTransitions(): TransitionPreset[];
|
|
202
|
+
/**
|
|
203
|
+
* Get transition count by category
|
|
204
|
+
*/
|
|
205
|
+
declare function getTransitionCountByCategory(): Record<TransitionCategory, number>;
|
|
206
|
+
/**
|
|
207
|
+
* Get all unique tags from all transitions
|
|
208
|
+
*/
|
|
209
|
+
declare function getAllTransitionTags(): string[];
|
|
210
|
+
/**
|
|
211
|
+
* Filter transitions by multiple tags (AND logic)
|
|
212
|
+
*/
|
|
213
|
+
declare function getTransitionsByTags(tags: string[]): TransitionPreset[];
|
|
214
|
+
/**
|
|
215
|
+
* Get recommended transition duration for a preset
|
|
216
|
+
*/
|
|
217
|
+
declare function getRecommendedDuration(presetId: string): number;
|
|
218
|
+
|
|
219
|
+
export { ALL_TRANSITIONS, type AppliedTransition, ChromaticPushTransition, CrossDissolveTransition, DepthPushTransition, DirectionalDissolveTransition, type EasingFunction, ElasticSnapCutTransition, FilmBurnWipeTransition, FoldTurnTransition, FrameHoldStutterTransition, GlitchTransition, GravityDropTransition, IrisRevealTransition, LightLeakSweepTransition, LumaWipeTransition, ParallaxLayerSplitTransition, PixelateCollapseTransition, PushTransition, RackFocusBlendTransition, RefractionWarpTransition, ShatterBurstTransition, StrobeCutTransition, TRANSITION_CATEGORIES, TRANSITION_PRESETS, type TransitionCategory, type TransitionParameters, type TransitionPreset, TransitionRenderer, type TransitionRenderer$1 as TransitionRendererType, ZoomTransition, getAllTransitionTags, getAllTransitions, getRecommendedDuration, getTransitionById, getTransitionByRenderer, getTransitionCategories, getTransitionCountByCategory, getTransitionEffect, getTransitionsByCategory, getTransitionsByTags, searchTransitions, transitionEffects, transitionEffectsById };
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { i as TransitionDefinition } from '../TransitionDefinition-CQoSb4ZB.js';
|
|
2
|
+
import 'pixi.js';
|
|
3
|
+
|
|
4
|
+
declare const PushTransition: TransitionDefinition;
|
|
5
|
+
|
|
6
|
+
declare const IrisRevealTransition: TransitionDefinition;
|
|
7
|
+
|
|
8
|
+
declare const FoldTurnTransition: TransitionDefinition;
|
|
9
|
+
|
|
10
|
+
declare const ZoomTransition: TransitionDefinition;
|
|
11
|
+
|
|
12
|
+
declare const ChromaticPushTransition: TransitionDefinition;
|
|
13
|
+
|
|
14
|
+
declare const RefractionWarpTransition: TransitionDefinition;
|
|
15
|
+
|
|
16
|
+
declare const GlitchTransition: TransitionDefinition;
|
|
17
|
+
|
|
18
|
+
declare const StrobeCutTransition: TransitionDefinition;
|
|
19
|
+
|
|
20
|
+
declare const FrameHoldStutterTransition: TransitionDefinition;
|
|
21
|
+
|
|
22
|
+
declare const CrossDissolveTransition: TransitionDefinition;
|
|
23
|
+
|
|
24
|
+
declare const DirectionalDissolveTransition: TransitionDefinition;
|
|
25
|
+
|
|
26
|
+
declare const PixelateCollapseTransition: TransitionDefinition;
|
|
27
|
+
|
|
28
|
+
declare const LumaWipeTransition: TransitionDefinition;
|
|
29
|
+
|
|
30
|
+
declare const LightLeakSweepTransition: TransitionDefinition;
|
|
31
|
+
|
|
32
|
+
declare const FilmBurnWipeTransition: TransitionDefinition;
|
|
33
|
+
|
|
34
|
+
declare const DepthPushTransition: TransitionDefinition;
|
|
35
|
+
|
|
36
|
+
declare const RackFocusBlendTransition: TransitionDefinition;
|
|
37
|
+
|
|
38
|
+
declare const ParallaxLayerSplitTransition: TransitionDefinition;
|
|
39
|
+
|
|
40
|
+
declare const ShatterBurstTransition: TransitionDefinition;
|
|
41
|
+
|
|
42
|
+
declare const ElasticSnapCutTransition: TransitionDefinition;
|
|
43
|
+
|
|
44
|
+
declare const GravityDropTransition: TransitionDefinition;
|
|
45
|
+
|
|
46
|
+
declare const ALL_TRANSITIONS: TransitionDefinition[];
|
|
47
|
+
declare const transitionEffects: TransitionDefinition[];
|
|
48
|
+
declare const transitionEffectsById: {
|
|
49
|
+
[k: string]: TransitionDefinition;
|
|
50
|
+
};
|
|
51
|
+
declare function getTransitionEffect(id: string): TransitionDefinition;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Transition Types
|
|
55
|
+
* Type definitions for transition effects between video clips
|
|
56
|
+
*
|
|
57
|
+
* Part of @clypra-studio/engine - shared between clypra-studio and clypra app
|
|
58
|
+
*/
|
|
59
|
+
type TransitionRenderer$1 = "fade" | "dissolve" | "cut" | "canvas" | "zoom_in" | "zoom_out" | "zoom_blur" | "slide_left" | "slide_right" | "slide_up" | "slide_down" | "wipe_left" | "wipe_right" | "wipe_up" | "wipe_down" | "wipe_clockwise" | "wipe_center" | "circle_expand" | "circle_collapse" | "diamond_expand" | "rectangle_expand" | "blur_fade" | "directional_blur" | "glitch" | "rgb_split" | "chromatic" | "film_burn" | "light_leak" | "whip_pan";
|
|
60
|
+
type EasingFunction = "linear" | "ease" | "ease-in" | "ease-out" | "ease-in-out" | "ease-in-quad" | "ease-out-quad" | "ease-in-out-quad" | "ease-in-cubic" | "ease-out-cubic" | "ease-in-out-cubic" | "ease-in-quart" | "ease-out-quart" | "ease-in-out-quart" | "spring" | "bounce";
|
|
61
|
+
interface TransitionParameters {
|
|
62
|
+
easing?: EasingFunction;
|
|
63
|
+
direction?: "left" | "right" | "up" | "down";
|
|
64
|
+
angle?: number;
|
|
65
|
+
scale?: number;
|
|
66
|
+
centerX?: number;
|
|
67
|
+
centerY?: number;
|
|
68
|
+
blurAmount?: number;
|
|
69
|
+
feather?: number;
|
|
70
|
+
color?: string;
|
|
71
|
+
[key: string]: any;
|
|
72
|
+
}
|
|
73
|
+
type TransitionCategory = "fade" | "slide" | "wipe" | "zoom" | "dissolve" | "creative";
|
|
74
|
+
interface TransitionPreset {
|
|
75
|
+
id: string;
|
|
76
|
+
name: string;
|
|
77
|
+
category: TransitionCategory;
|
|
78
|
+
description: string;
|
|
79
|
+
tags: string[];
|
|
80
|
+
defaultDuration: number;
|
|
81
|
+
defaultDurationMs: number;
|
|
82
|
+
durationConstraints?: {
|
|
83
|
+
min: number;
|
|
84
|
+
max: number;
|
|
85
|
+
};
|
|
86
|
+
renderer: TransitionRenderer$1;
|
|
87
|
+
params: TransitionParameters;
|
|
88
|
+
isPremium?: boolean;
|
|
89
|
+
thumbnail?: string;
|
|
90
|
+
}
|
|
91
|
+
interface AppliedTransition {
|
|
92
|
+
id: string;
|
|
93
|
+
transitionId: string;
|
|
94
|
+
renderer: TransitionRenderer$1;
|
|
95
|
+
params: TransitionParameters;
|
|
96
|
+
duration: number;
|
|
97
|
+
easing?: EasingFunction;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Transition Renderer
|
|
102
|
+
*
|
|
103
|
+
* Applies transitions between two video frames.
|
|
104
|
+
* These are NOT video files - they are algorithmic blends.
|
|
105
|
+
*
|
|
106
|
+
* Examples:
|
|
107
|
+
* - fade: Crossfade opacity
|
|
108
|
+
* - zoom_in: Scale up during fade
|
|
109
|
+
* - wipe_left: Reveal next frame from left
|
|
110
|
+
*
|
|
111
|
+
* Part of @clypra-studio/engine - shared between clypra-studio and clypra app
|
|
112
|
+
*/
|
|
113
|
+
|
|
114
|
+
declare class TransitionRenderer {
|
|
115
|
+
/**
|
|
116
|
+
* Render a transition between two frames
|
|
117
|
+
*
|
|
118
|
+
* @param ctx - Canvas 2D context
|
|
119
|
+
* @param fromFrame - Canvas or image of the outgoing frame
|
|
120
|
+
* @param toFrame - Canvas or image of the incoming frame
|
|
121
|
+
* @param renderer - Transition type
|
|
122
|
+
* @param params - Transition parameters
|
|
123
|
+
* @param progress - Transition progress (0-1)
|
|
124
|
+
*/
|
|
125
|
+
static render(ctx: CanvasRenderingContext2D, fromFrame: HTMLCanvasElement | HTMLImageElement, toFrame: HTMLCanvasElement | HTMLImageElement, renderer: TransitionRenderer$1, params: TransitionParameters, progress: number): void;
|
|
126
|
+
/**
|
|
127
|
+
* Get the renderer function for a transition type
|
|
128
|
+
*/
|
|
129
|
+
private static getRenderer;
|
|
130
|
+
private static renderFade;
|
|
131
|
+
private static renderDissolve;
|
|
132
|
+
private static renderCut;
|
|
133
|
+
private static renderZoomIn;
|
|
134
|
+
private static renderZoomOut;
|
|
135
|
+
private static renderZoomBlur;
|
|
136
|
+
private static renderSlideLeft;
|
|
137
|
+
private static renderSlideRight;
|
|
138
|
+
private static renderSlideUp;
|
|
139
|
+
private static renderSlideDown;
|
|
140
|
+
private static renderWipeLeft;
|
|
141
|
+
private static renderWipeRight;
|
|
142
|
+
private static renderWipeUp;
|
|
143
|
+
private static renderWipeDown;
|
|
144
|
+
private static renderWipeClockwise;
|
|
145
|
+
private static renderWipeCenter;
|
|
146
|
+
private static renderCircleExpand;
|
|
147
|
+
private static renderCircleCollapse;
|
|
148
|
+
private static renderDiamondExpand;
|
|
149
|
+
private static renderRectangleExpand;
|
|
150
|
+
private static renderBlurFade;
|
|
151
|
+
private static renderDirectionalBlur;
|
|
152
|
+
private static renderGlitch;
|
|
153
|
+
private static renderRGBSplit;
|
|
154
|
+
private static renderChromatic;
|
|
155
|
+
private static renderFilmBurn;
|
|
156
|
+
private static renderLightLeak;
|
|
157
|
+
private static renderWhipPan;
|
|
158
|
+
private static applyEasing;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Transition Presets
|
|
163
|
+
* Professional transition definitions mapped to TransitionRenderer types
|
|
164
|
+
*
|
|
165
|
+
* Part of @clypra-studio/engine - shared between clypra-studio and clypra app
|
|
166
|
+
*/
|
|
167
|
+
|
|
168
|
+
declare const TRANSITION_CATEGORIES: TransitionCategory[];
|
|
169
|
+
declare const TRANSITION_PRESETS: TransitionPreset[];
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Transition Helpers
|
|
173
|
+
* Utility functions for working with transition presets
|
|
174
|
+
*
|
|
175
|
+
* Part of @clypra-studio/engine - shared between clypra-studio and clypra app
|
|
176
|
+
*/
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Get all available transition categories
|
|
180
|
+
*/
|
|
181
|
+
declare function getTransitionCategories(): TransitionCategory[];
|
|
182
|
+
/**
|
|
183
|
+
* Get transitions filtered by category
|
|
184
|
+
*/
|
|
185
|
+
declare function getTransitionsByCategory(category: TransitionCategory): TransitionPreset[];
|
|
186
|
+
/**
|
|
187
|
+
* Search transitions by query (name, description, or tags)
|
|
188
|
+
*/
|
|
189
|
+
declare function searchTransitions(query: string): TransitionPreset[];
|
|
190
|
+
/**
|
|
191
|
+
* Get a specific transition preset by ID
|
|
192
|
+
*/
|
|
193
|
+
declare function getTransitionById(id: string): TransitionPreset | undefined;
|
|
194
|
+
/**
|
|
195
|
+
* Get a transition preset by renderer type
|
|
196
|
+
*/
|
|
197
|
+
declare function getTransitionByRenderer(renderer: TransitionRenderer$1): TransitionPreset | undefined;
|
|
198
|
+
/**
|
|
199
|
+
* Get all transition presets
|
|
200
|
+
*/
|
|
201
|
+
declare function getAllTransitions(): TransitionPreset[];
|
|
202
|
+
/**
|
|
203
|
+
* Get transition count by category
|
|
204
|
+
*/
|
|
205
|
+
declare function getTransitionCountByCategory(): Record<TransitionCategory, number>;
|
|
206
|
+
/**
|
|
207
|
+
* Get all unique tags from all transitions
|
|
208
|
+
*/
|
|
209
|
+
declare function getAllTransitionTags(): string[];
|
|
210
|
+
/**
|
|
211
|
+
* Filter transitions by multiple tags (AND logic)
|
|
212
|
+
*/
|
|
213
|
+
declare function getTransitionsByTags(tags: string[]): TransitionPreset[];
|
|
214
|
+
/**
|
|
215
|
+
* Get recommended transition duration for a preset
|
|
216
|
+
*/
|
|
217
|
+
declare function getRecommendedDuration(presetId: string): number;
|
|
218
|
+
|
|
219
|
+
export { ALL_TRANSITIONS, type AppliedTransition, ChromaticPushTransition, CrossDissolveTransition, DepthPushTransition, DirectionalDissolveTransition, type EasingFunction, ElasticSnapCutTransition, FilmBurnWipeTransition, FoldTurnTransition, FrameHoldStutterTransition, GlitchTransition, GravityDropTransition, IrisRevealTransition, LightLeakSweepTransition, LumaWipeTransition, ParallaxLayerSplitTransition, PixelateCollapseTransition, PushTransition, RackFocusBlendTransition, RefractionWarpTransition, ShatterBurstTransition, StrobeCutTransition, TRANSITION_CATEGORIES, TRANSITION_PRESETS, type TransitionCategory, type TransitionParameters, type TransitionPreset, TransitionRenderer, type TransitionRenderer$1 as TransitionRendererType, ZoomTransition, getAllTransitionTags, getAllTransitions, getRecommendedDuration, getTransitionById, getTransitionByRenderer, getTransitionCategories, getTransitionCountByCategory, getTransitionEffect, getTransitionsByCategory, getTransitionsByTags, searchTransitions, transitionEffects, transitionEffectsById };
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @clypra-studio/engine — NLE Runtime & Pipeline Contract v2 (LEGACY DRAFT)
|
|
3
|
+
*
|
|
4
|
+
* @deprecated Prefer `v2/project`, `v2/graph`, `v2/planner`, and `v2/runtime`.
|
|
5
|
+
* Exported via `@clypra/engine/contract` for Rust/wgpu alignment only.
|
|
6
|
+
*/
|
|
7
|
+
type AssetType = "video" | "audio" | "image" | "font" | "lut" | "model" | "generated";
|
|
8
|
+
interface AssetDescriptor {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
type: AssetType;
|
|
12
|
+
uri: string;
|
|
13
|
+
checksum: string;
|
|
14
|
+
sizeBytes: number;
|
|
15
|
+
metadata: {
|
|
16
|
+
durationMs?: number;
|
|
17
|
+
width?: number;
|
|
18
|
+
height?: number;
|
|
19
|
+
fps?: number;
|
|
20
|
+
codec?: string;
|
|
21
|
+
sampleRate?: number;
|
|
22
|
+
channels?: number;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
interface MediaResolver {
|
|
26
|
+
resolveAsset(assetId: string): Promise<AssetDescriptor>;
|
|
27
|
+
getThumbnailUri(assetId: string, frameNumber: number): string;
|
|
28
|
+
getWaveformUri(assetId: string): string;
|
|
29
|
+
prewarmAsset(assetId: string): Promise<void>;
|
|
30
|
+
releaseAsset(assetId: string): void;
|
|
31
|
+
}
|
|
32
|
+
type GraphDataType = "Texture" | "Depth" | "MotionField" | "BoundingBoxes" | "Mask" | "Mesh" | "Particles" | "AudioSpectrum" | "Text" | "Markers";
|
|
33
|
+
interface GraphValue<T = any> {
|
|
34
|
+
type: GraphDataType;
|
|
35
|
+
payload: T;
|
|
36
|
+
}
|
|
37
|
+
interface EffectCapabilities {
|
|
38
|
+
temporal: boolean;
|
|
39
|
+
requiresFrameHistory: number;
|
|
40
|
+
requiresLookAhead: number;
|
|
41
|
+
stateful: boolean;
|
|
42
|
+
spatial: boolean;
|
|
43
|
+
geometry: boolean;
|
|
44
|
+
inputsCount: number;
|
|
45
|
+
gpuOnly: boolean;
|
|
46
|
+
requiresAnalysis: boolean;
|
|
47
|
+
}
|
|
48
|
+
interface EffectProfile {
|
|
49
|
+
gpuCost: number;
|
|
50
|
+
memoryCost: number;
|
|
51
|
+
temporalRadius: number;
|
|
52
|
+
recommendedResolutionScale: number;
|
|
53
|
+
}
|
|
54
|
+
interface PinConnection {
|
|
55
|
+
nodeId: string;
|
|
56
|
+
pinId: string;
|
|
57
|
+
}
|
|
58
|
+
interface GraphNode {
|
|
59
|
+
id: string;
|
|
60
|
+
type: string;
|
|
61
|
+
version: number;
|
|
62
|
+
params: Record<string, any>;
|
|
63
|
+
inputs: Record<string, PinConnection | null>;
|
|
64
|
+
outputs: Record<string, PinConnection[]>;
|
|
65
|
+
capabilities: EffectCapabilities;
|
|
66
|
+
profile: EffectProfile;
|
|
67
|
+
}
|
|
68
|
+
type ExecutionQuality = "draft" | "preview" | "export";
|
|
69
|
+
type PlaybackMode = "play" | "seek";
|
|
70
|
+
type PlaybackDirection = "forward" | "reverse";
|
|
71
|
+
interface ExecutionPolicy {
|
|
72
|
+
quality: ExecutionQuality;
|
|
73
|
+
playbackMode: PlaybackMode;
|
|
74
|
+
direction: PlaybackDirection;
|
|
75
|
+
targetFps: number;
|
|
76
|
+
}
|
|
77
|
+
type RenderIntent = "thumbnail" | "preview" | "export" | "still" | "analysis";
|
|
78
|
+
interface ResourceRequest {
|
|
79
|
+
id: string;
|
|
80
|
+
type: "texture" | "buffer";
|
|
81
|
+
width?: number;
|
|
82
|
+
height?: number;
|
|
83
|
+
format: "rgba8" | "rgba16f" | "rgba32f" | "r8";
|
|
84
|
+
usage: "render_target" | "shader_read" | "compute_write";
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Single-frame resolved graph to run on the GPU queue.
|
|
88
|
+
* Contains only nodes that are visible and active at timelineTime.
|
|
89
|
+
*/
|
|
90
|
+
interface FrameGraph {
|
|
91
|
+
frameNumber: number;
|
|
92
|
+
timelineTime: number;
|
|
93
|
+
intent: RenderIntent;
|
|
94
|
+
nodes: GraphNode[];
|
|
95
|
+
edges: Array<{
|
|
96
|
+
fromNodeId: string;
|
|
97
|
+
fromPinId: string;
|
|
98
|
+
toNodeId: string;
|
|
99
|
+
toPinId: string;
|
|
100
|
+
}>;
|
|
101
|
+
resourceRequests: ResourceRequest[];
|
|
102
|
+
}
|
|
103
|
+
interface Command {
|
|
104
|
+
op: "draw" | "compute" | "copy" | "clear" | "resolve";
|
|
105
|
+
shaderId: string;
|
|
106
|
+
inputs: string[];
|
|
107
|
+
outputs: string[];
|
|
108
|
+
uniforms: Record<string, any>;
|
|
109
|
+
}
|
|
110
|
+
interface CommandBuffer {
|
|
111
|
+
frameNumber: number;
|
|
112
|
+
commands: Command[];
|
|
113
|
+
}
|
|
114
|
+
interface RenderBackend {
|
|
115
|
+
init(deviceInfo: any): Promise<void>;
|
|
116
|
+
compileShader(shaderId: string, source: string): Promise<any>;
|
|
117
|
+
submit(commandBuffer: CommandBuffer): Promise<void>;
|
|
118
|
+
readPixels(resourceId: string): Promise<Uint8Array>;
|
|
119
|
+
destroy(): void;
|
|
120
|
+
}
|
|
121
|
+
interface CacheKey {
|
|
122
|
+
projectVersion: number;
|
|
123
|
+
timelineTime: number;
|
|
124
|
+
quality: ExecutionQuality;
|
|
125
|
+
renderIntent: RenderIntent;
|
|
126
|
+
nodeStateHashes: Record<string, string>;
|
|
127
|
+
}
|
|
128
|
+
interface VersionTracker {
|
|
129
|
+
nodeVersions: Record<string, number>;
|
|
130
|
+
globalProjectVersion: number;
|
|
131
|
+
}
|
|
132
|
+
interface ClipSegment {
|
|
133
|
+
id: string;
|
|
134
|
+
assetId: string;
|
|
135
|
+
timelineStartMs: number;
|
|
136
|
+
timelineEndMs: number;
|
|
137
|
+
sourceStartMs: number;
|
|
138
|
+
speed: number;
|
|
139
|
+
volume: number;
|
|
140
|
+
}
|
|
141
|
+
interface TrackDefinition {
|
|
142
|
+
id: string;
|
|
143
|
+
name: string;
|
|
144
|
+
type: "video" | "audio";
|
|
145
|
+
enabled: boolean;
|
|
146
|
+
clips: ClipSegment[];
|
|
147
|
+
effectGraph: {
|
|
148
|
+
nodes: GraphNode[];
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
interface ProjectManifestV2 {
|
|
152
|
+
id: string;
|
|
153
|
+
version: number;
|
|
154
|
+
name: string;
|
|
155
|
+
width: number;
|
|
156
|
+
height: number;
|
|
157
|
+
fps: number;
|
|
158
|
+
assets: AssetDescriptor[];
|
|
159
|
+
tracks: TrackDefinition[];
|
|
160
|
+
compositeGraph: {
|
|
161
|
+
nodes: GraphNode[];
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export type { AssetDescriptor, AssetType, CacheKey, ClipSegment, Command, CommandBuffer, EffectCapabilities, EffectProfile, ExecutionPolicy, ExecutionQuality, FrameGraph, GraphDataType, GraphNode, GraphValue, MediaResolver, PinConnection, PlaybackDirection, PlaybackMode, ProjectManifestV2, RenderBackend, RenderIntent, ResourceRequest, TrackDefinition, VersionTracker };
|