hyper-animator-codex 0.7.1 → 0.8.1
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/README.md +67 -4
- package/bin/hyper-animator-codex.mjs +1 -1
- package/lib/minimax-config.mjs +3 -3
- package/package.json +4 -1
- package/skills/hyper-animator-codex/SKILL.md +66 -22
- package/skills/hyper-animator-codex/agents/openai.yaml +2 -2
- package/skills/hyper-animator-codex/contracts/shot-plan.schema.json +280 -0
- package/skills/hyper-animator-codex/contracts/workflow-policy.json +97 -0
- package/skills/hyper-animator-codex/references/HyperFrames-AI-Generation-Patterns-codex.md +788 -0
- package/skills/hyper-animator-codex/references/beat-sync-workflow.md +7 -0
- package/skills/hyper-animator-codex/references/examples/shot-plan-dual-catalog.json +99 -0
- package/skills/hyper-animator-codex/references/hyperframes-agent-pseudocode.ts +1 -1
- package/skills/hyper-animator-codex/references/hyperframes-catalog-map.json +97 -230
- package/skills/hyper-animator-codex/references/hyperframes-intent-workflow.md +32 -8
- package/skills/hyper-animator-codex/references/minimax-music-workflow.md +24 -4
- package/skills/hyper-animator-codex/references/narration-audio-workflow.md +47 -10
- package/skills/hyper-animator-codex/references/shotcraft/LICENSE +202 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/ai-stream-response/README.md +46 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/autolayout-gap-dial/README.md +53 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/beat-cut-moves/README.md +54 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/beat-step-list-theme-cycle/README.md +59 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/before-after-slider-scrub/README.md +47 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/bottom-push-stack-wipe/README.md +58 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/brand-frame-snap/README.md +51 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/brand-ink-open/README.md +35 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/bubble-swarm-takeover/README.md +62 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/canvas-materialize-moves/README.md +55 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/card-flip-reveal/README.md +50 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/card-flock-tumble/README.md +54 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/cel-flash-stomp/README.md +54 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/chart-live-moves/README.md +51 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/circle-match-iris/README.md +53 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/cloner-depth-echo/README.md +38 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/collab-cursor-moves/README.md +48 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/color-block-step-wipe/README.md +54 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/command-palette-summon/README.md +45 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/crane-rise-reveal/README.md +47 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/crash-zoom-punch/README.md +38 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/dataviz-landscape-open/README.md +54 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/deck-deal-flyin/README.md +45 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/depth-layer-moves/README.md +40 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/document-typewriter-reveal/README.md +40 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/draw-svg-trace/README.md +50 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/edit-hook-moves/README.md +38 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/element-body-moves/README.md +49 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/fui-hud-moves/README.md +44 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/gauge-readout-moves/README.md +45 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/glow-flyline-moves/README.md +51 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/gradient-word-sweep/README.md +49 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/graze-face-tour/README.md +56 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/hashtag-to-pill-materialize/README.md +57 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/hires-rasterize-3d-text/README.md +34 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/icon-field-colorize/README.md +53 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/icon-performance-moves/README.md +46 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/impact-feedback/README.md +50 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/input-trigger-moves/README.md +49 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/integration-hub-map/README.md +54 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/letterspace-materialize/README.md +52 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/light-play-moves/README.md +49 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/line-boil/README.md +52 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/line-carry-transition/README.md +52 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/list-stack-press/README.md +43 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/magician-card-flourish/README.md +63 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/marker-underline-title/README.md +48 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/montage-rhythm-moves/README.md +55 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/morph-from-primitive/README.md +51 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/neon-frame-forerun/README.md +50 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/neon-frame-orbit-drop/README.md +50 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/neon-triple-marquee/README.md +55 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/odometer-digit-roll/README.md +54 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/outro-group-photo-launch/README.md +39 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/overhead-camera-moves/README.md +50 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/page-turn-transitions/README.md +48 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/page-waterfall-wall/README.md +52 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/panel-grid-moves/README.md +52 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/paper-craft-moves/README.md +46 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/paper-plane-messenger/README.md +62 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/paper-title-card/README.md +36 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/particle-celebrate-hits/README.md +42 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/particle-sand-fill/README.md +39 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/pill-slot-cycle/README.md +57 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/print-texture-transitions/README.md +40 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/rhythm-interrupt-moves/README.md +44 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/riso-print-hits/README.md +54 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/row-embed/README.md +36 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/runway-ground-skim/README.md +52 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/sakuga-timing-shift/README.md +50 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/scene-locked-title/README.md +43 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/scroll-brake-moves/README.md +45 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/segmented-thumb-hero/README.md +57 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/shot-transitions/README.md +60 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/skeleton-reveal/README.md +54 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/slam-entrance-moves/README.md +53 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/smear-multiples/README.md +49 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/space-camera-moves/README.md +53 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/spectrum-morph-ui/README.md +50 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/speed-ramp-freeze/README.md +42 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/split-flap-title/README.md +52 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/spotlight-hero-card/README.md +39 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/spotlight-sweep-moves/README.md +51 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/steep-tilt-glide/README.md +53 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/stroke-segment-build/README.md +43 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/tear-streak-transitions/README.md +43 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/tension-camera-moves/README.md +55 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/text-as-mask/README.md +50 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/text-column-converge/README.md +55 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/theme-switch-moves/README.md +44 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/timeline-travel/README.md +43 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/title-demote-to-label/README.md +58 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/trailer-grammar-moves/README.md +51 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/transition-hidden-cut/README.md +52 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/transition-travel/README.md +48 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/type-and-filter/README.md +37 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/type-assembly-moves/README.md +50 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/type-entrance-moves/README.md +46 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/type-rhythm-sync/README.md +47 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/typewriter-moves/README.md +50 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/ui-strip-away-outro/README.md +63 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/ui-to-brand-morph/README.md +52 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/voice-waveform-live/README.md +52 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/wall-reveal-moves/README.md +53 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/wipe-transitions/README.md +47 -0
- package/skills/hyper-animator-codex/references/shotcraft/cards/word-relay-filmstrip/README.md +50 -0
- package/skills/hyper-animator-codex/references/shotcraft/catalog.json +3946 -0
- package/skills/hyper-animator-codex/references/shotcraft/motion-pack/README.md +32 -0
- package/skills/hyper-animator-codex/references/shotcraft/motion-pack/shotcraft-motion-pack.js +178 -0
- package/skills/hyper-animator-codex/references/shotcraft/references/aesthetic-rules.md +157 -0
- package/skills/hyper-animator-codex/references/shotcraft/references/final-review.md +107 -0
- package/skills/hyper-animator-codex/references/shotcraft/references/guided-free-creation.md +197 -0
- package/skills/hyper-animator-codex/references/shotcraft/references/music-beat-sync.md +125 -0
- package/skills/hyper-animator-codex/references/shotcraft/references/pipeline.md +357 -0
- package/skills/hyper-animator-codex/references/shotcraft/references/sound-design.md +126 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/assets/lib/Caption.tsx +50 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/assets/lib/DigitRoll.tsx +45 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/assets/lib/FlashCut.tsx +20 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/assets/lib/FlatPanel.tsx +65 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/assets/lib/PageCam.tsx +151 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/assets/lib/VerticalTicker.tsx +129 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/assets/lib/helpers/camera.tsx +75 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/assets/lib/helpers/motion.ts +40 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/assets/lib/helpers/rand.ts +11 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/assets/lib/helpers/shake.ts +10 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/_fixtures/Fixtures.tsx +83 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/ai-stream-response/StreamResponse.tsx +146 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/autolayout-gap-dial/AutolayoutGapDial.tsx +174 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/beat-cut-moves/BeatCutAccelerando.tsx +77 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/beat-cut-moves/PaparazziFlash.tsx +115 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/beat-step-list-theme-cycle/BeatStepListThemeCycle.tsx +98 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/before-after-slider-scrub/BeforeAfterSliderScrub.tsx +99 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/bottom-push-stack-wipe/BottomPushStackWipe.tsx +79 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/brand-frame-snap/BrandFrameSnap.tsx +110 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/bubble-swarm-takeover/BubbleSwarmTakeover.tsx +189 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/canvas-materialize-moves/DiagramCascadeBuild.tsx +172 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/canvas-materialize-moves/PanelToCanvasMaterialize.tsx +254 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/card-flip-reveal/CardFlipReveal.tsx +139 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/card-flock-tumble/CardFlockTumble.tsx +382 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/cel-flash-stomp/CelFlashStomp.tsx +111 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/chart-live-moves/AxisRescaleShockV2.tsx +282 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/chart-live-moves/OscilloscopeStreamV2.tsx +227 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/chart-live-moves/UnitDotSwarmRegroupV2.tsx +248 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/circle-match-iris/CircleMatchIris.tsx +124 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/cloner-depth-echo/ClonerDepthEcho.tsx +90 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/collab-cursor-moves/CursorCastEnsemble.tsx +136 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/collab-cursor-moves/CursorDialogueDuet.tsx +145 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/color-block-step-wipe/ColorBlockStepWipe.tsx +157 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/command-palette-summon/CommandPaletteSummon.tsx +173 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/crane-rise-reveal/CraneRiseReveal.tsx +91 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/crash-zoom-punch/CrashImpactReal.tsx +63 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/crash-zoom-punch/CrashZoomReal.tsx +60 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/dataviz-landscape-open/DatavizLandscapeOpen.tsx +401 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/depth-layer-moves/DollyZoomReal.tsx +55 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/depth-layer-moves/MultiplaneReal.tsx +45 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/draw-svg-trace/DrawSvgTrace.tsx +199 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/edit-hook-moves/LogoStingButton.tsx +106 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/element-body-moves/AxialStretch.tsx +112 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/element-body-moves/ContactShadowLift.tsx +117 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/fui-hud-moves/LineUnfoldPanel.tsx +125 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/fui-hud-moves/ReticleLockOn.tsx +139 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/gauge-readout-moves/NeedleSweepSelftest.tsx +146 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/gauge-readout-moves/TapeScrollFixedPointer.tsx +120 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/glow-flyline-moves/FlylineArc.tsx +158 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/glow-flyline-moves/GlowOrbAmbient.tsx +131 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/glow-flyline-moves/OrbFlylineRelay.tsx +268 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/gradient-word-sweep/GradientWordSweep.tsx +307 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/graze-face-tour/GrazeFaceTour.tsx +469 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/hashtag-to-pill-materialize/HashtagToPillMaterialize.tsx +166 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/icon-field-colorize/IconFieldColorize.tsx +93 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/icon-performance-moves/AttentionBounce.tsx +193 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/icon-performance-moves/PopBurstConfirm.tsx +162 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/impact-feedback/AnimeImpact.tsx +149 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/impact-feedback/HitCounter.tsx +147 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/input-trigger-moves/CursorPerformancePunchIn.tsx +154 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/input-trigger-moves/KeycapSmashCut.tsx +217 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/integration-hub-map/IntegrationHubMap.tsx +554 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/letterspace-materialize/LetterspaceMaterialize.tsx +85 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/light-play-moves/HalationBloom.tsx +139 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/light-play-moves/SheenSweepRetry.tsx +85 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/light-play-moves/SpotlightSweepReveal.tsx +102 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/line-boil/LineBoil.tsx +140 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/line-carry-transition/LineCarryTransition.tsx +151 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/magician-card-flourish/MagicianCardFlourish.tsx +294 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/marker-underline-title/MarkerUnderlineTitle.tsx +87 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/montage-rhythm-moves/DominoCascade.tsx +125 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/montage-rhythm-moves/DropBlackoutSlam.tsx +135 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/montage-rhythm-moves/WrightTripleCut.tsx +175 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/morph-from-primitive/MorphFromPrimitive.tsx +190 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/neon-frame-forerun/NeonFrameForerun.tsx +279 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/neon-frame-orbit-drop/NeonFrameForerunOrbit.tsx +273 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/neon-triple-marquee/NeonTripleMarquee.tsx +111 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/odometer-digit-roll/OdometerDigitRoll.tsx +178 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/overhead-camera-moves/OverheadTabletopDrop.tsx +129 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/overhead-camera-moves/TiltReveal.tsx +55 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/page-turn-transitions/BarnDoorSplit.tsx +138 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/page-turn-transitions/CubeRotate.tsx +114 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/page-waterfall-wall/PageWaterfallWall.tsx +76 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/page-waterfall-wall/VerticalTicker.tsx +129 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/panel-grid-moves/ComicPanelSplit.tsx +171 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/panel-grid-moves/FlipGridReflow.tsx +121 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/panel-grid-moves/GridFlashMosaic.tsx +182 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/paper-craft-moves/MaskingTapeSlap.tsx +163 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/paper-craft-moves/PopupBookRise.tsx +134 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/paper-plane-messenger/PaperPlaneMessenger.tsx +183 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/particle-celebrate-hits/ConfettiCrossfire.tsx +115 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/particle-celebrate-hits/CounterTickSparks.tsx +103 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/particle-sand-fill/ParticleSandFill.tsx +119 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/pill-slot-cycle/PillSlotCycle.tsx +220 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/print-texture-transitions/InkBleedReveal.tsx +81 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/rhythm-interrupt-moves/JumpCutPunchIn.tsx +72 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/rhythm-interrupt-moves/StrobeBlackFrames.tsx +99 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/riso-print-hits/RisoBeatPump.tsx +155 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/riso-print-hits/RisoMisregistrationHit.tsx +120 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/runway-ground-skim/RunwayGroundSkim.tsx +258 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/sakuga-timing-shift/SakugaTimingShift.tsx +178 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/scene-locked-title/SceneLockedTitle.tsx +98 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/scroll-brake-moves/BrakeReticleLock.tsx +171 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/scroll-brake-moves/ChangelogScrollBrake.tsx +117 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/segmented-thumb-hero/SegmentedThumbHero.tsx +213 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/shot-transitions/MaskWipeReal.tsx +67 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/shot-transitions/PortalWipeV2.tsx +128 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/shot-transitions/WhipBrakeReal.tsx +60 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/shot-transitions/WhipPanReal.tsx +45 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/skeleton-reveal/SkeletonReveal.tsx +283 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/slam-entrance-moves/ImpactBurstKit.tsx +185 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/slam-entrance-moves/KanadaPerspectiveSnap.tsx +91 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/slam-entrance-moves/ScoreSlam.tsx +225 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/smear-multiples/SmearMultiples.tsx +88 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/space-camera-moves/DroneDiveLanding.tsx +91 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/space-camera-moves/ExplodedView.tsx +178 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/space-camera-moves/SnorricamLock.tsx +130 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/spectrum-morph-ui/SpectrumMorphUi.tsx +129 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/speed-ramp-freeze/FreezeAnnotateReal.tsx +70 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/speed-ramp-freeze/SpeedRampReal.tsx +58 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/split-flap-title/SplitFlapFlip.tsx +189 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/spotlight-sweep-moves/CornerSpotlightReveal.tsx +121 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/spotlight-sweep-moves/GlowWakeSleepPanel.tsx +183 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/spotlight-sweep-moves/SlideSpotlightPan.tsx +171 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/steep-tilt-glide/SteepTiltGlide.tsx +315 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/stroke-segment-build/StrokeSegmentBuild.tsx +126 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/tear-streak-transitions/GlitchDisplace.tsx +107 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/tension-camera-moves/BulletTimeFreezeOrbit.tsx +219 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/tension-camera-moves/DutchRollToLevel.tsx +110 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/tension-camera-moves/PullBackIsolation.tsx +120 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/tension-camera-moves/SlowPushIn.tsx +96 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/text-as-mask/TextAsMask.tsx +94 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/text-column-converge/TextColumnConverge.tsx +122 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/theme-switch-moves/PaletteThemeRipple.tsx +207 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/theme-switch-moves/ThemeSweepToggle.tsx +123 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/timeline-travel/TimelineTravel.tsx +123 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/title-demote-to-label/TitleDemoteToLabel.tsx +174 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/trailer-grammar-moves/CardFootageCadence.tsx +118 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/trailer-grammar-moves/SmashCut.tsx +105 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/trailer-grammar-moves/TrailerBumper.tsx +103 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/transition-hidden-cut/InvisibleCut.tsx +93 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/transition-hidden-cut/LightLeakBurn.tsx +122 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/transition-hidden-cut/VersusSlam.tsx +104 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/transition-travel/LetterformZoom.tsx +141 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/transition-travel/SharedElementMorph.tsx +101 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/type-assembly-moves/LetterformDriftAssembly.tsx +107 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/type-assembly-moves/SplitTextStagger.tsx +101 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/type-assembly-moves/TextOnPath.tsx +92 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/type-assembly-moves/TrackingExpandReveal.tsx +109 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/type-entrance-moves/LetterDropPhysics.tsx +100 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/type-entrance-moves/ScrambleDecode.tsx +90 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/type-rhythm-sync/FontWeightPump.tsx +124 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/type-rhythm-sync/KaraokeFillSync.tsx +93 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/typewriter-moves/TerminalTypewriter.tsx +122 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/typewriter-moves/TypewriterErrorRetype.tsx +109 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/ui-strip-away-outro/UiStripAwayOutro.tsx +218 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/ui-to-brand-morph/IconFlipBloomLogo.tsx +199 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/ui-to-brand-morph/InputMorphsIntoLogo.tsx +215 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/voice-waveform-live/VoiceWaveformLive.tsx +171 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/wall-reveal-moves/BentoLightUp.tsx +135 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/wipe-transitions/BlindsSlice.tsx +107 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/wipe-transitions/ClockWipe.tsx +83 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/demos/word-relay-filmstrip/WordRelayFilmstrip.tsx +300 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/template/src/Root.tsx +15 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/template/src/aifl/Caption.tsx +49 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/template/src/aifl/DigitRoll.tsx +44 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/template/src/aifl/FlashCut.tsx +19 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/template/src/aifl/Main.tsx +163 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/template/src/aifl/PaperTitleCard.tsx +89 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/template/src/aifl/live/PageCam.tsx +145 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/template/src/aifl/live/SceneDetail.tsx +146 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/template/src/aifl/live/SceneFlyIn.tsx +447 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/template/src/aifl/live/SceneOpen.tsx +532 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/template/src/aifl/live/SceneOutroLive.tsx +394 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/template/src/aifl/live/ScenePapers.tsx +185 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/template/src/aifl/live/SceneWbr.tsx +299 -0
- package/skills/hyper-animator-codex/references/shotcraft/source/template/src/index.ts +4 -0
- package/skills/hyper-animator-codex/references/shotcraft/source-notes.md +10 -0
- package/skills/hyper-animator-codex/scripts/generate_minimax_music.mjs +27 -10
- package/skills/hyper-animator-codex/scripts/generate_minimax_tts.mjs +142 -13
- package/skills/hyper-animator-codex/scripts/generate_subtitles.mjs +42 -3
- package/skills/hyper-animator-codex/scripts/git_checkpoint.mjs +2 -2
- package/skills/hyper-animator-codex/scripts/minimax_runtime_config.mjs +3 -3
- package/skills/hyper-animator-codex/scripts/query_shotcraft.mjs +140 -0
- package/skills/hyper-animator-codex/scripts/validate_hyperframes_html.py +22 -0
- package/skills/hyper-animator-codex/scripts/validate_provider_policy.mjs +108 -0
- package/skills/hyper-animator-codex/scripts/validate_shot_plan.mjs +266 -0
- package/skills/hyper-animator-codex/vendor/music-beat-detector/beat_detector/analyzer.py +3 -1
- package/skills/hyper-animator-codex/vendor/music-beat-detector/beat_detector/beat.py +37 -1
|
@@ -0,0 +1,788 @@
|
|
|
1
|
+
# HyperFrames AI Generation Patterns
|
|
2
|
+
|
|
3
|
+
生成日期: 2026-06-29
|
|
4
|
+
|
|
5
|
+
来源: HyperFrames 官方 registry `https://raw.githubusercontent.com/heygen-com/hyperframes/main/registry`。本文件基于 133 个可读取 block/component 的 `registry-item.json` 与 132 个源码文件扫描总结,目标是帮助未来用 AI 生成更好看、可渲染、符合 HyperFrames 框架规范的转场、组件和动效。
|
|
6
|
+
|
|
7
|
+
## 1. 核心结论
|
|
8
|
+
|
|
9
|
+
- 绝大多数可动画条目使用 `gsap.timeline({ paused: true })`,并注册到 `window.__timelines[compositionId]`。
|
|
10
|
+
- 完整 block 是独立 HTML composition,根节点通常带 `data-composition-id`、`data-width`、`data-height`、`data-start`、`data-duration`。
|
|
11
|
+
- 可叠加/可复用 component 通常是 snippet,不一定是完整 HTML;应可 paste 到现有 composition 中。
|
|
12
|
+
- 可渲染性优先级高于“炫技”。AI 生成时必须保证 deterministic timeline、固定画布、无交互阻塞、资源加载完成后才注册 timeline。
|
|
13
|
+
- 最稳定的视觉模式是“清晰分层 + scoped CSS + GSAP 驱动状态变化 + 最后一帧 padding 到完整 duration”。
|
|
14
|
+
- 高级 VFX/WebGL/3D 可以做,但必须提供 fallback 或延迟注册策略,否则 preview/render 容易空白。
|
|
15
|
+
|
|
16
|
+
## 2. 扫描统计证据
|
|
17
|
+
|
|
18
|
+
源码扫描结果:
|
|
19
|
+
|
|
20
|
+
- 源码文件: 132 个
|
|
21
|
+
- `gsap.` 出现文件: 124 个
|
|
22
|
+
- `gsap.timeline` 出现文件: 124 个
|
|
23
|
+
- `window.__timelines` 出现文件: 124 个
|
|
24
|
+
- `data-start` 出现文件: 99 个
|
|
25
|
+
- `data-duration` 出现文件: 101 个
|
|
26
|
+
- `data-track-index` 出现文件: 63 个
|
|
27
|
+
- SVG/filter/mask 相关出现文件: 97 个
|
|
28
|
+
- canvas 相关出现文件: 45 个
|
|
29
|
+
- WebGL/shader/Three 相关出现文件: 29 个
|
|
30
|
+
- caption/word/karaoke 相关出现文件: 35 个
|
|
31
|
+
- CSS 变量定义出现文件: 23 个
|
|
32
|
+
- `document.fonts.ready` 出现文件: 9 个
|
|
33
|
+
- 仅 CSS keyframes 作为主动画的文件很少,代表是 `grain-overlay`。
|
|
34
|
+
|
|
35
|
+
读取异常:
|
|
36
|
+
|
|
37
|
+
- `code-morph` 的 manifest 拉取失败。
|
|
38
|
+
- `swirl-vortex.html` 源码拉取失败,但 registry item 可读取。
|
|
39
|
+
|
|
40
|
+
## 3. Block vs Component 生成准则
|
|
41
|
+
|
|
42
|
+
### 3.1 生成 Block 的场景
|
|
43
|
+
|
|
44
|
+
生成完整 block,当它是一个完整镜头、独立段落或可通过 `data-composition-src` 嵌入的 composition。
|
|
45
|
+
|
|
46
|
+
适合:
|
|
47
|
+
|
|
48
|
+
- 一段 5-15 秒的完整开场、结尾、数据图、地图、代码演示、产品展示。
|
|
49
|
+
- 需要独立 width/height/duration 的场景。
|
|
50
|
+
- 需要 preview poster/video 的 registry 条目。
|
|
51
|
+
- 转场 showcase 或单个 shader transition demo。
|
|
52
|
+
|
|
53
|
+
Block 最小结构:
|
|
54
|
+
|
|
55
|
+
```html
|
|
56
|
+
<!doctype html>
|
|
57
|
+
<html lang="en">
|
|
58
|
+
<head>
|
|
59
|
+
<meta charset="UTF-8" />
|
|
60
|
+
<meta name="viewport" content="width=1920, height=1080" />
|
|
61
|
+
<script src="https://cdn.jsdmirror.com/npm/gsap@3.15/dist/gsap.min.js"></script>
|
|
62
|
+
<script>
|
|
63
|
+
if (typeof gsap === 'undefined') {
|
|
64
|
+
document.write('<script src="https://cdn.jsdmirror.cn/npm/gsap@3.15/dist/gsap.min.js"><\/script>');
|
|
65
|
+
}
|
|
66
|
+
</script>
|
|
67
|
+
<script>
|
|
68
|
+
if (typeof gsap === 'undefined') {
|
|
69
|
+
document.write('<script src="https://s4.zstatic.net/npm/gsap@3.15/dist/gsap.min.js"><\/script>');
|
|
70
|
+
}
|
|
71
|
+
</script>
|
|
72
|
+
<style>
|
|
73
|
+
* { box-sizing: border-box; }
|
|
74
|
+
html, body { margin: 0; width: 1920px; height: 1080px; overflow: hidden; }
|
|
75
|
+
[data-composition-id="my-block"] { position: relative; width: 1920px; height: 1080px; overflow: hidden; }
|
|
76
|
+
</style>
|
|
77
|
+
</head>
|
|
78
|
+
<body>
|
|
79
|
+
<div id="root" data-composition-id="my-block" data-start="0" data-duration="8" data-width="1920" data-height="1080">
|
|
80
|
+
<div class="clip" data-start="0" data-duration="8" data-track-index="0">
|
|
81
|
+
<!-- visual layers -->
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
<script>
|
|
85
|
+
(function () {
|
|
86
|
+
window.__timelines = window.__timelines || {};
|
|
87
|
+
var tl = gsap.timeline({ paused: true });
|
|
88
|
+
// set initial states
|
|
89
|
+
// add tweens
|
|
90
|
+
tl.to({}, { duration: 8 }, 0); // pad to full duration
|
|
91
|
+
window.__timelines["my-block"] = tl;
|
|
92
|
+
})();
|
|
93
|
+
</script>
|
|
94
|
+
</body>
|
|
95
|
+
</html>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### 3.2 生成 Component 的场景
|
|
99
|
+
|
|
100
|
+
生成 component,当它应该被 paste 到另一个 composition,而不是独立成片。
|
|
101
|
+
|
|
102
|
+
适合:
|
|
103
|
+
|
|
104
|
+
- 质感覆盖层: grain、vignette、shimmer。
|
|
105
|
+
- 可复用效果函数: motion blur、texture mask、morph text。
|
|
106
|
+
- 字幕样式: caption-*。
|
|
107
|
+
- 转场 helper: parallax zoom/unzoom、grid pixelate wipe。
|
|
108
|
+
|
|
109
|
+
Component 最小结构:
|
|
110
|
+
|
|
111
|
+
```html
|
|
112
|
+
<!--
|
|
113
|
+
Component Name - short description.
|
|
114
|
+
|
|
115
|
+
Usage:
|
|
116
|
+
Paste this snippet into a HyperFrames composition.
|
|
117
|
+
If it needs a timeline, call its attach/build function after creating the main tl and before window.__timelines registration.
|
|
118
|
+
-->
|
|
119
|
+
|
|
120
|
+
<div id="my-component" class="hf-my-component" aria-hidden="true"></div>
|
|
121
|
+
|
|
122
|
+
<style>
|
|
123
|
+
#my-component { position: absolute; inset: 0; pointer-events: none; z-index: 100; }
|
|
124
|
+
</style>
|
|
125
|
+
|
|
126
|
+
<script>
|
|
127
|
+
(function () {
|
|
128
|
+
window.attachMyComponent = function (tl, options) {
|
|
129
|
+
options = options || {};
|
|
130
|
+
// attach tweens or runtime effect to the caller timeline
|
|
131
|
+
};
|
|
132
|
+
})();
|
|
133
|
+
</script>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## 4. Timeline 注册范式
|
|
137
|
+
|
|
138
|
+
### 4.1 标准同步注册
|
|
139
|
+
|
|
140
|
+
适合无需等待字体、图片、GLTF、WebGL 编译的普通动效。
|
|
141
|
+
|
|
142
|
+
```js
|
|
143
|
+
window.__timelines = window.__timelines || {};
|
|
144
|
+
var tl = gsap.timeline({ paused: true });
|
|
145
|
+
|
|
146
|
+
gsap.set(".card", { opacity: 0, y: 24 });
|
|
147
|
+
tl.to(".card", { opacity: 1, y: 0, duration: 0.55, ease: "power3.out" }, 0.2);
|
|
148
|
+
tl.to(".card", { opacity: 0, y: 18, duration: 0.35, ease: "power2.in" }, 4.3);
|
|
149
|
+
tl.set(".card", { visibility: "hidden" }, 4.75);
|
|
150
|
+
|
|
151
|
+
window.__timelines["my-id"] = tl;
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
来自: lower-third 系列、社媒卡片、通知卡片。
|
|
155
|
+
|
|
156
|
+
### 4.2 等字体后注册
|
|
157
|
+
|
|
158
|
+
适合代码排版、逐字输入、需要 `getBoundingClientRect()` 或 canvas text measurement 的效果。关键点是: 不要先注册空 timeline,否则作为 sub-composition 时 runtime 可能把空 timeline 嵌进去,后续不会重绑。
|
|
159
|
+
|
|
160
|
+
```js
|
|
161
|
+
function go() {
|
|
162
|
+
var root = document.getElementById("root");
|
|
163
|
+
var tl = gsap.timeline({ paused: true });
|
|
164
|
+
|
|
165
|
+
document.fonts.ready.then(function () {
|
|
166
|
+
buildLayoutAndTweens(tl);
|
|
167
|
+
var dur = parseFloat(root.dataset.duration) || tl.duration();
|
|
168
|
+
tl.to({}, { duration: dur }, 0);
|
|
169
|
+
window.__timelines = window.__timelines || {};
|
|
170
|
+
window.__timelines["my-code-block"] = tl;
|
|
171
|
+
if (typeof window.__hfForceTimelineRebind === "function") {
|
|
172
|
+
window.__hfForceTimelineRebind();
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
if (document.readyState === "loading") document.addEventListener("DOMContentLoaded", go);
|
|
178
|
+
else go();
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
来自: `code-typing`、`code-highlight`、`code-scroll`。
|
|
182
|
+
|
|
183
|
+
### 4.3 等资源后注册
|
|
184
|
+
|
|
185
|
+
适合 GLTF/3D、外部纹理、截图到 canvas 的设备展示。关键点是所有关键资源 ready 以后再注册 timeline。
|
|
186
|
+
|
|
187
|
+
```js
|
|
188
|
+
var tl = gsap.timeline({ paused: true });
|
|
189
|
+
tl.to(state, { p: 1, duration: DURATION, ease: "none", onUpdate: render }, 0);
|
|
190
|
+
|
|
191
|
+
function onReady() {
|
|
192
|
+
requestAnimationFrame(function () {
|
|
193
|
+
requestAnimationFrame(function () {
|
|
194
|
+
captureScreens();
|
|
195
|
+
window.__timelines = window.__timelines || {};
|
|
196
|
+
window.__timelines["devices-canvas"] = tl;
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
来自: `vfx-iphone-device`。
|
|
203
|
+
|
|
204
|
+
### 4.4 WebGL fallback 注册
|
|
205
|
+
|
|
206
|
+
适合 shader 转场、WebGL VFX。关键点是 `gl` 不可用时也必须注册一个 paused timeline,避免 renderer 挂住。
|
|
207
|
+
|
|
208
|
+
```js
|
|
209
|
+
window.__timelines = window.__timelines || {};
|
|
210
|
+
var gl = canvas.getContext("webgl", { preserveDrawingBuffer: true });
|
|
211
|
+
|
|
212
|
+
if (!gl) {
|
|
213
|
+
console.warn("WebGL not available");
|
|
214
|
+
window.__timelines["main"] = gsap.timeline({ paused: true });
|
|
215
|
+
} else {
|
|
216
|
+
var tl = gsap.timeline({
|
|
217
|
+
paused: true,
|
|
218
|
+
onUpdate: function () {
|
|
219
|
+
renderShader(tl.time());
|
|
220
|
+
},
|
|
221
|
+
});
|
|
222
|
+
tl.to({ v: 0 }, { v: 1, duration: DURATION, ease: "none" }, 0);
|
|
223
|
+
window.__timelines["main"] = tl;
|
|
224
|
+
}
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
来自: shader transition 系列、`vfx-text-cursor`。
|
|
228
|
+
|
|
229
|
+
## 5. Visual Quality Patterns
|
|
230
|
+
|
|
231
|
+
### 5.1 好看的 composition 通常有 4 层
|
|
232
|
+
|
|
233
|
+
推荐分层:
|
|
234
|
+
|
|
235
|
+
1. Atmosphere: 背景渐变、网格、光晕、噪声、地图底图或柔和 vignette。
|
|
236
|
+
2. Subject: 主要卡片、设备、文字、图表、代码窗口。
|
|
237
|
+
3. Motion Accent: 扫光、粒子、描边、cursor、connector、line draw、mask reveal。
|
|
238
|
+
4. Focus/Finish: 下三分之一、标签、source note、logo、CTA、exit fade。
|
|
239
|
+
|
|
240
|
+
生成时不要只画一个居中白卡。至少给背景、主元素、动效重点各一个明确设计决策。
|
|
241
|
+
|
|
242
|
+
### 5.2 最常见的入场/出场组合
|
|
243
|
+
|
|
244
|
+
稳定组合:
|
|
245
|
+
|
|
246
|
+
- `clip-path: inset(...)` 做横向/纵向 wipe。
|
|
247
|
+
- `opacity + y` 做文字上升。
|
|
248
|
+
- `scale + blur` 做卡片/设备柔和入场。
|
|
249
|
+
- `drawSVG` 类效果可用 SVG path dasharray/dashoffset 替代插件。
|
|
250
|
+
- 退出时不要只 opacity 0,最好加轻微 y/scale/blur,最后 `visibility: hidden`。
|
|
251
|
+
|
|
252
|
+
示例:
|
|
253
|
+
|
|
254
|
+
```js
|
|
255
|
+
gsap.set(card, { clipPath: "inset(0 100% 0 0)" });
|
|
256
|
+
gsap.set(title, { y: 22, opacity: 0 });
|
|
257
|
+
|
|
258
|
+
tl.to(card, { clipPath: "inset(0 0% 0 0)", duration: 0.55, ease: "power3.out" }, 0.1);
|
|
259
|
+
tl.to(title, { y: 0, opacity: 1, duration: 0.5, ease: "power3.out" }, 0.34);
|
|
260
|
+
tl.to(card, { y: 18, opacity: 0, duration: 0.35, ease: "power2.in" }, DURATION - 0.5);
|
|
261
|
+
tl.set(card, { visibility: "hidden" }, DURATION - 0.05);
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
### 5.3 CSS scoping
|
|
265
|
+
|
|
266
|
+
Block 内 CSS 应用 `[data-composition-id="..."]` scope,避免作为 sub-composition 或 snippet 时污染外部。
|
|
267
|
+
|
|
268
|
+
```css
|
|
269
|
+
[data-composition-id="data-chart"] .headline { ... }
|
|
270
|
+
[data-composition-id="data-chart"] .bar { ... }
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
Component 应使用唯一 id 或 `hf-` 前缀类名。
|
|
274
|
+
|
|
275
|
+
```css
|
|
276
|
+
#grain-overlay .grain-texture { ... }
|
|
277
|
+
.hf-caption-highlight .caption-word { ... }
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### 5.4 CSS 变量接口
|
|
281
|
+
|
|
282
|
+
当效果需要可调色彩/强度,优先暴露 CSS custom properties。VS Code theme 和 liquid glass 系列大量使用这一范式。
|
|
283
|
+
|
|
284
|
+
```css
|
|
285
|
+
[data-composition-id="my-card"] {
|
|
286
|
+
--accent: #ff5a36;
|
|
287
|
+
--surface: #ffffff;
|
|
288
|
+
--text: #0f1115;
|
|
289
|
+
--shadow-opacity: 0.18;
|
|
290
|
+
}
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
生成 registry item 时可把重要变量写入 `params`,例如 `--bg-color`、`--text-color`。
|
|
294
|
+
|
|
295
|
+
## 6. 转场生成范式
|
|
296
|
+
|
|
297
|
+
### 6.1 普通 HTML/CSS 转场
|
|
298
|
+
|
|
299
|
+
适合 cover、push、blur、radial、scale、grid。结构上放两个 scene,再用 mask/clip/transform 过渡。
|
|
300
|
+
|
|
301
|
+
```html
|
|
302
|
+
<div id="root" data-composition-id="main" data-duration="4" data-width="1920" data-height="1080">
|
|
303
|
+
<section id="scene-a" class="scene">...</section>
|
|
304
|
+
<section id="scene-b" class="scene">...</section>
|
|
305
|
+
<div class="transition-mask"></div>
|
|
306
|
+
</div>
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
```js
|
|
310
|
+
gsap.set(sceneB, { opacity: 0, scale: 1.04 });
|
|
311
|
+
tl.to(sceneA, { scale: 0.97, filter: "blur(8px)", duration: 1.1, ease: "power2.inOut" }, 1.2);
|
|
312
|
+
tl.to(sceneB, { opacity: 1, scale: 1, duration: 1.1, ease: "power2.inOut" }, 1.2);
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
### 6.2 Shader 转场
|
|
316
|
+
|
|
317
|
+
代表条目: `domain-warp-dissolve`、`ridged-burn`、`whip-pan`、`sdf-iris`、`ripple-waves`、`gravitational-lens`、`cinematic-zoom`、`chromatic-radial-split`、`glitch`、`thermal-distortion`、`flash-through-white`、`cross-warp-morph`、`light-leak`。
|
|
318
|
+
|
|
319
|
+
范式:
|
|
320
|
+
|
|
321
|
+
- 用 DOM scene 先构建 from/to。
|
|
322
|
+
- 用 canvas 捕获 scene 到 texture。
|
|
323
|
+
- fragment shader 接收 `u_from`、`u_to`、`u_progress`、`u_resolution`。
|
|
324
|
+
- timeline `onUpdate` 用 `tl.time()` 转为 progress。
|
|
325
|
+
- WebGL 不可用时注册空 timeline 或 fallback DOM fade。
|
|
326
|
+
|
|
327
|
+
AI 生成 shader 时应控制复杂度:
|
|
328
|
+
|
|
329
|
+
- 必须有 deterministic noise,不要依赖实时随机。
|
|
330
|
+
- `u_progress` 必须 clamp 到 `[0,1]`。
|
|
331
|
+
- shader 编译失败要 `console.error`,不要 throw 到阻断注册。
|
|
332
|
+
- fragment shader 字符串要保持短且可读,避免生成超大不可维护代码。
|
|
333
|
+
|
|
334
|
+
### 6.3 转场不要做的事
|
|
335
|
+
|
|
336
|
+
- 不要用 `setInterval` 或无限 `requestAnimationFrame` 驱动主进度;应该让 HyperFrames seek timeline。
|
|
337
|
+
- 不要把进度绑定到 wall-clock `Date.now()`。
|
|
338
|
+
- 不要假设用户交互或 hover。
|
|
339
|
+
- 不要在 render frame 中创建大量 DOM/texture。
|
|
340
|
+
|
|
341
|
+
## 7. Component 生成范式
|
|
342
|
+
|
|
343
|
+
### 7.1 Overlay component
|
|
344
|
+
|
|
345
|
+
代表: `grain-overlay`、`vignette`。
|
|
346
|
+
|
|
347
|
+
特点:
|
|
348
|
+
|
|
349
|
+
- 无需 GSAP timeline。
|
|
350
|
+
- absolute full viewport。
|
|
351
|
+
- `pointer-events: none`。
|
|
352
|
+
- z-index 可调。
|
|
353
|
+
- 可用 CSS keyframes,但要简短、steps 或 deterministic。
|
|
354
|
+
|
|
355
|
+
```html
|
|
356
|
+
<div id="hf-vignette" aria-hidden="true"></div>
|
|
357
|
+
<style>
|
|
358
|
+
#hf-vignette {
|
|
359
|
+
position: absolute;
|
|
360
|
+
inset: 0;
|
|
361
|
+
pointer-events: none;
|
|
362
|
+
z-index: 90;
|
|
363
|
+
background: radial-gradient(circle at center, transparent 50%, rgba(0,0,0,.34) 100%);
|
|
364
|
+
}
|
|
365
|
+
</style>
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
### 7.2 Timeline-attached component
|
|
369
|
+
|
|
370
|
+
代表: `motion-blur`。
|
|
371
|
+
|
|
372
|
+
特点:
|
|
373
|
+
|
|
374
|
+
- 提供 `attachX(selector, tl, options)`。
|
|
375
|
+
- 调用时机写清楚: 在所有 tween 定义后、`window.__timelines` 注册前。
|
|
376
|
+
- 如果需要 per-frame update,不依赖 `tl.eventCallback("onUpdate")`;可添加一个 duration driver tween,用 tween `onUpdate` 适配 HyperFrames renderer 的 seek。
|
|
377
|
+
|
|
378
|
+
```js
|
|
379
|
+
var proxy = { t: 0 };
|
|
380
|
+
tl.to(proxy, {
|
|
381
|
+
t: 1,
|
|
382
|
+
duration: Math.max(tl.duration(), 0.1),
|
|
383
|
+
ease: "none",
|
|
384
|
+
onUpdate: function () {
|
|
385
|
+
// read gsap.getProperty(target, "x") / "y" and update effect
|
|
386
|
+
}
|
|
387
|
+
}, 0);
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
### 7.3 Text effect component
|
|
391
|
+
|
|
392
|
+
代表: `shimmer-sweep`、`texture-mask-text`、`morph-text`、`caption-blend-difference`。
|
|
393
|
+
|
|
394
|
+
生成建议:
|
|
395
|
+
|
|
396
|
+
- 支持传 selector 或写明需要包裹的 DOM。
|
|
397
|
+
- 使用 mask/filter/blend-mode 时提供 fallback color。
|
|
398
|
+
- 文字效果应支持短文本和多词文本,避免只适配单个 demo 单词。
|
|
399
|
+
- 使用 SVG filter 时,id 要唯一,避免多个实例冲突。
|
|
400
|
+
|
|
401
|
+
## 8. Caption 生成范式
|
|
402
|
+
|
|
403
|
+
代表: `caption-pill-karaoke`、`caption-neon-accent`、`caption-weight-shift`、`caption-emoji-pop`、`caption-editorial-emphasis`、`caption-parallax-layers`、`caption-glitch-rgb`、`caption-matrix-decode`、`caption-particle-burst`、`caption-texture`、`caption-clip-wipe`、`caption-kinetic-slam`、`caption-gradient-fill`、`caption-neon-glow`、`caption-highlight`。
|
|
404
|
+
|
|
405
|
+
### 8.1 Caption 数据结构
|
|
406
|
+
|
|
407
|
+
推荐接受 word-level transcript:
|
|
408
|
+
|
|
409
|
+
```js
|
|
410
|
+
var TRANSCRIPT = [
|
|
411
|
+
{ text: "Every", start: 0.0, end: 0.3 },
|
|
412
|
+
{ text: "great", start: 0.3, end: 0.55 },
|
|
413
|
+
{ text: "video", start: 0.55, end: 0.85 }
|
|
414
|
+
];
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
Normalize:
|
|
418
|
+
|
|
419
|
+
```js
|
|
420
|
+
function normalizeWords(rawWords) {
|
|
421
|
+
return rawWords.map(function (item) {
|
|
422
|
+
var text = String(item.word || item.text || "").trim();
|
|
423
|
+
return {
|
|
424
|
+
text: text,
|
|
425
|
+
start: Math.max(0, Number(item.start) || 0),
|
|
426
|
+
end: Math.max(Number(item.start) || 0, Number(item.end) || 0)
|
|
427
|
+
};
|
|
428
|
+
}).filter(function (w) { return w.text.length > 0; });
|
|
429
|
+
}
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
### 8.2 Caption 分组策略
|
|
433
|
+
|
|
434
|
+
源码中常见策略:
|
|
435
|
+
|
|
436
|
+
- 按 `MAX_WORDS_PER_GROUP` 控制每组词数。
|
|
437
|
+
- 遇到标点、自然停顿、下一组太宽时断组。
|
|
438
|
+
- 使用 canvas measureText 估算宽度。
|
|
439
|
+
- 字体过宽时从 base font size 逐步降到 min font size。
|
|
440
|
+
- 每组可见时间从第一个词 start 到最后词 end,并加 buffer。
|
|
441
|
+
|
|
442
|
+
AI 生成字幕组件时必须处理:
|
|
443
|
+
|
|
444
|
+
- 长词。
|
|
445
|
+
- 两行布局。
|
|
446
|
+
- 口播停顿。
|
|
447
|
+
- 最后一组持续到 duration 结束。
|
|
448
|
+
- active word 与 inactive word 的区别。
|
|
449
|
+
|
|
450
|
+
### 8.3 Caption timeline
|
|
451
|
+
|
|
452
|
+
```js
|
|
453
|
+
window.__timelines = window.__timelines || {};
|
|
454
|
+
var tl = gsap.timeline({ paused: true });
|
|
455
|
+
|
|
456
|
+
GROUPS.forEach(function (group, groupIndex) {
|
|
457
|
+
var groupEl = document.getElementById("caption-group-" + groupIndex);
|
|
458
|
+
var visibleStart = Math.max(0, group.start);
|
|
459
|
+
var visibleEnd = Math.min(DURATION, group.end + 0.3);
|
|
460
|
+
|
|
461
|
+
tl.set(groupEl, { opacity: 1 }, visibleStart);
|
|
462
|
+
tl.set(groupEl, { opacity: 0 }, visibleEnd);
|
|
463
|
+
|
|
464
|
+
group.words.forEach(function (word, wordIndex) {
|
|
465
|
+
var wordEl = document.getElementById("caption-word-" + groupIndex + "-" + wordIndex);
|
|
466
|
+
tl.to(wordEl, { color: ACTIVE, duration: 0.1, ease: "none" }, word.start - 0.05);
|
|
467
|
+
});
|
|
468
|
+
});
|
|
469
|
+
|
|
470
|
+
window.__timelines["caption-style-id"] = tl;
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
### 8.4 Caption visual quality rules
|
|
474
|
+
|
|
475
|
+
- 短视频风格: high contrast, big type, clear active word.
|
|
476
|
+
- Editorial 风格: dual-font, size contrast, restrained color.
|
|
477
|
+
- Gaming/cyber 风格: glow, RGB split, scanline, but keep readability.
|
|
478
|
+
- Parallax/3D 风格: use depth sparingly; do not obscure face/safe zone.
|
|
479
|
+
- Always keep safe zone, usually bottom center, width around 1400-1600 px for 1920x1080.
|
|
480
|
+
|
|
481
|
+
## 9. Code/Terminal 生成范式
|
|
482
|
+
|
|
483
|
+
### 9.1 Terminal blocks
|
|
484
|
+
|
|
485
|
+
代表: Apple Terminal profiles。
|
|
486
|
+
|
|
487
|
+
范式:
|
|
488
|
+
|
|
489
|
+
- 固定 terminal window chrome。
|
|
490
|
+
- `COMMANDS` 或 lines array 作为数据。
|
|
491
|
+
- per-character typing。
|
|
492
|
+
- Cursor blink/position 由 timeline 控制,不能依赖 real-time CSS animation。
|
|
493
|
+
- 主题差异通过 colors/font/background 配置,而不是复制大量逻辑。
|
|
494
|
+
|
|
495
|
+
### 9.2 VS Code blocks
|
|
496
|
+
|
|
497
|
+
代表: `code-snippet-*`。
|
|
498
|
+
|
|
499
|
+
范式:
|
|
500
|
+
|
|
501
|
+
- Workbench chrome: titlebar, activity bar, sidebar, tabs, editor, terminal, statusbar。
|
|
502
|
+
- Theme tokens 映射到 CSS variables。
|
|
503
|
+
- Code tokens 是结构化数组 `{ text, token }`。
|
|
504
|
+
- `renderCode(root)` 生成 line/token spans。
|
|
505
|
+
- `buildTimeline(root, compositionId)` 处理 typing/caret/highlight。
|
|
506
|
+
|
|
507
|
+
推荐数据结构:
|
|
508
|
+
|
|
509
|
+
```js
|
|
510
|
+
var CODE_LINES = [
|
|
511
|
+
[{ text: "function", token: "keyword" }, { text: " build", token: "function" }],
|
|
512
|
+
[{ text: " return", token: "keyword" }, { text: " frame", token: "variable" }]
|
|
513
|
+
];
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
### 9.3 代码演示质量规则
|
|
517
|
+
|
|
518
|
+
- 使用等宽字体,不要默认 system monospace;优先 JetBrains Mono、SF Mono、IBM Plex Mono 等。
|
|
519
|
+
- 字号应可读,1080p 建议 26-34px。
|
|
520
|
+
- 不要一次展示太多代码;聚焦 6-14 行。
|
|
521
|
+
- 加 active line/highlight/caret,帮助观众知道该看哪里。
|
|
522
|
+
- 如果使用 `getBoundingClientRect()` 定位 caret/highlight,必须等 `document.fonts.ready`。
|
|
523
|
+
|
|
524
|
+
## 10. Data / Map / Diagram 范式
|
|
525
|
+
|
|
526
|
+
代表: `data-chart`、`us-map`、`world-map`、`flowchart`。
|
|
527
|
+
|
|
528
|
+
### 10.1 数据图
|
|
529
|
+
|
|
530
|
+
范式:
|
|
531
|
+
|
|
532
|
+
- 数据 array 写在 script 顶部。
|
|
533
|
+
- SVG 动态创建 gridlines/bars/labels/paths。
|
|
534
|
+
- 使用 scale 函数计算位置。
|
|
535
|
+
- 入场顺序: headline wipe -> legend fade -> gridline fade -> bars stagger -> line draw -> labels fade。
|
|
536
|
+
- source note 最后淡入。
|
|
537
|
+
|
|
538
|
+
```js
|
|
539
|
+
var tl = gsap.timeline({ paused: true });
|
|
540
|
+
tl.to(".headline", { clipPath: "inset(0 0% 0 0)", duration: 0.7 }, 0.2);
|
|
541
|
+
tl.to(".grid-line", { opacity: 1, stagger: 0.05, duration: 0.4 }, 0.8);
|
|
542
|
+
tl.fromTo(".bar", { scaleY: 0 }, { scaleY: 1, transformOrigin: "bottom", stagger: 0.12, duration: 0.8 }, 1.1);
|
|
543
|
+
tl.to(".conversion-path", { strokeDashoffset: 0, duration: 1.2 }, 2.0);
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
### 10.2 地图
|
|
547
|
+
|
|
548
|
+
范式:
|
|
549
|
+
|
|
550
|
+
- 地图最好用 SVG path,不依赖 remote map tiles。
|
|
551
|
+
- Choropleth 使用 fill scale + stagger reveal。
|
|
552
|
+
- Flow/bubble map 使用 arc/path/circle + labels。
|
|
553
|
+
- 地理解释类 YouTube insert 可配合 marker、scribble circle、callout label、editorial wash。
|
|
554
|
+
|
|
555
|
+
### 10.3 Flowchart
|
|
556
|
+
|
|
557
|
+
范式:
|
|
558
|
+
|
|
559
|
+
- Node 是普通 DOM 卡片。
|
|
560
|
+
- Connector 是 SVG path/line。
|
|
561
|
+
- Timeline 先入场 node,再 draw connector,再 cursor/typing correction。
|
|
562
|
+
- Portrait variant 应单独设计,不要只 scale 16:9。
|
|
563
|
+
|
|
564
|
+
## 11. 3D / WebGL / HTML-in-Canvas 范式
|
|
565
|
+
|
|
566
|
+
### 11.1 HTML-in-Canvas / drawElementImage
|
|
567
|
+
|
|
568
|
+
代表: `vfx-iphone-device`、liquid glass 系列。
|
|
569
|
+
|
|
570
|
+
范式:
|
|
571
|
+
|
|
572
|
+
- DOM 写出真实 UI。
|
|
573
|
+
- Canvas/Three 获取 DOM 纹理或截屏。
|
|
574
|
+
- 动画状态对象 `S` 驱动 camera/device/UI values。
|
|
575
|
+
- Timeline tween `S`,`onUpdate: render`。
|
|
576
|
+
- 资源 ready 后捕获屏幕并注册 timeline。
|
|
577
|
+
|
|
578
|
+
### 11.2 Liquid Glass
|
|
579
|
+
|
|
580
|
+
代表: `liquid-glass-context-menu`、`liquid-glass-notification`、`liquid-glass-media-controls`。
|
|
581
|
+
|
|
582
|
+
范式:
|
|
583
|
+
|
|
584
|
+
- 大量 CSS variables 描述材质: blur、refraction、corner radius、specular、fresnel、chrom aberration、tint、brightness、saturation。
|
|
585
|
+
- 一个背景 canvas 或 Three shader。
|
|
586
|
+
- 一个 glass canvas 或 layout subtree 承载玻璃面板。
|
|
587
|
+
- Timeline 既驱动 DOM 位置,也触发 `requestGlassRender(tl.time())`。
|
|
588
|
+
|
|
589
|
+
### 11.3 3D 设备展示
|
|
590
|
+
|
|
591
|
+
范式:
|
|
592
|
+
|
|
593
|
+
- GLTF model load 后才 register timeline。
|
|
594
|
+
- 设备运动拆成 acts: hero close-up, spin, exit, second device enter, turntable。
|
|
595
|
+
- Camera values、device transforms、screen scroll/counter/card reveal 用同一个 state object。
|
|
596
|
+
- Render loop必须由 timeline seek 驱动,避免 real-time drift。
|
|
597
|
+
|
|
598
|
+
## 12. Registry Item 生成建议
|
|
599
|
+
|
|
600
|
+
Block registry item:
|
|
601
|
+
|
|
602
|
+
```json
|
|
603
|
+
{
|
|
604
|
+
"$schema": "https://hyperframes.heygen.com/schema/registry-item.json",
|
|
605
|
+
"name": "my-transition",
|
|
606
|
+
"type": "hyperframes:block",
|
|
607
|
+
"title": "My Transition",
|
|
608
|
+
"description": "A concise description of the visual effect",
|
|
609
|
+
"tags": ["transition", "shader"],
|
|
610
|
+
"dimensions": { "width": 1920, "height": 1080 },
|
|
611
|
+
"duration": 4,
|
|
612
|
+
"files": [
|
|
613
|
+
{ "path": "my-transition.html", "target": "compositions/my-transition.html", "type": "hyperframes:composition" }
|
|
614
|
+
],
|
|
615
|
+
"params": [
|
|
616
|
+
{ "key": "--accent", "label": "Accent", "type": "color", "default": "#58a6ff" }
|
|
617
|
+
]
|
|
618
|
+
}
|
|
619
|
+
```
|
|
620
|
+
|
|
621
|
+
Component registry item:
|
|
622
|
+
|
|
623
|
+
```json
|
|
624
|
+
{
|
|
625
|
+
"name": "my-overlay",
|
|
626
|
+
"type": "hyperframes:component",
|
|
627
|
+
"title": "My Overlay",
|
|
628
|
+
"description": "A reusable overlay component",
|
|
629
|
+
"tags": ["overlay", "effect"],
|
|
630
|
+
"files": [
|
|
631
|
+
{ "path": "my-overlay.html", "target": "compositions/components/my-overlay.html", "type": "hyperframes:snippet" }
|
|
632
|
+
]
|
|
633
|
+
}
|
|
634
|
+
```
|
|
635
|
+
|
|
636
|
+
## 13. AI Prompt Checklist
|
|
637
|
+
|
|
638
|
+
When asking AI to generate a HyperFrames effect, include:
|
|
639
|
+
|
|
640
|
+
- Output type: block or component.
|
|
641
|
+
- Canvas: `1920x1080` or portrait dimensions.
|
|
642
|
+
- Duration: exact seconds.
|
|
643
|
+
- Visual direction: typography, color palette, mood, references.
|
|
644
|
+
- Data/content: transcript, code lines, map values, labels, social post content.
|
|
645
|
+
- Runtime constraints: use GSAP timeline, paused, register to `window.__timelines[id]`.
|
|
646
|
+
- Resource constraints: inline SVG/CSS preferred; external assets only if registry will include them.
|
|
647
|
+
- Fallback needs: WebGL/Three/GLTF fallback or delayed timeline registration.
|
|
648
|
+
- Integration: for component, explain paste location and any `attachX()` call.
|
|
649
|
+
|
|
650
|
+
Reusable prompt skeleton:
|
|
651
|
+
|
|
652
|
+
```text
|
|
653
|
+
Generate a HyperFrames [block/component] named [id].
|
|
654
|
+
It must render at [width]x[height], duration [seconds]s.
|
|
655
|
+
Use a paused GSAP timeline and register it as window.__timelines["[id]"].
|
|
656
|
+
Use scoped CSS under [data-composition-id="[id]"] or a unique component id.
|
|
657
|
+
Avoid wall-clock time, hover, user interaction, and unbounded requestAnimationFrame loops.
|
|
658
|
+
If measuring text, wait for document.fonts.ready before registering the timeline.
|
|
659
|
+
If using WebGL/Three/assets, register only after resources are ready and provide a safe fallback.
|
|
660
|
+
Visual direction: [specific mood, typography, palette, layout].
|
|
661
|
+
Content/data: [specific content].
|
|
662
|
+
Return complete HTML and, if registry-ready, include registry-item.json.
|
|
663
|
+
```
|
|
664
|
+
|
|
665
|
+
## 14. Anti-Patterns To Avoid
|
|
666
|
+
|
|
667
|
+
- Registering `window.__timelines[id]` before the timeline is populated when async setup is required.
|
|
668
|
+
- Relying on CSS animations for primary timing when the renderer seeks the GSAP timeline.
|
|
669
|
+
- Using `Date.now()` or real-time RAF to determine animation progress.
|
|
670
|
+
- Missing `data-duration`, `data-width`, `data-height`, or timeline padding.
|
|
671
|
+
- Global CSS selectors that pollute the host composition.
|
|
672
|
+
- Non-unique SVG filter ids in reusable components.
|
|
673
|
+
- Huge unscoped external dependencies when vanilla SVG/CSS/GSAP is enough.
|
|
674
|
+
- Visual center-only layouts with no atmosphere, no accent motion, no hierarchy.
|
|
675
|
+
- Text too small for video or contrast too low for captions.
|
|
676
|
+
- WebGL code that throws before registering fallback timeline.
|
|
677
|
+
|
|
678
|
+
## 15. Category-Specific Generation Recipes
|
|
679
|
+
|
|
680
|
+
### Lower Third
|
|
681
|
+
|
|
682
|
+
Use when: interviews, podcasts, expert intro, news overlays.
|
|
683
|
+
|
|
684
|
+
Recipe:
|
|
685
|
+
|
|
686
|
+
- Transparent body.
|
|
687
|
+
- Position at lower left, inside safe margins.
|
|
688
|
+
- One accent element: tab, underline, side rule, or role bar.
|
|
689
|
+
- Name large and high contrast; role smaller and muted.
|
|
690
|
+
- Entry: card wipe + accent grow + text rise.
|
|
691
|
+
- Exit: y/opacity out + visibility hidden.
|
|
692
|
+
|
|
693
|
+
### Social Card Overlay
|
|
694
|
+
|
|
695
|
+
Use when: X/Reddit/Spotify/YouTube/notification inserts.
|
|
696
|
+
|
|
697
|
+
Recipe:
|
|
698
|
+
|
|
699
|
+
- Card with platform-specific chrome.
|
|
700
|
+
- Avatar/icon, account, content, metrics/status.
|
|
701
|
+
- Entry: scale-pop or slide from edge.
|
|
702
|
+
- Inner stagger: avatar -> text -> metrics -> CTA.
|
|
703
|
+
- Keep `pointer-events: none` if overlay component.
|
|
704
|
+
|
|
705
|
+
### Caption Style
|
|
706
|
+
|
|
707
|
+
Use when: talking-head short-form video.
|
|
708
|
+
|
|
709
|
+
Recipe:
|
|
710
|
+
|
|
711
|
+
- Word-level transcript.
|
|
712
|
+
- Group into 2-4 words, split into max 2 lines.
|
|
713
|
+
- Safe zone bottom center.
|
|
714
|
+
- Timeline controls group visibility and active word.
|
|
715
|
+
- Prioritize readability over decorative effects.
|
|
716
|
+
|
|
717
|
+
### Shader Transition
|
|
718
|
+
|
|
719
|
+
Use when: premium scene change.
|
|
720
|
+
|
|
721
|
+
Recipe:
|
|
722
|
+
|
|
723
|
+
- Two DOM scenes.
|
|
724
|
+
- Capture to textures.
|
|
725
|
+
- Fragment shader blends with `u_progress`.
|
|
726
|
+
- Timeline `onUpdate` renders progress.
|
|
727
|
+
- WebGL fallback registers timeline.
|
|
728
|
+
|
|
729
|
+
### Code Demo
|
|
730
|
+
|
|
731
|
+
Use when: developer product, AI coding tool, tutorial.
|
|
732
|
+
|
|
733
|
+
Recipe:
|
|
734
|
+
|
|
735
|
+
- Editor or terminal chrome.
|
|
736
|
+
- Structured code tokens or command lines.
|
|
737
|
+
- Wait for fonts before metrics.
|
|
738
|
+
- Typing/caret/highlight line tell the story.
|
|
739
|
+
- Use theme CSS variables for reuse.
|
|
740
|
+
|
|
741
|
+
### Product/Device 3D
|
|
742
|
+
|
|
743
|
+
Use when: app launches, device UI showcase.
|
|
744
|
+
|
|
745
|
+
Recipe:
|
|
746
|
+
|
|
747
|
+
- DOM UI captured as texture.
|
|
748
|
+
- GLTF or CSS 3D device.
|
|
749
|
+
- State object drives camera, transforms, screen content.
|
|
750
|
+
- Wait for assets; register timeline only when ready.
|
|
751
|
+
- Acts-based choreography, not random spinning.
|
|
752
|
+
|
|
753
|
+
## 16. Fast Quality Rubric
|
|
754
|
+
|
|
755
|
+
Before accepting AI-generated HyperFrames code, check:
|
|
756
|
+
|
|
757
|
+
- Does it register a paused timeline with the correct id?
|
|
758
|
+
- Does the timeline cover the declared duration?
|
|
759
|
+
- Is the visual scope fixed to the declared dimensions?
|
|
760
|
+
- Are all CSS selectors scoped or unique?
|
|
761
|
+
- Are async resources handled before registration?
|
|
762
|
+
- Does it avoid wall-clock timing and user interaction?
|
|
763
|
+
- Is there at least one clear visual hierarchy: title/subject/accent/background?
|
|
764
|
+
- Is text readable at final video size?
|
|
765
|
+
- Does it have an exit or stable hold state?
|
|
766
|
+
- For components, is usage documented and paste-safe?
|
|
767
|
+
|
|
768
|
+
## 17. Representative Source Patterns
|
|
769
|
+
|
|
770
|
+
- `lt-clean-bar`: compact lower-third block, clean example of clip-path wipe, accent tab, text stagger, exit hide.
|
|
771
|
+
- `caption-pill-karaoke`: robust transcript normalization, group planning, width measurement, word highlight timeline.
|
|
772
|
+
- `motion-blur`: reusable component API, attaches to caller timeline, uses SVG filters, avoids timeline event callback pitfalls.
|
|
773
|
+
- `domain-warp-dissolve`: DOM scene capture to WebGL textures, shader progress controlled by timeline, fallback registration.
|
|
774
|
+
- `code-typing`: waits for `document.fonts.ready`, registers after populated, uses force rebind hook.
|
|
775
|
+
- `vfx-iphone-device`: waits for GLTF and double RAF before registering timeline, state-object render model.
|
|
776
|
+
- `grain-overlay`: pure CSS paste-safe overlay with `pointer-events: none` and deterministic grain keyframes.
|
|
777
|
+
|
|
778
|
+
## 18. Recommended Next Step
|
|
779
|
+
|
|
780
|
+
If this guide becomes an internal generation standard, turn sections 3-16 into a reusable Codex skill or prompt pack:
|
|
781
|
+
|
|
782
|
+
- `hyperframes-block-template`
|
|
783
|
+
- `hyperframes-component-template`
|
|
784
|
+
- `hyperframes-transition-template`
|
|
785
|
+
- `hyperframes-caption-template`
|
|
786
|
+
- `hyperframes-quality-review`
|
|
787
|
+
|
|
788
|
+
That would let future generation tasks start from these validated patterns rather than rediscovering framework rules each time.
|