dsh-drawai 0.3.3 → 0.4.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 (533) hide show
  1. package/LICENSE +4142 -0
  2. package/README.md +43 -10
  3. package/lib/audio-media.js +147 -0
  4. package/lib/audio-service.js +66 -0
  5. package/lib/canvas-format.js +134 -0
  6. package/lib/client.js +5283 -223
  7. package/lib/comfyui-default-workflow.mjs +1825 -0
  8. package/lib/comfyui-workflow.mjs +426 -0
  9. package/lib/document-commands.js +12 -0
  10. package/lib/document-core.js +29 -0
  11. package/lib/drawing-tasks.js +26 -0
  12. package/lib/imagegen.mjs +596 -0
  13. package/lib/index.js +1758 -129
  14. package/lib/media.js +26 -13
  15. package/lib/mgstyle-core.js +75 -0
  16. package/lib/motion/apply.js +180 -0
  17. package/lib/motion/asset-pack-lock.js +10 -0
  18. package/lib/motion/asset-pack.js +335 -0
  19. package/lib/motion/assets.js +290 -0
  20. package/lib/motion/audio.js +103 -0
  21. package/lib/motion/audiolevel.js +63 -0
  22. package/lib/motion/audiomix.js +144 -0
  23. package/lib/motion/beats.js +337 -0
  24. package/lib/motion/builtin-assets.js +62 -0
  25. package/lib/motion/canvas-spec.js +442 -0
  26. package/lib/motion/capture.js +95 -0
  27. package/lib/motion/cards.js +80 -0
  28. package/lib/motion/collect.js +447 -0
  29. package/lib/motion/delivery.js +112 -0
  30. package/lib/motion/edge-speech.py +90 -0
  31. package/lib/motion/entry.jsx +73 -0
  32. package/lib/motion/export.js +200 -0
  33. package/lib/motion/ffmpeg.js +42 -0
  34. package/lib/motion/fonts.js +71 -0
  35. package/lib/motion/jobs.js +113 -0
  36. package/lib/motion/json.js +4 -0
  37. package/lib/motion/media-catalog.js +59 -0
  38. package/lib/motion/mgstyles/BRIEF-TEMPLATE.md +63 -0
  39. package/lib/motion/mgstyles/briefs/01-flat-vector.md +104 -0
  40. package/lib/motion/mgstyles/briefs/02-line-art.md +97 -0
  41. package/lib/motion/mgstyles/briefs/03-isometric.md +108 -0
  42. package/lib/motion/mgstyles/briefs/05-cel-boil.md +145 -0
  43. package/lib/motion/mgstyles/briefs/06-collage.md +149 -0
  44. package/lib/motion/mgstyles/briefs/07-liquid.md +106 -0
  45. package/lib/motion/mgstyles/briefs/08-morph.md +111 -0
  46. package/lib/motion/mgstyles/briefs/09-bauhaus.md +150 -0
  47. package/lib/motion/mgstyles/briefs/10-synthwave.md +151 -0
  48. package/lib/motion/mgstyles/briefs/12-aurora-glass.md +147 -0
  49. package/lib/motion/mgstyles/briefs/18-hanazi.md +140 -0
  50. package/lib/motion/mgstyles/briefs/19-paperclip.md +156 -0
  51. package/lib/motion/mgstyles/briefs/20-pixel.md +118 -0
  52. package/lib/motion/mgstyles/briefs/22-hud.md +118 -0
  53. package/lib/motion/mgstyles/catalog.d/01-flat-vector.json +34 -0
  54. package/lib/motion/mgstyles/catalog.d/02-line-art.json +34 -0
  55. package/lib/motion/mgstyles/catalog.d/03-isometric.json +35 -0
  56. package/lib/motion/mgstyles/catalog.d/05-cel-boil.json +28 -0
  57. package/lib/motion/mgstyles/catalog.d/06-collage.json +28 -0
  58. package/lib/motion/mgstyles/catalog.d/07-liquid.json +28 -0
  59. package/lib/motion/mgstyles/catalog.d/08-morph.json +28 -0
  60. package/lib/motion/mgstyles/catalog.d/09-bauhaus.json +28 -0
  61. package/lib/motion/mgstyles/catalog.d/10-synthwave.json +28 -0
  62. package/lib/motion/mgstyles/catalog.d/12-aurora-glass.json +28 -0
  63. package/lib/motion/mgstyles/catalog.d/18-hanazi.json +28 -0
  64. package/lib/motion/mgstyles/catalog.d/19-paperclip.json +28 -0
  65. package/lib/motion/mgstyles/catalog.d/20-pixel.json +28 -0
  66. package/lib/motion/mgstyles/catalog.d/22-hud.json +28 -0
  67. package/lib/motion/mgstyles/catalog.json +1356 -0
  68. package/lib/motion/mgstyles/upstream/README.md +147 -0
  69. package/lib/motion/mgstyles/upstream/README.zh-CN.md +147 -0
  70. package/lib/motion/mgstyles/upstream/demos/01-flat-vector/cues.json +1 -0
  71. package/lib/motion/mgstyles/upstream/demos/01-flat-vector/index.html +712 -0
  72. package/lib/motion/mgstyles/upstream/demos/02-line-art/cues.json +331 -0
  73. package/lib/motion/mgstyles/upstream/demos/02-line-art/film.js +676 -0
  74. package/lib/motion/mgstyles/upstream/demos/02-line-art/index.html +18 -0
  75. package/lib/motion/mgstyles/upstream/demos/02-line-art/tools/dump_timing.mjs +26 -0
  76. package/lib/motion/mgstyles/upstream/demos/03-isometric/cues.json +109 -0
  77. package/lib/motion/mgstyles/upstream/demos/03-isometric/index.html +25 -0
  78. package/lib/motion/mgstyles/upstream/demos/03-isometric/js/anim.js +82 -0
  79. package/lib/motion/mgstyles/upstream/demos/03-isometric/js/main.js +219 -0
  80. package/lib/motion/mgstyles/upstream/demos/03-isometric/js/night5.js +180 -0
  81. package/lib/motion/mgstyles/upstream/demos/03-isometric/js/render.js +202 -0
  82. package/lib/motion/mgstyles/upstream/demos/03-isometric/js/title.js +167 -0
  83. package/lib/motion/mgstyles/upstream/demos/03-isometric/js/title5.js +294 -0
  84. package/lib/motion/mgstyles/upstream/demos/03-isometric/js/ui.js +141 -0
  85. package/lib/motion/mgstyles/upstream/demos/03-isometric/js/world.js +1399 -0
  86. package/lib/motion/mgstyles/upstream/demos/05-cel-boil/cues.json +157 -0
  87. package/lib/motion/mgstyles/upstream/demos/05-cel-boil/index.html +34 -0
  88. package/lib/motion/mgstyles/upstream/demos/05-cel-boil/js/engine.js +326 -0
  89. package/lib/motion/mgstyles/upstream/demos/05-cel-boil/js/scene.js +2036 -0
  90. package/lib/motion/mgstyles/upstream/demos/06-collage/assets/gen/layout.json +157 -0
  91. package/lib/motion/mgstyles/upstream/demos/06-collage/cues.json +80 -0
  92. package/lib/motion/mgstyles/upstream/demos/06-collage/index.html +889 -0
  93. package/lib/motion/mgstyles/upstream/demos/07-liquid/cues.json +100 -0
  94. package/lib/motion/mgstyles/upstream/demos/07-liquid/index.html +108 -0
  95. package/lib/motion/mgstyles/upstream/demos/07-liquid/js/engine.js +153 -0
  96. package/lib/motion/mgstyles/upstream/demos/07-liquid/js/links.js +64 -0
  97. package/lib/motion/mgstyles/upstream/demos/07-liquid/js/lookdev.js +46 -0
  98. package/lib/motion/mgstyles/upstream/demos/07-liquid/js/scene.js +963 -0
  99. package/lib/motion/mgstyles/upstream/demos/07-liquid/js/shaders.js +647 -0
  100. package/lib/motion/mgstyles/upstream/demos/07-liquid/js/textsdf.js +114 -0
  101. package/lib/motion/mgstyles/upstream/demos/07-liquid/js/type.js +50 -0
  102. package/lib/motion/mgstyles/upstream/demos/08-morph/cues.json +131 -0
  103. package/lib/motion/mgstyles/upstream/demos/08-morph/glyphs.json +1 -0
  104. package/lib/motion/mgstyles/upstream/demos/08-morph/index.html +901 -0
  105. package/lib/motion/mgstyles/upstream/demos/09-bauhaus/cues.json +270 -0
  106. package/lib/motion/mgstyles/upstream/demos/09-bauhaus/film.js +697 -0
  107. package/lib/motion/mgstyles/upstream/demos/09-bauhaus/index.html +12 -0
  108. package/lib/motion/mgstyles/upstream/demos/10-synthwave/cues.json +44 -0
  109. package/lib/motion/mgstyles/upstream/demos/10-synthwave/index.html +1028 -0
  110. package/lib/motion/mgstyles/upstream/demos/12-aurora-glass/cues.json +67 -0
  111. package/lib/motion/mgstyles/upstream/demos/12-aurora-glass/index.html +16 -0
  112. package/lib/motion/mgstyles/upstream/demos/12-aurora-glass/main.js +967 -0
  113. package/lib/motion/mgstyles/upstream/demos/12-aurora-glass/shaders.js +468 -0
  114. package/lib/motion/mgstyles/upstream/demos/18-hanazi/cues.json +117 -0
  115. package/lib/motion/mgstyles/upstream/demos/18-hanazi/index.html +541 -0
  116. package/lib/motion/mgstyles/upstream/demos/19-paperclip/assets/countries-110m.json +1 -0
  117. package/lib/motion/mgstyles/upstream/demos/19-paperclip/assets/stickers/meta.json +34 -0
  118. package/lib/motion/mgstyles/upstream/demos/19-paperclip/cues.json +285 -0
  119. package/lib/motion/mgstyles/upstream/demos/19-paperclip/index.html +599 -0
  120. package/lib/motion/mgstyles/upstream/demos/20-pixel/cues.json +42 -0
  121. package/lib/motion/mgstyles/upstream/demos/20-pixel/film.js +914 -0
  122. package/lib/motion/mgstyles/upstream/demos/20-pixel/index.html +18 -0
  123. package/lib/motion/mgstyles/upstream/demos/22-hud/cues.json +108 -0
  124. package/lib/motion/mgstyles/upstream/demos/22-hud/index.html +125 -0
  125. package/lib/motion/mgstyles/upstream/demos/22-hud/js/holo.js +275 -0
  126. package/lib/motion/mgstyles/upstream/demos/22-hud/js/hud.js +855 -0
  127. package/lib/motion/mgstyles/upstream/demos/22-hud/js/post.js +150 -0
  128. package/lib/motion/mgstyles/upstream/demos/22-hud/js/util.js +65 -0
  129. package/lib/motion/mgstyles/upstream/demos/22-hud/js/v5.js +142 -0
  130. package/lib/motion/mgstyles/upstream/harness/render.mjs +319 -0
  131. package/lib/motion/mgstyles/upstream/manifest.json +269 -0
  132. package/lib/motion/mgstyles/upstream/prompts/01-flat-vector.md +98 -0
  133. package/lib/motion/mgstyles/upstream/prompts/02-line-art.md +95 -0
  134. package/lib/motion/mgstyles/upstream/prompts/03-isometric.md +97 -0
  135. package/lib/motion/mgstyles/upstream/prompts/05-cel-boil.md +95 -0
  136. package/lib/motion/mgstyles/upstream/prompts/06-collage.md +95 -0
  137. package/lib/motion/mgstyles/upstream/prompts/07-liquid.md +98 -0
  138. package/lib/motion/mgstyles/upstream/prompts/08-morph.md +95 -0
  139. package/lib/motion/mgstyles/upstream/prompts/09-bauhaus.md +96 -0
  140. package/lib/motion/mgstyles/upstream/prompts/10-synthwave.md +95 -0
  141. package/lib/motion/mgstyles/upstream/prompts/12-aurora-glass.md +96 -0
  142. package/lib/motion/mgstyles/upstream/prompts/18-hanazi.md +95 -0
  143. package/lib/motion/mgstyles/upstream/prompts/19-paperclip.md +96 -0
  144. package/lib/motion/mgstyles/upstream/prompts/20-pixel.md +96 -0
  145. package/lib/motion/mgstyles/upstream/prompts/22-hud.md +95 -0
  146. package/lib/motion/mgstyles/upstream/rubric.md +51 -0
  147. package/lib/motion/mgstyles/upstream/template.md +36 -0
  148. package/lib/motion/pixelqa.js +198 -0
  149. package/lib/motion/preview.js +95 -0
  150. package/lib/motion/project.js +395 -0
  151. package/lib/motion/qa.js +290 -0
  152. package/lib/motion/reference-media.jsx +10 -0
  153. package/lib/motion/render-settings.js +112 -0
  154. package/lib/motion/render.js +159 -0
  155. package/lib/motion/scene-kit.js +183 -0
  156. package/lib/motion/sfx.js +232 -0
  157. package/lib/motion/shotcraft/ClipCard.tsx +204 -0
  158. package/lib/motion/shotcraft/catalog.json +2461 -0
  159. package/lib/motion/shotcraft/upstream/SKILL.md +286 -0
  160. package/lib/motion/shotcraft/upstream/assets/lib/Caption.tsx +54 -0
  161. package/lib/motion/shotcraft/upstream/assets/lib/ClipCard.tsx +200 -0
  162. package/lib/motion/shotcraft/upstream/assets/lib/DigitRoll.tsx +45 -0
  163. package/lib/motion/shotcraft/upstream/assets/lib/FlashCut.tsx +20 -0
  164. package/lib/motion/shotcraft/upstream/assets/lib/FlatPanel.tsx +65 -0
  165. package/lib/motion/shotcraft/upstream/assets/lib/PageCam.tsx +151 -0
  166. package/lib/motion/shotcraft/upstream/assets/lib/VerticalTicker.tsx +129 -0
  167. package/lib/motion/shotcraft/upstream/assets/lib/helpers/camera.tsx +75 -0
  168. package/lib/motion/shotcraft/upstream/assets/lib/helpers/motion.ts +40 -0
  169. package/lib/motion/shotcraft/upstream/assets/lib/helpers/rand.ts +11 -0
  170. package/lib/motion/shotcraft/upstream/assets/lib/helpers/shake.ts +10 -0
  171. package/lib/motion/shotcraft/upstream/assets/scripts/__pycache__/sfx-source.cpython-313.pyc +0 -0
  172. package/lib/motion/shotcraft/upstream/assets/scripts/build-readme-cover.mjs +49 -0
  173. package/lib/motion/shotcraft/upstream/assets/scripts/capture-template.mjs +210 -0
  174. package/lib/motion/shotcraft/upstream/assets/scripts/sfx-source.py +423 -0
  175. package/lib/motion/shotcraft/upstream/assets/scripts/smoke-render-demos.py +170 -0
  176. package/lib/motion/shotcraft/upstream/assets/scripts/test_sfx_source.py +157 -0
  177. package/lib/motion/shotcraft/upstream/demos/README.md +120 -0
  178. package/lib/motion/shotcraft/upstream/demos/_fixtures/Brand.tsx +112 -0
  179. package/lib/motion/shotcraft/upstream/demos/_fixtures/Fixtures.tsx +647 -0
  180. package/lib/motion/shotcraft/upstream/demos/_fixtures/Look.tsx +316 -0
  181. package/lib/motion/shotcraft/upstream/demos/_fixtures/Motion.tsx +82 -0
  182. package/lib/motion/shotcraft/upstream/demos/_fixtures/PageCam2D.tsx +115 -0
  183. package/lib/motion/shotcraft/upstream/demos/_fixtures/Polish.tsx +243 -0
  184. package/lib/motion/shotcraft/upstream/demos/_textures/live-layout.json +389 -0
  185. package/lib/motion/shotcraft/upstream/demos/camera/basic-3d-scene/Basic3DScene.tsx +250 -0
  186. package/lib/motion/shotcraft/upstream/demos/camera/crash-zoom-punch/CrashImpactReal.tsx +305 -0
  187. package/lib/motion/shotcraft/upstream/demos/camera/crash-zoom-punch/CrashZoomReal.tsx +246 -0
  188. package/lib/motion/shotcraft/upstream/demos/camera/cursor-flyover/CursorFlyover.tsx +390 -0
  189. package/lib/motion/shotcraft/upstream/demos/camera/depth-layer-moves/MultiplaneReal.tsx +138 -0
  190. package/lib/motion/shotcraft/upstream/demos/camera/graze-face-tour/GrazeFaceTour.tsx +542 -0
  191. package/lib/motion/shotcraft/upstream/demos/camera/overhead-camera-moves/OverheadTabletopDrop.tsx +315 -0
  192. package/lib/motion/shotcraft/upstream/demos/camera/overhead-camera-moves/TiltReveal.tsx +299 -0
  193. package/lib/motion/shotcraft/upstream/demos/camera/space-camera-moves/DroneDiveLanding.tsx +173 -0
  194. package/lib/motion/shotcraft/upstream/demos/camera/space-camera-moves/ExplodedView.tsx +348 -0
  195. package/lib/motion/shotcraft/upstream/demos/camera/steep-tilt-glide/SteepTiltGlide.tsx +366 -0
  196. package/lib/motion/shotcraft/upstream/demos/camera/tension-camera-moves/BulletTimeFreezeOrbit.tsx +279 -0
  197. package/lib/motion/shotcraft/upstream/demos/camera/tension-camera-moves/PullBackIsolation.tsx +184 -0
  198. package/lib/motion/shotcraft/upstream/demos/camera/terminal-3d/Terminal3D.tsx +390 -0
  199. package/lib/motion/shotcraft/upstream/demos/data/before-after-slider-scrub/BeforeAfterSliderScrub.tsx +155 -0
  200. package/lib/motion/shotcraft/upstream/demos/data/chart-live-moves/AxisRescaleShockV2.tsx +303 -0
  201. package/lib/motion/shotcraft/upstream/demos/data/chart-live-moves/OscilloscopeStreamV2.tsx +290 -0
  202. package/lib/motion/shotcraft/upstream/demos/data/chart-live-moves/UnitDotSwarmRegroupV2.tsx +278 -0
  203. package/lib/motion/shotcraft/upstream/demos/data/gauge-readout-moves/NeedleSweepSelftest.tsx +307 -0
  204. package/lib/motion/shotcraft/upstream/demos/data/gauge-readout-moves/TapeScrollFixedPointer.tsx +215 -0
  205. package/lib/motion/shotcraft/upstream/demos/data/scroll-brake-moves/BrakeReticleLock.tsx +299 -0
  206. package/lib/motion/shotcraft/upstream/demos/data/scroll-brake-moves/ChangelogScrollBrake.tsx +232 -0
  207. package/lib/motion/shotcraft/upstream/demos/data/timeline-travel/TimelineTravel.tsx +290 -0
  208. package/lib/motion/shotcraft/upstream/demos/effects/assemble-then-type-flyin/AssembleThenTypeFlyin.tsx +273 -0
  209. package/lib/motion/shotcraft/upstream/demos/effects/aurora-bloom-bg-flip/AuroraBloomBgFlip.tsx +167 -0
  210. package/lib/motion/shotcraft/upstream/demos/effects/brand-frame-snap/BrandFrameSnap.tsx +536 -0
  211. package/lib/motion/shotcraft/upstream/demos/effects/fui-hud-moves/ReticleLockOn.tsx +164 -0
  212. package/lib/motion/shotcraft/upstream/demos/effects/glow-flyline-moves/FlylineArc.tsx +175 -0
  213. package/lib/motion/shotcraft/upstream/demos/effects/glow-flyline-moves/GlowOrbAmbient.tsx +197 -0
  214. package/lib/motion/shotcraft/upstream/demos/effects/glow-flyline-moves/OrbFlylineRelay.tsx +241 -0
  215. package/lib/motion/shotcraft/upstream/demos/effects/icon-performance-moves/AttentionBounce.tsx +279 -0
  216. package/lib/motion/shotcraft/upstream/demos/effects/impact-feedback/AnimeImpact.tsx +230 -0
  217. package/lib/motion/shotcraft/upstream/demos/effects/impact-feedback/HitCounter.tsx +345 -0
  218. package/lib/motion/shotcraft/upstream/demos/effects/light-play-moves/SheenSweepRetry.tsx +275 -0
  219. package/lib/motion/shotcraft/upstream/demos/effects/light-play-moves/SpotlightSweepReveal.tsx +229 -0
  220. package/lib/motion/shotcraft/upstream/demos/effects/radial-ripple-phone-chips/RadialRipplePhoneChips.tsx +312 -0
  221. package/lib/motion/shotcraft/upstream/demos/effects/riso-print-hits/RisoMisregistrationHit.tsx +222 -0
  222. package/lib/motion/shotcraft/upstream/demos/effects/scan-bracket-sweep/ScanBracketSweep.tsx +295 -0
  223. package/lib/motion/shotcraft/upstream/demos/effects/scanline-annotate-focus/ScanlineAnnotateFocus.tsx +329 -0
  224. package/lib/motion/shotcraft/upstream/demos/effects/scanline-assemble-flyin/ScanlineAssembleFlyin.tsx +315 -0
  225. package/lib/motion/shotcraft/upstream/demos/effects/slam-entrance-moves/ImpactBurstKit.tsx +264 -0
  226. package/lib/motion/shotcraft/upstream/demos/effects/slam-entrance-moves/KanadaPerspectiveSnap.tsx +260 -0
  227. package/lib/motion/shotcraft/upstream/demos/effects/slam-entrance-moves/ScoreSlam.tsx +263 -0
  228. package/lib/motion/shotcraft/upstream/demos/effects/spotlight-sweep-moves/CornerSpotlightReveal.tsx +123 -0
  229. package/lib/motion/shotcraft/upstream/demos/effects/spotlight-sweep-moves/GlowWakeSleepPanel.tsx +187 -0
  230. package/lib/motion/shotcraft/upstream/demos/effects/spotlight-sweep-moves/SlideSpotlightPan.tsx +175 -0
  231. package/lib/motion/shotcraft/upstream/demos/interaction/autolayout-gap-dial/AutolayoutGapDial.tsx +305 -0
  232. package/lib/motion/shotcraft/upstream/demos/interaction/canvas-materialize-moves/DiagramCascadeBuild.tsx +350 -0
  233. package/lib/motion/shotcraft/upstream/demos/interaction/canvas-materialize-moves/PanelToCanvasMaterialize.tsx +352 -0
  234. package/lib/motion/shotcraft/upstream/demos/interaction/chip-grid-single-select-blackout/ChipGridSingleSelectBlackout.tsx +218 -0
  235. package/lib/motion/shotcraft/upstream/demos/interaction/collab-cursor-moves/CursorCastEnsemble.tsx +297 -0
  236. package/lib/motion/shotcraft/upstream/demos/interaction/glass-pill-dictation-typing/GlassPillDictationTyping.tsx +157 -0
  237. package/lib/motion/shotcraft/upstream/demos/interaction/hashtag-to-pill-materialize/HashtagToPillMaterialize.tsx +218 -0
  238. package/lib/motion/shotcraft/upstream/demos/interaction/picker-carousel-feature-cycle/PickerCarouselFeatureCycle.tsx +202 -0
  239. package/lib/motion/shotcraft/upstream/demos/interaction/segmented-thumb-hero/SegmentedThumbHero.tsx +265 -0
  240. package/lib/motion/shotcraft/upstream/demos/interaction/theme-switch-moves/PaletteThemeRipple.tsx +457 -0
  241. package/lib/motion/shotcraft/upstream/demos/interaction/theme-switch-moves/ThemeSweepToggle.tsx +446 -0
  242. package/lib/motion/shotcraft/upstream/demos/interaction/type-and-filter/TypeAndFilter.tsx +249 -0
  243. package/lib/motion/shotcraft/upstream/demos/interaction/voice-waveform-live/VoiceWaveformLive.tsx +278 -0
  244. package/lib/motion/shotcraft/upstream/demos/opening/crane-rise-reveal/CraneRiseReveal.tsx +332 -0
  245. package/lib/motion/shotcraft/upstream/demos/opening/dataviz-landscape-open/DatavizLandscapeOpen.tsx +358 -0
  246. package/lib/motion/shotcraft/upstream/demos/opening/fracture/Fracture.tsx +201 -0
  247. package/lib/motion/shotcraft/upstream/demos/opening/icon-field-colorize/IconFieldColorize.tsx +200 -0
  248. package/lib/motion/shotcraft/upstream/demos/opening/letterspace-materialize/LetterspaceMaterialize.tsx +208 -0
  249. package/lib/motion/shotcraft/upstream/demos/opening/magician-card-flourish/MagicianCardFlourish.tsx +341 -0
  250. package/lib/motion/shotcraft/upstream/demos/opening/orbit-ring-title-open/OrbitRingTitleOpen.tsx +389 -0
  251. package/lib/motion/shotcraft/upstream/demos/opening/spotlight-hero-card/SpotlightHeroCard.tsx +293 -0
  252. package/lib/motion/shotcraft/upstream/demos/opening/stroke-segment-build/StrokeSegmentBuild.tsx +183 -0
  253. package/lib/motion/shotcraft/upstream/demos/opening/text-as-mask/TextAsMask.tsx +245 -0
  254. package/lib/motion/shotcraft/upstream/demos/outro/grain-dissolve/GrainDissolve.tsx +222 -0
  255. package/lib/motion/shotcraft/upstream/demos/outro/logo-shrink-wordmark-lockup/LogoShrinkWordmarkLockup.tsx +223 -0
  256. package/lib/motion/shotcraft/upstream/demos/outro/neon-triple-marquee/NeonTripleMarquee.tsx +217 -0
  257. package/lib/motion/shotcraft/upstream/demos/outro/outro-group-photo-launch/OutroGroupPhotoLaunch.tsx +343 -0
  258. package/lib/motion/shotcraft/upstream/demos/outro/ui-strip-away-outro/UiStripAwayOutro.tsx +357 -0
  259. package/lib/motion/shotcraft/upstream/demos/outro/ui-to-brand-morph/IconFlipBloomLogo.tsx +187 -0
  260. package/lib/motion/shotcraft/upstream/demos/outro/ui-to-brand-morph/InputMorphsIntoLogo.tsx +333 -0
  261. package/lib/motion/shotcraft/upstream/demos/rhythm/beat-cut-moves/PaparazziFlash.tsx +274 -0
  262. package/lib/motion/shotcraft/upstream/demos/rhythm/beat-step-list-theme-cycle/BeatStepListThemeCycle.tsx +270 -0
  263. package/lib/motion/shotcraft/upstream/demos/rhythm/panel-grid-moves/ComicPanelSplit.tsx +430 -0
  264. package/lib/motion/shotcraft/upstream/demos/rhythm/quad-split-parallel-scenes/QuadSplitParallelScenes.tsx +252 -0
  265. package/lib/motion/shotcraft/upstream/demos/rhythm/rhythm-interrupt-moves/JumpCutPunchIn.tsx +106 -0
  266. package/lib/motion/shotcraft/upstream/demos/rhythm/sakuga-timing-shift/SakugaTimingShift.tsx +288 -0
  267. package/lib/motion/shotcraft/upstream/demos/rhythm/speed-ramp-freeze/FreezeAnnotateReal.tsx +362 -0
  268. package/lib/motion/shotcraft/upstream/demos/rhythm/trailer-grammar-moves/TrailerBumper.tsx +168 -0
  269. package/lib/motion/shotcraft/upstream/demos/transition/bottom-push-stack-wipe/BottomPushStackWipe.tsx +310 -0
  270. package/lib/motion/shotcraft/upstream/demos/transition/card-flip-reveal/CardFlipReveal.tsx +261 -0
  271. package/lib/motion/shotcraft/upstream/demos/transition/card-flock-tumble/CardFlockTumble.tsx +459 -0
  272. package/lib/motion/shotcraft/upstream/demos/transition/circle-match-iris/CircleMatchIris.tsx +294 -0
  273. package/lib/motion/shotcraft/upstream/demos/transition/gradient-transition/GradientTransition.tsx +161 -0
  274. package/lib/motion/shotcraft/upstream/demos/transition/line-carry-transition/LineCarryTransition.tsx +248 -0
  275. package/lib/motion/shotcraft/upstream/demos/transition/mosaic-reframe/MosaicReframe.tsx +359 -0
  276. package/lib/motion/shotcraft/upstream/demos/transition/page-turn-transitions/BarnDoorSplit.tsx +227 -0
  277. package/lib/motion/shotcraft/upstream/demos/transition/print-texture-transitions/InkBleedReveal.tsx +162 -0
  278. package/lib/motion/shotcraft/upstream/demos/transition/shot-transitions/PortalWipeV2.tsx +248 -0
  279. package/lib/motion/shotcraft/upstream/demos/transition/shot-transitions/WhipBrakeReal.tsx +186 -0
  280. package/lib/motion/shotcraft/upstream/demos/transition/tear-streak-transitions/GlitchDisplace.tsx +355 -0
  281. package/lib/motion/shotcraft/upstream/demos/transition/transition-hidden-cut/InvisibleCut.tsx +272 -0
  282. package/lib/motion/shotcraft/upstream/demos/transition/transition-hidden-cut/LightLeakBurn.tsx +262 -0
  283. package/lib/motion/shotcraft/upstream/demos/transition/transition-hidden-cut/VersusSlam.tsx +217 -0
  284. package/lib/motion/shotcraft/upstream/demos/transition/transition-travel/LetterformZoom.tsx +285 -0
  285. package/lib/motion/shotcraft/upstream/demos/transition/white-flash-logo-simplify-cut/WhiteFlashLogoSimplifyCut.tsx +205 -0
  286. package/lib/motion/shotcraft/upstream/demos/transition/wipe-transitions/BlindsSlice.tsx +178 -0
  287. package/lib/motion/shotcraft/upstream/demos/typography/blur-slide/BlurSlide.tsx +147 -0
  288. package/lib/motion/shotcraft/upstream/demos/typography/brace-expand/BraceExpand.tsx +143 -0
  289. package/lib/motion/shotcraft/upstream/demos/typography/brand-ink-open/BrandInkOpen.tsx +134 -0
  290. package/lib/motion/shotcraft/upstream/demos/typography/countdown-arc-scatter/CountdownArcScatter.tsx +217 -0
  291. package/lib/motion/shotcraft/upstream/demos/typography/flying-words/FlyingWords.tsx +198 -0
  292. package/lib/motion/shotcraft/upstream/demos/typography/glitch-cycle/GlitchCycle.tsx +221 -0
  293. package/lib/motion/shotcraft/upstream/demos/typography/gradient-word-sweep/GradientWordSweep.tsx +312 -0
  294. package/lib/motion/shotcraft/upstream/demos/typography/lead-word-zoom-assemble/LeadWordZoomAssemble.tsx +261 -0
  295. package/lib/motion/shotcraft/upstream/demos/typography/marker-underline-title/MarkerUnderlineTitle.tsx +121 -0
  296. package/lib/motion/shotcraft/upstream/demos/typography/outline-word-fill/OutlineWordFill.tsx +153 -0
  297. package/lib/motion/shotcraft/upstream/demos/typography/paper-title-card/PaperTitleCard.tsx +179 -0
  298. package/lib/motion/shotcraft/upstream/demos/typography/pill-chip-slot-cycle-handled/PillChipSlotCycleHandled.tsx +140 -0
  299. package/lib/motion/shotcraft/upstream/demos/typography/pill-slot-cycle/PillSlotCycle.tsx +309 -0
  300. package/lib/motion/shotcraft/upstream/demos/typography/text-column-converge/TextColumnConverge.tsx +191 -0
  301. package/lib/motion/shotcraft/upstream/demos/typography/title-demote-to-label/TitleDemoteToLabel.tsx +292 -0
  302. package/lib/motion/shotcraft/upstream/demos/typography/type-assembly-moves/LetterformDriftAssembly.tsx +135 -0
  303. package/lib/motion/shotcraft/upstream/demos/typography/type-assembly-moves/SplitTextStagger.tsx +124 -0
  304. package/lib/motion/shotcraft/upstream/demos/typography/type-assembly-moves/TextOnPath.tsx +255 -0
  305. package/lib/motion/shotcraft/upstream/demos/typography/type-entrance-moves/LetterDropPhysics.tsx +173 -0
  306. package/lib/motion/shotcraft/upstream/demos/typography/type-rhythm-sync/FontWeightPump.tsx +225 -0
  307. package/lib/motion/shotcraft/upstream/demos/typography/type-rhythm-sync/KaraokeFillSync.tsx +141 -0
  308. package/lib/motion/shotcraft/upstream/demos/typography/typewriter-moves/TypewriterErrorRetype.tsx +137 -0
  309. package/lib/motion/shotcraft/upstream/demos/typography/vertical-word-roll-blur-cycle/VerticalWordRollBlurCycle.tsx +147 -0
  310. package/lib/motion/shotcraft/upstream/demos/typography/word-relay-filmstrip/WordRelayFilmstrip.tsx +409 -0
  311. package/lib/motion/shotcraft/upstream/demos/typography/word-relay-geometry/WordRelayGeometry.tsx +280 -0
  312. package/lib/motion/shotcraft/upstream/demos/ui-entrance/avatar-bracket-carousel/AvatarBracketCarousel.tsx +271 -0
  313. package/lib/motion/shotcraft/upstream/demos/ui-entrance/bezier-source-converge-merge/BezierSourceConvergeMerge.tsx +385 -0
  314. package/lib/motion/shotcraft/upstream/demos/ui-entrance/card-stack/CardStack.tsx +312 -0
  315. package/lib/motion/shotcraft/upstream/demos/ui-entrance/carousel-3d/Carousel3D.tsx +303 -0
  316. package/lib/motion/shotcraft/upstream/demos/ui-entrance/clipcard-looping/ClipCardLooping.tsx +77 -0
  317. package/lib/motion/shotcraft/upstream/demos/ui-entrance/cloner-depth-echo/ClonerDepthEcho.tsx +311 -0
  318. package/lib/motion/shotcraft/upstream/demos/ui-entrance/deck-deal-flyin/DeckDealFlyin.tsx +307 -0
  319. package/lib/motion/shotcraft/upstream/demos/ui-entrance/doc-park-left-pill-deal/DocParkLeftPillDeal.tsx +349 -0
  320. package/lib/motion/shotcraft/upstream/demos/ui-entrance/document-typewriter-reveal/DocumentTypewriterReveal.tsx +255 -0
  321. package/lib/motion/shotcraft/upstream/demos/ui-entrance/draw-svg-trace/DrawSvgTrace.tsx +244 -0
  322. package/lib/motion/shotcraft/upstream/demos/ui-entrance/element-body-moves/ContactShadowLift.tsx +217 -0
  323. package/lib/motion/shotcraft/upstream/demos/ui-entrance/integration-hub-map/IntegrationHubMap.tsx +652 -0
  324. package/lib/motion/shotcraft/upstream/demos/ui-entrance/list-reveal/ListReveal.tsx +153 -0
  325. package/lib/motion/shotcraft/upstream/demos/ui-entrance/list-stack-press/ListStackPress.tsx +238 -0
  326. package/lib/motion/shotcraft/upstream/demos/ui-entrance/neon-frame-forerun/NeonFrameForerun.tsx +324 -0
  327. package/lib/motion/shotcraft/upstream/demos/ui-entrance/neon-frame-orbit-drop/NeonFrameForerunOrbit.tsx +354 -0
  328. package/lib/motion/shotcraft/upstream/demos/ui-entrance/page-waterfall-wall/PageWaterfallWall.tsx +101 -0
  329. package/lib/motion/shotcraft/upstream/demos/ui-entrance/page-waterfall-wall/VerticalTicker.tsx +129 -0
  330. package/lib/motion/shotcraft/upstream/demos/ui-entrance/product-card-progressive-assemble/ProductCardProgressiveAssemble.tsx +297 -0
  331. package/lib/motion/shotcraft/upstream/demos/ui-entrance/radial-wave/RadialWave.tsx +57 -0
  332. package/lib/motion/shotcraft/upstream/demos/ui-entrance/research-card-stack-scroll/ResearchCardStackScroll.tsx +155 -0
  333. package/lib/motion/shotcraft/upstream/demos/ui-entrance/row-embed/RowEmbed.tsx +175 -0
  334. package/lib/motion/shotcraft/upstream/demos/ui-entrance/value-stagger-gradient/ValueStaggerGradient.tsx +153 -0
  335. package/lib/motion/shotcraft/upstream/demos/ui-entrance/wall-reveal-moves/BentoLightUp.tsx +146 -0
  336. package/lib/motion/shotcraft/upstream/demos/ui-entrance/wall-reveal-moves/WireframeDrawOn.tsx +226 -0
  337. package/lib/motion/shotcraft/upstream/gallery/api/library.json +1 -0
  338. package/lib/motion/shotcraft/upstream/manifest.json +2715 -0
  339. package/lib/motion/shotcraft/upstream/references/aesthetic-rules.md +193 -0
  340. package/lib/motion/shotcraft/upstream/references/final-review.md +121 -0
  341. package/lib/motion/shotcraft/upstream/references/guided-free-creation.md +199 -0
  342. package/lib/motion/shotcraft/upstream/references/jianying-export.md +183 -0
  343. package/lib/motion/shotcraft/upstream/references/music-beat-sync.md +257 -0
  344. package/lib/motion/shotcraft/upstream/references/pipeline.md +382 -0
  345. package/lib/motion/shotcraft/upstream/references/publish-upload-post.md +111 -0
  346. package/lib/motion/shotcraft/upstream/references/sequences/promo-energy-arc.md +50 -0
  347. package/lib/motion/shotcraft/upstream/references/sfx-sourcing.md +95 -0
  348. package/lib/motion/shotcraft/upstream/references/shots/camera/basic-3d-scene.md +41 -0
  349. package/lib/motion/shotcraft/upstream/references/shots/camera/crash-zoom-punch.md +52 -0
  350. package/lib/motion/shotcraft/upstream/references/shots/camera/cursor-flyover.md +39 -0
  351. package/lib/motion/shotcraft/upstream/references/shots/camera/depth-layer-moves.md +39 -0
  352. package/lib/motion/shotcraft/upstream/references/shots/camera/graze-face-tour.md +57 -0
  353. package/lib/motion/shotcraft/upstream/references/shots/camera/overhead-camera-moves.md +51 -0
  354. package/lib/motion/shotcraft/upstream/references/shots/camera/space-camera-moves.md +46 -0
  355. package/lib/motion/shotcraft/upstream/references/shots/camera/steep-tilt-glide.md +52 -0
  356. package/lib/motion/shotcraft/upstream/references/shots/camera/tension-camera-moves.md +43 -0
  357. package/lib/motion/shotcraft/upstream/references/shots/camera/terminal-3d.md +42 -0
  358. package/lib/motion/shotcraft/upstream/references/shots/data/before-after-slider-scrub.md +48 -0
  359. package/lib/motion/shotcraft/upstream/references/shots/data/chart-live-moves.md +52 -0
  360. package/lib/motion/shotcraft/upstream/references/shots/data/gauge-readout-moves.md +45 -0
  361. package/lib/motion/shotcraft/upstream/references/shots/data/scroll-brake-moves.md +46 -0
  362. package/lib/motion/shotcraft/upstream/references/shots/data/timeline-travel.md +44 -0
  363. package/lib/motion/shotcraft/upstream/references/shots/effects/assemble-then-type-flyin.md +63 -0
  364. package/lib/motion/shotcraft/upstream/references/shots/effects/aurora-bloom-bg-flip.md +54 -0
  365. package/lib/motion/shotcraft/upstream/references/shots/effects/brand-frame-snap.md +58 -0
  366. package/lib/motion/shotcraft/upstream/references/shots/effects/fui-hud-moves.md +35 -0
  367. package/lib/motion/shotcraft/upstream/references/shots/effects/glow-flyline-moves.md +53 -0
  368. package/lib/motion/shotcraft/upstream/references/shots/effects/icon-performance-moves.md +42 -0
  369. package/lib/motion/shotcraft/upstream/references/shots/effects/impact-feedback.md +50 -0
  370. package/lib/motion/shotcraft/upstream/references/shots/effects/light-play-moves.md +46 -0
  371. package/lib/motion/shotcraft/upstream/references/shots/effects/radial-ripple-phone-chips.md +56 -0
  372. package/lib/motion/shotcraft/upstream/references/shots/effects/riso-print-hits.md +49 -0
  373. package/lib/motion/shotcraft/upstream/references/shots/effects/scan-bracket-sweep.md +50 -0
  374. package/lib/motion/shotcraft/upstream/references/shots/effects/scanline-annotate-focus.md +53 -0
  375. package/lib/motion/shotcraft/upstream/references/shots/effects/scanline-assemble-flyin.md +53 -0
  376. package/lib/motion/shotcraft/upstream/references/shots/effects/slam-entrance-moves.md +55 -0
  377. package/lib/motion/shotcraft/upstream/references/shots/effects/spotlight-sweep-moves.md +52 -0
  378. package/lib/motion/shotcraft/upstream/references/shots/interaction/autolayout-gap-dial.md +60 -0
  379. package/lib/motion/shotcraft/upstream/references/shots/interaction/canvas-materialize-moves.md +57 -0
  380. package/lib/motion/shotcraft/upstream/references/shots/interaction/chip-grid-single-select-blackout.md +51 -0
  381. package/lib/motion/shotcraft/upstream/references/shots/interaction/collab-cursor-moves.md +41 -0
  382. package/lib/motion/shotcraft/upstream/references/shots/interaction/glass-pill-dictation-typing.md +53 -0
  383. package/lib/motion/shotcraft/upstream/references/shots/interaction/hashtag-to-pill-materialize.md +60 -0
  384. package/lib/motion/shotcraft/upstream/references/shots/interaction/picker-carousel-feature-cycle.md +55 -0
  385. package/lib/motion/shotcraft/upstream/references/shots/interaction/segmented-thumb-hero.md +57 -0
  386. package/lib/motion/shotcraft/upstream/references/shots/interaction/theme-switch-moves.md +47 -0
  387. package/lib/motion/shotcraft/upstream/references/shots/interaction/type-and-filter.md +37 -0
  388. package/lib/motion/shotcraft/upstream/references/shots/interaction/voice-waveform-live.md +54 -0
  389. package/lib/motion/shotcraft/upstream/references/shots/opening/brand-ink-open.md +36 -0
  390. package/lib/motion/shotcraft/upstream/references/shots/opening/crane-rise-reveal.md +56 -0
  391. package/lib/motion/shotcraft/upstream/references/shots/opening/dataviz-landscape-open.md +56 -0
  392. package/lib/motion/shotcraft/upstream/references/shots/opening/fracture.md +40 -0
  393. package/lib/motion/shotcraft/upstream/references/shots/opening/icon-field-colorize.md +60 -0
  394. package/lib/motion/shotcraft/upstream/references/shots/opening/letterspace-materialize.md +57 -0
  395. package/lib/motion/shotcraft/upstream/references/shots/opening/magician-card-flourish.md +73 -0
  396. package/lib/motion/shotcraft/upstream/references/shots/opening/orbit-ring-title-open.md +87 -0
  397. package/lib/motion/shotcraft/upstream/references/shots/opening/spotlight-hero-card.md +55 -0
  398. package/lib/motion/shotcraft/upstream/references/shots/opening/stroke-segment-build.md +50 -0
  399. package/lib/motion/shotcraft/upstream/references/shots/opening/text-as-mask.md +59 -0
  400. package/lib/motion/shotcraft/upstream/references/shots/outro/grain-dissolve.md +38 -0
  401. package/lib/motion/shotcraft/upstream/references/shots/outro/logo-shrink-wordmark-lockup.md +38 -0
  402. package/lib/motion/shotcraft/upstream/references/shots/outro/neon-triple-marquee.md +59 -0
  403. package/lib/motion/shotcraft/upstream/references/shots/outro/outro-group-photo-launch.md +39 -0
  404. package/lib/motion/shotcraft/upstream/references/shots/outro/ui-strip-away-outro.md +61 -0
  405. package/lib/motion/shotcraft/upstream/references/shots/outro/ui-to-brand-morph.md +52 -0
  406. package/lib/motion/shotcraft/upstream/references/shots/rhythm/beat-cut-moves.md +50 -0
  407. package/lib/motion/shotcraft/upstream/references/shots/rhythm/beat-step-list-theme-cycle.md +66 -0
  408. package/lib/motion/shotcraft/upstream/references/shots/rhythm/panel-grid-moves.md +43 -0
  409. package/lib/motion/shotcraft/upstream/references/shots/rhythm/quad-split-parallel-scenes.md +38 -0
  410. package/lib/motion/shotcraft/upstream/references/shots/rhythm/rhythm-interrupt-moves.md +38 -0
  411. package/lib/motion/shotcraft/upstream/references/shots/rhythm/sakuga-timing-shift.md +56 -0
  412. package/lib/motion/shotcraft/upstream/references/shots/rhythm/speed-ramp-freeze.md +44 -0
  413. package/lib/motion/shotcraft/upstream/references/shots/rhythm/trailer-grammar-moves.md +38 -0
  414. package/lib/motion/shotcraft/upstream/references/shots/transition/bottom-push-stack-wipe.md +63 -0
  415. package/lib/motion/shotcraft/upstream/references/shots/transition/card-flip-reveal.md +57 -0
  416. package/lib/motion/shotcraft/upstream/references/shots/transition/card-flock-tumble.md +63 -0
  417. package/lib/motion/shotcraft/upstream/references/shots/transition/circle-match-iris.md +58 -0
  418. package/lib/motion/shotcraft/upstream/references/shots/transition/gradient-transition.md +45 -0
  419. package/lib/motion/shotcraft/upstream/references/shots/transition/line-carry-transition.md +55 -0
  420. package/lib/motion/shotcraft/upstream/references/shots/transition/mosaic-reframe.md +49 -0
  421. package/lib/motion/shotcraft/upstream/references/shots/transition/page-turn-transitions.md +42 -0
  422. package/lib/motion/shotcraft/upstream/references/shots/transition/print-texture-transitions.md +42 -0
  423. package/lib/motion/shotcraft/upstream/references/shots/transition/shot-transitions.md +45 -0
  424. package/lib/motion/shotcraft/upstream/references/shots/transition/tear-streak-transitions.md +48 -0
  425. package/lib/motion/shotcraft/upstream/references/shots/transition/transition-hidden-cut.md +55 -0
  426. package/lib/motion/shotcraft/upstream/references/shots/transition/transition-travel.md +43 -0
  427. package/lib/motion/shotcraft/upstream/references/shots/transition/white-flash-logo-simplify-cut.md +41 -0
  428. package/lib/motion/shotcraft/upstream/references/shots/transition/wipe-transitions.md +42 -0
  429. package/lib/motion/shotcraft/upstream/references/shots/typography/blur-slide.md +59 -0
  430. package/lib/motion/shotcraft/upstream/references/shots/typography/brace-expand.md +55 -0
  431. package/lib/motion/shotcraft/upstream/references/shots/typography/countdown-arc-scatter.md +65 -0
  432. package/lib/motion/shotcraft/upstream/references/shots/typography/document-typewriter-reveal.md +42 -0
  433. package/lib/motion/shotcraft/upstream/references/shots/typography/flying-words.md +64 -0
  434. package/lib/motion/shotcraft/upstream/references/shots/typography/glitch-cycle.md +64 -0
  435. package/lib/motion/shotcraft/upstream/references/shots/typography/gradient-word-sweep.md +54 -0
  436. package/lib/motion/shotcraft/upstream/references/shots/typography/lead-word-zoom-assemble.md +91 -0
  437. package/lib/motion/shotcraft/upstream/references/shots/typography/marker-underline-title.md +51 -0
  438. package/lib/motion/shotcraft/upstream/references/shots/typography/outline-word-fill.md +66 -0
  439. package/lib/motion/shotcraft/upstream/references/shots/typography/paper-title-card.md +38 -0
  440. package/lib/motion/shotcraft/upstream/references/shots/typography/pill-chip-slot-cycle-handled.md +66 -0
  441. package/lib/motion/shotcraft/upstream/references/shots/typography/pill-slot-cycle.md +58 -0
  442. package/lib/motion/shotcraft/upstream/references/shots/typography/text-column-converge.md +61 -0
  443. package/lib/motion/shotcraft/upstream/references/shots/typography/title-demote-to-label.md +64 -0
  444. package/lib/motion/shotcraft/upstream/references/shots/typography/type-assembly-moves.md +45 -0
  445. package/lib/motion/shotcraft/upstream/references/shots/typography/type-entrance-moves.md +41 -0
  446. package/lib/motion/shotcraft/upstream/references/shots/typography/type-rhythm-sync.md +51 -0
  447. package/lib/motion/shotcraft/upstream/references/shots/typography/typewriter-moves.md +42 -0
  448. package/lib/motion/shotcraft/upstream/references/shots/typography/vertical-word-roll-blur-cycle.md +63 -0
  449. package/lib/motion/shotcraft/upstream/references/shots/typography/word-relay-filmstrip.md +57 -0
  450. package/lib/motion/shotcraft/upstream/references/shots/typography/word-relay-geometry.md +75 -0
  451. package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/avatar-bracket-carousel.md +59 -0
  452. package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/bezier-source-converge-merge.md +67 -0
  453. package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/card-stack.md +60 -0
  454. package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/carousel-3d.md +66 -0
  455. package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/cloner-depth-echo.md +40 -0
  456. package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/deck-deal-flyin.md +45 -0
  457. package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/doc-park-left-pill-deal.md +62 -0
  458. package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/draw-svg-trace.md +55 -0
  459. package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/element-body-moves.md +37 -0
  460. package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/integration-hub-map.md +55 -0
  461. package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/list-reveal.md +50 -0
  462. package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/list-stack-press.md +43 -0
  463. package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/neon-frame-forerun.md +55 -0
  464. package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/neon-frame-orbit-drop.md +51 -0
  465. package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/page-waterfall-wall.md +51 -0
  466. package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/product-card-progressive-assemble.md +56 -0
  467. package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/radial-wave.md +49 -0
  468. package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/research-card-stack-scroll.md +57 -0
  469. package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/row-embed.md +36 -0
  470. package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/value-stagger-gradient.md +64 -0
  471. package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/wall-reveal-moves.md +47 -0
  472. package/lib/motion/shotcraft/upstream/references/sound-design.md +170 -0
  473. package/lib/motion/shotcraft/upstream/references/workbench.md +157 -0
  474. package/lib/motion/shotcraft/upstream/template/TEMPLATE.md +103 -0
  475. package/lib/motion/shotcraft/upstream/template/THEMES.md +44 -0
  476. package/lib/motion/shotcraft/upstream/template/package.json +20 -0
  477. package/lib/motion/shotcraft/upstream/template/remotion.config.ts +6 -0
  478. package/lib/motion/shotcraft/upstream/template/src/Root.tsx +17 -0
  479. package/lib/motion/shotcraft/upstream/template/src/aifl/Caption.tsx +65 -0
  480. package/lib/motion/shotcraft/upstream/template/src/aifl/DigitRoll.tsx +48 -0
  481. package/lib/motion/shotcraft/upstream/template/src/aifl/FlashCut.tsx +24 -0
  482. package/lib/motion/shotcraft/upstream/template/src/aifl/Main.tsx +192 -0
  483. package/lib/motion/shotcraft/upstream/template/src/aifl/PaperTitleCard.tsx +111 -0
  484. package/lib/motion/shotcraft/upstream/template/src/aifl/live/PageCam.tsx +150 -0
  485. package/lib/motion/shotcraft/upstream/template/src/aifl/live/SceneDetail.tsx +158 -0
  486. package/lib/motion/shotcraft/upstream/template/src/aifl/live/SceneFlyIn.tsx +468 -0
  487. package/lib/motion/shotcraft/upstream/template/src/aifl/live/SceneOpen.tsx +552 -0
  488. package/lib/motion/shotcraft/upstream/template/src/aifl/live/SceneOutroLive.tsx +411 -0
  489. package/lib/motion/shotcraft/upstream/template/src/aifl/live/ScenePapers.tsx +200 -0
  490. package/lib/motion/shotcraft/upstream/template/src/aifl/live/SceneWbr.tsx +324 -0
  491. package/lib/motion/shotcraft/upstream/template/src/aifl/live-layout.json +389 -0
  492. package/lib/motion/shotcraft/upstream/template/src/index.ts +4 -0
  493. package/lib/motion/shotcraft/upstream/template/src/themes/ThemedFilm.tsx +7 -0
  494. package/lib/motion/shotcraft/upstream/template/src/themes/manifest.tsx +68 -0
  495. package/lib/motion/shotcraft/upstream/template/src/themes/palette-assets.json +1 -0
  496. package/lib/motion/shotcraft/upstream/template/src/themes/palette-assets.ts +24 -0
  497. package/lib/motion/shotcraft/upstream/template/src/themes/palettes.json +74 -0
  498. package/lib/motion/shotcraft/upstream/template/src/themes/visual-theme.tsx +91 -0
  499. package/lib/motion/shotcraft/upstream/template/src/workbench.ts +213 -0
  500. package/lib/motion/shotcraft/upstream/template/tsconfig.json +15 -0
  501. package/lib/motion/spec.js +113 -0
  502. package/lib/motion/style-engine.js +153 -0
  503. package/lib/motion/style-frames.js +268 -0
  504. package/lib/motion/sync.js +214 -0
  505. package/lib/motion/theme.js +121 -0
  506. package/lib/motion/voice.js +417 -0
  507. package/lib/motion-agent-files.js +82 -0
  508. package/lib/motion-agent-protocol.js +66 -0
  509. package/lib/motion-agent-tools.js +196 -0
  510. package/lib/motion-agent.js +171 -0
  511. package/lib/motion-capture.js +92 -0
  512. package/lib/motion-core.js +238 -0
  513. package/lib/motion-film-review.js +71 -0
  514. package/lib/motion-library.js +210 -0
  515. package/lib/motion-planner.js +254 -0
  516. package/lib/motion-project.js +80 -0
  517. package/lib/motion-render-worker.js +145 -0
  518. package/lib/motion-session.js +32 -0
  519. package/lib/motion-source.js +49 -0
  520. package/lib/motion-tasks.js +452 -0
  521. package/lib/motion-vision.js +43 -0
  522. package/lib/mxfile.js +27 -7
  523. package/lib/routing/node-runtime.js +14 -0
  524. package/lib/routing/router.js +211 -0
  525. package/lib/routing/vendor/README.md +96 -0
  526. package/lib/routing/vendor/libavoid-routing.js +753 -0
  527. package/lib/routing/vendor/libavoid.min.js +59 -0
  528. package/lib/shotcard-core.js +39 -0
  529. package/lib/shotcard-reference.js +56 -0
  530. package/lib/style-kernel.js +37 -3
  531. package/lib/task-patches.js +26 -2
  532. package/lib/video-export.js +17 -2
  533. package/package.json +29 -4
