hyper-animator-codex 0.7.1 → 0.8.0

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.
Files changed (318) hide show
  1. package/README.md +51 -3
  2. package/bin/hyper-animator-codex.mjs +1 -1
  3. package/lib/minimax-config.mjs +3 -3
  4. package/package.json +1 -1
  5. package/skills/hyper-animator-codex/SKILL.md +58 -20
  6. package/skills/hyper-animator-codex/agents/openai.yaml +2 -2
  7. package/skills/hyper-animator-codex/contracts/shot-plan.schema.json +214 -0
  8. package/skills/hyper-animator-codex/contracts/workflow-policy.json +85 -0
  9. package/skills/hyper-animator-codex/references/HyperFrames-AI-Generation-Patterns-codex.md +788 -0
  10. package/skills/hyper-animator-codex/references/beat-sync-workflow.md +7 -0
  11. package/skills/hyper-animator-codex/references/examples/shot-plan-dual-catalog.json +69 -0
  12. package/skills/hyper-animator-codex/references/hyperframes-agent-pseudocode.ts +1 -1
  13. package/skills/hyper-animator-codex/references/hyperframes-catalog-map.json +97 -230
  14. package/skills/hyper-animator-codex/references/hyperframes-intent-workflow.md +23 -7
  15. package/skills/hyper-animator-codex/references/minimax-music-workflow.md +24 -4
  16. package/skills/hyper-animator-codex/references/narration-audio-workflow.md +31 -1
  17. package/skills/hyper-animator-codex/references/shotcraft/LICENSE +202 -0
  18. package/skills/hyper-animator-codex/references/shotcraft/cards/ai-stream-response/README.md +46 -0
  19. package/skills/hyper-animator-codex/references/shotcraft/cards/autolayout-gap-dial/README.md +53 -0
  20. package/skills/hyper-animator-codex/references/shotcraft/cards/beat-cut-moves/README.md +54 -0
  21. package/skills/hyper-animator-codex/references/shotcraft/cards/beat-step-list-theme-cycle/README.md +59 -0
  22. package/skills/hyper-animator-codex/references/shotcraft/cards/before-after-slider-scrub/README.md +47 -0
  23. package/skills/hyper-animator-codex/references/shotcraft/cards/bottom-push-stack-wipe/README.md +58 -0
  24. package/skills/hyper-animator-codex/references/shotcraft/cards/brand-frame-snap/README.md +51 -0
  25. package/skills/hyper-animator-codex/references/shotcraft/cards/brand-ink-open/README.md +35 -0
  26. package/skills/hyper-animator-codex/references/shotcraft/cards/bubble-swarm-takeover/README.md +62 -0
  27. package/skills/hyper-animator-codex/references/shotcraft/cards/canvas-materialize-moves/README.md +55 -0
  28. package/skills/hyper-animator-codex/references/shotcraft/cards/card-flip-reveal/README.md +50 -0
  29. package/skills/hyper-animator-codex/references/shotcraft/cards/card-flock-tumble/README.md +54 -0
  30. package/skills/hyper-animator-codex/references/shotcraft/cards/cel-flash-stomp/README.md +54 -0
  31. package/skills/hyper-animator-codex/references/shotcraft/cards/chart-live-moves/README.md +51 -0
  32. package/skills/hyper-animator-codex/references/shotcraft/cards/circle-match-iris/README.md +53 -0
  33. package/skills/hyper-animator-codex/references/shotcraft/cards/cloner-depth-echo/README.md +38 -0
  34. package/skills/hyper-animator-codex/references/shotcraft/cards/collab-cursor-moves/README.md +48 -0
  35. package/skills/hyper-animator-codex/references/shotcraft/cards/color-block-step-wipe/README.md +54 -0
  36. package/skills/hyper-animator-codex/references/shotcraft/cards/command-palette-summon/README.md +45 -0
  37. package/skills/hyper-animator-codex/references/shotcraft/cards/crane-rise-reveal/README.md +47 -0
  38. package/skills/hyper-animator-codex/references/shotcraft/cards/crash-zoom-punch/README.md +38 -0
  39. package/skills/hyper-animator-codex/references/shotcraft/cards/dataviz-landscape-open/README.md +54 -0
  40. package/skills/hyper-animator-codex/references/shotcraft/cards/deck-deal-flyin/README.md +45 -0
  41. package/skills/hyper-animator-codex/references/shotcraft/cards/depth-layer-moves/README.md +40 -0
  42. package/skills/hyper-animator-codex/references/shotcraft/cards/document-typewriter-reveal/README.md +40 -0
  43. package/skills/hyper-animator-codex/references/shotcraft/cards/draw-svg-trace/README.md +50 -0
  44. package/skills/hyper-animator-codex/references/shotcraft/cards/edit-hook-moves/README.md +38 -0
  45. package/skills/hyper-animator-codex/references/shotcraft/cards/element-body-moves/README.md +49 -0
  46. package/skills/hyper-animator-codex/references/shotcraft/cards/fui-hud-moves/README.md +44 -0
  47. package/skills/hyper-animator-codex/references/shotcraft/cards/gauge-readout-moves/README.md +45 -0
  48. package/skills/hyper-animator-codex/references/shotcraft/cards/glow-flyline-moves/README.md +51 -0
  49. package/skills/hyper-animator-codex/references/shotcraft/cards/gradient-word-sweep/README.md +49 -0
  50. package/skills/hyper-animator-codex/references/shotcraft/cards/graze-face-tour/README.md +56 -0
  51. package/skills/hyper-animator-codex/references/shotcraft/cards/hashtag-to-pill-materialize/README.md +57 -0
  52. package/skills/hyper-animator-codex/references/shotcraft/cards/hires-rasterize-3d-text/README.md +34 -0
  53. package/skills/hyper-animator-codex/references/shotcraft/cards/icon-field-colorize/README.md +53 -0
  54. package/skills/hyper-animator-codex/references/shotcraft/cards/icon-performance-moves/README.md +46 -0
  55. package/skills/hyper-animator-codex/references/shotcraft/cards/impact-feedback/README.md +50 -0
  56. package/skills/hyper-animator-codex/references/shotcraft/cards/input-trigger-moves/README.md +49 -0
  57. package/skills/hyper-animator-codex/references/shotcraft/cards/integration-hub-map/README.md +54 -0
  58. package/skills/hyper-animator-codex/references/shotcraft/cards/letterspace-materialize/README.md +52 -0
  59. package/skills/hyper-animator-codex/references/shotcraft/cards/light-play-moves/README.md +49 -0
  60. package/skills/hyper-animator-codex/references/shotcraft/cards/line-boil/README.md +52 -0
  61. package/skills/hyper-animator-codex/references/shotcraft/cards/line-carry-transition/README.md +52 -0
  62. package/skills/hyper-animator-codex/references/shotcraft/cards/list-stack-press/README.md +43 -0
  63. package/skills/hyper-animator-codex/references/shotcraft/cards/magician-card-flourish/README.md +63 -0
  64. package/skills/hyper-animator-codex/references/shotcraft/cards/marker-underline-title/README.md +48 -0
  65. package/skills/hyper-animator-codex/references/shotcraft/cards/montage-rhythm-moves/README.md +55 -0
  66. package/skills/hyper-animator-codex/references/shotcraft/cards/morph-from-primitive/README.md +51 -0
  67. package/skills/hyper-animator-codex/references/shotcraft/cards/neon-frame-forerun/README.md +50 -0
  68. package/skills/hyper-animator-codex/references/shotcraft/cards/neon-frame-orbit-drop/README.md +50 -0
  69. package/skills/hyper-animator-codex/references/shotcraft/cards/neon-triple-marquee/README.md +55 -0
  70. package/skills/hyper-animator-codex/references/shotcraft/cards/odometer-digit-roll/README.md +54 -0
  71. package/skills/hyper-animator-codex/references/shotcraft/cards/outro-group-photo-launch/README.md +39 -0
  72. package/skills/hyper-animator-codex/references/shotcraft/cards/overhead-camera-moves/README.md +50 -0
  73. package/skills/hyper-animator-codex/references/shotcraft/cards/page-turn-transitions/README.md +48 -0
  74. package/skills/hyper-animator-codex/references/shotcraft/cards/page-waterfall-wall/README.md +52 -0
  75. package/skills/hyper-animator-codex/references/shotcraft/cards/panel-grid-moves/README.md +52 -0
  76. package/skills/hyper-animator-codex/references/shotcraft/cards/paper-craft-moves/README.md +46 -0
  77. package/skills/hyper-animator-codex/references/shotcraft/cards/paper-plane-messenger/README.md +62 -0
  78. package/skills/hyper-animator-codex/references/shotcraft/cards/paper-title-card/README.md +36 -0
  79. package/skills/hyper-animator-codex/references/shotcraft/cards/particle-celebrate-hits/README.md +42 -0
  80. package/skills/hyper-animator-codex/references/shotcraft/cards/particle-sand-fill/README.md +39 -0
  81. package/skills/hyper-animator-codex/references/shotcraft/cards/pill-slot-cycle/README.md +57 -0
  82. package/skills/hyper-animator-codex/references/shotcraft/cards/print-texture-transitions/README.md +40 -0
  83. package/skills/hyper-animator-codex/references/shotcraft/cards/rhythm-interrupt-moves/README.md +44 -0
  84. package/skills/hyper-animator-codex/references/shotcraft/cards/riso-print-hits/README.md +54 -0
  85. package/skills/hyper-animator-codex/references/shotcraft/cards/row-embed/README.md +36 -0
  86. package/skills/hyper-animator-codex/references/shotcraft/cards/runway-ground-skim/README.md +52 -0
  87. package/skills/hyper-animator-codex/references/shotcraft/cards/sakuga-timing-shift/README.md +50 -0
  88. package/skills/hyper-animator-codex/references/shotcraft/cards/scene-locked-title/README.md +43 -0
  89. package/skills/hyper-animator-codex/references/shotcraft/cards/scroll-brake-moves/README.md +45 -0
  90. package/skills/hyper-animator-codex/references/shotcraft/cards/segmented-thumb-hero/README.md +57 -0
  91. package/skills/hyper-animator-codex/references/shotcraft/cards/shot-transitions/README.md +60 -0
  92. package/skills/hyper-animator-codex/references/shotcraft/cards/skeleton-reveal/README.md +54 -0
  93. package/skills/hyper-animator-codex/references/shotcraft/cards/slam-entrance-moves/README.md +53 -0
  94. package/skills/hyper-animator-codex/references/shotcraft/cards/smear-multiples/README.md +49 -0
  95. package/skills/hyper-animator-codex/references/shotcraft/cards/space-camera-moves/README.md +53 -0
  96. package/skills/hyper-animator-codex/references/shotcraft/cards/spectrum-morph-ui/README.md +50 -0
  97. package/skills/hyper-animator-codex/references/shotcraft/cards/speed-ramp-freeze/README.md +42 -0
  98. package/skills/hyper-animator-codex/references/shotcraft/cards/split-flap-title/README.md +52 -0
  99. package/skills/hyper-animator-codex/references/shotcraft/cards/spotlight-hero-card/README.md +39 -0
  100. package/skills/hyper-animator-codex/references/shotcraft/cards/spotlight-sweep-moves/README.md +51 -0
  101. package/skills/hyper-animator-codex/references/shotcraft/cards/steep-tilt-glide/README.md +53 -0
  102. package/skills/hyper-animator-codex/references/shotcraft/cards/stroke-segment-build/README.md +43 -0
  103. package/skills/hyper-animator-codex/references/shotcraft/cards/tear-streak-transitions/README.md +43 -0
  104. package/skills/hyper-animator-codex/references/shotcraft/cards/tension-camera-moves/README.md +55 -0
  105. package/skills/hyper-animator-codex/references/shotcraft/cards/text-as-mask/README.md +50 -0
  106. package/skills/hyper-animator-codex/references/shotcraft/cards/text-column-converge/README.md +55 -0
  107. package/skills/hyper-animator-codex/references/shotcraft/cards/theme-switch-moves/README.md +44 -0
  108. package/skills/hyper-animator-codex/references/shotcraft/cards/timeline-travel/README.md +43 -0
  109. package/skills/hyper-animator-codex/references/shotcraft/cards/title-demote-to-label/README.md +58 -0
  110. package/skills/hyper-animator-codex/references/shotcraft/cards/trailer-grammar-moves/README.md +51 -0
  111. package/skills/hyper-animator-codex/references/shotcraft/cards/transition-hidden-cut/README.md +52 -0
  112. package/skills/hyper-animator-codex/references/shotcraft/cards/transition-travel/README.md +48 -0
  113. package/skills/hyper-animator-codex/references/shotcraft/cards/type-and-filter/README.md +37 -0
  114. package/skills/hyper-animator-codex/references/shotcraft/cards/type-assembly-moves/README.md +50 -0
  115. package/skills/hyper-animator-codex/references/shotcraft/cards/type-entrance-moves/README.md +46 -0
  116. package/skills/hyper-animator-codex/references/shotcraft/cards/type-rhythm-sync/README.md +47 -0
  117. package/skills/hyper-animator-codex/references/shotcraft/cards/typewriter-moves/README.md +50 -0
  118. package/skills/hyper-animator-codex/references/shotcraft/cards/ui-strip-away-outro/README.md +63 -0
  119. package/skills/hyper-animator-codex/references/shotcraft/cards/ui-to-brand-morph/README.md +52 -0
  120. package/skills/hyper-animator-codex/references/shotcraft/cards/voice-waveform-live/README.md +52 -0
  121. package/skills/hyper-animator-codex/references/shotcraft/cards/wall-reveal-moves/README.md +53 -0
  122. package/skills/hyper-animator-codex/references/shotcraft/cards/wipe-transitions/README.md +47 -0
  123. package/skills/hyper-animator-codex/references/shotcraft/cards/word-relay-filmstrip/README.md +50 -0
  124. package/skills/hyper-animator-codex/references/shotcraft/catalog.json +3946 -0
  125. package/skills/hyper-animator-codex/references/shotcraft/references/aesthetic-rules.md +157 -0
  126. package/skills/hyper-animator-codex/references/shotcraft/references/final-review.md +107 -0
  127. package/skills/hyper-animator-codex/references/shotcraft/references/guided-free-creation.md +197 -0
  128. package/skills/hyper-animator-codex/references/shotcraft/references/music-beat-sync.md +125 -0
  129. package/skills/hyper-animator-codex/references/shotcraft/references/pipeline.md +357 -0
  130. package/skills/hyper-animator-codex/references/shotcraft/references/sound-design.md +126 -0
  131. package/skills/hyper-animator-codex/references/shotcraft/source/assets/lib/Caption.tsx +50 -0
  132. package/skills/hyper-animator-codex/references/shotcraft/source/assets/lib/DigitRoll.tsx +45 -0
  133. package/skills/hyper-animator-codex/references/shotcraft/source/assets/lib/FlashCut.tsx +20 -0
  134. package/skills/hyper-animator-codex/references/shotcraft/source/assets/lib/FlatPanel.tsx +65 -0
  135. package/skills/hyper-animator-codex/references/shotcraft/source/assets/lib/PageCam.tsx +151 -0
  136. package/skills/hyper-animator-codex/references/shotcraft/source/assets/lib/VerticalTicker.tsx +129 -0
  137. package/skills/hyper-animator-codex/references/shotcraft/source/assets/lib/helpers/camera.tsx +75 -0
  138. package/skills/hyper-animator-codex/references/shotcraft/source/assets/lib/helpers/motion.ts +40 -0
  139. package/skills/hyper-animator-codex/references/shotcraft/source/assets/lib/helpers/rand.ts +11 -0
  140. package/skills/hyper-animator-codex/references/shotcraft/source/assets/lib/helpers/shake.ts +10 -0
  141. package/skills/hyper-animator-codex/references/shotcraft/source/demos/_fixtures/Fixtures.tsx +83 -0
  142. package/skills/hyper-animator-codex/references/shotcraft/source/demos/ai-stream-response/StreamResponse.tsx +146 -0
  143. package/skills/hyper-animator-codex/references/shotcraft/source/demos/autolayout-gap-dial/AutolayoutGapDial.tsx +174 -0
  144. package/skills/hyper-animator-codex/references/shotcraft/source/demos/beat-cut-moves/BeatCutAccelerando.tsx +77 -0
  145. package/skills/hyper-animator-codex/references/shotcraft/source/demos/beat-cut-moves/PaparazziFlash.tsx +115 -0
  146. package/skills/hyper-animator-codex/references/shotcraft/source/demos/beat-step-list-theme-cycle/BeatStepListThemeCycle.tsx +98 -0
  147. package/skills/hyper-animator-codex/references/shotcraft/source/demos/before-after-slider-scrub/BeforeAfterSliderScrub.tsx +99 -0
  148. package/skills/hyper-animator-codex/references/shotcraft/source/demos/bottom-push-stack-wipe/BottomPushStackWipe.tsx +79 -0
  149. package/skills/hyper-animator-codex/references/shotcraft/source/demos/brand-frame-snap/BrandFrameSnap.tsx +110 -0
  150. package/skills/hyper-animator-codex/references/shotcraft/source/demos/bubble-swarm-takeover/BubbleSwarmTakeover.tsx +189 -0
  151. package/skills/hyper-animator-codex/references/shotcraft/source/demos/canvas-materialize-moves/DiagramCascadeBuild.tsx +172 -0
  152. package/skills/hyper-animator-codex/references/shotcraft/source/demos/canvas-materialize-moves/PanelToCanvasMaterialize.tsx +254 -0
  153. package/skills/hyper-animator-codex/references/shotcraft/source/demos/card-flip-reveal/CardFlipReveal.tsx +139 -0
  154. package/skills/hyper-animator-codex/references/shotcraft/source/demos/card-flock-tumble/CardFlockTumble.tsx +382 -0
  155. package/skills/hyper-animator-codex/references/shotcraft/source/demos/cel-flash-stomp/CelFlashStomp.tsx +111 -0
  156. package/skills/hyper-animator-codex/references/shotcraft/source/demos/chart-live-moves/AxisRescaleShockV2.tsx +282 -0
  157. package/skills/hyper-animator-codex/references/shotcraft/source/demos/chart-live-moves/OscilloscopeStreamV2.tsx +227 -0
  158. package/skills/hyper-animator-codex/references/shotcraft/source/demos/chart-live-moves/UnitDotSwarmRegroupV2.tsx +248 -0
  159. package/skills/hyper-animator-codex/references/shotcraft/source/demos/circle-match-iris/CircleMatchIris.tsx +124 -0
  160. package/skills/hyper-animator-codex/references/shotcraft/source/demos/cloner-depth-echo/ClonerDepthEcho.tsx +90 -0
  161. package/skills/hyper-animator-codex/references/shotcraft/source/demos/collab-cursor-moves/CursorCastEnsemble.tsx +136 -0
  162. package/skills/hyper-animator-codex/references/shotcraft/source/demos/collab-cursor-moves/CursorDialogueDuet.tsx +145 -0
  163. package/skills/hyper-animator-codex/references/shotcraft/source/demos/color-block-step-wipe/ColorBlockStepWipe.tsx +157 -0
  164. package/skills/hyper-animator-codex/references/shotcraft/source/demos/command-palette-summon/CommandPaletteSummon.tsx +173 -0
  165. package/skills/hyper-animator-codex/references/shotcraft/source/demos/crane-rise-reveal/CraneRiseReveal.tsx +91 -0
  166. package/skills/hyper-animator-codex/references/shotcraft/source/demos/crash-zoom-punch/CrashImpactReal.tsx +63 -0
  167. package/skills/hyper-animator-codex/references/shotcraft/source/demos/crash-zoom-punch/CrashZoomReal.tsx +60 -0
  168. package/skills/hyper-animator-codex/references/shotcraft/source/demos/dataviz-landscape-open/DatavizLandscapeOpen.tsx +401 -0
  169. package/skills/hyper-animator-codex/references/shotcraft/source/demos/depth-layer-moves/DollyZoomReal.tsx +55 -0
  170. package/skills/hyper-animator-codex/references/shotcraft/source/demos/depth-layer-moves/MultiplaneReal.tsx +45 -0
  171. package/skills/hyper-animator-codex/references/shotcraft/source/demos/draw-svg-trace/DrawSvgTrace.tsx +199 -0
  172. package/skills/hyper-animator-codex/references/shotcraft/source/demos/edit-hook-moves/LogoStingButton.tsx +106 -0
  173. package/skills/hyper-animator-codex/references/shotcraft/source/demos/element-body-moves/AxialStretch.tsx +112 -0
  174. package/skills/hyper-animator-codex/references/shotcraft/source/demos/element-body-moves/ContactShadowLift.tsx +117 -0
  175. package/skills/hyper-animator-codex/references/shotcraft/source/demos/fui-hud-moves/LineUnfoldPanel.tsx +125 -0
  176. package/skills/hyper-animator-codex/references/shotcraft/source/demos/fui-hud-moves/ReticleLockOn.tsx +139 -0
  177. package/skills/hyper-animator-codex/references/shotcraft/source/demos/gauge-readout-moves/NeedleSweepSelftest.tsx +146 -0
  178. package/skills/hyper-animator-codex/references/shotcraft/source/demos/gauge-readout-moves/TapeScrollFixedPointer.tsx +120 -0
  179. package/skills/hyper-animator-codex/references/shotcraft/source/demos/glow-flyline-moves/FlylineArc.tsx +158 -0
  180. package/skills/hyper-animator-codex/references/shotcraft/source/demos/glow-flyline-moves/GlowOrbAmbient.tsx +131 -0
  181. package/skills/hyper-animator-codex/references/shotcraft/source/demos/glow-flyline-moves/OrbFlylineRelay.tsx +268 -0
  182. package/skills/hyper-animator-codex/references/shotcraft/source/demos/gradient-word-sweep/GradientWordSweep.tsx +307 -0
  183. package/skills/hyper-animator-codex/references/shotcraft/source/demos/graze-face-tour/GrazeFaceTour.tsx +469 -0
  184. package/skills/hyper-animator-codex/references/shotcraft/source/demos/hashtag-to-pill-materialize/HashtagToPillMaterialize.tsx +166 -0
  185. package/skills/hyper-animator-codex/references/shotcraft/source/demos/icon-field-colorize/IconFieldColorize.tsx +93 -0
  186. package/skills/hyper-animator-codex/references/shotcraft/source/demos/icon-performance-moves/AttentionBounce.tsx +193 -0
  187. package/skills/hyper-animator-codex/references/shotcraft/source/demos/icon-performance-moves/PopBurstConfirm.tsx +162 -0
  188. package/skills/hyper-animator-codex/references/shotcraft/source/demos/impact-feedback/AnimeImpact.tsx +149 -0
  189. package/skills/hyper-animator-codex/references/shotcraft/source/demos/impact-feedback/HitCounter.tsx +147 -0
  190. package/skills/hyper-animator-codex/references/shotcraft/source/demos/input-trigger-moves/CursorPerformancePunchIn.tsx +154 -0
  191. package/skills/hyper-animator-codex/references/shotcraft/source/demos/input-trigger-moves/KeycapSmashCut.tsx +217 -0
  192. package/skills/hyper-animator-codex/references/shotcraft/source/demos/integration-hub-map/IntegrationHubMap.tsx +554 -0
  193. package/skills/hyper-animator-codex/references/shotcraft/source/demos/letterspace-materialize/LetterspaceMaterialize.tsx +85 -0
  194. package/skills/hyper-animator-codex/references/shotcraft/source/demos/light-play-moves/HalationBloom.tsx +139 -0
  195. package/skills/hyper-animator-codex/references/shotcraft/source/demos/light-play-moves/SheenSweepRetry.tsx +85 -0
  196. package/skills/hyper-animator-codex/references/shotcraft/source/demos/light-play-moves/SpotlightSweepReveal.tsx +102 -0
  197. package/skills/hyper-animator-codex/references/shotcraft/source/demos/line-boil/LineBoil.tsx +140 -0
  198. package/skills/hyper-animator-codex/references/shotcraft/source/demos/line-carry-transition/LineCarryTransition.tsx +151 -0
  199. package/skills/hyper-animator-codex/references/shotcraft/source/demos/magician-card-flourish/MagicianCardFlourish.tsx +294 -0
  200. package/skills/hyper-animator-codex/references/shotcraft/source/demos/marker-underline-title/MarkerUnderlineTitle.tsx +87 -0
  201. package/skills/hyper-animator-codex/references/shotcraft/source/demos/montage-rhythm-moves/DominoCascade.tsx +125 -0
  202. package/skills/hyper-animator-codex/references/shotcraft/source/demos/montage-rhythm-moves/DropBlackoutSlam.tsx +135 -0
  203. package/skills/hyper-animator-codex/references/shotcraft/source/demos/montage-rhythm-moves/WrightTripleCut.tsx +175 -0
  204. package/skills/hyper-animator-codex/references/shotcraft/source/demos/morph-from-primitive/MorphFromPrimitive.tsx +190 -0
  205. package/skills/hyper-animator-codex/references/shotcraft/source/demos/neon-frame-forerun/NeonFrameForerun.tsx +279 -0
  206. package/skills/hyper-animator-codex/references/shotcraft/source/demos/neon-frame-orbit-drop/NeonFrameForerunOrbit.tsx +273 -0
  207. package/skills/hyper-animator-codex/references/shotcraft/source/demos/neon-triple-marquee/NeonTripleMarquee.tsx +111 -0
  208. package/skills/hyper-animator-codex/references/shotcraft/source/demos/odometer-digit-roll/OdometerDigitRoll.tsx +178 -0
  209. package/skills/hyper-animator-codex/references/shotcraft/source/demos/overhead-camera-moves/OverheadTabletopDrop.tsx +129 -0
  210. package/skills/hyper-animator-codex/references/shotcraft/source/demos/overhead-camera-moves/TiltReveal.tsx +55 -0
  211. package/skills/hyper-animator-codex/references/shotcraft/source/demos/page-turn-transitions/BarnDoorSplit.tsx +138 -0
  212. package/skills/hyper-animator-codex/references/shotcraft/source/demos/page-turn-transitions/CubeRotate.tsx +114 -0
  213. package/skills/hyper-animator-codex/references/shotcraft/source/demos/page-waterfall-wall/PageWaterfallWall.tsx +76 -0
  214. package/skills/hyper-animator-codex/references/shotcraft/source/demos/page-waterfall-wall/VerticalTicker.tsx +129 -0
  215. package/skills/hyper-animator-codex/references/shotcraft/source/demos/panel-grid-moves/ComicPanelSplit.tsx +171 -0
  216. package/skills/hyper-animator-codex/references/shotcraft/source/demos/panel-grid-moves/FlipGridReflow.tsx +121 -0
  217. package/skills/hyper-animator-codex/references/shotcraft/source/demos/panel-grid-moves/GridFlashMosaic.tsx +182 -0
  218. package/skills/hyper-animator-codex/references/shotcraft/source/demos/paper-craft-moves/MaskingTapeSlap.tsx +163 -0
  219. package/skills/hyper-animator-codex/references/shotcraft/source/demos/paper-craft-moves/PopupBookRise.tsx +134 -0
  220. package/skills/hyper-animator-codex/references/shotcraft/source/demos/paper-plane-messenger/PaperPlaneMessenger.tsx +183 -0
  221. package/skills/hyper-animator-codex/references/shotcraft/source/demos/particle-celebrate-hits/ConfettiCrossfire.tsx +115 -0
  222. package/skills/hyper-animator-codex/references/shotcraft/source/demos/particle-celebrate-hits/CounterTickSparks.tsx +103 -0
  223. package/skills/hyper-animator-codex/references/shotcraft/source/demos/particle-sand-fill/ParticleSandFill.tsx +119 -0
  224. package/skills/hyper-animator-codex/references/shotcraft/source/demos/pill-slot-cycle/PillSlotCycle.tsx +220 -0
  225. package/skills/hyper-animator-codex/references/shotcraft/source/demos/print-texture-transitions/InkBleedReveal.tsx +81 -0
  226. package/skills/hyper-animator-codex/references/shotcraft/source/demos/rhythm-interrupt-moves/JumpCutPunchIn.tsx +72 -0
  227. package/skills/hyper-animator-codex/references/shotcraft/source/demos/rhythm-interrupt-moves/StrobeBlackFrames.tsx +99 -0
  228. package/skills/hyper-animator-codex/references/shotcraft/source/demos/riso-print-hits/RisoBeatPump.tsx +155 -0
  229. package/skills/hyper-animator-codex/references/shotcraft/source/demos/riso-print-hits/RisoMisregistrationHit.tsx +120 -0
  230. package/skills/hyper-animator-codex/references/shotcraft/source/demos/runway-ground-skim/RunwayGroundSkim.tsx +258 -0
  231. package/skills/hyper-animator-codex/references/shotcraft/source/demos/sakuga-timing-shift/SakugaTimingShift.tsx +178 -0
  232. package/skills/hyper-animator-codex/references/shotcraft/source/demos/scene-locked-title/SceneLockedTitle.tsx +98 -0
  233. package/skills/hyper-animator-codex/references/shotcraft/source/demos/scroll-brake-moves/BrakeReticleLock.tsx +171 -0
  234. package/skills/hyper-animator-codex/references/shotcraft/source/demos/scroll-brake-moves/ChangelogScrollBrake.tsx +117 -0
  235. package/skills/hyper-animator-codex/references/shotcraft/source/demos/segmented-thumb-hero/SegmentedThumbHero.tsx +213 -0
  236. package/skills/hyper-animator-codex/references/shotcraft/source/demos/shot-transitions/MaskWipeReal.tsx +67 -0
  237. package/skills/hyper-animator-codex/references/shotcraft/source/demos/shot-transitions/PortalWipeV2.tsx +128 -0
  238. package/skills/hyper-animator-codex/references/shotcraft/source/demos/shot-transitions/WhipBrakeReal.tsx +60 -0
  239. package/skills/hyper-animator-codex/references/shotcraft/source/demos/shot-transitions/WhipPanReal.tsx +45 -0
  240. package/skills/hyper-animator-codex/references/shotcraft/source/demos/skeleton-reveal/SkeletonReveal.tsx +283 -0
  241. package/skills/hyper-animator-codex/references/shotcraft/source/demos/slam-entrance-moves/ImpactBurstKit.tsx +185 -0
  242. package/skills/hyper-animator-codex/references/shotcraft/source/demos/slam-entrance-moves/KanadaPerspectiveSnap.tsx +91 -0
  243. package/skills/hyper-animator-codex/references/shotcraft/source/demos/slam-entrance-moves/ScoreSlam.tsx +225 -0
  244. package/skills/hyper-animator-codex/references/shotcraft/source/demos/smear-multiples/SmearMultiples.tsx +88 -0
  245. package/skills/hyper-animator-codex/references/shotcraft/source/demos/space-camera-moves/DroneDiveLanding.tsx +91 -0
  246. package/skills/hyper-animator-codex/references/shotcraft/source/demos/space-camera-moves/ExplodedView.tsx +178 -0
  247. package/skills/hyper-animator-codex/references/shotcraft/source/demos/space-camera-moves/SnorricamLock.tsx +130 -0
  248. package/skills/hyper-animator-codex/references/shotcraft/source/demos/spectrum-morph-ui/SpectrumMorphUi.tsx +129 -0
  249. package/skills/hyper-animator-codex/references/shotcraft/source/demos/speed-ramp-freeze/FreezeAnnotateReal.tsx +70 -0
  250. package/skills/hyper-animator-codex/references/shotcraft/source/demos/speed-ramp-freeze/SpeedRampReal.tsx +58 -0
  251. package/skills/hyper-animator-codex/references/shotcraft/source/demos/split-flap-title/SplitFlapFlip.tsx +189 -0
  252. package/skills/hyper-animator-codex/references/shotcraft/source/demos/spotlight-sweep-moves/CornerSpotlightReveal.tsx +121 -0
  253. package/skills/hyper-animator-codex/references/shotcraft/source/demos/spotlight-sweep-moves/GlowWakeSleepPanel.tsx +183 -0
  254. package/skills/hyper-animator-codex/references/shotcraft/source/demos/spotlight-sweep-moves/SlideSpotlightPan.tsx +171 -0
  255. package/skills/hyper-animator-codex/references/shotcraft/source/demos/steep-tilt-glide/SteepTiltGlide.tsx +315 -0
  256. package/skills/hyper-animator-codex/references/shotcraft/source/demos/stroke-segment-build/StrokeSegmentBuild.tsx +126 -0
  257. package/skills/hyper-animator-codex/references/shotcraft/source/demos/tear-streak-transitions/GlitchDisplace.tsx +107 -0
  258. package/skills/hyper-animator-codex/references/shotcraft/source/demos/tension-camera-moves/BulletTimeFreezeOrbit.tsx +219 -0
  259. package/skills/hyper-animator-codex/references/shotcraft/source/demos/tension-camera-moves/DutchRollToLevel.tsx +110 -0
  260. package/skills/hyper-animator-codex/references/shotcraft/source/demos/tension-camera-moves/PullBackIsolation.tsx +120 -0
  261. package/skills/hyper-animator-codex/references/shotcraft/source/demos/tension-camera-moves/SlowPushIn.tsx +96 -0
  262. package/skills/hyper-animator-codex/references/shotcraft/source/demos/text-as-mask/TextAsMask.tsx +94 -0
  263. package/skills/hyper-animator-codex/references/shotcraft/source/demos/text-column-converge/TextColumnConverge.tsx +122 -0
  264. package/skills/hyper-animator-codex/references/shotcraft/source/demos/theme-switch-moves/PaletteThemeRipple.tsx +207 -0
  265. package/skills/hyper-animator-codex/references/shotcraft/source/demos/theme-switch-moves/ThemeSweepToggle.tsx +123 -0
  266. package/skills/hyper-animator-codex/references/shotcraft/source/demos/timeline-travel/TimelineTravel.tsx +123 -0
  267. package/skills/hyper-animator-codex/references/shotcraft/source/demos/title-demote-to-label/TitleDemoteToLabel.tsx +174 -0
  268. package/skills/hyper-animator-codex/references/shotcraft/source/demos/trailer-grammar-moves/CardFootageCadence.tsx +118 -0
  269. package/skills/hyper-animator-codex/references/shotcraft/source/demos/trailer-grammar-moves/SmashCut.tsx +105 -0
  270. package/skills/hyper-animator-codex/references/shotcraft/source/demos/trailer-grammar-moves/TrailerBumper.tsx +103 -0
  271. package/skills/hyper-animator-codex/references/shotcraft/source/demos/transition-hidden-cut/InvisibleCut.tsx +93 -0
  272. package/skills/hyper-animator-codex/references/shotcraft/source/demos/transition-hidden-cut/LightLeakBurn.tsx +122 -0
  273. package/skills/hyper-animator-codex/references/shotcraft/source/demos/transition-hidden-cut/VersusSlam.tsx +104 -0
  274. package/skills/hyper-animator-codex/references/shotcraft/source/demos/transition-travel/LetterformZoom.tsx +141 -0
  275. package/skills/hyper-animator-codex/references/shotcraft/source/demos/transition-travel/SharedElementMorph.tsx +101 -0
  276. package/skills/hyper-animator-codex/references/shotcraft/source/demos/type-assembly-moves/LetterformDriftAssembly.tsx +107 -0
  277. package/skills/hyper-animator-codex/references/shotcraft/source/demos/type-assembly-moves/SplitTextStagger.tsx +101 -0
  278. package/skills/hyper-animator-codex/references/shotcraft/source/demos/type-assembly-moves/TextOnPath.tsx +92 -0
  279. package/skills/hyper-animator-codex/references/shotcraft/source/demos/type-assembly-moves/TrackingExpandReveal.tsx +109 -0
  280. package/skills/hyper-animator-codex/references/shotcraft/source/demos/type-entrance-moves/LetterDropPhysics.tsx +100 -0
  281. package/skills/hyper-animator-codex/references/shotcraft/source/demos/type-entrance-moves/ScrambleDecode.tsx +90 -0
  282. package/skills/hyper-animator-codex/references/shotcraft/source/demos/type-rhythm-sync/FontWeightPump.tsx +124 -0
  283. package/skills/hyper-animator-codex/references/shotcraft/source/demos/type-rhythm-sync/KaraokeFillSync.tsx +93 -0
  284. package/skills/hyper-animator-codex/references/shotcraft/source/demos/typewriter-moves/TerminalTypewriter.tsx +122 -0
  285. package/skills/hyper-animator-codex/references/shotcraft/source/demos/typewriter-moves/TypewriterErrorRetype.tsx +109 -0
  286. package/skills/hyper-animator-codex/references/shotcraft/source/demos/ui-strip-away-outro/UiStripAwayOutro.tsx +218 -0
  287. package/skills/hyper-animator-codex/references/shotcraft/source/demos/ui-to-brand-morph/IconFlipBloomLogo.tsx +199 -0
  288. package/skills/hyper-animator-codex/references/shotcraft/source/demos/ui-to-brand-morph/InputMorphsIntoLogo.tsx +215 -0
  289. package/skills/hyper-animator-codex/references/shotcraft/source/demos/voice-waveform-live/VoiceWaveformLive.tsx +171 -0
  290. package/skills/hyper-animator-codex/references/shotcraft/source/demos/wall-reveal-moves/BentoLightUp.tsx +135 -0
  291. package/skills/hyper-animator-codex/references/shotcraft/source/demos/wipe-transitions/BlindsSlice.tsx +107 -0
  292. package/skills/hyper-animator-codex/references/shotcraft/source/demos/wipe-transitions/ClockWipe.tsx +83 -0
  293. package/skills/hyper-animator-codex/references/shotcraft/source/demos/word-relay-filmstrip/WordRelayFilmstrip.tsx +300 -0
  294. package/skills/hyper-animator-codex/references/shotcraft/source/template/src/Root.tsx +15 -0
  295. package/skills/hyper-animator-codex/references/shotcraft/source/template/src/aifl/Caption.tsx +49 -0
  296. package/skills/hyper-animator-codex/references/shotcraft/source/template/src/aifl/DigitRoll.tsx +44 -0
  297. package/skills/hyper-animator-codex/references/shotcraft/source/template/src/aifl/FlashCut.tsx +19 -0
  298. package/skills/hyper-animator-codex/references/shotcraft/source/template/src/aifl/Main.tsx +163 -0
  299. package/skills/hyper-animator-codex/references/shotcraft/source/template/src/aifl/PaperTitleCard.tsx +89 -0
  300. package/skills/hyper-animator-codex/references/shotcraft/source/template/src/aifl/live/PageCam.tsx +145 -0
  301. package/skills/hyper-animator-codex/references/shotcraft/source/template/src/aifl/live/SceneDetail.tsx +146 -0
  302. package/skills/hyper-animator-codex/references/shotcraft/source/template/src/aifl/live/SceneFlyIn.tsx +447 -0
  303. package/skills/hyper-animator-codex/references/shotcraft/source/template/src/aifl/live/SceneOpen.tsx +532 -0
  304. package/skills/hyper-animator-codex/references/shotcraft/source/template/src/aifl/live/SceneOutroLive.tsx +394 -0
  305. package/skills/hyper-animator-codex/references/shotcraft/source/template/src/aifl/live/ScenePapers.tsx +185 -0
  306. package/skills/hyper-animator-codex/references/shotcraft/source/template/src/aifl/live/SceneWbr.tsx +299 -0
  307. package/skills/hyper-animator-codex/references/shotcraft/source/template/src/index.ts +4 -0
  308. package/skills/hyper-animator-codex/references/shotcraft/source-notes.md +10 -0
  309. package/skills/hyper-animator-codex/scripts/generate_minimax_music.mjs +27 -10
  310. package/skills/hyper-animator-codex/scripts/generate_minimax_tts.mjs +142 -13
  311. package/skills/hyper-animator-codex/scripts/generate_subtitles.mjs +42 -3
  312. package/skills/hyper-animator-codex/scripts/minimax_runtime_config.mjs +3 -3
  313. package/skills/hyper-animator-codex/scripts/query_shotcraft.mjs +140 -0
  314. package/skills/hyper-animator-codex/scripts/validate_hyperframes_html.py +22 -0
  315. package/skills/hyper-animator-codex/scripts/validate_provider_policy.mjs +108 -0
  316. package/skills/hyper-animator-codex/scripts/validate_shot_plan.mjs +193 -0
  317. package/skills/hyper-animator-codex/vendor/music-beat-detector/beat_detector/analyzer.py +3 -1
  318. package/skills/hyper-animator-codex/vendor/music-beat-detector/beat_detector/beat.py +37 -1
