Remotion Minimal Scenes
Overview
Compile every beat in artifacts/edit_plan.md into an isolated, frame-accurate Remotion scene component (src/scenes/SceneXX.tsx) using shared primitives (src/primitives/) and design tokens (ten-principles-tokens.json), then assemble them in src/Root.tsx.
Swarm Isolation Architecture
-
Bootstrap Shared Primitives First (Coordinator): Before spawning scene workers, ensure the Remotion project has shared base primitives in
src/primitives/and font loading insrc/styles/fonts.ts:<CameraRig>: AppliestranslateX,translateY,scale, androtatetransforms to all children together, plus optionalenterTransition/exitTransitionhandshake contracts (zoom_through,pan_left,pan_up,anchor_morph) for seamless cross-scene camera flow.<TextureOverlay>: Renders the paper/cloth/grain PNG withopacitystrictly between0.12and0.22(mixBlendMode: 'multiply'on light paper,'screen'on dark#0D0F12).<DualFontCaption>&<KineticWordGroup>: Renders<= 5words per card usingInter+Playfair Display Bold Italic(or bilingual Marathi composite fonts) with spring reveals synced tobuild/transcript_ms.json.<TrackedSvgPath>: AnimatesstrokeDashoffsetin#1E5EFF(strokeWidth: 6) and exposes(x, y)tip coordinates for<CameraRig>.
-
One Named Worker Per Scene (
swarm):- Spawn one worker per scene (
@scene-01,@scene-02, etc.) using Antigravityswarm(action: "add",workspace: "share"if workers run builds independently, orworkspace: "inherit"with strict single-file ownership). - Strict Ownership: Each worker may ONLY write to its assigned
src/scenes/SceneXX.tsxfile and read fromsrc/primitives/,public/assets/,build/transcript_ms.json, andbuild/explainer_timeline.json. Never edit another scene's file orsrc/Root.tsxfrom a scene worker. - The Coordinator merges/assembles all
SceneXX.tsxcomponents intosrc/Root.tsxonce all scene workers finish.
- Spawn one worker per scene (
Mandatory Global Laws (All Workers)
-
Texture Binding Law: NEVER mount
<TextureOverlay />outside an animated<CameraRig>. In every animated scene (P2–P10andKINETIC_BREATHER), wrap BOTH the scene artwork/typography AND<TextureOverlay />inside the same<CameraRig>container so paper grain tracks organically with camera pans, zooms, and transition handshakes.<CameraRig x={camX} y={camY} scale={camScale} enterTransition={{ type: 'zoom_through', durationFrames: 18 }} exitTransition={{ type: 'pan_left', durationFrames: 18 }} > <SceneArtwork /> <DualFontCaption words={group} /> <TextureOverlay src={staticFile('assets/textures/paper_rough_white.png')} opacity={0.18} /> </CameraRig> -
Shared Camera Transition Handshake Law (Explainer Mode): When
build/explainer_timeline.jsonorartifacts/edit_plan.mdspecifiesenter_transition/exit_transition, every scene worker MUST pass those exactenterTransitionandexitTransitioncontracts into its root<CameraRig>(and include a// Principle: <PRINCIPLE_ID>+// Transitions: enter=<type> exit=<type>header comment) so adjacent scenes share matching motion vectors. -
Dual-Font Caption Layout & Reels/Shorts Safe-Zone Law (
P1–P10&KINETIC_BREATHER):- Maximum 5 words visible per caption card.
- Reels / Shorts Safe Zones (
1080×1920— Mandatory):- A-Roll & Graphic Caption Pills: Anchor at
y: 1215–1235,maxWidth: 820px, centered (clears bottom handle/caption UIy: 1400–1920and right action iconsx > 960). Style as sleek dark-frosted pills (backgroundColor: 'rgba(13, 15, 18, 0.78)',backdropFilter: 'blur(14px)',border: '1px solid rgba(255,255,255,0.14)',borderRadius: 16px,padding: '20px 30px', soft shadow0 20px 50px rgba(13,15,18,0.30)). - Top Hook Banners & Timeline Pills: Place at
y: 225–240,left: 90,width: 860px(x <= 950) as borderless translucent pills (rgba(245,243,238,0.92)orrgba(20,24,32,0.82)). KeepScene01hook headers steady at opacity1for the full opening scene (2.5s+). - Regulatory Disclaimers: Place at
y: 1345–1358(ory: 1045in the upper/mid dark zone when bright bottom artwork occupies the lower 30%, as inScene12staircase backdrops).
- A-Roll & Graphic Caption Pills: Anchor at
- No Raw Wireframe CSS Boxes or >20% Dead Space: Never render
2px solid blackwireframe borders, hard neo-brutalist offset shadows (box-shadow: 4px 4px 0 #000), or empty blank backgrounds. Use full-bleed9:16editorial illustrations (Scene02,Scene12) or large rounded hero cards (width: 860–880px,height: 830–920px,borderRadius: 24–28px, soft ambient shadow0 24px 60px rgba(13,15,18,0.12)). - No Orphan Flash Frames: Never split the final word of a clause into its own
< 24frame card or<Sequence>; merge it into the active sentence block. - Marathi Override (
marathi-devanagari-engine): UseMukta SemiBold (600)+Mukta ExtraBold (800)on all caption pills (neverRozha Oneon moving video captions—its thin hairlines shimmer under H.264 compression). ReserveRozha Onestrictly for66px+solid-canvas headlines andP6_QUOTE_SCENE. EnforcelineHeight >= 1.42on every numericlineHeightstyle in Devanagari.tsxfiles,paddingTop/Bottom: 20px, zero inlinefontStyle: 'italic', andIntl.Segmenter('mr', { granularity: 'grapheme' }). - Archive Stale Scenes First & Match Native Source FPS: Move any leftover
src/scenes/Scene*.tsxfiles from previous projects intobuild/archive_prev_scenes/before creating new scenes. When source A-roll is30fps, support native30fpscomposition rendering (aroll_trimmed_30fps.mp4,<OffthreadVideo muted startFrom={...} />with sub-pixeltranslate3dscale transforms) to prevent 30→60fps frame-doubling judder.
Implementation Specs for the 10 Principles + Kinetic Breather
P1_CAPTION(Talking-Head A-Roll + Captions): Render mutedaroll_trimmed_30fps.mp4(or60fpsmaster) full screen (1080x1920) with smooth sub-pixeltranslate3d(0,0,0) scale(...)push-in (audio plays continuously fromaroll_dialogue.wavinAudioTimeline.tsx). Anchor<ArollCaptionBar>attop: 1215(maxWidth: 820px).KINETIC_BREATHER(Explainer Kinetic Typography Breather): Full-screen editorial typography card replacing A-roll cuts during rhetorical questions or twists. Render<KineticWordGroup>centered over a subtly animatedneutral_dark(#0D0F12) canvas withaccent_brightkeyword highlights, wrapped inside<CameraRig>alongside<TextureOverlay src={staticFile('assets/textures/paper_dark_charcoal_grain.png')} opacity={0.18} mode="screen" />.P2_BROLL_TEXT(Textured B-Roll): Mount the pre-vignetted clippublic/assets/broll/<scene_id>.mp4inside<CameraRig>(subtle1.00 -> 1.05push-in). Center<DualFontCaption>optically (top: 46%).P3_PAINTING(Painting Slide-In): Place the Wikimedia painting inside a feathered brush-stroke mask (paint_brush_mask.png) overpaper_rough_white.png. Animate a fast camera slide-in (cubic-bezier(0.16, 1, 0.3, 1)over18frames).P4_LINE_TEXT(Concrete Parity / Tracked Visual Metaphor): Instead of abstract CSS progress bars, fill the center canvas (width: 880px,height: 855px,borderRadius: 28px) with a concrete editorial illustration (e.g.,asset_04_equal_payout.pngbalanced brass scale with subtle±5pxvertical float andscale(1.08)edge crop) and place synchronized pulsing payout pills directly above the left and right pans withgap >= 44pxso the center finial remains uncovered.P5_LINE_ILLUSTRATION(Progression / 2-Zone Verdict Split): For comparison verdicts (Scene10), use a 2-Zone Vertical Split Layout: Top zone (y: 222..872,width: 880px) with two side-by-side rounded comparison cards (borderRadius: 24px,340px-high illustrated thumbnail headers fromasset_02andasset_03) + Bottom zone (y: 895..1345,width: 880px,height: 450px,borderRadius: 28px) featuring wide-frame talking-head A-roll (objectPosition: '50% 42%'so the speaker's face sits cleanly above<ArollCaptionBar top={1232} />).P6_QUOTE_SCENE(Full-Bleed Editorial Closing Backdrop + Branded CTA Hold): Mount full-bleedasset_06_closing_backdrop.png(scale 1.00 -> 1.05slow drift) +<TextureOverlay opacity={0.14} mode="multiply" />inside<CameraRig>. Render BOTH oversized opening“and closing”marks (156px,lineHeight: 1.42with negative margins-92px) framing the centeredRozha Onequote, plus the circular brand logo (right_investment_logo.png), brushed-gold/cream CTA pill, and AMFI disclaimer—all positioned in the deep cobalt upper/mid zone (y: 235..1060) cleanly above any bright bottom architectural illustration.P7_CENTER_ILLUSTRATION(Abstract Center Piece): Place illustration across the center frame inside<CameraRig>. Hold>= 90frames (60fps) after entry settles.P8_SIDE_ILLUSTRATION(Split Allocation + Hero Illustration Card): Top 50/50 split reference strip (y: 222, docking the dimmedasset_02thumbnail chip alongside the active cobalt chip) + large860×830pxrounded hero illustration card (asset_03_father_daughter_mf.png,objectPosition: '50% 88%'to frame characters and coin sprout cleanly) with a warm emerald pill badge ("मुलीच्या आग्रहाखातर") animating in on the narrative cue.P9_OBJECT_CALLOUT(Full-Bleed or Hero Card Editorial Object): Either full-bleed9:16editorial illustration (asset_01_retirement_corpus.pngwith Ken Burns1.00 -> 1.07zoom and upper negative-space₹30 लाखcount-up aty: 235..530) or large860×920pxrounded hero card (asset_02_post_office.pngwith top-centered pill badgePOST OFFICE · ₹15 लाख).P10_DARK_GRAPH(Shared Taller760pxDark Charcoal Dataviz Grid): Use a shared<SharedDarkDatavizGrid />component (top: 315,left: 90,width: 880px,height: 760px,borderRadius: 24px) on#0D0F12across consecutive comparison scenes (Scene08→Scene09) so axes never jump. On the flatline contrast beat (Scene09), dim the growth curve to22%ghost opacity, draw the crimson#D62828flatline, slam<HalftoneStamp label="₹0 वाढ" />attop: 620, left: 435(clearing the flatline label), and fade in the210×210dark-modeasset_05_frozen_passbook.pngbadge (right: 40, bottom: 162).
Verification
- Typecheck the Remotion project (
npx tsc --noEmit) with zero errors. - Hand off all
src/scenes/SceneXX.tsxfiles to06-adversarial-edit-verifierbefore rendering drafts.