@@ -0,0 +1,647 @@
1
+ // GLSL for 07-liquid. All lighting in linear HDR; post pass tonemaps + grades.
2
+ export const VS = `#version 300 es
3
+ in vec2 aPos; out vec2 vUv;
4
+ void main(){ vUv = aPos*0.5+0.5; gl_Position = vec4(aPos,0.0,1.0); }`;
5
+
6
+ const COMMON = `
7
+ #define PI 3.14159265
8
+ // well-defined smoothstep for either edge order (GLSL smoothstep is UB when e0 >= e1)
9
+ float ss(float a, float b, float x){ float t = clamp((x - a)/(b - a), 0.0, 1.0); return t*t*(3.0 - 2.0*t); }
10
+ vec3 lin(vec3 c){ return pow(c, vec3(2.2)); }
11
+ float hash12(vec2 p){ vec3 p3 = fract(vec3(p.xyx)*0.1031); p3 += dot(p3, p3.yzx+33.33); return fract((p3.x+p3.y)*p3.z); }
12
+ vec2 hash22(vec2 p){ vec3 p3 = fract(vec3(p.xyx)*vec3(.1031,.1030,.0973)); p3 += dot(p3, p3.yzx+33.33); return fract((p3.xx+p3.yz)*p3.zy); }
13
+ // gradient noise with analytic derivatives (value, d/dx, d/dy)
14
+ vec3 noised(vec2 x){
15
+ vec2 i = floor(x), f = fract(x);
16
+ vec2 u = f*f*f*(f*(f*6.0-15.0)+10.0);
17
+ vec2 du = 30.0*f*f*(f*(f-2.0)+1.0);
18
+ vec2 ga = hash22(i)*2.0-1.0, gb = hash22(i+vec2(1,0))*2.0-1.0, gc = hash22(i+vec2(0,1))*2.0-1.0, gd = hash22(i+vec2(1,1))*2.0-1.0;
19
+ float va = dot(ga, f), vb = dot(gb, f-vec2(1,0)), vc = dot(gc, f-vec2(0,1)), vd = dot(gd, f-vec2(1,1));
20
+ float v = va + u.x*(vb-va) + u.y*(vc-va) + u.x*u.y*(va-vb-vc+vd);
21
+ vec2 d = ga + u.x*(gb-ga) + u.y*(gc-ga) + u.x*u.y*(ga-gb-gc+gd) + du*(u.yx*(va-vb-vc+vd) + vec2(vb,vc) - va);
22
+ return vec3(v, d);
23
+ }
24
+ `;
25
+
26
+ export const FS_SCENE = `#version 300 es
27
+ precision highp float;
28
+ in vec2 vUv; out vec4 oCol;
29
+ ${COMMON}
30
+ uniform vec2 uRes;
31
+ uniform float uT;
32
+ uniform vec4 uCam; // zoom, pivot x, pivot y, 0 (+ offset in uCam2)
33
+ uniform vec2 uCam2; // offset x,y
34
+ uniform float uK; // smooth-union sharpness (1/px)
35
+ #define NB 72
36
+ #define NS 20
37
+ uniform int uNB; uniform vec4 uB[NB]; uniform vec4 uBX[NB]; // ball: cx cy r u | stretch angle 0 0
38
+ uniform int uNS; uniform vec4 uS[NS]; uniform vec4 uSX[NS]; // seg: ax ay bx by | ra rb u 0
39
+ uniform sampler2D uTex; uniform vec2 uTexSize; // letter SDFs, one per channel (tex px units)
40
+ uniform vec4 uL[4]; // letter: screen pivot x,y, grow(px), u
41
+ uniform vec4 uLX[4]; // letter: sx, sy, angle, on
42
+ uniform vec4 uLM[4]; // letter morph source ellipse: centre x,y, semi-axes (world px); blend = uLX.w
43
+ uniform vec4 uLP[4]; // letter: texture pivot x,y, wobble amp, wobble phase
44
+ uniform vec4 uFl; // main flood: front, back, phase, on
45
+ uniform vec4 uFlA; // amp, freq, lean, u
46
+ uniform vec4 uFlB; // dir x,y, bump amp, bump centre
47
+ uniform vec4 uOv[3]; // flood sheets (drawn over the scene, back to front)
48
+ uniform vec4 uOvA[3];
49
+ uniform vec4 uOvB[3];
50
+ uniform vec3 uOvV; // overlay edge speed (px/frame) -> in-shader shutter blur of the edge
51
+ uniform float uFloorY; // contact line of the action plane
52
+ uniform float uHorizon; // backdrop / floor junction
53
+ uniform vec4 uRip; // ripple x, y, age, amp
54
+ uniform vec4 uSw; // s3: hero-sphere interior colour swirl: centre x,y, radius, amount
55
+ uniform vec4 uKey; // key softbox centre (q-space) x,y + glint sweep pos, glint amp
56
+ uniform float uGoo;
57
+ uniform int uDbg;
58
+ uniform vec2 uSpot;
59
+ uniform vec4 uRing; // r2: light ring from behind the bar: centre x,y, radius, amp
60
+ uniform vec4 uCrown; // r2: backlit crown sheet behind the word: centre x, base y, height, alpha
61
+ uniform float uCaus; // r2 P3: animated caustics thrown by the jelly letters onto the set (end card)
62
+ uniform vec4 uPar; // r2: backdrop parallax offset xy, cyc spot drift xy
63
+ #define NBUB 32
64
+ uniform vec4 uBub[NBUB]; // carbonation bubbles inside the liquid: x, y, r, alpha
65
+ uniform int uNBub; // backdrop light gain, logo halo // extra flood-surface noise amount
66
+ uniform sampler2D uBack; // background type layer (refracted)
67
+ uniform float uMbw; // shutter fraction between MB samples (fast edges get that much in-shader blur)
68
+ uniform vec4 uLens; // ball-lens bulb: centre x,y, semi-axes x,y (world px)
69
+ uniform vec4 uLens2; // lens image: word centre in tex px, tex px per unit lens radius, amount
70
+ #ifdef V5
71
+ uniform vec4 uV5; // reel v5.1 grade: x = set darkening (near-black plum), y = title liquid lift, z = violet -> pink-violet lift, w = floor-reflection kill
72
+ uniform vec4 uV5b; // reflection kill band: centre x, half width (world px)
73
+ #endif
74
+
75
+ // ---------- palette: u in [0,1] tangerine -> hot pink -> violet ----------
76
+ vec3 palThin(float u){ u=clamp(u,0.,1.);
77
+ vec3 a=lin(vec3(1.00,0.74,0.30)), b=lin(vec3(1.00,0.50,0.66)), c=lin(vec3(0.84,0.52,1.00));
78
+ #ifdef V5
79
+ c = mix(c, lin(vec3(0.98,0.74,1.00)), uV5.z);
80
+ #endif
81
+ return u<0.5 ? mix(a,b,u*2.0) : mix(b,c,u*2.0-1.0); }
82
+ vec3 palMid(float u){ u=clamp(u,0.,1.);
83
+ vec3 a=lin(vec3(1.00,0.36,0.06)), b=lin(vec3(1.00,0.10,0.44)), c=lin(vec3(0.56,0.12,1.00));
84
+ #ifdef V5
85
+ c = mix(c, lin(vec3(0.88,0.36,1.00)), uV5.z);
86
+ #endif
87
+ return u<0.5 ? mix(a,b,u*2.0) : mix(b,c,u*2.0-1.0); }
88
+ vec3 palDeep(float u){ u=clamp(u,0.,1.);
89
+ vec3 a=lin(vec3(0.80,0.10,0.04)), b=lin(vec3(0.62,0.02,0.30)), c=lin(vec3(0.24,0.04,0.60));
90
+ #ifdef V5
91
+ c = mix(c, lin(vec3(0.52,0.12,0.74)), uV5.z);
92
+ #endif
93
+ return u<0.5 ? mix(a,b,u*2.0) : mix(b,c,u*2.0-1.0); }
94
+
95
+ // ---------- smooth union accumulator (log-sum-exp, stable) ----------
96
+ struct Fld { float m; float s; vec2 g; float u; };
97
+ void fadd(inout Fld f, float d, vec2 g, float u, float k){
98
+ if (d < f.m){ float c = exp(-k*(f.m-d)); f.s = f.s*c+1.0; f.g = f.g*c+g; f.u = f.u*c+u; f.m = d; }
99
+ else { float w = exp(-k*(d-f.m)); f.s += w; f.g += w*g; f.u += w*u; }
100
+ }
101
+ vec4 fres(Fld f, float k){ return vec4(f.m - log(max(f.s,1e-30))/k, f.g/max(f.s,1e-30), f.u/max(f.s,1e-30)); }
102
+
103
+ // wave front shape along coordinate b: returns (offset, derivative)
104
+ vec2 waveShape(float b, float amp, float fr, float ph, float lean){
105
+ float s1 = sin(b*fr + ph), c1 = cos(b*fr + ph);
106
+ float s2 = sin(b*fr*1.87 + ph*1.31 + 1.7), c2 = cos(b*fr*1.87 + ph*1.31 + 1.7);
107
+ float s3 = sin(b*fr*3.13 - ph*0.63 + 4.1), c3 = cos(b*fr*3.13 - ph*0.63 + 4.1);
108
+ float v = amp*(0.58*s1 + 0.30*s2 + 0.14*s3) + lean*(b-960.0);
109
+ float d = amp*fr*(0.58*c1 + 0.30*1.87*c2 + 0.14*3.13*c3) + lean;
110
+ return vec2(v, d);
111
+ }
112
+ // flood band between back(b) < a < front(b); a = travel coordinate along dir, b across.
113
+ // F = (front, back, phase, on) A = (amp, freq, lean, u) B = (dir.x, dir.y, bump amp, bump centre)
114
+ vec3 floodSD(vec2 p, vec4 F, vec4 A, vec4 B){
115
+ vec2 dir = B.xy, perp = vec2(-B.y, B.x);
116
+ float a = dot(p, dir), b = dot(p, perp);
117
+ vec2 f1 = waveShape(b, A.x, A.y, F.z, A.z);
118
+ float bb = (b - B.w)/250.0; float bump = B.z*exp(-0.5*bb*bb);
119
+ f1 += vec2(bump, -bump*bb/250.0);
120
+ vec2 f2 = waveShape(b, A.x*0.85, A.y*0.93, F.z*0.8 + 2.3, -A.z*0.6);
121
+ float nf = sqrt(1.0 + f1.y*f1.y), nb = sqrt(1.0 + f2.y*f2.y);
122
+ float dF = (a - (F.x + f1.x))/nf;
123
+ float dB = ((F.y + f2.x) - a)/nb;
124
+ vec2 gF = (dir - f1.y*perp)/nf, gB = (-dir + f2.y*perp)/nb;
125
+ // r2 s2 (4.23 slashes): the front's waviness bends the normals only near the front. Deep inside, the old gradient kept
126
+ // the wave's tilt as bands parallel to dir, and the env strip lights reflected in them as white slashes.
127
+ gF = normalize(mix(gF, dir, ss(-24.0, -150.0, dF))); gB = normalize(mix(gB, -dir, ss(-24.0, -150.0, dB)));
128
+ float k = 0.08; float m = max(dF, dB);
129
+ float eF = exp(k*(dF - m)), eB = exp(k*(dB - m));
130
+ return vec3(m + log(eF + eB)/k, (eF*gF + eB*gB)/(eF + eB));
131
+ }
132
+
133
+ vec4 field(vec2 p){
134
+ Fld f = Fld(1e5, 0.0, vec2(0.0), 0.0);
135
+ float gW[4]; float gU[4]; int gN = 0;
136
+ for (int j=0;j<4;j++){ gW[j] = 0.0; gU[j] = 0.0; }
137
+ float k = uK;
138
+ for (int i=0;i<NB;i++){
139
+ if (i>=uNB) break;
140
+ vec4 b = uB[i]; vec4 bx = uBX[i];
141
+ vec2 dp = p - b.xy;
142
+ float ext = b.z*max(bx.x, 1.0/bx.x);
143
+ if (dot(dp,dp) > (ext+140.0)*(ext+140.0)) continue;
144
+ float ca = cos(bx.y), sa = sin(bx.y);
145
+ vec2 q = vec2(ca*dp.x + sa*dp.y, -sa*dp.x + ca*dp.y);
146
+ float ax = b.z*bx.x, ay = b.z/bx.x;
147
+ vec2 qa = q/vec2(ax*ax, ay*ay);
148
+ if (bx.z > 0.5){ // colour-only 'ghost' swirl inside a bigger body
149
+ float rho = sqrt(dot(q, q/vec2(ax*ax, ay*ay)));
150
+ gW[gN] = (1.0 - ss(0.25, 1.0, rho))*bx.w; gU[gN] = b.w; gN = min(gN+1, 3);
151
+ continue;
152
+ }
153
+ float d = 0.5*b.z*(dot(q,qa) - 1.0);
154
+ vec2 gq = b.z*qa;
155
+ fadd(f, d, vec2(ca*gq.x - sa*gq.y, sa*gq.x + ca*gq.y), b.w, k);
156
+ }
157
+ for (int i=0;i<NS;i++){
158
+ if (i>=uNS) break;
159
+ vec4 s = uS[i]; vec4 sx = uSX[i];
160
+ vec2 a = s.xy, ba = s.zw - s.xy, pa = p - a;
161
+ float h = clamp(dot(pa,ba)/max(dot(ba,ba),1e-4), 0.0, 1.0);
162
+ vec2 v = pa - ba*h; float r = max(mix(sx.x, sx.y, h), 0.3);
163
+ float d = (dot(v,v) - r*r)/(2.0*r);
164
+ fadd(f, d, v/r, sx.z, k);
165
+ }
166
+ for (int i=0;i<4;i++){
167
+ vec4 L = uL[i]; vec4 LX = uLX[i]; vec4 LP = uLP[i];
168
+ if (LX.w <= 0.0) continue;
169
+ vec2 dp = p - L.xy;
170
+ float ca = cos(LX.z), sa = sin(LX.z);
171
+ vec2 q = vec2(ca*dp.x + sa*dp.y, -sa*dp.x + ca*dp.y) / LX.xy;
172
+ // jelly wobble: gentle travelling sine warp
173
+ q.x += LP.z*sin(q.y*0.021 + LP.w);
174
+ q.y += LP.z*0.6*sin(q.x*0.017 + LP.w*1.3);
175
+ vec2 tq = q + LP.xy;
176
+ vec4 msk = vec4(i==0, i==1, i==2, i==3);
177
+ vec2 e = vec2(1.0, 0.0);
178
+ float sd = dot(texture(uTex, tq/uTexSize), msk);
179
+ float sxp = dot(texture(uTex, (tq+e.xy)/uTexSize), msk), sxm = dot(texture(uTex, (tq-e.xy)/uTexSize), msk);
180
+ float syp = dot(texture(uTex, (tq+e.yx)/uTexSize), msk), sym = dot(texture(uTex, (tq-e.yx)/uTexSize), msk);
181
+ vec2 gq = vec2(sxp-sxm, syp-sym)*0.5 / LX.xy;
182
+ float sc = sqrt(LX.x*LX.y);
183
+ vec2 g = vec2(ca*gq.x - sa*gq.y, sa*gq.x + ca*gq.y) * sc;
184
+ float dl = sd*sc - L.z;
185
+ if (LX.w < 0.999){ // SDF morph: slot ellipse -> letter
186
+ vec4 M = uLM[i]; vec2 eq = p - M.xy;
187
+ float k0 = length(eq/M.zw), k1 = length(eq/(M.zw*M.zw));
188
+ float de = k0*(k0 - 1.0)/max(k1, 1e-5);
189
+ vec2 ge = normalize(eq/(M.zw*M.zw) + 1e-6);
190
+ float m = smoothstep(0.0, 1.0, LX.w);
191
+ dl = mix(de, dl, m); g = normalize(mix(ge, g, m) + 1e-6);
192
+ }
193
+ fadd(f, dl, g, L.w, k);
194
+ }
195
+ vec4 R = fres(f, k);
196
+ for (int j=0;j<4;j++){ if (j >= gN) break; R.w = mix(R.w, gU[j], gW[j]); }
197
+ if (uSw.w > 0.001){ // curl-warped spiral bands of the 4 palette colours (colour only)
198
+ vec2 dq = (p - uSw.xy)/uSw.z; float rho = length(dq);
199
+ if (rho < 1.25){
200
+ // r2 P5: reconstruct the sphere point, spin it ~40 deg/s about a tilted axis, colour by 3D warped bands of it
201
+ float r1 = min(rho, 1.0);
202
+ vec3 sp = vec3(dq/max(rho, 1.0), sqrt(max(0.0, 1.0 - r1*r1)));
203
+ vec3 ax = normalize(vec3(0.35, 1.0, 0.28));
204
+ float an = uT*0.70, ca = cos(an), sa = sin(an);
205
+ sp = sp*ca + cross(ax, sp)*sa + ax*dot(ax, sp)*(1.0 - ca);
206
+ vec3 nz = noised(sp.xz*1.35 + vec2(2.0, 5.0));
207
+ vec3 nz2 = noised(sp.yx*1.1 + vec2(7.0, 1.0));
208
+ float ph = 4.4*sp.y + 1.3*sin(3.1*sp.x + 2.2*sp.z) + 1.5*nz.x + 0.8*nz2.x;
209
+ R.w = mix(R.w, 0.5 + 0.46*sin(ph), uSw.w*(1.0 - ss(0.82, 1.2, rho)));
210
+ }
211
+ }
212
+ return R;
213
+ }
214
+
215
+ // ---------- studio environment (reflection) ----------
216
+ float softRect(vec2 q, vec2 hs, float soft){
217
+ vec2 d = abs(q) - hs;
218
+ float o = length(max(d,0.0)) + min(max(d.x,d.y),0.0);
219
+ return 1.0 - ss(-soft, soft, o);
220
+ }
221
+ vec3 env(vec3 r){
222
+ vec3 c = lin(vec3(0.10,0.03,0.12))*0.5; // dark plum studio
223
+ float up = clamp(-r.y, 0.0, 1.0), dn = clamp(r.y, 0.0, 1.0);
224
+ c += lin(vec3(0.60,0.40,0.75))*0.55*up*up; // overhead fill
225
+ c += lin(vec3(1.0,0.30,0.32))*0.32*ss(0.2,0.95,dn); // warm floor bounce
226
+ float zf = max(r.z, 0.06);
227
+ vec2 q = r.xy/zf;
228
+ // key softbox (upper left) with a soft vertical falloff inside the panel
229
+ vec2 kq = q - uKey.xy;
230
+ float kb = softRect(kq, vec2(0.60,0.36), 0.10);
231
+ c += lin(vec3(1.0,0.97,0.93))*30.0*kb*(0.75 + 0.25*ss(0.36,-0.36,kq.y));
232
+ // small top-right softbox (second catch-light)
233
+ c += lin(vec3(1.0,0.90,0.95))*12.0*softRect(q - vec2(0.95,-1.25), vec2(0.20,0.14), 0.07);
234
+ // strip right
235
+ c += lin(vec3(1.0,0.80,0.92))*14.0*softRect(q - vec2(1.55,-0.05), vec2(0.07,1.3), 0.04);
236
+ // kicker lower left
237
+ c += lin(vec3(1.0,0.80,0.70))*4.0*softRect(q - vec2(-1.7,0.7), vec2(0.08,0.45), 0.08);
238
+ // grazing rims pick up the dim set + coloured bounce, not white
239
+ float gr = pow(1.0 - clamp(r.z,0.0,1.0), 4.0);
240
+ vec2 rd = normalize(r.xy + 1e-5);
241
+ c += gr*(lin(vec3(1.0,0.72,0.70))*1.1*ss(0.2,-0.9,rd.x+rd.y) + lin(vec3(1.0,0.38,0.70))*0.9*ss(0.5,1.0,rd.x));
242
+ return c;
243
+ }
244
+
245
+ // shade a liquid sample. F = (D, grad, u). returns rgb (linear HDR) and coverage in .a
246
+ vec4 shadeLiquid(vec2 p, vec4 F, float deepNoise, float mirror){
247
+ float D = F.x; vec2 gD = F.yz; float u = F.w;
248
+ float gl = max(length(gD), 0.2);
249
+ float cov = clamp(0.5 - D/gl, 0.0, 1.0);
250
+ if (cov <= 0.0) return vec4(0.0);
251
+ const float R = 95.0, Hc = 210.0;
252
+ float x = max(-D, 0.0);
253
+ float h0 = sqrt(2.0*R*x + 2.0*R*0.6);
254
+ float th = tanh(h0/Hc);
255
+ float h = Hc*th;
256
+ float dhdx = (1.0 - th*th)*R/h0;
257
+ vec2 gh = -dhdx*gD;
258
+ // deep-interior surface undulation (flood sheets / big pools)
259
+ float deep = ss(90.0, 320.0, x)*deepNoise;
260
+ float du = 0.0, sheen = 0.0;
261
+ if (deep > 0.001){
262
+ // marbled pour: domain-warped bands of the palette; each band boundary is a soft ridge that catches light
263
+ vec2 q = p*0.00118 + vec2(uT*0.085, -uT*0.04);
264
+ vec3 w1 = noised(q*0.8 + vec2(1.3, 4.1));
265
+ vec3 w2 = noised(q + 1.25*w1.yz + vec2(uT*0.06, 2.0));
266
+ vec3 m = noised(q*1.15 + 1.8*w2.yz + vec2(5.2, 1.1));
267
+ float ph = 6.2*m.x + 1.8*w1.x;
268
+ float band = sin(ph);
269
+ vec2 gph = (6.2*m.yz*1.15 + 1.8*w1.yz*0.8)*0.00118; // approx gradient of phase (warp jacobian ignored)
270
+ float A = 26.0*deep;
271
+ h += A*(0.5 + 0.5*band);
272
+ gh += A*0.5*cos(ph)*gph;
273
+ float vein = ss(0.35, 0.8, band) - ss(-0.35, -0.8, band);
274
+ float fl = 1.0 - 0.85*ss(4.08, 4.16, uT)*(1.0 - ss(4.5, 4.62, uT)); // r2 P4: no marble slashes in the flood
275
+ du = deep*(0.40*vein + 0.10*w2.x);
276
+ h -= (1.0 - fl)*A*(0.5 + 0.5*band); gh -= (1.0 - fl)*A*0.5*cos(ph)*gph;
277
+ sheen = deep*fl;
278
+ }
279
+ if (mirror > 0.5 && mirror < 1.5) gh.y = -gh.y;
280
+ float ovl = step(1.5, mirror); // r2: flood overlay sheet
281
+ vec3 n = normalize(vec3(-gh, 1.0));
282
+ float uu = u + du;
283
+ // body colour: thickness drives the hue (thin -> light/warm, thick -> deep, saturated)
284
+ vec3 body = mix(palThin(uu), palMid(uu), ss(0.0, 5.0, x));
285
+ body = mix(body, palDeep(uu), ss(40.0, 260.0, x)*mix(0.55, 0.22, ss(200.0, 400.0, x)));
286
+ #ifdef V5
287
+ float lift = uV5.y*(1.0 - step(1.5, mirror));
288
+ body = mix(body, palThin(uu), 0.22*lift);
289
+ #endif
290
+ vec3 L = normalize(vec3(-0.55, -0.7, 0.62));
291
+ float ndl = dot(n, L);
292
+ float side = 1.0 - n.z;
293
+ vec3 col = body*(0.26 + 0.50*(0.5 + 0.5*ndl))*(0.50 + 0.50*n.z); // edges fall off: glossy, not rubbery
294
+ #ifdef V5
295
+ col *= 1.0 + 0.62*lift;
296
+ #endif
297
+ // transmitted light: a saturated crescent glow inside the rim, opposite the key (light focused through the body)
298
+ vec2 l2 = normalize(L.xy);
299
+ float away = dot(normalize(n.xy + 1e-6), -l2);
300
+ float trans = pow(max(away, 0.0), 1.2)*ss(0.10, 0.50, side)*(1.0 - 0.85*ss(0.70, 1.0, side));
301
+ col += (palMid(uu)*1.4 + palThin(uu)*0.3)*trans*1.0;
302
+ col += palMid(uu)*exp(-x/3.0)*0.22; // thin translucent lip
303
+ vec3 V = vec3(0,0,1);
304
+ vec3 r = reflect(-V, n);
305
+ float fr = 0.04 + 0.96*pow(1.0 - clamp(n.z,0.0,1.0), 5.0);
306
+ vec3 e = env(r);
307
+ vec3 bodyOnly = col;
308
+ float frc = mix(fr, min(fr, 0.05), ovl*ss(30.0, 48.0, x)); // r2 P4: sheet reflections only on the meniscus band (no slashes)
309
+ col = col*(1.0 - frc) + e*frc;
310
+ if (uDbg==1) return vec4(bodyOnly, cov);
311
+ if (uDbg==2) return vec4(e*fr, cov);
312
+ if (uDbg==3) return vec4(vec3(h/150.0), cov);
313
+ if (uDbg==4) return vec4(n*0.5+0.5, cov);
314
+ if (uDbg==6) return vec4(vec3(uu, u, du+0.5), cov);
315
+ // broad glossy sheen on large flat liquid (flood sheets): a big soft light just above the lens axis
316
+ if (sheen > 0.0){
317
+ // crisp wet highlight lines where the marbling ridges tilt toward a light just off-axis
318
+ vec3 Lb = normalize(vec3(-0.16, -0.22, 1.0));
319
+ float sb = pow(max(dot(r, Lb), 0.0), 380.0);
320
+ vec3 Lc = normalize(vec3(0.20, 0.10, 1.0));
321
+ float sc = pow(max(dot(r, Lc), 0.0), 600.0);
322
+ col += (lin(vec3(1.0,0.93,0.95))*sb*2.2 + lin(vec3(1.0,0.80,0.90))*sc*1.2)*sheen;
323
+ }
324
+ // wet hotspot
325
+ vec3 Ls = normalize(vec3(-0.46, -0.62, 0.64));
326
+ float sp = pow(max(dot(r, Ls), 0.0), 900.0);
327
+ #ifdef V5
328
+ col += vec3(1.0,0.97,0.94)*sp*22.0*(1.0 + 0.8*lift);
329
+ col += e*frc*0.6*lift; // v5.1: hotter softbox reflections on the title
330
+ #else
331
+ col += vec3(1.0,0.97,0.94)*sp*22.0;
332
+ #endif
333
+ // glint sweep (hero): narrow diagonal band travelling across the liquid
334
+ float gb = (p.x*0.8 - p.y*0.6) - uKey.z;
335
+ col += vec3(1.0,0.95,0.98)*uKey.w*exp(-gb*gb/(2.0*34.0*34.0))*ss(0.35,0.75,side)*(1.0-ss(0.9,1.0,side))*1.1;
336
+ return vec4(col, cov);
337
+ }
338
+
339
+ #ifdef V5
340
+ // v5.1: the set goes down to a near-black, desaturated plum so the jelly title has >= 90/255 luma over its ground
341
+ vec3 v5set(vec3 c){
342
+ float l = dot(c, vec3(0.2126, 0.7152, 0.0722));
343
+ vec3 d = mix(c, l*vec3(1.10, 0.80, 1.18), 0.5)*0.20;
344
+ return mix(c, d, uV5.x);
345
+ }
346
+ #endif
347
+ vec3 backdrop(vec2 p){
348
+ vec2 p0 = p; p += uPar.xy;
349
+ float y = p.y/uRes.y;
350
+ vec3 top = lin(vec3(0.070,0.018,0.090));
351
+ vec3 hor = lin(vec3(0.205,0.058,0.235));
352
+ vec3 c = mix(top, hor, ss(0.0, uHorizon/uRes.y, y));
353
+ vec2 d = (p - vec2(960.0, 500.0) - uPar.zw)/vec2(1050.0, 620.0);
354
+ c += lin(vec3(0.34,0.10,0.35))*0.55*uSpot.x*exp(-dot(d,d)*1.6);
355
+ vec2 dh = (p0 - vec2(960.0, 470.0))/vec2(620.0, 300.0);
356
+ c += lin(vec3(0.62,0.16,0.42))*0.42*uSpot.y*exp(-dot(dh,dh)*2.2);
357
+ #ifdef V5
358
+ c = v5set(c);
359
+ #endif
360
+ if (uRing.w > 0.001){ // r2: radial light ring expanding from behind the bar (120 px soft edge)
361
+ float rl = length((p0 - uRing.xy)*vec2(1.0, 1.18));
362
+ float e = (rl - uRing.z)/120.0;
363
+ c += lin(vec3(1.0,0.58,0.66))*uRing.w*(1.5*exp(-e*e) + 0.14*ss(uRing.z + 60.0, 0.0, rl));
364
+ }
365
+ if (uCrown.w > 0.001){ // r2: backlit crown sheet kicking up behind the word (translucent, 9 flared points)
366
+ float x = p0.x - uCrown.x, hw = 540.0, ax = abs(x)/hw;
367
+ if (ax < 1.0){
368
+ float env = 1.0 - ax*ax, h = 0.40 + 0.08*sin(x*0.011 + 1.7), bead = 0.0; // continuous wall, points on its rim
369
+ float up = clamp((uCrown.y - p0.y)/max(uCrown.z, 1.0), 0.0, 1.5);
370
+ for (int k=0;k<7;k++){
371
+ float fk = float(k), hk = fract(sin(fk*12.9898 + 4.1)*43758.5453);
372
+ float xk = -450.0 + fk*150.0 + (hk - 0.5)*70.0;
373
+ float wk = 20.0 + 18.0*fract(hk*7.13);
374
+ float ak = (0.5 + 0.5*hk)*(1.0 - pow(abs(xk)/hw, 2.0));
375
+ float g = ak*exp(-pow((x - xk - xk*0.2*up)/(wk*(1.0 + 1.6*max(0.0, 0.35 - up))), 2.0));
376
+ h = h + g - h*g;
377
+ vec2 bc = vec2(xk*(1.0 + 0.2*ak), uCrown.y - uCrown.z*ak - 16.0 - 40.0*(1.0 - uCrown.w));
378
+ if (hk > 0.3) bead = max(bead, ss(7.0 + 5.0*hk, 4.5 + 5.0*hk, length(vec2(x, p0.y) - bc)));
379
+ }
380
+ float top = uCrown.y - uCrown.z*env*h;
381
+ float sd = top - p0.y; // > 0 above the sheet edge
382
+ float body = ss(1.2, -1.2, sd)*ss(uCrown.y + 30.0, uCrown.y - 40.0, p0.y);
383
+ float depth = clamp((p0.y - top)/max(uCrown.z*0.5, 1.0), 0.0, 1.0);
384
+ vec3 trans = mix(lin(vec3(1.0,0.74,0.50))*1.5, lin(vec3(0.80,0.14,0.42))*0.55, pow(depth, 0.45));
385
+ c = mix(c, trans, max(body*mix(0.62, 0.30, depth), bead*0.8)*uCrown.w);
386
+ c += lin(vec3(1.0,0.90,0.84))*1.3*exp(-sd*sd/10.0)*uCrown.w*env;
387
+ }
388
+ }
389
+ return c;
390
+ }
391
+ vec3 floorCol(vec2 p){
392
+ vec2 p0 = p; p += uPar.xy*0.6;
393
+ float yy = (p.y - uHorizon)/(uRes.y - uHorizon);
394
+ vec3 near = lin(vec3(0.034,0.009,0.044));
395
+ vec3 far = lin(vec3(0.165,0.046,0.188));
396
+ vec3 c = mix(far, near, pow(clamp(yy,0.0,1.0), 0.55));
397
+ vec2 d = (p - vec2(960.0, uHorizon + 30.0))/vec2(950.0, 150.0);
398
+ c += lin(vec3(0.32,0.09,0.32))*0.30*uSpot.x*exp(-dot(d,d)*1.5);
399
+ #ifdef V5
400
+ c = v5set(c);
401
+ #endif
402
+ if (uRing.w > 0.001){ // r2: the light ring sweeps across the floor (foreshortened)
403
+ float rl = length((p0 - vec2(uRing.x, uFloorY))*vec2(1.0, 3.6));
404
+ float e = (rl - uRing.z)/140.0;
405
+ c += lin(vec3(1.0,0.56,0.64))*uRing.w*(0.8*exp(-e*e) + 0.12*ss(uRing.z + 60.0, 0.0, rl));
406
+ }
407
+ return c;
408
+ }
409
+ float ripRings(vec2 p){
410
+ if (uRip.w <= 0.0) return 0.0;
411
+ vec2 rd = (p - uRip.xy)*vec2(1.0, 4.6);
412
+ float rr = length(rd), ring = 0.0;
413
+ for (int k=0;k<2;k++){
414
+ float fk = uRip.z*470.0*(1.0 - 0.12*float(k)) - float(k)*22.0;
415
+ if (fk > 0.0) ring += exp(-pow((rr-fk)/(2.6+fk*0.008), 2.0))*exp(-fk/380.0)*(1.0-0.3*float(k));
416
+ }
417
+ return ring*uRip.w*ss(952.0, 905.0, p.y); // rings fade out before they reach the tagline
418
+ }
419
+
420
+ vec4 bubbleLayer(vec2 p, float u){
421
+ vec3 bc = vec3(0.0); float ba = 0.0;
422
+ for (int i=0;i<NBUB;i++){
423
+ if (i >= uNBub) break;
424
+ vec4 b = uBub[i];
425
+ vec2 d = (p - b.xy)/b.z;
426
+ float rr = length(d);
427
+ if (rr > 1.6) continue;
428
+ float rim = ss(0.55, 0.95, rr)*(1.0 - ss(0.95, 1.25, rr));
429
+ float pip = exp(-dot(d - vec2(-0.35,-0.38), d - vec2(-0.35,-0.38))*22.0);
430
+ bc += (palThin(u)*1.2*rim + vec3(1.0,0.97,0.95)*pip*2.4)*b.w;
431
+ ba = max(ba, (0.55*rim + pip)*b.w);
432
+ }
433
+ return vec4(bc, ba);
434
+ }
435
+ void main(){
436
+ vec2 sp = vec2(gl_FragCoord.x, uRes.y - gl_FragCoord.y); // screen px, y down
437
+ vec2 p = (sp - 0.5*uRes)/uCam.x + uCam.yz + uCam2; // world px (camera: zoom, centre)
438
+ vec4 F = field(p);
439
+ vec3 col;
440
+ bool onFloor = p.y > uHorizon;
441
+ col = onFloor ? floorCol(p) : backdrop(p);
442
+ // soft blend at the horizon
443
+ float hzc = uHorizon - 42.0*pow((p.x - 960.0)/980.0, 2.0); // curved cyc: junction bends up toward the edges
444
+ float hb = ss(-85.0, 65.0, p.y - hzc); // 150 px falloff instead of a ruler line
445
+ col = mix(backdrop(p), floorCol(p), hb);
446
+ // soft shadow + coloured caustic of the liquid, cast down-right onto the set
447
+ vec2 so = vec2(24.0, 32.0);
448
+ vec4 Fs = field(p - so);
449
+ float sh = ss(26.0, -34.0, Fs.x);
450
+ col *= 1.0 - 0.50*sh;
451
+ float ca = ss(-8.0, -60.0, Fs.x);
452
+ #ifdef V5
453
+ col += (palMid(Fs.w)*0.075*ca + palThin(Fs.w)*0.05*ss(-30.0,-110.0,Fs.x))*(1.0 - 0.7*uV5.x);
454
+ #else
455
+ col += palMid(Fs.w)*0.075*ca + palThin(Fs.w)*0.05*ss(-30.0,-110.0,Fs.x);
456
+ #endif
457
+ if (uCaus > 0.001){ // r2 s2 P3: pool caustics thrown up onto the cyc by the liquid on the floor (replaces the letter ghost)
458
+ float wy = hzc - p.y; // height above the (curved) horizon
459
+ float reg = ss(-40.0, 50.0, wy)*exp(-max(wy, 0.0)/260.0)*exp(-pow((p.x - 960.0)/820.0, 2.0));
460
+ if (reg > 0.002){
461
+ vec2 cq = vec2(p.x*0.0046, (p.y - uHorizon)*0.0105); // squashed cells: projected at a grazing angle
462
+ vec3 c1 = noised(cq + vec2(uT*0.42, -uT*0.33));
463
+ vec3 c2 = noised(cq*1.9 + c1.yz*0.55 + vec2(-uT*0.37, uT*0.45));
464
+ float web = pow(1.0 - abs(c2.x), 4.0)*(0.55 + 0.45*c1.x);
465
+ #ifdef V5
466
+ col += lin(vec3(1.0,0.60,0.80))*web*reg*uCaus*0.09*(1.0 - 0.6*uV5.x);
467
+ #else
468
+ col += lin(vec3(1.0,0.60,0.80))*web*reg*uCaus*0.09;
469
+ #endif
470
+ }
471
+ }
472
+ if (p.y > uHorizon){
473
+ // ripple rings (specular on the polished floor)
474
+ float ring = ripRings(p);
475
+ col += lin(vec3(1.0,0.66,0.82))*ring*0.55*exp(-uRip.z*2.2);
476
+ }
477
+ if (p.y > uFloorY){
478
+ float dy = p.y - uFloorY;
479
+ vec2 pm = vec2(p.x, 2.0*uFloorY - p.y);
480
+ if (uRip.w > 0.0){
481
+ vec2 rd = (p - uRip.xy)*vec2(1.0, 4.6);
482
+ float rr = length(rd);
483
+ float w = exp(-pow((rr - uRip.z*470.0)/50.0, 2.0))*uRip.w*exp(-uRip.z*1.6);
484
+ pm.x += w*12.0*sin(rr*0.08); pm.y += w*9.0*cos(rr*0.08);
485
+ }
486
+ vec4 Fm = field(pm);
487
+ vec4 lm = shadeLiquid(pm, Fm, 1.0, 1.0);
488
+ float fade = exp(-dy/80.0)*0.50*ss(170.0, 90.0, dy);
489
+ #ifdef V5
490
+ fade *= 1.0 - uV5.w*ss(uV5b.y, uV5b.y*0.6, abs(p.x - uV5b.x));
491
+ #endif
492
+ col = mix(col, lm.rgb*0.75, lm.a*fade);
493
+ }
494
+ // contact darkening where liquid meets the floor
495
+ {
496
+ vec4 Fc = field(vec2(p.x, uFloorY - 3.0));
497
+ float cont = ss(4.0, -10.0, Fc.x)*exp(-abs(p.y - uFloorY)/7.0);
498
+ col *= 1.0 - 0.65*cont;
499
+ }
500
+ // horizon: faint polished edge
501
+ float hl = exp(-abs(p.y - hzc)/34.0)*ss(0.0, 800.0, 980.0-abs(p.x-960.0));
502
+ col += lin(vec3(0.60,0.30,0.62))*hl*0.035;
503
+ // ---- liquid ----
504
+ vec4 L = shadeLiquid(p, F, 1.0, 0.0);
505
+ // soda carbonation: tiny bubbles inside the liquid (brighter rim, dark core edge, specular pip)
506
+ if (L.a > 0.0 && uNBub > 0){ vec4 bb = bubbleLayer(p, F.w); L.rgb = L.rgb*(1.0 - 0.35*bb.a) + bb.rgb*0.8; }
507
+ // ball lens (opening macro): a real, inverted, barrel-compressed image of the 'drop' wordmark inside the pour bulb
508
+ if (uLens2.w > 0.0 && L.a > 0.0){
509
+ vec2 q = (p - uLens.xy)/uLens.zw;
510
+ float rq = length(q);
511
+ if (rq < 0.95){
512
+ // r2 P6: barrel refraction (about 1.3x at the centre, 0.6x at the limb), 1-1.5 px soft focus, 1-2 px chromatic
513
+ // split toward the limb, swims +-3 px with the bulb; multiply-tinted #FFBD4D so it reads as an image, not a decal
514
+ float pxs = uLens2.z/(uLens.z*uCam.x); // tex px per screen px
515
+ vec2 sw = vec2(sin(uT*11.0 + 0.7), cos(uT*8.3))*3.0*pxs;
516
+ vec2 tq = uLens2.xy - q*(1.0 + 0.48*rq*rq)*uLens2.z/1.12 + sw;
517
+ vec2 rdir = q/max(rq, 1e-3)*pxs*(0.6 + 1.6*rq);
518
+ vec4 tA = texture(uTex, (tq + rdir)/uTexSize), tB = texture(uTex, tq/uTexSize), tC = texture(uTex, (tq - rdir)/uTexSize);
519
+ vec3 sd3 = vec3(min(min(tA.r, tA.g), min(tA.b, tA.a)), min(min(tB.r, tB.g), min(tB.b, tB.a)), min(min(tC.r, tC.g), min(tC.b, tC.a)));
520
+ float soft = 1.4*pxs*(1.0 + 0.6*rq);
521
+ vec3 ink = vec3(ss(soft, -soft, sd3.x), ss(soft, -soft, sd3.y), ss(soft, -soft, sd3.z))*(1.0 - ss(0.55, 0.9, rq));
522
+ vec3 tint = lin(vec3(1.0, 0.741, 0.302));
523
+ float lum = dot(L.rgb, vec3(0.3, 0.55, 0.15));
524
+ vec3 tgt = mix(L.rgb, L.rgb*0.35 + tint*(0.55 + 1.2*lum)*(1.25 - 0.45*rq), 0.6);
525
+ L.rgb = mix(L.rgb, tgt, ink*uLens2.w);
526
+ }
527
+ }
528
+ col = mix(col, L.rgb, L.a);
529
+ // ---- overlay flood sheets ----
530
+ for (int i=0;i<3;i++){
531
+ if (uOv[i].w < 0.5) continue;
532
+ // top sheet crisp, back sheets softer (depth); fast edges are additionally blurred by the distance they travel between
533
+ // two shutter samples, so the averaged samples form one continuous streak instead of stacked strata
534
+ float bw = max(i==2 ? 3.0 : (i==1 ? 5.0 : 8.0), uOvV[i]*uCam.x*uMbw*1.7);
535
+ vec3 fsd = floodSD(p - so*1.4, uOv[i], uOvA[i], uOvB[i]);
536
+ col *= 1.0 - 0.55*ss(30.0 + bw*0.5, -40.0 - bw*0.5, fsd.x);
537
+ vec3 fd = floodSD(p, uOv[i], uOvA[i], uOvB[i]);
538
+ float ca2 = ss(bw*0.5, -bw*0.5, fd.x*uCam.x);
539
+ if (ca2 <= 0.0) continue;
540
+ // motion-blurred edges also get a proportionally wider height ramp, so the Fresnel rim streaks instead of strobing
541
+ vec4 O = shadeLiquid(p, vec4(min(fd.x/(1.0 + 0.12*bw/uCam.x), -0.6), fd.yz, uOvA[i].w), 0.0, 2.0);
542
+ { // r2 P4: under-surface light field (lighter top, darker bottom, 4 slow caustic shafts) replaces the marble
543
+ float inner = ss(50.0, 240.0, -fd.x);
544
+ if (inner > 0.0){
545
+ float sy = clamp((p.y - uCam.z + 540.0/uCam.x)/(1080.0/uCam.x), 0.0, 1.0);
546
+ float uo = uOvA[i].w;
547
+ vec3 lf = mix(palThin(uo)*1.05, palDeep(uo)*0.42, ss(0.0, 1.0, sy));
548
+ float shf = 0.0;
549
+ for (int k=0;k<4;k++){ float fk = float(k); float xk = 260.0 + 470.0*fk + 70.0*sin(uT*0.6 + fk*1.9);
550
+ float dd = (p.x + (p.y - 200.0)*0.34 - xk)/(40.0 + 26.0*fract(fk*0.37)); shf += exp(-dd*dd)*(0.6 + 0.4*sin(uT*1.4 + fk*2.3)); }
551
+ lf += palThin(uo)*shf*0.42*(1.0 - 0.75*sy);
552
+ O.rgb = mix(O.rgb, lf, inner*0.72);
553
+ }
554
+ }
555
+ // thick-liquid front: bright 8-12 px meniscus just inside the edge (widened, not multiplied, when motion-blurred)
556
+ float mw = 3.4 + 0.5*bw/uCam.x;
557
+ float men = exp(-pow((fd.x + 7.0 + 0.3*bw/uCam.x)/mw, 2.0))*(3.4/mw);
558
+ O.rgb += (palThin(uOvA[i].w)*1.1 + lin(vec3(1.0,0.94,0.96))*0.75)*men;
559
+ // subject: the liquid behind this sheet (the four seed blobs, the spray) as dense backlit silhouettes with a thin rim
560
+ if (F.x < -3.0){ // only bodies deeper than the spray: small droplets stay hidden, the seeds read as the subject
561
+ // r2 P4: thick backlit bodies: warm transmitted core offset toward the key, deep edges, 2-3 px rim, one sharp
562
+ // specular, and the light field behind refracted through them (offset = normal x 25 px)
563
+ float xin = -F.x;
564
+ vec2 gn = F.yz/max(length(F.yz), 1e-3);
565
+ float edge = exp(-xin/16.0);
566
+ vec3 nb = normalize(vec3(gn*(0.25 + 1.5*edge), 1.0));
567
+ vec2 kd = normalize(vec2(-0.55, -0.7));
568
+ float coreK = ss(4.0, 46.0, xin)*(0.62 + 0.38*dot(-gn, -kd)*(1.0 - edge));
569
+ vec3 bodyC = mix(palDeep(F.w)*0.55, palThin(F.w)*1.9 + lin(vec3(1.0,0.72,0.45))*0.5, coreK);
570
+ vec2 pr = p - nb.xy*25.0;
571
+ float shr = 0.0;
572
+ for (int k=0;k<4;k++){ float fk = float(k); float xk = 260.0 + 470.0*fk + 70.0*sin(uT*0.6 + fk*1.9);
573
+ float dd = (pr.x + (pr.y - 200.0)*0.34 - xk)/(40.0 + 26.0*fract(fk*0.37)); shr += exp(-dd*dd); }
574
+ bodyC += palThin(F.w)*shr*0.5;
575
+ float cb = ss(-1.0, -4.0, F.x);
576
+ float rim = exp(-pow((F.x + 2.0)/1.2, 2.0));
577
+ vec3 rb = reflect(vec3(0.0,0.0,-1.0), nb);
578
+ float spk = pow(max(dot(rb, normalize(vec3(-0.5, -0.62, 0.6))), 0.0), 220.0);
579
+ O.rgb = mix(O.rgb, bodyC, cb*0.88) + palThin(F.w)*rim*0.45 + lin(vec3(1.0,0.96,0.94))*spk*3.0*cb;
580
+ }
581
+ if (uNBub > 0){ vec4 bb = bubbleLayer(p, uOvA[i].w); O.rgb = O.rgb*(1.0 - 0.35*bb.a) + bb.rgb*0.55; }
582
+ col = mix(col, O.rgb, ca2);
583
+ }
584
+ oCol = vec4(col, 1.0);
585
+ }`;
586
+
587
+ export const FS_BRIGHT = `#version 300 es
588
+ precision highp float;
589
+ in vec2 vUv; out vec4 o;
590
+ ${COMMON}
591
+ uniform sampler2D uSrc; uniform vec2 uTexel;
592
+ void main(){
593
+ vec3 c = vec3(0.0);
594
+ for (int j=-1;j<=1;j++) for (int i=-1;i<=1;i++) c += texture(uSrc, vUv + vec2(i,j)*uTexel).rgb;
595
+ c /= 9.0;
596
+ float l = max(max(c.r,c.g),c.b);
597
+ vec3 b = c*ss(0.85, 2.2, l);
598
+ o = vec4(b, 1.0);
599
+ }`;
600
+
601
+ export const FS_POST = `#version 300 es
602
+ precision highp float;
603
+ in vec2 vUv; out vec4 o;
604
+ ${COMMON}
605
+ uniform sampler2D uHdr; uniform sampler2D uBloom; uniform sampler2D uType;
606
+ uniform vec2 uRes; uniform float uFrame; uniform float uBloomAmt; uniform float uFlash;
607
+ vec3 bloomAt(vec2 uv){
608
+ vec3 b = vec3(0.0);
609
+ float w = 0.0;
610
+ for (int l=1;l<7;l++){
611
+ float lf = float(l);
612
+ vec2 px = exp2(lf)/vec2(960.0,540.0);
613
+ vec3 s = textureLod(uBloom, uv + px*vec2(0.5,0.5), lf).rgb + textureLod(uBloom, uv + px*vec2(-0.5,0.5), lf).rgb
614
+ + textureLod(uBloom, uv + px*vec2(0.5,-0.5), lf).rgb + textureLod(uBloom, uv + px*vec2(-0.5,-0.5), lf).rgb;
615
+ float wl = 1.0/(1.0+lf*0.6);
616
+ b += s*0.25*wl; w += wl;
617
+ }
618
+ return b/w;
619
+ }
620
+ vec3 tonemap(vec3 x){
621
+ // hue-preserving shoulder + highlight desaturation toward white
622
+ float m = max(max(x.r,x.g),x.b);
623
+ float k = 0.72;
624
+ float mt = m < k ? m : k + (1.0-k)*(1.0 - exp(-(m-k)/(1.0-k)));
625
+ vec3 c = x*(mt/max(m,1e-5));
626
+ float wh = ss(1.0, 6.0, m);
627
+ return mix(c, vec3(mt), wh*0.85);
628
+ }
629
+ void main(){
630
+ vec3 hdr = texture(uHdr, vUv).rgb;
631
+ hdr += bloomAt(vUv)*uBloomAmt;
632
+ hdr *= exp2(uFlash); // exposure in EV
633
+ vec3 c = tonemap(hdr);
634
+ // subtle vignette
635
+ vec2 q = vUv - 0.5; q.x *= uRes.x/uRes.y;
636
+ c *= 1.0 - 0.28*ss(0.35, 1.05, length(q));
637
+ vec3 s = pow(max(c,0.0), vec3(1.0/2.2));
638
+ // front typography (already sRGB, premultiplied)
639
+ vec4 ty = texture(uType, vec2(vUv.x, 1.0-vUv.y));
640
+ s = s*(1.0-ty.a) + ty.rgb;
641
+ // film grain (boils per frame) + dither
642
+ vec2 fc = gl_FragCoord.xy;
643
+ float g = hash12(fc + uFrame*vec2(37.1, 91.7)) + hash12(fc*1.37 + uFrame*vec2(11.3, 53.9)) - 1.0;
644
+ float lum = dot(s, vec3(0.299,0.587,0.114));
645
+ s += g*(0.030*(1.0-lum)*ss(0.0,0.25,lum) + 0.012);
646
+ o = vec4(s, 1.0);
647
+ }`;