@@ -0,0 +1,134 @@
1
+ // popup-book-rise —— 立体书立起
2
+ // FakeDashboard(A) 打平躺下(场景 rotateX 75° 透视俯视),6 张卡片是贴在页上的
3
+ // 纸片,沿各自底边从平躺错峰立起(rotateX 90°→-5° 过冲→0° 回弹,即立到 95° 再回 90°),
4
+ // 根部投影随立起角度收窄变淡。全部立起后整个场景轻微回正(75°→68°)收尾。
5
+ // 卡片用独立网格复刻 dashboard A 区布局(Fixtures 内嵌卡无法单独驱动)。
6
+ // 收尾 f108 后真静止 ≥52f。帧确定性:全由 frame 派生。
7
+ import React from 'react';
8
+ import { useCurrentFrame, interpolate, spring, Easing } from 'remotion';
9
+ import { G, Card } from '../_fixtures/Fixtures';
10
+
11
+ const FPS = 30;
12
+ const HOLD = 14; // 开头静置
13
+ const STAGGER = 7;
14
+ const RISE_DUR = 34; // spring 视觉收敛帧数
15
+ const LAST_START = HOLD + 5 * STAGGER; // 49
16
+ const SETTLE = LAST_START + RISE_DUR; // 83:全部立起
17
+ const REST = SETTLE + 25; // 108:场景回正完成
18
+
19
+ // dashboard A 区几何(照抄 FakeDashboard:侧栏 220 + 顶栏 72 + padding 36 + gap 28)
20
+ const AREA_X = 220 + 36;
21
+ const AREA_Y = 72 + 36;
22
+ const AREA_W = 1920 - 220 - 72;
23
+ const AREA_H = 1080 - 72 - 72;
24
+ const GAP = 28;
25
+ const CELL_W = (AREA_W - 2 * GAP) / 3;
26
+ const CELL_H = (AREA_H - GAP) / 2;
27
+
28
+ const PageCard: React.FC<{ i: number; frame: number }> = ({ i, frame }) => {
29
+ const col = i % 3;
30
+ const row = Math.floor(i / 3);
31
+ // 远排(row 0)先立,近排后立;同排从左到右
32
+ const order = row === 0 ? col : 3 + col;
33
+ const start = HOLD + order * STAGGER;
34
+
35
+ const s = spring({
36
+ frame: frame - start,
37
+ fps: FPS,
38
+ config: { damping: 11, stiffness: 130, mass: 0.9 },
39
+ durationInFrames: RISE_DUR,
40
+ durationRestThreshold: 0.0001,
41
+ });
42
+ // 平躺(贴页面 = local 0°)→ 立起(垂直页面 = local -90°,顶边朝观众翻起),
43
+ // spring 过冲自然冲过 -90° 到约 -95°(纸的韧性)再回弹。
44
+ const rx = interpolate(s, [0, 1], [0, -90]);
45
+
46
+ // 根部投影:躺平时长影(卡片盖在页面上),立起后收成窄条
47
+ const lie = 1 - Math.min(Math.abs(rx) / 90, 1); // 1 = 躺平, 0 = 立直
48
+ const shH = 14 + 90 * Math.max(lie, 0);
49
+ const shAlpha = 0.1 + 0.16 * Math.max(lie, 0);
50
+
51
+ return (
52
+ <div
53
+ style={{
54
+ position: 'absolute',
55
+ left: AREA_X + col * (CELL_W + GAP),
56
+ top: AREA_Y + row * (CELL_H + GAP),
57
+ width: CELL_W,
58
+ height: CELL_H,
59
+ transformStyle: 'preserve-3d',
60
+ }}
61
+ >
62
+ {/* 根部投影贴在页面上,不随卡片立起 */}
63
+ <div
64
+ style={{
65
+ position: 'absolute',
66
+ left: 6,
67
+ right: 6,
68
+ bottom: -4,
69
+ height: shH,
70
+ background: `rgba(0,0,0,${shAlpha})`,
71
+ borderRadius: 12,
72
+ filter: 'blur(10px)',
73
+ }}
74
+ />
75
+ <div
76
+ style={{
77
+ position: 'absolute',
78
+ inset: 0,
79
+ transform: `rotateX(${rx}deg)`,
80
+ transformOrigin: '50% 100%',
81
+ backfaceVisibility: 'hidden',
82
+ }}
83
+ >
84
+ <Card w={0} h={0} seed={i + 1} style={{ width: '100%', height: '100%' }} />
85
+ </div>
86
+ </div>
87
+ );
88
+ };
89
+
90
+ export const PopupBookRise: React.FC = () => {
91
+ const frame = useCurrentFrame();
92
+
93
+ // 场景(书页)俯视角:全程 75°,全部立起后轻微回正到 68°
94
+ const sceneRx = interpolate(frame, [SETTLE, REST], [75, 68], {
95
+ easing: Easing.inOut(Easing.cubic),
96
+ extrapolateLeft: 'clamp',
97
+ extrapolateRight: 'clamp',
98
+ });
99
+
100
+ return (
101
+ <div style={{ width: 1920, height: 1080, background: '#dddddb', position: 'relative', overflow: 'hidden' }}>
102
+ <div style={{ position: 'absolute', inset: 0, perspective: 2600, perspectiveOrigin: '50% 30%' }}>
103
+ <div
104
+ style={{
105
+ position: 'absolute',
106
+ inset: 0,
107
+ transform: `translateY(-40px) rotateX(${sceneRx}deg)`,
108
+ transformOrigin: '50% 62%',
109
+ transformStyle: 'preserve-3d',
110
+ }}
111
+ >
112
+ {/* 书页底板:dashboard 的壳(侧栏+顶栏+空白页面) */}
113
+ <div style={{ position: 'absolute', inset: 0, background: G.bg, boxShadow: '0 40px 80px rgba(0,0,0,0.25)' }}>
114
+ <div style={{ position: 'absolute', left: 0, top: 0, bottom: 0, width: 220, background: G.side, padding: '28px 22px', boxSizing: 'border-box', display: 'flex', flexDirection: 'column', gap: 18 }}>
115
+ <div style={{ width: 40, height: 40, borderRadius: 10, background: '#777775' }} />
116
+ {Array.from({ length: 7 }).map((_, i) => (
117
+ <div key={i} style={{ height: 12, width: `${60 + ((i * 29) % 35)}%`, background: G.sideBar, borderRadius: 6 }} />
118
+ ))}
119
+ </div>
120
+ <div style={{ position: 'absolute', left: 220, right: 0, top: 0, height: 72, background: G.panel, borderBottom: `2px solid ${G.line}`, display: 'flex', alignItems: 'center', padding: '0 32px', gap: 20, boxSizing: 'border-box' }}>
121
+ <div style={{ height: 18, width: 180, background: G.bar, borderRadius: 9 }} />
122
+ <div style={{ marginLeft: 'auto', height: 36, width: 320, background: '#fff', border: `2px solid ${G.line}`, borderRadius: 18, boxSizing: 'border-box' }} />
123
+ <div style={{ width: 36, height: 36, borderRadius: 18, background: G.mid }} />
124
+ </div>
125
+ </div>
126
+ {/* 6 张纸片卡沿底边立起 */}
127
+ {Array.from({ length: 6 }).map((_, i) => (
128
+ <PageCard key={i} i={i} frame={frame} />
129
+ ))}
130
+ </div>
131
+ </div>
132
+ </div>
133
+ );
134
+ };
@@ -0,0 +1,183 @@
1
+ // paper-plane-messenger —— pitch-app 77–82s(2.5D 简化)
2
+ // 点击"发送"后镜头拉远脱离窗口 A,折纸飞机从窗口飞出沿弧线飞行
3
+ // (俯仰角跟随切线),镜头伴飞穿过多层视差漂浮的灰阶道具,
4
+ // 飞抵窗口 B 前落定,窗口 B 放大接管全屏。发送语义实体化成转场信使。
5
+ import React from 'react';
6
+ import { AbsoluteFill, useCurrentFrame, interpolate, Easing } from 'remotion';
7
+ import { Card, G } from '../_fixtures/Fixtures';
8
+
9
+ const mulberry32 = (a: number) => () => {
10
+ let t = (a += 0x6d2b79f5);
11
+ t = Math.imul(t ^ (t >>> 15), t | 1);
12
+ t ^= t + Math.imul(t ^ (t >>> 7), t | 61);
13
+ return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
14
+ };
15
+
16
+ // ---- 世界坐标 ----
17
+ const AX = 520, AY = 560; // 窗口 A 中心
18
+ const BX = 3200, BY = 600; // 窗口 B 中心
19
+ const WIN_W = 760, WIN_H = 500;
20
+
21
+ // 飞机三次贝塞尔弧线:A 的发送按钮 → 高抛 → B 门前
22
+ const P0 = { x: AX + 300, y: AY + 150 };
23
+ const P1 = { x: 1250, y: -80 };
24
+ const P2 = { x: 2500, y: 300 };
25
+ const P3 = { x: BX - 470, y: BY + 20 };
26
+ const bez = (t: number) => {
27
+ const u = 1 - t;
28
+ return {
29
+ x: u * u * u * P0.x + 3 * u * u * t * P1.x + 3 * u * t * t * P2.x + t * t * t * P3.x,
30
+ y: u * u * u * P0.y + 3 * u * u * t * P1.y + 3 * u * t * t * P2.y + t * t * t * P3.y,
31
+ };
32
+ };
33
+
34
+ // ---- 时间轴(150f)----
35
+ const CLICK = 12; // 点击发送
36
+ const ZOOM_OUT = [16, 42] as const; // 镜头拉远
37
+ const FLY = [34, 104] as const; // 飞行
38
+ const TAKEOVER = [112, 146] as const; // 窗口 B 接管
39
+
40
+ // 视差道具(圆环/方块),depth: 0.45 远 / 0.75 中 / 1.3 近
41
+ type Prop = { x: number; y: number; size: number; ring: boolean; depth: number; drift: number };
42
+ const PROPS: Prop[] = (() => {
43
+ const rng = mulberry32(42);
44
+ const out: Prop[] = [];
45
+ const depths = [0.45, 0.75, 1.3];
46
+ for (let i = 0; i < 16; i++) {
47
+ const depth = depths[i % 3];
48
+ out.push({
49
+ x: 500 + rng() * 2800,
50
+ y: -150 + rng() * 1350,
51
+ size: depth < 0.6 ? 60 + rng() * 70 : depth < 1 ? 110 + rng() * 100 : 220 + rng() * 160,
52
+ ring: rng() > 0.45,
53
+ depth,
54
+ drift: rng() * Math.PI * 2,
55
+ });
56
+ }
57
+ return out;
58
+ })();
59
+
60
+ const Window: React.FC<{ cx: number; cy: number; seed: number; sendBtn?: boolean; btnPulse?: number }> = ({ cx, cy, seed, sendBtn, btnPulse = 0 }) => (
61
+ <div style={{ position: 'absolute', left: cx - WIN_W / 2, top: cy - WIN_H / 2, width: WIN_W, height: WIN_H, borderRadius: 18, background: '#fff', border: `2px solid ${G.border}`, boxShadow: '0 40px 100px rgba(0,0,0,0.30)', boxSizing: 'border-box', overflow: 'hidden' }}>
62
+ <div style={{ height: 54, background: '#f2f2f0', borderBottom: `2px solid ${G.line}`, display: 'flex', alignItems: 'center', gap: 10, padding: '0 20px', boxSizing: 'border-box' }}>
63
+ {[0, 1, 2].map((i) => <div key={i} style={{ width: 15, height: 15, borderRadius: 8, background: G.bar }} />)}
64
+ <div style={{ marginLeft: 14, height: 13, width: 200, background: G.bar, borderRadius: 7 }} />
65
+ </div>
66
+ <div style={{ padding: 26, display: 'flex', flexDirection: 'column', gap: 16 }}>
67
+ <Card w={WIN_W - 56} h={250} seed={seed} style={{ boxShadow: 'none' }} />
68
+ {sendBtn && (
69
+ <div style={{ alignSelf: 'flex-end', transform: `scale(${1 + btnPulse * 0.22})`, padding: '16px 46px', borderRadius: 12, background: G.ink, color: '#fff', fontFamily: 'Helvetica, Arial, sans-serif', fontWeight: 800, fontSize: 30, boxShadow: btnPulse > 0 ? `0 0 0 ${btnPulse * 22}px rgba(47,47,47,0.18)` : 'none' }}>
70
+ Send ➤
71
+ </div>
72
+ )}
73
+ </div>
74
+ </div>
75
+ );
76
+
77
+ const Plane: React.FC<{ x: number; y: number; angle: number; scale: number; opacity: number }> = ({ x, y, angle, scale, opacity }) => (
78
+ <svg width={180} height={110} viewBox="0 0 180 110" style={{ position: 'absolute', left: x - 90, top: y - 55, transform: `rotate(${angle}deg) scale(${scale})`, overflow: 'visible', opacity }}>
79
+ {/* 折纸飞机:三块折面,灰阶深浅示折痕 */}
80
+ <polygon points="176,30 6,4 62,66" fill="#ffffff" stroke="#b8b8b6" strokeWidth={3} />
81
+ <polygon points="176,30 62,66 78,102" fill="#d4d4d2" stroke="#b8b8b6" strokeWidth={3} />
82
+ <polygon points="176,30 6,4 50,44" fill="#efefed" stroke="#c6c6c4" strokeWidth={2} />
83
+ </svg>
84
+ );
85
+
86
+ export const PaperPlaneMessenger: React.FC = () => {
87
+ const frame = useCurrentFrame();
88
+
89
+ // 飞行进度(整体 ease-in-out:起飞加速、落定减速)
90
+ const tFly = interpolate(frame, [FLY[0], FLY[1]], [0, 1], {
91
+ extrapolateLeft: 'clamp', extrapolateRight: 'clamp',
92
+ easing: Easing.bezier(0.45, 0.05, 0.25, 1),
93
+ });
94
+ const pos = bez(tFly);
95
+ const posNext = bez(Math.min(tFly + 0.012, 1));
96
+ const angle = Math.atan2(posNext.y - pos.y, posNext.x - pos.x) * (180 / Math.PI);
97
+
98
+ // ---- 镜头 ----
99
+ const zoomOutP = interpolate(frame, [ZOOM_OUT[0], ZOOM_OUT[1]], [0, 1], {
100
+ extrapolateLeft: 'clamp', extrapolateRight: 'clamp', easing: Easing.inOut(Easing.cubic),
101
+ });
102
+ const takeP = interpolate(frame, [TAKEOVER[0], TAKEOVER[1]], [0, 1], {
103
+ extrapolateLeft: 'clamp', extrapolateRight: 'clamp', easing: Easing.inOut(Easing.cubic),
104
+ });
105
+ // 镜头中心:A → 跟飞机 → B
106
+ const followW = interpolate(frame, [ZOOM_OUT[0], ZOOM_OUT[1]], [0, 1], { extrapolateLeft: 'clamp', extrapolateRight: 'clamp' });
107
+ let cx = AX + (pos.x - AX) * followW;
108
+ let cy = (AY + (pos.y - AY) * followW) * (1 - takeP) + 0; // 占位,下一行合成
109
+ cy = AY + (Math.max(pos.y, 150) - AY) * followW;
110
+ cx = cx * (1 - takeP) + BX * takeP;
111
+ cy = cy * (1 - takeP) + BY * takeP;
112
+ // 变焦:1.55(贴脸 A)→ 0.62(拉远伴飞)→ 2.6(B 接管全屏)
113
+ const zBase = 1.55 + (0.62 - 1.55) * zoomOutP;
114
+ const zTake = 0.62 + (3.1 - 0.62) * takeP;
115
+ const z = frame < TAKEOVER[0] ? zBase : zTake;
116
+
117
+ const camX = (wx: number, d: number) => 960 + (wx - cx) * z * d;
118
+ const camY = (wy: number, d: number) => 540 + (wy - cy) * z * d;
119
+
120
+ const btnPulse = interpolate(frame, [CLICK, CLICK + 3, CLICK + 12], [0, 1, 0], {
121
+ extrapolateLeft: 'clamp', extrapolateRight: 'clamp', easing: Easing.out(Easing.quad),
122
+ });
123
+ const planeVisible = frame >= FLY[0] - 2;
124
+ // 飞行途中放大到 1.7 增强可读性,落定收回 1.1
125
+ const flightBoost = interpolate(tFly, [0, 0.25, 0.75, 1], [1, 1.7, 1.7, 1.1], {
126
+ extrapolateLeft: 'clamp', extrapolateRight: 'clamp',
127
+ });
128
+ const planeScale = interpolate(frame, [FLY[0] - 2, FLY[0] + 8], [0.3, 1], {
129
+ extrapolateLeft: 'clamp', extrapolateRight: 'clamp', easing: Easing.out(Easing.back(1.6)),
130
+ }) * flightBoost;
131
+ // 窗口 B 接管时飞机淡出,不留残影
132
+ const planeOpacity = interpolate(takeP, [0, 0.35], [1, 0], { extrapolateLeft: 'clamp', extrapolateRight: 'clamp' });
133
+
134
+ return (
135
+ <AbsoluteFill style={{ background: 'linear-gradient(160deg, #e9e9e7 0%, #dcdcda 100%)', overflow: 'hidden' }}>
136
+ {/* 视差道具:远层 / 中层(世界层之下) */}
137
+ {PROPS.filter((p) => p.depth < 1).map((p, i) => {
138
+ const wob = Math.sin(frame * 0.035 + p.drift) * 14;
139
+ const x = camX(p.x, p.depth) + wob;
140
+ const y = camY(p.y, p.depth) + Math.cos(frame * 0.03 + p.drift) * 10;
141
+ const s = p.size * z * p.depth;
142
+ const fade = interpolate(takeP, [0.3, 0.9], [1, 0], { extrapolateLeft: 'clamp', extrapolateRight: 'clamp' });
143
+ return (
144
+ <div key={i} style={{
145
+ position: 'absolute', left: x - s / 2, top: y - s / 2, width: s, height: s,
146
+ opacity: (p.depth < 0.6 ? 0.5 : 0.75) * fade,
147
+ borderRadius: p.ring ? '50%' : 14,
148
+ background: p.ring ? 'transparent' : '#c9c9c7',
149
+ border: p.ring ? `${Math.max(s * 0.13, 4)}px solid #bfbfbd` : 'none',
150
+ filter: p.depth < 0.6 ? 'blur(3px)' : 'none',
151
+ boxSizing: 'border-box',
152
+ }} />
153
+ );
154
+ })}
155
+
156
+ {/* 世界层(depth=1):窗口 A / B + 飞机 */}
157
+ <div style={{ position: 'absolute', left: 0, top: 0, transformOrigin: '0 0', transform: `translate(${960 - cx * z}px, ${540 - cy * z}px) scale(${z})` }}>
158
+ <Window cx={AX} cy={AY} seed={3} sendBtn btnPulse={btnPulse} />
159
+ <Window cx={BX} cy={BY} seed={6} />
160
+ {planeVisible && planeOpacity > 0.01 && <Plane x={pos.x} y={pos.y} angle={angle} scale={planeScale} opacity={planeOpacity} />}
161
+ </div>
162
+
163
+ {/* 近景道具(世界层之上,焦外大件) */}
164
+ {PROPS.filter((p) => p.depth >= 1).map((p, i) => {
165
+ const wob = Math.sin(frame * 0.04 + p.drift) * 20;
166
+ const x = camX(p.x, p.depth) + wob;
167
+ const y = camY(p.y, p.depth) + Math.cos(frame * 0.033 + p.drift) * 16;
168
+ const s = p.size * z * p.depth;
169
+ const fade = interpolate(takeP, [0.2, 0.7], [1, 0], { extrapolateLeft: 'clamp', extrapolateRight: 'clamp' });
170
+ return (
171
+ <div key={i} style={{
172
+ position: 'absolute', left: x - s / 2, top: y - s / 2, width: s, height: s,
173
+ opacity: 0.55 * fade,
174
+ borderRadius: p.ring ? '50%' : 22,
175
+ background: p.ring ? 'transparent' : '#b5b5b3',
176
+ border: p.ring ? `${Math.max(s * 0.12, 6)}px solid #adadab` : 'none',
177
+ filter: 'blur(8px)', boxSizing: 'border-box',
178
+ }} />
179
+ );
180
+ })}
181
+ </AbsoluteFill>
182
+ );
183
+ };
@@ -0,0 +1,115 @@
1
+ // confetti-crossfire —— 双侧礼炮交叉喷洒
2
+ // 中央大 KPI 卡 scale 落定(f0–14),揭晓帧 f16 左下+右下两门炮各射 50 颗矩形彩屑:
3
+ // 闭式弹道(初速 ~18px/f + spread 55° + 重力 + decay 0.9 的位移闭式解),每帧翻转 8–15°,
4
+ // 灰阶为主 + 1/3 琥珀。全部彩屑 ~f100 前落出画外(越界即条件卸载),结尾真静止 ≥55f。
5
+ // 帧确定性:sin 散列伪随机派生每颗初速/角度/翻转率,弹道 = 纯 age 的函数。
6
+ import React from 'react';
7
+ import { useCurrentFrame, interpolate, Easing } from 'remotion';
8
+ import { G, TitleBlock } from '../_fixtures/Fixtures';
9
+
10
+ const AMBER = '#b45309';
11
+ const FIRE = 16; // 揭晓帧 = 发射帧
12
+ const DECAY = 0.9;
13
+ const GRAV = 1.5; // px/f² (等效重力;decay 下终端落速 = GRAV/(1-d) = 15px/f)
14
+
15
+ const frac = (x: number) => x - Math.floor(x);
16
+ const rnd = (i: number, salt: number) => frac(Math.sin(i * 12.9898 + salt * 78.233) * 43758.5453);
17
+
18
+ // decay 弹道闭式解:v 每帧 ×0.9 → 位移 = v0·(1-d^age)/(1-d);重力项同样按衰减序列累积
19
+ const decaySum = (age: number) => (1 - Math.pow(DECAY, age)) / (1 - DECAY);
20
+
21
+ type Confetto = {
22
+ vx: number; vy: number; w: number; h: number;
23
+ spin: number; phase: number; amber: boolean; shade: string;
24
+ };
25
+
26
+ const makeGun = (originDeg: number, saltBase: number): Confetto[] =>
27
+ Array.from({ length: 50 }).map((_, i) => {
28
+ const ang = ((originDeg + (rnd(i, saltBase) - 0.5) * 55) * Math.PI) / 180;
29
+ // decay 0.9 下初速总位移只有 10×v0(velocity 6.6f 减半),18px/f 只够 180px 完全不可感
30
+ // → 加码到 70–95px/f:最陡颗峰值升到 y≈390(画面上 1/3),弹幕跨越中央卡,~f96 全部落出
31
+ const speed = 70 + rnd(i, saltBase + 1) * 25;
32
+ const grays = ['#6d6d6b', '#8f8f8d', '#4a4a48', '#b0b0ae'];
33
+ return {
34
+ vx: Math.cos(ang) * speed,
35
+ vy: -Math.sin(ang) * speed, // 屏幕坐标向下为正,射向斜上
36
+ w: 14 + rnd(i, saltBase + 2) * 12,
37
+ h: 8 + rnd(i, saltBase + 3) * 8,
38
+ spin: 8 + rnd(i, saltBase + 4) * 7, // 8–15°/f
39
+ phase: rnd(i, saltBase + 5) * 360,
40
+ amber: rnd(i, saltBase + 6) < 1 / 3,
41
+ shade: grays[Math.floor(rnd(i, saltBase + 7) * 4)],
42
+ };
43
+ });
44
+
45
+ const LEFT_GUN = makeGun(60, 3); // 左下炮朝 60°(偏右上)
46
+ const RIGHT_GUN = makeGun(120, 9); // 右下炮朝 120°(偏左上)
47
+ const LEFT_POS = { x: 140, y: 1040 };
48
+ const RIGHT_POS = { x: 1780, y: 1040 };
49
+
50
+ export const ConfettiCrossfire: React.FC = () => {
51
+ const frame = useCurrentFrame();
52
+ const age = frame - FIRE;
53
+
54
+ // KPI 卡 scale 入场落定
55
+ const cardScale = interpolate(frame, [0, 14], [0.6, 1], {
56
+ easing: Easing.out(Easing.back(1.8)),
57
+ extrapolateRight: 'clamp',
58
+ });
59
+ const cardOp = interpolate(frame, [0, 8], [0, 1], { extrapolateRight: 'clamp' });
60
+
61
+ const renderGun = (gun: Confetto[], origin: { x: number; y: number }, keyBase: string) =>
62
+ gun.map((c, i) => {
63
+ if (age <= 0) return null;
64
+ const s = decaySum(age);
65
+ const x = origin.x + c.vx * s;
66
+ // 重力:每帧速度 +GRAV 再统一衰减 → 位移闭式 Σ 可整理为 GRAV·(age - s·d)/(1-d) 的近似;
67
+ // 直接用精确序列和:g 项位移 = GRAV · Σ_{k=1..age} (1-d^k)/(1-d) = GRAV·(age-(d-d^{age+1})/(1-d))/(1-d)
68
+ const gDisp = (GRAV * (age - (DECAY - Math.pow(DECAY, age + 1)) / (1 - DECAY))) / (1 - DECAY);
69
+ const y = origin.y + c.vy * s + gDisp;
70
+ // 落出画外即卸载(左右也裁)
71
+ if (y > 1140 || x < -80 || x > 2000) return null;
72
+ const rot = c.phase + c.spin * age;
73
+ return (
74
+ <div
75
+ key={`${keyBase}${i}`}
76
+ style={{
77
+ position: 'absolute', left: x, top: y, width: c.w, height: c.h,
78
+ background: c.amber ? AMBER : c.shade,
79
+ borderRadius: 2,
80
+ // rotateX 造翻牌式 3D 翻转(宽度不变、高度压扁),再加平面 rotate
81
+ transform: `rotate(${rot}deg) rotateX(${rot * 2.3}deg)`,
82
+ }}
83
+ />
84
+ );
85
+ });
86
+
87
+ return (
88
+ <div style={{ width: 1920, height: 1080, background: G.bg, position: 'relative', overflow: 'hidden' }}>
89
+ <div style={{ position: 'absolute', top: 110, width: '100%', textAlign: 'center' }}>
90
+ <TitleBlock text="CONFETTI CROSSFIRE" size={72} />
91
+ </div>
92
+
93
+ {/* 中央 KPI 卡 */}
94
+ <div style={{
95
+ position: 'absolute', left: 660, top: 400, width: 600, height: 320,
96
+ background: G.card, border: `2px solid ${G.border}`, borderRadius: 16,
97
+ boxSizing: 'border-box', padding: 36, boxShadow: '0 4px 14px rgba(0,0,0,0.08)',
98
+ display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center',
99
+ transform: `scale(${cardScale})`, opacity: cardOp,
100
+ }}>
101
+ <div style={{ height: 14, width: 220, background: G.bar, borderRadius: 7 }} />
102
+ <div style={{
103
+ fontFamily: 'Helvetica, Arial, sans-serif', fontWeight: 800, fontSize: 150,
104
+ color: AMBER, letterSpacing: -3, lineHeight: 1.1, fontVariantNumeric: 'tabular-nums',
105
+ }}>
106
+ 98.5%
107
+ </div>
108
+ <div style={{ height: 10, width: 150, background: G.line, borderRadius: 5 }} />
109
+ </div>
110
+
111
+ {renderGun(LEFT_GUN, LEFT_POS, 'L')}
112
+ {renderGun(RIGHT_GUN, RIGHT_POS, 'R')}
113
+ </div>
114
+ );
115
+ };
@@ -0,0 +1,103 @@
1
+ // counter-tick-sparks —— 数字跳动溅火
2
+ // 中央大计数器 0 → 12,847(easeOut 逐位跳动),每逢跳过整千的 tick 帧,
3
+ // 数字顶部溅 6–10 颗大火星(初速向上 9–13px/f、重力下坠 14–18f 内坠灭);
4
+ // 终值揭晓那跳翻倍 20 颗 + 数字弹 1.1x 回落。
5
+ // 结尾所有火星寿命耗尽条件卸载,真静止 ≥40f。
6
+ // 帧确定性:tick 帧从同一 easeOut 曲线预解析(模块级求出),火星 = 纯 age 闭式弹道。
7
+ import React from 'react';
8
+ import { useCurrentFrame, interpolate, Easing } from 'remotion';
9
+ import { G, TitleBlock } from '../_fixtures/Fixtures';
10
+
11
+ const AMBER = '#b45309';
12
+ const TARGET = 12847;
13
+ const COUNT_END = 78; // 计数结束帧
14
+ const easeOutCubic = (t: number) => 1 - Math.pow(1 - t, 3);
15
+ const valueAt = (f: number) => Math.round(TARGET * easeOutCubic(Math.min(Math.max(f / COUNT_END, 0), 1)));
16
+
17
+ const frac = (x: number) => x - Math.floor(x);
18
+ const rnd = (i: number, salt: number) => frac(Math.sin(i * 12.9898 + salt * 78.233) * 43758.5453);
19
+
20
+ // 预解析 tick 帧:跳过整千的那一帧 + 终值揭晓帧
21
+ const TICKS: { f: number; big: boolean }[] = (() => {
22
+ const out: { f: number; big: boolean }[] = [];
23
+ let prev = 0;
24
+ for (let f = 1; f <= COUNT_END; f++) {
25
+ const v = valueAt(f);
26
+ if (Math.floor(v / 1000) > Math.floor(prev / 1000)) out.push({ f, big: false });
27
+ prev = v;
28
+ }
29
+ out.push({ f: COUNT_END, big: true }); // 终值揭晓
30
+ return out;
31
+ })();
32
+
33
+ const SPARK_LIFE = 18;
34
+ const GRAV = 0.9;
35
+
36
+ export const CounterTickSparks: React.FC = () => {
37
+ const frame = useCurrentFrame();
38
+ const value = valueAt(frame);
39
+
40
+ // 终值揭晓弹 1.1x 回落
41
+ const popScale =
42
+ 1 +
43
+ 0.1 *
44
+ interpolate(frame, [COUNT_END, COUNT_END + 5, COUNT_END + 16], [0, 1, 0], {
45
+ easing: Easing.out(Easing.quad),
46
+ extrapolateLeft: 'clamp',
47
+ extrapolateRight: 'clamp',
48
+ });
49
+
50
+ const TOP_Y = 452; // 数字顶缘(火星发射线)
51
+ const CX = 960;
52
+
53
+ return (
54
+ <div style={{ width: 1920, height: 1080, background: G.bg, position: 'relative', overflow: 'hidden' }}>
55
+ <div style={{ position: 'absolute', top: 110, width: '100%', textAlign: 'center' }}>
56
+ <TitleBlock text="COUNTER TICK SPARKS" size={72} />
57
+ </div>
58
+
59
+ {/* 计数卡 */}
60
+ <div style={{
61
+ position: 'absolute', left: 560, top: 400, width: 800, height: 330,
62
+ background: G.card, border: `2px solid ${G.border}`, borderRadius: 16,
63
+ boxSizing: 'border-box', boxShadow: '0 4px 14px rgba(0,0,0,0.08)',
64
+ display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', gap: 20,
65
+ }}>
66
+ <div style={{ height: 14, width: 220, background: G.bar, borderRadius: 7 }} />
67
+ <div style={{
68
+ fontFamily: 'Helvetica, Arial, sans-serif', fontWeight: 800, fontSize: 168,
69
+ color: G.ink, letterSpacing: -3, lineHeight: 1, fontVariantNumeric: 'tabular-nums',
70
+ transform: `scale(${popScale})`,
71
+ }}>
72
+ {value.toLocaleString('en-US')}
73
+ </div>
74
+ <div style={{ height: 10, width: 150, background: G.line, borderRadius: 5 }} />
75
+ </div>
76
+
77
+ {/* 火星:每个 tick 一簇,寿命耗尽条件卸载 */}
78
+ {TICKS.map((tick, t) => {
79
+ const age = frame - tick.f;
80
+ if (age <= 0 || age >= SPARK_LIFE) return null;
81
+ const n = tick.big ? 20 : 6 + Math.floor(rnd(t, 21) * 5); // 6–10,终跳 20
82
+ return Array.from({ length: n }).map((_, i) => {
83
+ const salt = t * 31 + i;
84
+ // 初速:向上 9–13px/f,水平 ±4.5px/f 扇形铺开(终跳更宽)
85
+ const vy = -(9 + rnd(salt, 2) * 4);
86
+ const vx = (rnd(salt, 3) - 0.5) * (tick.big ? 13 : 9);
87
+ const x0 = CX + (rnd(salt, 4) - 0.5) * (tick.big ? 560 : 380); // 沿数字顶缘散布
88
+ const x = x0 + vx * age;
89
+ const y = TOP_Y + vy * age + 0.5 * GRAV * age * age;
90
+ const life = 1 - age / SPARK_LIFE;
91
+ const size = (tick.big ? 7 : 5.5) * (0.4 + 0.6 * life);
92
+ return (
93
+ <div key={`${t}-${i}`} style={{
94
+ position: 'absolute', left: x, top: y, width: size, height: size,
95
+ borderRadius: size / 2, background: AMBER, opacity: life,
96
+ boxShadow: `0 0 ${6 * life}px ${AMBER}`,
97
+ }} />
98
+ );
99
+ });
100
+ })}
101
+ </div>
102
+ );
103
+ };
@@ -0,0 +1,119 @@
1
+ // particle-sand-fill —— 粒子落斗成柱
2
+ // 图表卡内 4 根柱,每根柱上方"下雨":14px 方点错峰坠落(重力加速),触堆积面即停
3
+ // + 15% 回弹一下,逐层堆高——堆积高度闭式预解析(第 k 层顶面 = 基线 - (k+1)×粒径,
4
+ // 无真碰撞)。各柱错峰 6f 启动;堆满后粒子面淡出换实体柱 + 顶部数值标签弹出。
5
+ // 结尾全部粒子条件卸载、只剩实体柱 + 标签,真静止 ≥35f。
6
+ // 帧确定性:sin 散列派生每颗出发帧抖动/起点错高,落地帧由高度差闭式反解。
7
+ import React from 'react';
8
+ import { useCurrentFrame, interpolate, Easing } from 'remotion';
9
+ import { G, TitleBlock } from '../_fixtures/Fixtures';
10
+
11
+ const AMBER = '#b45309';
12
+ const frac = (x: number) => x - Math.floor(x);
13
+ const rnd = (i: number, salt: number) => frac(Math.sin(i * 12.9898 + salt * 78.233) * 43758.5453);
14
+
15
+ const CARD = { x: 460, y: 300, w: 1000, h: 560 };
16
+ const PLOT_BOTTOM = CARD.y + CARD.h - 70; // 堆积地面(卡内基线)
17
+ const GRAIN = 14; // 方点边长(宁大勿小:4px 在 1080p 卡内不可感,加码到 14)
18
+ const PER_LAYER = 9; // 每层 9 颗 → 柱宽 126px
19
+ const BAR_W = GRAIN * PER_LAYER;
20
+ const DROP_FROM = 230; // 距各自落点上方 ~230px 起落
21
+ const GRAV = 1.6; // px/f²
22
+ const STAGGER = 6; // 各柱错峰启动
23
+ const RATE = 0.28; // 颗间出发间隔(帧)——最高柱 216 颗需 ~60f 发完,全局 f120 内收束
24
+
25
+ const BARS = [
26
+ { cx: CARD.x + 175, h: 238, label: '238' },
27
+ { cx: CARD.x + 395, h: 336, label: '336' },
28
+ { cx: CARD.x + 615, h: 182, label: '182' },
29
+ { cx: CARD.x + 835, h: 294, label: '294' },
30
+ ].map((b) => ({ ...b, layers: Math.round(b.h / GRAIN), n: Math.round(b.h / GRAIN) * PER_LAYER }));
31
+
32
+ const fallTime = (dist: number) => Math.sqrt((2 * dist) / GRAV);
33
+ const departOf = (bar: number, i: number) => 8 + bar * STAGGER + i * RATE + rnd(i, bar * 7 + 1) * 1.5;
34
+
35
+ export const ParticleSandFill: React.FC = () => {
36
+ const frame = useCurrentFrame();
37
+
38
+ return (
39
+ <div style={{ width: 1920, height: 1080, background: G.bg, position: 'relative', overflow: 'hidden' }}>
40
+ <div style={{ position: 'absolute', top: 110, width: '100%', textAlign: 'center' }}>
41
+ <TitleBlock text="PARTICLE SAND FILL" size={72} />
42
+ </div>
43
+
44
+ {/* 图表卡 */}
45
+ <div style={{
46
+ position: 'absolute', left: CARD.x, top: CARD.y, width: CARD.w, height: CARD.h,
47
+ background: G.card, border: `2px solid ${G.border}`, borderRadius: 14,
48
+ boxSizing: 'border-box', padding: 28, boxShadow: '0 2px 8px rgba(0,0,0,0.06)',
49
+ }}>
50
+ <div style={{ height: 14, width: 260, background: G.bar, borderRadius: 7 }} />
51
+ <div style={{ height: 10, width: 160, background: G.line, borderRadius: 5, marginTop: 10 }} />
52
+ </div>
53
+ {/* 基线 */}
54
+ <div style={{ position: 'absolute', left: CARD.x + 40, top: PLOT_BOTTOM, width: CARD.w - 80, height: 3, background: G.line }} />
55
+
56
+ {BARS.map((bar, b) => {
57
+ const left = bar.cx - BAR_W / 2;
58
+ // 末颗落地帧(闭式):末颗落点在堆顶,坠距仍 ≈DROP_FROM
59
+ const lastLand = departOf(b, bar.n - 1) + fallTime(DROP_FROM);
60
+ const doneAt = lastLand + 7; // 回弹收完 → 开始交接
61
+ const solidOp = interpolate(frame, [doneAt, doneAt + 10], [0, 1], { extrapolateLeft: 'clamp', extrapolateRight: 'clamp' });
62
+ const labelScale = interpolate(frame, [doneAt + 6, doneAt + 18], [0, 1], {
63
+ easing: Easing.out(Easing.back(2.2)),
64
+ extrapolateLeft: 'clamp', extrapolateRight: 'clamp',
65
+ });
66
+
67
+ return (
68
+ <React.Fragment key={b}>
69
+ {solidOp > 0 && (
70
+ <div style={{
71
+ position: 'absolute', left, top: PLOT_BOTTOM - bar.h,
72
+ width: BAR_W, height: bar.h, background: b === 1 ? AMBER : G.bar,
73
+ borderRadius: '6px 6px 0 0', opacity: solidOp,
74
+ }} />
75
+ )}
76
+ {labelScale > 0 && (
77
+ <div style={{
78
+ position: 'absolute', left: bar.cx - 70, top: PLOT_BOTTOM - bar.h - 62, width: 140,
79
+ textAlign: 'center', fontFamily: 'Helvetica, Arial, sans-serif', fontWeight: 800,
80
+ fontSize: 46, color: b === 1 ? AMBER : G.ink,
81
+ transform: `scale(${labelScale})`,
82
+ }}>
83
+ {bar.label}
84
+ </div>
85
+ )}
86
+ {/* 粒子面:交接完成(solidOp=1)即整体条件卸载 → 真静止 */}
87
+ {solidOp < 1 && Array.from({ length: bar.n }).map((_, i) => {
88
+ const depart = departOf(b, i);
89
+ const age = frame - depart;
90
+ if (age <= 0) return null;
91
+ const layer = Math.floor(i / PER_LAYER);
92
+ const col = i % PER_LAYER;
93
+ const targetTop = PLOT_BOTTOM - (layer + 1) * GRAIN; // 闭式堆积面
94
+ const startTop = targetTop - DROP_FROM - rnd(i, b * 13 + 3) * 70;
95
+ const dist = targetTop - startTop;
96
+ const tLand = fallTime(dist);
97
+ let top: number;
98
+ if (age < tLand) {
99
+ top = startTop + 0.5 * GRAV * age * age;
100
+ } else {
101
+ const ba = age - tLand;
102
+ const bounce = ba < 6 ? Math.sin((ba / 6) * Math.PI) * GRAIN * 2 * 0.15 * (1 + rnd(i, b * 13 + 9)) : 0;
103
+ top = targetTop - bounce;
104
+ }
105
+ const amber = b === 1 || rnd(i, b * 13 + 7) < 0.18;
106
+ return (
107
+ <div key={i} style={{
108
+ position: 'absolute', left: left + col * GRAIN + 1, top, width: GRAIN - 2, height: GRAIN - 2,
109
+ background: amber ? AMBER : G.mid, opacity: 1 - solidOp,
110
+ borderRadius: 2,
111
+ }} />
112
+ );
113
+ })}
114
+ </React.Fragment>
115
+ );
116
+ })}
117
+ </div>
118
+ );
119
+ };