2026-04-20 11:31:17 +02:00
|
|
|
import type { EffectPass } from "@/effects/types";
|
2026-05-03 03:49:52 +02:00
|
|
|
import type { RetimeConfig } from "@/model";
|
2026-03-25 16:47:22 +01:00
|
|
|
import { BaseNode } from "./base-node";
|
|
|
|
|
|
|
|
|
|
export type BlurBackgroundNodeParams = {
|
|
|
|
|
mediaId: string;
|
|
|
|
|
url: string;
|
|
|
|
|
file: File;
|
|
|
|
|
mediaType: "video" | "image";
|
|
|
|
|
duration: number;
|
|
|
|
|
timeOffset: number;
|
|
|
|
|
trimStart: number;
|
|
|
|
|
trimEnd: number;
|
|
|
|
|
retime?: RetimeConfig;
|
|
|
|
|
blurIntensity: number;
|
|
|
|
|
};
|
|
|
|
|
|
2026-04-13 04:41:17 +02:00
|
|
|
export type BackdropSource = {
|
2026-03-25 16:47:22 +01:00
|
|
|
source: CanvasImageSource;
|
|
|
|
|
width: number;
|
|
|
|
|
height: number;
|
|
|
|
|
};
|
|
|
|
|
|
2026-04-13 04:41:17 +02:00
|
|
|
export interface ResolvedBlurBackgroundNodeState {
|
|
|
|
|
backdropSource: BackdropSource;
|
|
|
|
|
passes: EffectPass[];
|
2026-03-25 16:47:22 +01:00
|
|
|
}
|
2026-04-13 04:41:17 +02:00
|
|
|
|
|
|
|
|
export class BlurBackgroundNode extends BaseNode<
|
|
|
|
|
BlurBackgroundNodeParams,
|
|
|
|
|
ResolvedBlurBackgroundNodeState
|
|
|
|
|
> {}
|