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,18 @@
1
+ <!doctype html>
2
+ <html><head><meta charset="utf-8">
3
+ <link rel="stylesheet" href="/assets/fonts/fonts.css">
4
+ <style>html,body{margin:0;background:#000;overflow:hidden}canvas{display:block;width:1920px;height:1080px}</style>
5
+ </head><body>
6
+ <canvas id="c" width="1920" height="1080"></canvas>
7
+ <script type="module">
8
+ await document.fonts.load('12px "Fusion Pixel 12"', '神秘宝箱欢迎来到像素世界!像素冒险');
9
+ await document.fonts.load('8px "Press Start 2P"', 'SCORE PRESS START x0123456789');
10
+ if (new URLSearchParams(location.search).get('v5') === '1') { // reel v5 title 「像素风」 + PIXEL ART
11
+ await document.fonts.load('12px "Fusion Pixel 12"', '像素风');
12
+ await document.fonts.load('8px "Press Start 2P"', 'PIXEL ART');
13
+ }
14
+ await document.fonts.ready;
15
+ await import('/demos/20-pixel/film.js');
16
+ window.__ready = true;
17
+ </script>
18
+ </body></html>
@@ -0,0 +1,108 @@
1
+ {
2
+ "fps": 30,
3
+ "bpm": 120,
4
+ "anchor": 6.4,
5
+ "duration": 10.0,
6
+ "power_on": 0.0,
7
+ "boot": {
8
+ "frame": 0.12,
9
+ "ring_outer": 0.4,
10
+ "ring_ticks": 0.55,
11
+ "ring_inner": 0.7,
12
+ "panel_left": 0.9,
13
+ "panel_right": 1.15,
14
+ "hex": 1.2,
15
+ "globe": 1.4,
16
+ "log_lines": [
17
+ 0.4,
18
+ 0.9,
19
+ 1.4,
20
+ 1.9
21
+ ]
22
+ },
23
+ "data_live": 2.4,
24
+ "radar_start": 2.4,
25
+ "radar_period": 2.0,
26
+ "radar_theta0_deg": 52,
27
+ "radar_blips": [
28
+ {
29
+ "brg": 118,
30
+ "r": 0.62
31
+ },
32
+ {
33
+ "brg": 205,
34
+ "r": 0.41
35
+ },
36
+ {
37
+ "brg": 262,
38
+ "r": 0.78
39
+ },
40
+ {
41
+ "brg": 331,
42
+ "r": 0.55
43
+ }
44
+ ],
45
+ "data_rolls": [
46
+ 2.4,
47
+ 2.65,
48
+ 2.9,
49
+ 3.15,
50
+ 3.4,
51
+ 3.65
52
+ ],
53
+ "sparkline": 2.9,
54
+ "signal_detected": 4.4,
55
+ "globe_turn": [
56
+ 4.4,
57
+ 5.4
58
+ ],
59
+ "candidates": [
60
+ 4.9,
61
+ 5.4,
62
+ 5.9
63
+ ],
64
+ "brackets_in": 5.9,
65
+ "snap": 6.2333,
66
+ "lock": 6.4,
67
+ "wave_dur": 0.45,
68
+ "zoom": [
69
+ 6.4,
70
+ 7.7
71
+ ],
72
+ "title_en": 6.4,
73
+ "title_cn": 6.4,
74
+ "coords": 7.25,
75
+ "alarm": [
76
+ 6.4,
77
+ 7.4
78
+ ],
79
+ "alert_pulses": [
80
+ 6.9,
81
+ 7.4,
82
+ 7.9,
83
+ 8.4
84
+ ],
85
+ "outro": 8.4,
86
+ "end_hold": 8.9,
87
+ "settle": 6.3333,
88
+ "ground_track": 3.4,
89
+ "band_open": 7.1,
90
+ "resolve": 7.1,
91
+ "sweep": [
92
+ 2.4,
93
+ 4.6
94
+ ],
95
+ "dive": [
96
+ 6.4333,
97
+ 7.1
98
+ ],
99
+ "uplink": [
100
+ 9.0,
101
+ 9.4
102
+ ],
103
+ "power_off": 9.7667,
104
+ "bracket_travel": [
105
+ 5.9,
106
+ 6.1667
107
+ ]
108
+ }
@@ -0,0 +1,125 @@
1
+ <!doctype html>
2
+ <html><head><meta charset="utf-8"><title>22-hud · KESTREL-9 TARGET ACQUIRED</title>
3
+ <link rel="stylesheet" href="/assets/fonts/fonts.css">
4
+ <style>html,body{margin:0;background:#000;overflow:hidden}canvas{display:block;position:absolute;left:0;top:0;width:1920px;height:1080px}</style>
5
+ <script src="/node_modules/d3/dist/d3.min.js"></script>
6
+ <script src="/node_modules/topojson-client/dist/topojson-client.min.js"></script>
7
+ <script type="importmap">{"imports":{"three":"/node_modules/three/build/three.module.js","three/addons/":"/node_modules/three/examples/jsm/"}}</script>
8
+ </head><body>
9
+ <script type="module">
10
+ import * as THREE from 'three';
11
+ import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js';
12
+ import { ShaderPass } from 'three/addons/postprocessing/ShaderPass.js';
13
+ import { UnrealBloomPass } from 'three/addons/postprocessing/UnrealBloomPass.js';
14
+ import { createHolo, H0 } from './js/holo.js';
15
+ import { initHUD, drawHUD, linksV5 } from './js/hud.js';
16
+ import { VS, COMP_FS as COMP_FS0, FINAL_FS, TEXT_FS as TEXT_FS0 } from './js/post.js';
17
+ import { prog, E, frameOf, LOCK, clamp, V5 } from './js/util.js';
18
+ import { initTitle, drawTitle, TITLE_FS, magentaInk } from './js/v5.js';
19
+ // v5: magenta alert ink (default path untouched: the shader strings are only rewritten when ?v5=1)
20
+ const INKM = V5 && new URLSearchParams(location.search).get('ink') !== 'amber';
21
+ const COMP_FS = INKM ? magentaInk(COMP_FS0) : COMP_FS0, TEXT_FS = INKM ? magentaInk(TEXT_FS0) : TEXT_FS0;
22
+
23
+ window.DEMO = { width: 1920, height: 1080, fps: 30, duration: 10, motionBlur: { samples: 1, shutter: 0.5 } };
24
+ const W = 1920, H = 1080, dpr = window.devicePixelRatio || 1;
25
+ const K = await (await fetch('/demos/22-hud/cues.json')).json();
26
+ const topo = await (await fetch('/demos/22-hud/assets/land-50m.json')).json();
27
+
28
+ // equirectangular land mask for the dotted-land layer
29
+ const mc = document.createElement('canvas'); mc.width = 2048; mc.height = 1024;
30
+ const mx = mc.getContext('2d', { willReadFrequently: true });
31
+ const proj = d3.geoEquirectangular().scale(2048 / (2 * Math.PI)).translate([1024, 512]);
32
+ mx.fillStyle = '#fff'; mx.beginPath(); d3.geoPath(proj, mx)(topojson.feature(topo, topo.objects.land)); mx.fill();
33
+ const landMask = { w: 2048, h: 1024, data: mx.getImageData(0, 0, 2048, 1024).data };
34
+
35
+ const renderer = new THREE.WebGLRenderer({ antialias: false, preserveDrawingBuffer: true, powerPreference: 'high-performance' });
36
+ renderer.setPixelRatio(dpr); renderer.setSize(W, H, false);
37
+ renderer.outputColorSpace = THREE.LinearSRGBColorSpace; renderer.toneMapping = THREE.NoToneMapping;
38
+ document.body.appendChild(renderer.domElement);
39
+
40
+ const holo = createHolo(topo, landMask);
41
+ const holoRT = new THREE.WebGLRenderTarget(W * dpr, H * dpr, { type: THREE.HalfFloatType, samples: 4 });
42
+
43
+ const hud = document.createElement('canvas'); hud.width = W * dpr; hud.height = H * dpr;
44
+ const txt = document.createElement('canvas'); txt.width = W * dpr; txt.height = H * dpr;
45
+ initHUD(hud, K, dpr, txt);
46
+ const txtTex = new THREE.CanvasTexture(txt); txtTex.colorSpace = THREE.NoColorSpace;
47
+ txtTex.generateMipmaps = false; txtTex.minFilter = THREE.LinearFilter; txtTex.magFilter = THREE.LinearFilter;
48
+ const hudTex = new THREE.CanvasTexture(hud); hudTex.colorSpace = THREE.NoColorSpace;
49
+ hudTex.generateMipmaps = false; hudTex.minFilter = THREE.LinearFilter; hudTex.magFilter = THREE.LinearFilter;
50
+
51
+ const comp = new THREE.ShaderMaterial({ vertexShader: VS, fragmentShader: COMP_FS, depthTest: false, depthWrite: false, uniforms: {
52
+ tHolo: { value: holoRT.texture }, tHud: { value: hudTex }, uRes: { value: new THREE.Vector2(W * dpr, H * dpr) },
53
+ uT: { value: 0 }, uWave: { value: -1 }, uHex: { value: 0 }, uFlash: { value: 0 }, uZoom: { value: 0 }, uScope: { value: 322 }, uGain: { value: 1 }, uHexS: { value: 1 }, uDive: { value: 0 },
54
+ uTgt: { value: new THREE.Vector2(960, 540) } } });
55
+ const fin = new THREE.ShaderMaterial({ vertexShader: VS, fragmentShader: FINAL_FS, depthTest: false, depthWrite: false, uniforms: {
56
+ tDiffuse: { value: null }, uRes: { value: new THREE.Vector2(W * dpr, H * dpr) }, uT: { value: 0 }, uOpen: { value: 1 },
57
+ uGlitch: { value: 0 }, uFlash: { value: 0 }, uCA: { value: 0.0007 }, uFrame: { value: 0 }, uRoll: { value: 0.23 }, uClose: { value: 0 } } });
58
+
59
+ const composer = new EffectComposer(renderer);
60
+ composer.setPixelRatio(dpr); composer.setSize(W, H);
61
+ const compPass = new ShaderPass(comp); const bloom = new UnrealBloomPass(new THREE.Vector2(W * dpr, H * dpr), 0.75, 0.45, 0.32);
62
+ const finPass = new ShaderPass(fin);
63
+ const tmat = new THREE.ShaderMaterial({ vertexShader: VS, fragmentShader: TEXT_FS, depthTest: false, depthWrite: false, uniforms: {
64
+ tDiffuse: { value: null }, tTxt: { value: txtTex }, uRes: { value: new THREE.Vector2(W * dpr, H * dpr) }, uWave: { value: -1 },
65
+ uTgt: { value: new THREE.Vector2(960, 540) } } });
66
+ const txtPass = new ShaderPass(tmat);
67
+ composer.addPass(compPass); composer.addPass(bloom); composer.addPass(txtPass);
68
+ // v5: style-name title on its own post-bloom layer (not re-inked), under the final CRT pass
69
+ let ttlTex = null;
70
+ if (V5) {
71
+ const ttl = document.createElement('canvas'); ttl.width = W * dpr; ttl.height = H * dpr; initTitle(ttl, dpr);
72
+ ttlTex = new THREE.CanvasTexture(ttl); ttlTex.colorSpace = THREE.NoColorSpace; ttlTex.generateMipmaps = false; ttlTex.minFilter = THREE.LinearFilter; ttlTex.magFilter = THREE.LinearFilter;
73
+ composer.addPass(new ShaderPass(new THREE.ShaderMaterial({ vertexShader: VS, fragmentShader: TITLE_FS, depthTest: false, depthWrite: false, uniforms: { tDiffuse: { value: null }, tTtl: { value: ttlTex } } })));
74
+ }
75
+ composer.addPass(finPass);
76
+
77
+ // glitch events (frame-quantised): power-on, signal, lock + a few restrained micro-glitches
78
+ const GL = [[0.0, 0.2, 1.0], [K.signal_detected, 0.14, 0.8], [LOCK + 1 / 30, 0.1, 0.45], [K.resolve, 0.067, 0.3], [2.93, 0.067, 0.35], [5.43, 0.067, 0.3], [8.13, 0.067, 0.3], [9.3, 0.034, 0.25]];
79
+ const glitch = (t) => { let g = 0; for (const [t0, d, a] of GL) if (t >= t0 && t < t0 + d) g = Math.max(g, a * (1 - 0.5 * (t - t0) / d)); return g; };
80
+
81
+ // hard-event frames are rendered with a closed shutter (all sub-samples at the frame centre): the impact frame must be one crisp state
82
+ const HARD = new Set([frameOf(LOCK), frameOf(K.resolve), frameOf(K.signal_detected), frameOf(K.boot.ring_outer)]);
83
+ // type + post-bloom vector layer: drawn ONCE per frame at the frame centre (no motion-blur double exposure of rolling digits)
84
+ let lastTF = -1;
85
+ window.renderAt = async (t) => {
86
+ { const fr = Math.round(t * 30); if (HARD.has(fr)) t = fr / 30; }
87
+ { const fq = frameOf(t); if (fq !== lastTF) { const tc = fq / 30; drawHUD(tc, holo.update(tc), 'txt'); txtTex.needsUpdate = true; if (V5) { drawTitle(tc); ttlTex.needsUpdate = true; } lastTF = fq; } }
88
+ const S = holo.update(t);
89
+ renderer.setRenderTarget(holoRT); renderer.setClearColor(0x000000, 1); renderer.clear(); renderer.render(holo.scene, holo.camera);
90
+ renderer.setRenderTarget(null);
91
+ const HS = drawHUD(t, S, 'geo'); hudTex.needsUpdate = true;
92
+ const f = frameOf(t), fl = frameOf(LOCK);
93
+ const u = comp.uniforms, v0 = fin.uniforms;
94
+ u.uT.value = t; u.uZoom.value = S.zoom;
95
+ u.uWave.value = t >= LOCK ? E.outC(prog(t, LOCK, K.wave_dur)) * 1350 : -1;
96
+ u.uHex.value = t >= K.boot.hex ? E.outC(prog(t, K.boot.hex, 1.2)) * 1500 : 0;
97
+ u.uFlash.value = 0; v0.uFlash.value = f === fl ? 1.0 : f === fl + 1 ? 0.3 : f === frameOf(K.resolve) ? 0.45 : f === frameOf(K.signal_detected) ? 0.3 : 0;
98
+ // focus pull: hologram drops to 45 % while the brackets converge, returns on the impact
99
+ u.uGain.value = t < LOCK ? 1 - 0.55 * E.inOutC(prog(t, 6.10, 0.26)) : 1 + 0.55 * E.inOutC(prog(t, LOCK + 0.07, 0.3)) * (1 - E.inOutC(prog(t, 7.15, 0.55))); // dive: the coast rushing past is the brightest layer
100
+ u.uHexS.value = 1 + 0.1 * HS.dive; u.uDive.value = HS.dive;
101
+ u.uTgt.value.set(S.target.x, H - S.target.y);
102
+ tmat.uniforms.uWave.value = u.uWave.value; tmat.uniforms.uTgt.value.copy(u.uTgt.value);
103
+ u.uScope.value = HS.scopeR;
104
+ const v = fin.uniforms;
105
+ v.uT.value = t; v.uFrame.value = f; v.uOpen.value = E.outC(prog(t, 0.0, 0.3)); v.uGlitch.value = glitch(t);
106
+ v.uCA.value = 0.0007 + (t >= LOCK + 1 / 30 ? 0.003 * Math.exp(-(t - LOCK - 1 / 30) * 7) : 0) + (t < 0.2 ? 0.002 * (1 - t / 0.2) : 0);
107
+ bloom.radius = 0.45 - (t >= LOCK ? 0.2 * Math.exp(-(t - LOCK) * 4) : 0); v.uClose.value = prog(t, 9.7667, 0.2);
108
+ bloom.strength = 0.75 + (t >= LOCK + 1 / 30 ? 0.18 * Math.exp(-(t - LOCK - 1 / 30) * 8) : 0) + (f === frameOf(K.boot.ring_outer) ? 0.9 : 0);
109
+ composer.render();
110
+ renderer.getContext().finish();
111
+ };
112
+
113
+ await document.fonts.load('500 20px "JetBrains Mono"'); await document.fonts.load('600 20px "JetBrains Mono"'); await document.fonts.load('400 20px "JetBrains Mono"');
114
+ await document.fonts.load('600 14px Rajdhani'); await document.fonts.load('700 14px Rajdhani');
115
+ await document.fonts.load('600 60px "Chakra Petch"');
116
+ for (const w of [400, 500, 700, 900]) await document.fonts.load(`${w} 40px "HarmonyOS Sans SC"`, '目标锁定隼眼轨道光学系统自检导航遥测雷达扫描信号分析候选频谱数据链警报坐标');
117
+ if (V5) { await document.fonts.load('900 168px "HarmonyOS Sans SC"', '赛博朋克'); await document.fonts.load('700 206px "Chakra Petch"', 'HUD');
118
+ await document.fonts.load('500 28px "HarmonyOS Sans SC"', '信号锁定 · ALERT 03'); await document.fonts.load('700 28px Rajdhani', 'SIGNAL LOCKED'); }
119
+ await document.fonts.ready;
120
+ // v5 link elements: pure function of t (re-derives the hologram projection; renderAt re-runs holo.update itself)
121
+ if (V5) window.linkAt = (t) => { const fr = Math.round(t * 30); if (HARD.has(fr)) t = fr / 30; return linksV5(t, holo.update(t)); };
122
+ await window.renderAt(0);
123
+ window.__ready = true;
124
+ </script>
125
+ </body></html>
@@ -0,0 +1,275 @@
1
+ // Three.js holographic wireframe Earth (Natural Earth 50m coastlines), pure function of t
2
+ import * as THREE from 'three';
3
+ import { DEG, TARGET, CND, LOCK, E, prog, clamp, lerp, hermite, hash } from './util.js';
4
+
5
+ const ll = (lat, lon, r = 1) => {
6
+ const a = lat * DEG, b = lon * DEG;
7
+ return new THREE.Vector3(Math.cos(a) * Math.sin(b) * r, Math.sin(a) * r, Math.cos(a) * Math.cos(b) * r);
8
+ };
9
+
10
+ const VS = `
11
+ attribute float aU; attribute float aS;
12
+ uniform vec3 uCam;
13
+ varying float vU; varying float vS; varying float vFace; varying vec3 vW; varying float vLat;
14
+ void main(){
15
+ vLat = position.y;
16
+ vec4 wp = modelMatrix * vec4(position,1.0);
17
+ vec3 n = normalize(wp.xyz);
18
+ vFace = dot(n, normalize(uCam - wp.xyz));
19
+ vW = wp.xyz; vU = aU; vS = aS;
20
+ gl_Position = projectionMatrix * viewMatrix * wp;
21
+ }`;
22
+ const FS = `
23
+ uniform float uGrow, uSpread, uAlpha, uBack, uHead, uScanY, uFaceMode, uDash, uTime;
24
+ uniform vec3 uColor; uniform vec3 uTgt; uniform float uPulse, uPulseAmp, uFocus, uLimb;
25
+ varying float vU; varying float vS; varying float vFace; varying vec3 vW; varying float vLat;
26
+ void main(){
27
+ float g = uGrow * (1.0 + uSpread) - vS * uSpread;
28
+ if (vU > g) discard;
29
+ if (uDash > 0.0 && fract(vU * uDash - uTime * 0.15) > 0.55) discard;
30
+ float head = smoothstep(g - 0.035, g, vU) * uHead * (1.0 - step(0.9999, uGrow));
31
+ float f0 = vFace > 0.0 ? mix(0.5, 1.0, smoothstep(0.0, 0.45, vFace)) : uBack;
32
+ float f1 = vFace > 0.0 ? mix(0.16, 1.0, smoothstep(0.15, 0.5, vFace)) * mix(1.0, 0.6, smoothstep(0.83, 0.88, vLat)) : uBack * 0.6;
33
+ float face = uFaceMode > 0.5 ? mix(f0, f1, uLimb) : 1.0;
34
+ float scan = exp(-pow((vW.y - uScanY) / 0.045, 2.0));
35
+ float ang = acos(clamp(dot(normalize(vW), uTgt), -1.0, 1.0));
36
+ float pulse = uPulseAmp * exp(-pow((ang - uPulse) / 0.006, 2.0));
37
+ float focus = mix(1.0, 0.35 + 1.1 * exp(-ang * ang / 0.012), uFocus);
38
+ float a = uAlpha * face * focus;
39
+ vec3 c = uColor * a + vec3(0.75, 1.0, 1.0) * (head * 0.9 + (scan * 0.55 + pulse) * face);
40
+ gl_FragColor = vec4(c, 1.0);
41
+ }`;
42
+ const PVS = `
43
+ attribute float aS;
44
+ uniform vec3 uCam; uniform float uSize;
45
+ varying float vFace; varying float vS; varying vec3 vW; varying float vLat;
46
+ void main(){
47
+ vLat = position.y;
48
+ vec4 wp = modelMatrix * vec4(position,1.0);
49
+ vFace = dot(normalize(wp.xyz), normalize(uCam - wp.xyz)); vS = aS; vW = wp.xyz;
50
+ vec4 mv = viewMatrix * wp;
51
+ gl_PointSize = uSize * clamp(2.2 / -mv.z, 0.6, 2.4);
52
+ gl_Position = projectionMatrix * mv;
53
+ }`;
54
+ const PFS = `
55
+ uniform float uGrow, uAlpha; uniform vec3 uColor; uniform vec3 uTgt; uniform float uFocus, uScanY, uLimb;
56
+ varying float vFace; varying float vS; varying vec3 vW; varying float vLat;
57
+ void main(){
58
+ if (vS > uGrow) discard;
59
+ vec2 d = gl_PointCoord - 0.5; float r = length(d);
60
+ float m = smoothstep(0.5, 0.2, r);
61
+ float face = vFace > 0.0 ? smoothstep(0.0, 0.35, vFace) * mix(1.0, smoothstep(0.15, 0.5, vFace) * mix(1.0, 0.6, smoothstep(0.83, 0.88, vLat)), uLimb) : 0.0;
62
+ float ang = acos(clamp(dot(normalize(vW), uTgt), -1.0, 1.0));
63
+ float focus = mix(1.0, 0.3 + 1.2 * exp(-ang * ang / 0.01), uFocus);
64
+ float scan = exp(-pow((vW.y - uScanY) / 0.045, 2.0));
65
+ gl_FragColor = vec4(uColor * m * face * uAlpha * focus + vec3(0.6,1.0,1.0) * scan * m * face * 0.5, 1.0);
66
+ }`;
67
+
68
+ function lineMat(o) {
69
+ return new THREE.ShaderMaterial({
70
+ vertexShader: VS, fragmentShader: FS, transparent: true, depthTest: false, depthWrite: false,
71
+ blending: THREE.AdditiveBlending,
72
+ uniforms: {
73
+ uCam: { value: new THREE.Vector3() }, uGrow: { value: 0 }, uSpread: { value: o.spread ?? 0.6 },
74
+ uAlpha: { value: o.alpha ?? 1 }, uBack: { value: o.back ?? 0.12 }, uHead: { value: o.head ?? 1 },
75
+ uScanY: { value: 9 }, uFaceMode: { value: o.face ?? 1 }, uDash: { value: o.dash ?? 0 }, uTime: { value: 0 },
76
+ uColor: { value: new THREE.Color(...(o.color || [0, 0.9, 1])) }, uTgt: { value: new THREE.Vector3(0, 0, 1) },
77
+ uPulse: { value: 0 }, uPulseAmp: { value: 0 }, uFocus: { value: 0 }, uLimb: { value: 1 },
78
+ },
79
+ });
80
+ }
81
+ // polylines -> LineSegments with per-vertex aU (0..1 along line) and per-line aS (start offset)
82
+ function buildLines(lines, mat, seed = 1) {
83
+ const pos = [], U = [], S = [];
84
+ lines.forEach((pts, li) => {
85
+ let L = 0; const cum = [0];
86
+ for (let i = 1; i < pts.length; i++) { L += pts[i].distanceTo(pts[i - 1]); cum.push(L); }
87
+ if (L <= 0) return;
88
+ const s = hash(seed, li);
89
+ for (let i = 1; i < pts.length; i++) {
90
+ const a = pts[i - 1], b = pts[i];
91
+ pos.push(a.x, a.y, a.z, b.x, b.y, b.z); U.push(cum[i - 1] / L, cum[i] / L); S.push(s, s);
92
+ }
93
+ });
94
+ const g = new THREE.BufferGeometry();
95
+ g.setAttribute('position', new THREE.Float32BufferAttribute(pos, 3));
96
+ g.setAttribute('aU', new THREE.Float32BufferAttribute(U, 1));
97
+ g.setAttribute('aS', new THREE.Float32BufferAttribute(S, 1));
98
+ const m = new THREE.LineSegments(g, mat); m.frustumCulled = false; return m;
99
+ }
100
+
101
+ // post-dive map intelligence: cities (static) + sea tracks (moving, deg/s)
102
+ const CITIES = [['YTY', '扬州', 32.39, 119.41], ['YNZ', '盐城', 33.35, 120.16], ['JHA', '金华', 29.08, 119.65], ['HYN', '台州', 28.66, 121.42], ['WNZ', '温州', 28.00, 120.70]];
103
+ export const H0 = 6.35;
104
+ const TRACKS = [['TRK 11', 33.05, 123.25, -0.040, -0.050], ['TRK 12', 32.25, 122.55, 0.030, 0.055], ['TRK 14', 28.95, 122.75, 0.045, -0.030]];
105
+ export function createHolo(topo, landMask) {
106
+ const scene = new THREE.Scene();
107
+ const camera = new THREE.PerspectiveCamera(30, 16 / 9, 0.005, 100);
108
+ const tilt = new THREE.Group(); const spin = new THREE.Group();
109
+ tilt.rotation.order = 'XYZ'; tilt.add(spin); scene.add(tilt);
110
+ const mats = [];
111
+ const reg = (m) => (mats.push(m), m);
112
+
113
+ // coastlines
114
+ const land = topojson.feature(topo, topo.objects.land);
115
+ const rings = [];
116
+ for (const f of land.features) {
117
+ const polys = f.geometry.type === 'Polygon' ? [f.geometry.coordinates] : f.geometry.coordinates;
118
+ for (const poly of polys) for (const ring of poly) {
119
+ if (ring.length < 4) continue;
120
+ rings.push(ring.map(([lon, lat]) => ll(lat, lon, 1.0015)));
121
+ }
122
+ }
123
+ const coastMat = reg(lineMat({ alpha: 0.9, back: 0.09, spread: 0.55 }));
124
+ spin.add(buildLines(rings, coastMat, 3));
125
+
126
+ // graticule 10°
127
+ const grat = [];
128
+ for (let lat = -80; lat <= 80; lat += 10) { const p = []; for (let lon = -180; lon <= 180; lon += 2) p.push(ll(lat, lon)); grat.push(p); }
129
+ for (let lon = -180; lon < 180; lon += 10) { const p = []; for (let lat = -90; lat <= 90; lat += 2) p.push(ll(lat, lon)); grat.push(p); }
130
+ const gratMat = reg(lineMat({ color: [0, 0.495, 1], alpha: 0.2, back: 0.05, spread: 0.2, head: 0.4 }));
131
+ spin.add(buildLines(grat, gratMat, 5));
132
+ // fine 1° grid around target (fades in with zoom)
133
+ const fine = [];
134
+ for (let lat = 22; lat <= 41; lat += 1) { const p = []; for (let lon = 110; lon <= 133; lon += 0.5) p.push(ll(lat, lon, 1.0005)); fine.push(p); }
135
+ for (let lon = 110; lon <= 133; lon += 1) { const p = []; for (let lat = 22; lat <= 41; lat += 0.5) p.push(ll(lat, lon, 1.0005)); fine.push(p); }
136
+ const fineMat = reg(lineMat({ color: [0, 0.495, 1], alpha: 0.0, back: 0.0, spread: 0.3, head: 0.6 }));
137
+ spin.add(buildLines(fine, fineMat, 9));
138
+
139
+ // dotted land (fibonacci) + dense patch near target
140
+ const inLand = (lat, lon) => {
141
+ const x = Math.floor((lon + 180) / 360 * landMask.w) % landMask.w, y = Math.floor((90 - lat) / 180 * landMask.h);
142
+ return landMask.data[(y * landMask.w + x) * 4 + 3] > 128;
143
+ };
144
+ const mkPoints = (arr, size, alpha) => {
145
+ const pos = [], S = [];
146
+ arr.forEach(([lat, lon], i) => { const v = ll(lat, lon, 1.001); pos.push(v.x, v.y, v.z); S.push(hash(11, i)); });
147
+ const g = new THREE.BufferGeometry();
148
+ g.setAttribute('position', new THREE.Float32BufferAttribute(pos, 3));
149
+ g.setAttribute('aS', new THREE.Float32BufferAttribute(S, 1));
150
+ const m = new THREE.ShaderMaterial({ vertexShader: PVS, fragmentShader: PFS, transparent: true, depthTest: false,
151
+ depthWrite: false, blending: THREE.AdditiveBlending,
152
+ uniforms: { uCam: { value: new THREE.Vector3() }, uSize: { value: size }, uGrow: { value: 0 }, uAlpha: { value: alpha },
153
+ uColor: { value: new THREE.Color(0, 0.4125, 0.9) }, uTgt: { value: new THREE.Vector3(0, 0, 1) }, uFocus: { value: 0 }, uScanY: { value: 9 }, uLimb: { value: 1 } } });
154
+ const p = new THREE.Points(g, m); p.frustumCulled = false; spin.add(p); return m;
155
+ };
156
+ const fib = []; const N = 16000, ga = Math.PI * (3 - Math.sqrt(5));
157
+ for (let i = 0; i < N; i++) {
158
+ const y = 1 - (i + 0.5) / N * 2, lat = Math.asin(y) / DEG, lon = ((i * ga / DEG) % 360) - 180;
159
+ if (inLand(lat, lon)) fib.push([lat, lon]);
160
+ }
161
+ const dotsMat = reg(mkPoints(fib, 2.0, 0.26));
162
+ const dense = [];
163
+ for (let lat = 18; lat <= 44; lat += 0.13) for (let lon = 104; lon <= 138; lon += 0.13 / Math.cos(lat * DEG)) if (inLand(lat, lon)) dense.push([lat, lon]);
164
+ const denseMat = reg(mkPoints(dense, 1.35, 0.0));
165
+
166
+ // atmosphere fresnel shell
167
+ const shellMat = new THREE.ShaderMaterial({ transparent: true, depthWrite: false, depthTest: false, blending: THREE.AdditiveBlending,
168
+ uniforms: { uCam: { value: new THREE.Vector3() }, uA: { value: 0 } },
169
+ vertexShader: `uniform vec3 uCam; varying float vF; void main(){ vec4 wp = modelMatrix*vec4(position,1.0);
170
+ vF = dot(normalize(wp.xyz), normalize(uCam-wp.xyz)); gl_Position = projectionMatrix*viewMatrix*wp; }`,
171
+ fragmentShader: `uniform float uA; varying float vF; void main(){ float f = pow(1.0-clamp(vF,0.0,1.0), 3.5);
172
+ gl_FragColor = vec4(vec3(0.0,0.55,0.7)*(f*0.38+0.012)*uA, 1.0); }` });
173
+ const shell = new THREE.Mesh(new THREE.SphereGeometry(1.0, 96, 64), shellMat); scene.add(shell);
174
+
175
+ // orbit rings (scene space, not spinning with globe)
176
+ const orbit = (r, rx, rz) => { const p = []; for (let a = 0; a <= 360; a += 1) p.push(new THREE.Vector3(Math.cos(a * DEG) * r, 0, Math.sin(a * DEG) * r));
177
+ const m = reg(lineMat({ alpha: 0.5, face: 0, spread: 0, head: 0.8, dash: 90 })); const o = buildLines([p], m, 21);
178
+ o.rotation.set(rx, 0, rz); scene.add(o); return { m, o, r }; };
179
+ const orbits = [orbit(1.32, 1.25, 0.32), orbit(1.5, 1.42, -0.5)];
180
+
181
+ // target beam + surface rings (in spin space)
182
+ const T = ll(TARGET.lat, TARGET.lon, 1.0);
183
+ const beamMat = reg(lineMat({ alpha: 1.0, face: 0, spread: 0, head: 0 }));
184
+ const beam = buildLines([[T.clone().multiplyScalar(1.0), T.clone().multiplyScalar(1.07)]], beamMat, 31); spin.add(beam);
185
+ const circ = (rad) => { const n = T.clone().normalize(); const u = new THREE.Vector3(0, 1, 0).cross(n).normalize(); const v = n.clone().cross(u);
186
+ const p = []; for (let a = 0; a <= 360; a += 3) p.push(T.clone().multiplyScalar(1.002).addScaledVector(u, Math.cos(a * DEG) * rad).addScaledVector(v, Math.sin(a * DEG) * rad)); return p; };
187
+ const tRingMat = reg(lineMat({ alpha: 0.0, face: 0, spread: 0, head: 0 }));
188
+ spin.add(buildLines([circ(0.012), circ(0.024), circ(0.045)], tRingMat, 41));
189
+
190
+ const GA = ll(-9, 28, 1), GB = T.clone().normalize(), GN = GA.clone().cross(GB).normalize();
191
+ const GU = GA.clone().normalize(), GV = GN.clone().cross(GU).normalize(); // circle: cos(a)·GU + sin(a)·GV, a grows toward the target
192
+ const aT = Math.atan2(GB.dot(GV), GB.dot(GU));
193
+ const gc = (a, r = 1) => GU.clone().multiplyScalar(Math.cos(a) * r).addScaledVector(GV, Math.sin(a) * r);
194
+ const allLineMats = mats.filter((m) => m.uniforms.uTgt && m.uniforms.uPulse);
195
+ const tmp = new THREE.Vector3();
196
+
197
+ function update(t) {
198
+ // --- globe orientation: auto drift → hermite turn onto target (4.4–5.4)
199
+ const L = TARGET.lon, t0 = 4.4;
200
+ let lonC;
201
+ if (t < t0) lonC = L - 70 + 8 * (t - t0);
202
+ else if (t < 5.4) lonC = L - 70 + hermite((t - t0) / 1.0, 0, 70, 8, 0);
203
+ else lonC = L;
204
+ const tiltV = t < t0 ? 0.36 : lerp(0.36, TARGET.lat * DEG, E.inOutC(prog(t, t0, 1.0)));
205
+ spin.rotation.y = -lonC * DEG; tilt.rotation.x = tiltV;
206
+ tilt.updateMatrixWorld(true);
207
+ const Tw = T.clone().applyMatrix4(spin.matrixWorld);
208
+
209
+ // --- camera: orbit framing → dive at lock
210
+ const z = E.outC(prog(t, LOCK, 1.45)); // dive progress
211
+ const zs = E.inOutC(prog(t, LOCK, 1.9)); // pitch
212
+ const h = Math.exp(lerp(Math.log(H0), Math.log(0.3), z)) + 0.02 * Math.sin(t * 0.7) * z;
213
+ const pitch = lerp(0, 38, zs) * DEG;
214
+ const drift = 0.7 * Math.sin(t * 0.9) * DEG * z;
215
+ const dir = new THREE.Vector3(Math.sin(drift), -Math.sin(pitch), Math.cos(pitch)).normalize();
216
+ const look = Tw.clone().multiplyScalar(lerp(0, 1, E.inOutC(prog(t, LOCK, 0.9))));
217
+ // before lock look at origin (globe centred); after, look at the target point (which sits on the z axis)
218
+ camera.position.copy(Tw.clone().normalize().multiplyScalar(1).addScaledVector(dir, h));
219
+ if (t < LOCK) camera.position.set(0, 0, H0 + 1);
220
+ camera.lookAt(t < LOCK ? new THREE.Vector3(0, 0, 0) : look);
221
+ camera.updateMatrixWorld(true); camera.updateProjectionMatrix();
222
+
223
+ const cam = camera.position;
224
+ for (const m of mats) { if (m.uniforms.uCam) m.uniforms.uCam.value.copy(cam); if (m.uniforms.uTime) m.uniforms.uTime.value = t; }
225
+ shellMat.uniforms.uCam.value.copy(cam);
226
+
227
+ // --- build-on
228
+ const grow = E.inOutC(prog(t, 1.35, 1.25));
229
+ coastMat.uniforms.uGrow.value = grow;
230
+ gratMat.uniforms.uGrow.value = E.outC(prog(t, 1.2, 1.0));
231
+ dotsMat.uniforms.uGrow.value = E.outC(prog(t, 2.0, 1.2));
232
+ shellMat.uniforms.uA.value = E.outC(prog(t, 1.2, 1.0)) * (1 - z);
233
+ orbits.forEach((o, i) => { o.m.uniforms.uGrow.value = E.outC(prog(t, 1.9 + i * 0.25, 0.8)); o.m.uniforms.uAlpha.value = 0.55 * (1 - z);
234
+ o.o.rotation.y = t * (0.18 + i * 0.07); });
235
+ // focus / zoom detail
236
+ fineMat.uniforms.uGrow.value = E.outC(prog(t, LOCK + 0.25, 0.9)); fineMat.uniforms.uAlpha.value = 0.46 * z;
237
+ denseMat.uniforms.uGrow.value = E.outC(prog(t, LOCK + 0.15, 1.0)); denseMat.uniforms.uAlpha.value = 0.62 * z;
238
+ dotsMat.uniforms.uAlpha.value = 0.26 * (1 - 0.8 * z);
239
+ gratMat.uniforms.uAlpha.value = 0.2 * (1 - 0.4 * z);
240
+ const focus = 0.85 * z;
241
+ for (const m of mats) if (m.uniforms.uLimb) m.uniforms.uLimb.value = 1 - z;
242
+ // scan band sweeps: every 2 s pre-lock
243
+ const sp = ((t - 1.4) % 2.0) / 2.0;
244
+ const scanY = t > 1.4 && t < LOCK ? lerp(1.25, -1.25, E.inOutC(sp)) : 9;
245
+ // surface pulse from target after lock (angular radius)
246
+ const pt = t - LOCK;
247
+ const pulse = pt > 0 ? (pt % 1.0) * 0.12 : 0, pAmp = pt > 0.25 ? 0.7 * (1 - (pt % 1.0)) : 0;
248
+ const tn = Tw.clone().normalize();
249
+ for (const m of allLineMats) { m.uniforms.uScanY.value = scanY; m.uniforms.uTgt.value.copy(tn); m.uniforms.uPulse.value = pulse;
250
+ m.uniforms.uPulseAmp.value = pAmp; m.uniforms.uFocus.value = focus; }
251
+ for (const m of [dotsMat, denseMat]) { m.uniforms.uTgt.value.copy(tn); m.uniforms.uFocus.value = focus; m.uniforms.uScanY.value = scanY; }
252
+ beamMat.uniforms.uGrow.value = E.outE(prog(t, LOCK, 0.35)); beamMat.uniforms.uAlpha.value = 1.0;
253
+ tRingMat.uniforms.uGrow.value = E.outC(prog(t, LOCK, 0.5)); tRingMat.uniforms.uAlpha.value = 0.9;
254
+
255
+ // --- projections for the 2D HUD
256
+ const proj = (v) => { tmp.copy(v).project(camera); return { x: (tmp.x + 1) * 960, y: (1 - tmp.y) * 540, z: tmp.z }; };
257
+ const faceOf = (v) => v.clone().normalize().dot(cam.clone().sub(v).normalize());
258
+ const out = { target: { ...proj(Tw), face: faceOf(Tw) }, cnd: [] , zoom: z, globeR: 0, lonC, tiltDeg: tiltV / DEG, h };
259
+ for (const c of CND) { const w = ll(c.lat, c.lon, 1).applyMatrix4(spin.matrixWorld); out.cnd.push({ ...proj(w), face: faceOf(w) }); }
260
+ // satellite: angular distance to target (rad) closes 1.35 -> 0.26 (1648 km) over 3.2..6.4 s
261
+ const sa = aT - lerp(1.35, 0.26, E.outC(prog(t, 3.2, 3.2)));
262
+ const trk = [];
263
+ for (let i = 0; i <= 120; i++) { const a = sa - 1.7 + i * (2.6 / 120), w = gc(a, 1.002).applyMatrix4(spin.matrixWorld); trk.push({ ...proj(w), face: faceOf(w), a: a - sa }); }
264
+ const satW = gc(sa, 1.08).applyMatrix4(spin.matrixWorld), nadW = gc(sa, 1.0).applyMatrix4(spin.matrixWorld);
265
+ const fp = []; for (let i = 0; i <= 32; i++) { const q = i / 32 * Math.PI * 2, rr = 0.075;
266
+ const v = gc(sa + Math.cos(q) * rr, 1).addScaledVector(GN, Math.sin(q) * rr).normalize().multiplyScalar(1.002).applyMatrix4(spin.matrixWorld); fp.push({ ...proj(v), face: faceOf(v) }); }
267
+ out.sat = { ...proj(satW), face: faceOf(nadW), nad: proj(nadW), trk, fp, dist: sa - aT };
268
+ out.cities = CITIES.map((c) => { const w = ll(c[2], c[3], 1).applyMatrix4(spin.matrixWorld); return { id: c[0], cn: c[1], ...proj(w), face: faceOf(w) }; });
269
+ const tt = t - 7.0;
270
+ out.tracks = TRACKS.map((c) => { const w = ll(c[1] + c[3] * tt, c[2] + c[4] * tt, 1).applyMatrix4(spin.matrixWorld), w2 = ll(c[1] + c[3] * (tt - 1.5), c[2] + c[4] * (tt - 1.5), 1).applyMatrix4(spin.matrixWorld);
271
+ const p2 = proj(w2); return { id: c[0], ...proj(w), bx: p2.x, by: p2.y, face: faceOf(w), kn: Math.round(Math.hypot(c[3], c[4]) * 260) }; });
272
+ return out;
273
+ }
274
+ return { scene, camera, update };
275
+ }