feat: replace Remotion with custom Bradly Engine (Phases 1-3)

- Phase 1: Custom animation engine (interpolate, spring, Easing)
- Phase 2: Custom composition components (AbsoluteFill, Sequence, Img, Video, Audio)
- Phase 3: BradlyPlayer with rAF frame loop, imperative API, controls

Migrated 24 files from remotion/@remotion/player imports to src/engine/.
All type errors from migration resolved. Pre-existing errors remain unchanged.
This commit is contained in:
2026-06-02 05:20:43 -05:00
parent 0aa44afa43
commit ff07d8c492
39 changed files with 1451 additions and 55 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
import React, { useMemo, useState, useCallback, useRef, useEffect } from 'react';
import { Play, Pause, RotateCcw, Film } from 'lucide-react';
import { Player, PlayerRef } from '@remotion/player';
import { BradlyPlayer, BradlyPlayerRef } from '../../engine/player';
import { ExpressTemplate, CompanyProfile, DesignMD } from '../../types';
import { BrandComposition } from '../BrandComposition';
import { compileExpressToTimeline, getAspectDimensions, getTemplateDuration } from '../../utils/expressCompiler';
@@ -31,7 +31,7 @@ export interface LivePreviewCanvasProps {
/** Callback when user navigates to a scene */
onSceneChange?: (sceneId: string) => void;
/** External player ref */
playerRef?: React.RefObject<PlayerRef>;
playerRef?: React.RefObject<BradlyPlayerRef>;
/** Status label (e.g. "Listo" / "Faltan campos") */
statusLabel?: string;
/** Whether all required fields are complete */
@@ -67,7 +67,7 @@ export const LivePreviewCanvas: React.FC<LivePreviewCanvasProps> = ({
statusLabel,
isComplete = false,
}) => {
const internalRef = useRef<PlayerRef>(null);
const internalRef = useRef<BradlyPlayerRef>(null);
const playerRef = externalRef || internalRef;
const [isPlaying, setIsPlaying] = useState(false);
@@ -246,7 +246,7 @@ export const LivePreviewCanvas: React.FC<LivePreviewCanvasProps> = ({
maxHeight: 'calc(100% - 160px)',
}}
>
<Player
<BradlyPlayer
key={playerKey}
ref={playerRef}
component={BrandComposition}