chore(skills+remotion): add flat-artist skill bundle; register 3D templates
- .claude/skills/flat-artist: the bundled FlatRender template-creation suite (orchestrator + 16 sub-skills + design/motion R&D), mirrors the Gitea AISkills repo. - services/remotion Root.tsx/templates.tsx: register the 3D templates + Three3DTest. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -113,13 +113,16 @@ export const RemotionRoot: React.FC = () => {
|
||||
height={720}
|
||||
/>
|
||||
|
||||
{/* Branded templates — each registered in all three aspects. */}
|
||||
{/* Branded templates — each registered in all three aspects. A template may
|
||||
supply a dedicated component per aspect (componentsByAspect) when its
|
||||
design differs structurally; otherwise the shared `component` adapts
|
||||
responsively. */}
|
||||
{TEMPLATES.flatMap((tpl) =>
|
||||
ASPECTS.map((a) => (
|
||||
<Composition
|
||||
key={`${tpl.id}-${a.id}`}
|
||||
id={`${tpl.id}-${a.id}`}
|
||||
component={tpl.component}
|
||||
component={tpl.componentsByAspect?.[a.id] ?? tpl.component}
|
||||
durationInFrames={Math.round(FPS * tpl.durationSec)}
|
||||
fps={FPS}
|
||||
width={a.width}
|
||||
|
||||
@@ -32,7 +32,16 @@ export interface TemplateDef {
|
||||
name: string;
|
||||
/** Short Persian description for the catalog. */
|
||||
description: string;
|
||||
/** Default/shared component — used for any aspect without an override below. */
|
||||
component: React.FC<any>; // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
/**
|
||||
* Optional per-aspect component overrides, keyed by aspect id
|
||||
* ("16x9" | "1x1" | "9x16"). Provide one when a design must differ
|
||||
* STRUCTURALLY between aspects (a different layout/scene, not just
|
||||
* repositioning — repositioning should be done responsively inside the shared
|
||||
* `component` via useLayout). Aspects you omit fall back to `component`.
|
||||
*/
|
||||
componentsByAspect?: Partial<Record<string, React.FC<any>>>; // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
schema: AnyZodObject;
|
||||
durationSec: number;
|
||||
defaultProps: Record<string, unknown>;
|
||||
|
||||
Reference in New Issue
Block a user