dsh-drawai 0.3.4 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +4154 -0
- package/README.md +49 -11
- package/lib/audio-media.js +150 -0
- package/lib/audio-service.js +66 -0
- package/lib/canvas-format.js +134 -0
- package/lib/client.js +5090 -184
- package/lib/comfyui-default-workflow.mjs +1825 -0
- package/lib/comfyui-workflow.mjs +426 -0
- package/lib/document-commands.js +12 -0
- package/lib/document-core.js +29 -0
- package/lib/drawing-runner.js +6 -4
- package/lib/drawing-tasks.js +26 -0
- package/lib/ffmpeg-manager.js +1056 -0
- package/lib/imagegen.mjs +596 -0
- package/lib/index.js +1762 -129
- package/lib/media.js +26 -13
- package/lib/mgstyle-core.js +75 -0
- package/lib/motion/apply.js +181 -0
- package/lib/motion/asset-pack-lock.js +10 -0
- package/lib/motion/asset-pack.js +335 -0
- package/lib/motion/assets.js +291 -0
- package/lib/motion/audio.js +103 -0
- package/lib/motion/audiolevel.js +63 -0
- package/lib/motion/audiomix.js +144 -0
- package/lib/motion/beats.js +338 -0
- package/lib/motion/builtin-assets.js +62 -0
- package/lib/motion/canvas-spec.js +442 -0
- package/lib/motion/capture.js +95 -0
- package/lib/motion/cards.js +80 -0
- package/lib/motion/collect.js +449 -0
- package/lib/motion/delivery.js +140 -0
- package/lib/motion/edge-speech.py +90 -0
- package/lib/motion/entry.jsx +73 -0
- package/lib/motion/export.js +200 -0
- package/lib/motion/ffmpeg.js +43 -0
- package/lib/motion/fonts.js +71 -0
- package/lib/motion/jobs.js +117 -0
- package/lib/motion/json.js +4 -0
- package/lib/motion/media-catalog.js +59 -0
- package/lib/motion/mgstyles/BRIEF-TEMPLATE.md +63 -0
- package/lib/motion/mgstyles/briefs/01-flat-vector.md +104 -0
- package/lib/motion/mgstyles/briefs/02-line-art.md +97 -0
- package/lib/motion/mgstyles/briefs/03-isometric.md +108 -0
- package/lib/motion/mgstyles/briefs/05-cel-boil.md +145 -0
- package/lib/motion/mgstyles/briefs/06-collage.md +149 -0
- package/lib/motion/mgstyles/briefs/07-liquid.md +106 -0
- package/lib/motion/mgstyles/briefs/08-morph.md +111 -0
- package/lib/motion/mgstyles/briefs/09-bauhaus.md +150 -0
- package/lib/motion/mgstyles/briefs/10-synthwave.md +151 -0
- package/lib/motion/mgstyles/briefs/12-aurora-glass.md +147 -0
- package/lib/motion/mgstyles/briefs/18-hanazi.md +140 -0
- package/lib/motion/mgstyles/briefs/19-paperclip.md +156 -0
- package/lib/motion/mgstyles/briefs/20-pixel.md +118 -0
- package/lib/motion/mgstyles/briefs/22-hud.md +118 -0
- package/lib/motion/mgstyles/catalog.d/01-flat-vector.json +34 -0
- package/lib/motion/mgstyles/catalog.d/02-line-art.json +34 -0
- package/lib/motion/mgstyles/catalog.d/03-isometric.json +35 -0
- package/lib/motion/mgstyles/catalog.d/05-cel-boil.json +28 -0
- package/lib/motion/mgstyles/catalog.d/06-collage.json +28 -0
- package/lib/motion/mgstyles/catalog.d/07-liquid.json +28 -0
- package/lib/motion/mgstyles/catalog.d/08-morph.json +28 -0
- package/lib/motion/mgstyles/catalog.d/09-bauhaus.json +28 -0
- package/lib/motion/mgstyles/catalog.d/10-synthwave.json +28 -0
- package/lib/motion/mgstyles/catalog.d/12-aurora-glass.json +28 -0
- package/lib/motion/mgstyles/catalog.d/18-hanazi.json +28 -0
- package/lib/motion/mgstyles/catalog.d/19-paperclip.json +28 -0
- package/lib/motion/mgstyles/catalog.d/20-pixel.json +28 -0
- package/lib/motion/mgstyles/catalog.d/22-hud.json +28 -0
- package/lib/motion/mgstyles/catalog.json +1356 -0
- package/lib/motion/mgstyles/upstream/README.md +147 -0
- package/lib/motion/mgstyles/upstream/README.zh-CN.md +147 -0
- package/lib/motion/mgstyles/upstream/demos/01-flat-vector/cues.json +1 -0
- package/lib/motion/mgstyles/upstream/demos/01-flat-vector/index.html +712 -0
- package/lib/motion/mgstyles/upstream/demos/02-line-art/cues.json +331 -0
- package/lib/motion/mgstyles/upstream/demos/02-line-art/film.js +676 -0
- package/lib/motion/mgstyles/upstream/demos/02-line-art/index.html +18 -0
- package/lib/motion/mgstyles/upstream/demos/02-line-art/tools/dump_timing.mjs +26 -0
- package/lib/motion/mgstyles/upstream/demos/03-isometric/cues.json +109 -0
- package/lib/motion/mgstyles/upstream/demos/03-isometric/index.html +25 -0
- package/lib/motion/mgstyles/upstream/demos/03-isometric/js/anim.js +82 -0
- package/lib/motion/mgstyles/upstream/demos/03-isometric/js/main.js +219 -0
- package/lib/motion/mgstyles/upstream/demos/03-isometric/js/night5.js +180 -0
- package/lib/motion/mgstyles/upstream/demos/03-isometric/js/render.js +202 -0
- package/lib/motion/mgstyles/upstream/demos/03-isometric/js/title.js +167 -0
- package/lib/motion/mgstyles/upstream/demos/03-isometric/js/title5.js +294 -0
- package/lib/motion/mgstyles/upstream/demos/03-isometric/js/ui.js +141 -0
- package/lib/motion/mgstyles/upstream/demos/03-isometric/js/world.js +1399 -0
- package/lib/motion/mgstyles/upstream/demos/05-cel-boil/cues.json +157 -0
- package/lib/motion/mgstyles/upstream/demos/05-cel-boil/index.html +34 -0
- package/lib/motion/mgstyles/upstream/demos/05-cel-boil/js/engine.js +326 -0
- package/lib/motion/mgstyles/upstream/demos/05-cel-boil/js/scene.js +2036 -0
- package/lib/motion/mgstyles/upstream/demos/06-collage/assets/gen/layout.json +157 -0
- package/lib/motion/mgstyles/upstream/demos/06-collage/cues.json +80 -0
- package/lib/motion/mgstyles/upstream/demos/06-collage/index.html +889 -0
- package/lib/motion/mgstyles/upstream/demos/07-liquid/cues.json +100 -0
- package/lib/motion/mgstyles/upstream/demos/07-liquid/index.html +108 -0
- package/lib/motion/mgstyles/upstream/demos/07-liquid/js/engine.js +153 -0
- package/lib/motion/mgstyles/upstream/demos/07-liquid/js/links.js +64 -0
- package/lib/motion/mgstyles/upstream/demos/07-liquid/js/lookdev.js +46 -0
- package/lib/motion/mgstyles/upstream/demos/07-liquid/js/scene.js +963 -0
- package/lib/motion/mgstyles/upstream/demos/07-liquid/js/shaders.js +647 -0
- package/lib/motion/mgstyles/upstream/demos/07-liquid/js/textsdf.js +114 -0
- package/lib/motion/mgstyles/upstream/demos/07-liquid/js/type.js +50 -0
- package/lib/motion/mgstyles/upstream/demos/08-morph/cues.json +131 -0
- package/lib/motion/mgstyles/upstream/demos/08-morph/glyphs.json +1 -0
- package/lib/motion/mgstyles/upstream/demos/08-morph/index.html +901 -0
- package/lib/motion/mgstyles/upstream/demos/09-bauhaus/cues.json +270 -0
- package/lib/motion/mgstyles/upstream/demos/09-bauhaus/film.js +697 -0
- package/lib/motion/mgstyles/upstream/demos/09-bauhaus/index.html +12 -0
- package/lib/motion/mgstyles/upstream/demos/10-synthwave/cues.json +44 -0
- package/lib/motion/mgstyles/upstream/demos/10-synthwave/index.html +1028 -0
- package/lib/motion/mgstyles/upstream/demos/12-aurora-glass/cues.json +67 -0
- package/lib/motion/mgstyles/upstream/demos/12-aurora-glass/index.html +16 -0
- package/lib/motion/mgstyles/upstream/demos/12-aurora-glass/main.js +967 -0
- package/lib/motion/mgstyles/upstream/demos/12-aurora-glass/shaders.js +468 -0
- package/lib/motion/mgstyles/upstream/demos/18-hanazi/cues.json +117 -0
- package/lib/motion/mgstyles/upstream/demos/18-hanazi/index.html +541 -0
- package/lib/motion/mgstyles/upstream/demos/19-paperclip/assets/countries-110m.json +1 -0
- package/lib/motion/mgstyles/upstream/demos/19-paperclip/assets/stickers/meta.json +34 -0
- package/lib/motion/mgstyles/upstream/demos/19-paperclip/cues.json +285 -0
- package/lib/motion/mgstyles/upstream/demos/19-paperclip/index.html +599 -0
- package/lib/motion/mgstyles/upstream/demos/20-pixel/cues.json +42 -0
- package/lib/motion/mgstyles/upstream/demos/20-pixel/film.js +914 -0
- package/lib/motion/mgstyles/upstream/demos/20-pixel/index.html +18 -0
- package/lib/motion/mgstyles/upstream/demos/22-hud/cues.json +108 -0
- package/lib/motion/mgstyles/upstream/demos/22-hud/index.html +125 -0
- package/lib/motion/mgstyles/upstream/demos/22-hud/js/holo.js +275 -0
- package/lib/motion/mgstyles/upstream/demos/22-hud/js/hud.js +855 -0
- package/lib/motion/mgstyles/upstream/demos/22-hud/js/post.js +150 -0
- package/lib/motion/mgstyles/upstream/demos/22-hud/js/util.js +65 -0
- package/lib/motion/mgstyles/upstream/demos/22-hud/js/v5.js +142 -0
- package/lib/motion/mgstyles/upstream/harness/render.mjs +319 -0
- package/lib/motion/mgstyles/upstream/manifest.json +269 -0
- package/lib/motion/mgstyles/upstream/prompts/01-flat-vector.md +98 -0
- package/lib/motion/mgstyles/upstream/prompts/02-line-art.md +95 -0
- package/lib/motion/mgstyles/upstream/prompts/03-isometric.md +97 -0
- package/lib/motion/mgstyles/upstream/prompts/05-cel-boil.md +95 -0
- package/lib/motion/mgstyles/upstream/prompts/06-collage.md +95 -0
- package/lib/motion/mgstyles/upstream/prompts/07-liquid.md +98 -0
- package/lib/motion/mgstyles/upstream/prompts/08-morph.md +95 -0
- package/lib/motion/mgstyles/upstream/prompts/09-bauhaus.md +96 -0
- package/lib/motion/mgstyles/upstream/prompts/10-synthwave.md +95 -0
- package/lib/motion/mgstyles/upstream/prompts/12-aurora-glass.md +96 -0
- package/lib/motion/mgstyles/upstream/prompts/18-hanazi.md +95 -0
- package/lib/motion/mgstyles/upstream/prompts/19-paperclip.md +96 -0
- package/lib/motion/mgstyles/upstream/prompts/20-pixel.md +96 -0
- package/lib/motion/mgstyles/upstream/prompts/22-hud.md +95 -0
- package/lib/motion/mgstyles/upstream/rubric.md +51 -0
- package/lib/motion/mgstyles/upstream/template.md +36 -0
- package/lib/motion/pixelqa.js +198 -0
- package/lib/motion/preview.js +97 -0
- package/lib/motion/project.js +395 -0
- package/lib/motion/qa.js +290 -0
- package/lib/motion/reference-media.jsx +10 -0
- package/lib/motion/render-settings.js +112 -0
- package/lib/motion/render.js +161 -0
- package/lib/motion/runtime/package-lock.json +3058 -0
- package/lib/motion/runtime/package.json +16 -0
- package/lib/motion/scene-kit.js +183 -0
- package/lib/motion/sfx.js +232 -0
- package/lib/motion/shotcraft/ClipCard.tsx +204 -0
- package/lib/motion/shotcraft/catalog.json +2461 -0
- package/lib/motion/shotcraft/upstream/SKILL.md +286 -0
- package/lib/motion/shotcraft/upstream/assets/lib/Caption.tsx +54 -0
- package/lib/motion/shotcraft/upstream/assets/lib/ClipCard.tsx +200 -0
- package/lib/motion/shotcraft/upstream/assets/lib/DigitRoll.tsx +45 -0
- package/lib/motion/shotcraft/upstream/assets/lib/FlashCut.tsx +20 -0
- package/lib/motion/shotcraft/upstream/assets/lib/FlatPanel.tsx +65 -0
- package/lib/motion/shotcraft/upstream/assets/lib/PageCam.tsx +151 -0
- package/lib/motion/shotcraft/upstream/assets/lib/VerticalTicker.tsx +129 -0
- package/lib/motion/shotcraft/upstream/assets/lib/helpers/camera.tsx +75 -0
- package/lib/motion/shotcraft/upstream/assets/lib/helpers/motion.ts +40 -0
- package/lib/motion/shotcraft/upstream/assets/lib/helpers/rand.ts +11 -0
- package/lib/motion/shotcraft/upstream/assets/lib/helpers/shake.ts +10 -0
- package/lib/motion/shotcraft/upstream/assets/scripts/__pycache__/sfx-source.cpython-313.pyc +0 -0
- package/lib/motion/shotcraft/upstream/assets/scripts/build-readme-cover.mjs +49 -0
- package/lib/motion/shotcraft/upstream/assets/scripts/capture-template.mjs +210 -0
- package/lib/motion/shotcraft/upstream/assets/scripts/sfx-source.py +423 -0
- package/lib/motion/shotcraft/upstream/assets/scripts/smoke-render-demos.py +170 -0
- package/lib/motion/shotcraft/upstream/assets/scripts/test_sfx_source.py +157 -0
- package/lib/motion/shotcraft/upstream/demos/README.md +120 -0
- package/lib/motion/shotcraft/upstream/demos/_fixtures/Brand.tsx +112 -0
- package/lib/motion/shotcraft/upstream/demos/_fixtures/Fixtures.tsx +647 -0
- package/lib/motion/shotcraft/upstream/demos/_fixtures/Look.tsx +316 -0
- package/lib/motion/shotcraft/upstream/demos/_fixtures/Motion.tsx +82 -0
- package/lib/motion/shotcraft/upstream/demos/_fixtures/PageCam2D.tsx +115 -0
- package/lib/motion/shotcraft/upstream/demos/_fixtures/Polish.tsx +243 -0
- package/lib/motion/shotcraft/upstream/demos/_textures/live-layout.json +389 -0
- package/lib/motion/shotcraft/upstream/demos/camera/basic-3d-scene/Basic3DScene.tsx +250 -0
- package/lib/motion/shotcraft/upstream/demos/camera/crash-zoom-punch/CrashImpactReal.tsx +305 -0
- package/lib/motion/shotcraft/upstream/demos/camera/crash-zoom-punch/CrashZoomReal.tsx +246 -0
- package/lib/motion/shotcraft/upstream/demos/camera/cursor-flyover/CursorFlyover.tsx +390 -0
- package/lib/motion/shotcraft/upstream/demos/camera/depth-layer-moves/MultiplaneReal.tsx +138 -0
- package/lib/motion/shotcraft/upstream/demos/camera/graze-face-tour/GrazeFaceTour.tsx +542 -0
- package/lib/motion/shotcraft/upstream/demos/camera/overhead-camera-moves/OverheadTabletopDrop.tsx +315 -0
- package/lib/motion/shotcraft/upstream/demos/camera/overhead-camera-moves/TiltReveal.tsx +299 -0
- package/lib/motion/shotcraft/upstream/demos/camera/space-camera-moves/DroneDiveLanding.tsx +173 -0
- package/lib/motion/shotcraft/upstream/demos/camera/space-camera-moves/ExplodedView.tsx +348 -0
- package/lib/motion/shotcraft/upstream/demos/camera/steep-tilt-glide/SteepTiltGlide.tsx +366 -0
- package/lib/motion/shotcraft/upstream/demos/camera/tension-camera-moves/BulletTimeFreezeOrbit.tsx +279 -0
- package/lib/motion/shotcraft/upstream/demos/camera/tension-camera-moves/PullBackIsolation.tsx +184 -0
- package/lib/motion/shotcraft/upstream/demos/camera/terminal-3d/Terminal3D.tsx +390 -0
- package/lib/motion/shotcraft/upstream/demos/data/before-after-slider-scrub/BeforeAfterSliderScrub.tsx +155 -0
- package/lib/motion/shotcraft/upstream/demos/data/chart-live-moves/AxisRescaleShockV2.tsx +303 -0
- package/lib/motion/shotcraft/upstream/demos/data/chart-live-moves/OscilloscopeStreamV2.tsx +290 -0
- package/lib/motion/shotcraft/upstream/demos/data/chart-live-moves/UnitDotSwarmRegroupV2.tsx +278 -0
- package/lib/motion/shotcraft/upstream/demos/data/gauge-readout-moves/NeedleSweepSelftest.tsx +307 -0
- package/lib/motion/shotcraft/upstream/demos/data/gauge-readout-moves/TapeScrollFixedPointer.tsx +215 -0
- package/lib/motion/shotcraft/upstream/demos/data/scroll-brake-moves/BrakeReticleLock.tsx +299 -0
- package/lib/motion/shotcraft/upstream/demos/data/scroll-brake-moves/ChangelogScrollBrake.tsx +232 -0
- package/lib/motion/shotcraft/upstream/demos/data/timeline-travel/TimelineTravel.tsx +290 -0
- package/lib/motion/shotcraft/upstream/demos/effects/assemble-then-type-flyin/AssembleThenTypeFlyin.tsx +273 -0
- package/lib/motion/shotcraft/upstream/demos/effects/aurora-bloom-bg-flip/AuroraBloomBgFlip.tsx +167 -0
- package/lib/motion/shotcraft/upstream/demos/effects/brand-frame-snap/BrandFrameSnap.tsx +536 -0
- package/lib/motion/shotcraft/upstream/demos/effects/fui-hud-moves/ReticleLockOn.tsx +164 -0
- package/lib/motion/shotcraft/upstream/demos/effects/glow-flyline-moves/FlylineArc.tsx +175 -0
- package/lib/motion/shotcraft/upstream/demos/effects/glow-flyline-moves/GlowOrbAmbient.tsx +197 -0
- package/lib/motion/shotcraft/upstream/demos/effects/glow-flyline-moves/OrbFlylineRelay.tsx +241 -0
- package/lib/motion/shotcraft/upstream/demos/effects/icon-performance-moves/AttentionBounce.tsx +279 -0
- package/lib/motion/shotcraft/upstream/demos/effects/impact-feedback/AnimeImpact.tsx +230 -0
- package/lib/motion/shotcraft/upstream/demos/effects/impact-feedback/HitCounter.tsx +345 -0
- package/lib/motion/shotcraft/upstream/demos/effects/light-play-moves/SheenSweepRetry.tsx +275 -0
- package/lib/motion/shotcraft/upstream/demos/effects/light-play-moves/SpotlightSweepReveal.tsx +229 -0
- package/lib/motion/shotcraft/upstream/demos/effects/radial-ripple-phone-chips/RadialRipplePhoneChips.tsx +312 -0
- package/lib/motion/shotcraft/upstream/demos/effects/riso-print-hits/RisoMisregistrationHit.tsx +222 -0
- package/lib/motion/shotcraft/upstream/demos/effects/scan-bracket-sweep/ScanBracketSweep.tsx +295 -0
- package/lib/motion/shotcraft/upstream/demos/effects/scanline-annotate-focus/ScanlineAnnotateFocus.tsx +329 -0
- package/lib/motion/shotcraft/upstream/demos/effects/scanline-assemble-flyin/ScanlineAssembleFlyin.tsx +315 -0
- package/lib/motion/shotcraft/upstream/demos/effects/slam-entrance-moves/ImpactBurstKit.tsx +264 -0
- package/lib/motion/shotcraft/upstream/demos/effects/slam-entrance-moves/KanadaPerspectiveSnap.tsx +260 -0
- package/lib/motion/shotcraft/upstream/demos/effects/slam-entrance-moves/ScoreSlam.tsx +263 -0
- package/lib/motion/shotcraft/upstream/demos/effects/spotlight-sweep-moves/CornerSpotlightReveal.tsx +123 -0
- package/lib/motion/shotcraft/upstream/demos/effects/spotlight-sweep-moves/GlowWakeSleepPanel.tsx +187 -0
- package/lib/motion/shotcraft/upstream/demos/effects/spotlight-sweep-moves/SlideSpotlightPan.tsx +175 -0
- package/lib/motion/shotcraft/upstream/demos/interaction/autolayout-gap-dial/AutolayoutGapDial.tsx +305 -0
- package/lib/motion/shotcraft/upstream/demos/interaction/canvas-materialize-moves/DiagramCascadeBuild.tsx +350 -0
- package/lib/motion/shotcraft/upstream/demos/interaction/canvas-materialize-moves/PanelToCanvasMaterialize.tsx +352 -0
- package/lib/motion/shotcraft/upstream/demos/interaction/chip-grid-single-select-blackout/ChipGridSingleSelectBlackout.tsx +218 -0
- package/lib/motion/shotcraft/upstream/demos/interaction/collab-cursor-moves/CursorCastEnsemble.tsx +297 -0
- package/lib/motion/shotcraft/upstream/demos/interaction/glass-pill-dictation-typing/GlassPillDictationTyping.tsx +157 -0
- package/lib/motion/shotcraft/upstream/demos/interaction/hashtag-to-pill-materialize/HashtagToPillMaterialize.tsx +218 -0
- package/lib/motion/shotcraft/upstream/demos/interaction/picker-carousel-feature-cycle/PickerCarouselFeatureCycle.tsx +202 -0
- package/lib/motion/shotcraft/upstream/demos/interaction/segmented-thumb-hero/SegmentedThumbHero.tsx +265 -0
- package/lib/motion/shotcraft/upstream/demos/interaction/theme-switch-moves/PaletteThemeRipple.tsx +457 -0
- package/lib/motion/shotcraft/upstream/demos/interaction/theme-switch-moves/ThemeSweepToggle.tsx +446 -0
- package/lib/motion/shotcraft/upstream/demos/interaction/type-and-filter/TypeAndFilter.tsx +249 -0
- package/lib/motion/shotcraft/upstream/demos/interaction/voice-waveform-live/VoiceWaveformLive.tsx +278 -0
- package/lib/motion/shotcraft/upstream/demos/opening/crane-rise-reveal/CraneRiseReveal.tsx +332 -0
- package/lib/motion/shotcraft/upstream/demos/opening/dataviz-landscape-open/DatavizLandscapeOpen.tsx +358 -0
- package/lib/motion/shotcraft/upstream/demos/opening/fracture/Fracture.tsx +201 -0
- package/lib/motion/shotcraft/upstream/demos/opening/icon-field-colorize/IconFieldColorize.tsx +200 -0
- package/lib/motion/shotcraft/upstream/demos/opening/letterspace-materialize/LetterspaceMaterialize.tsx +208 -0
- package/lib/motion/shotcraft/upstream/demos/opening/magician-card-flourish/MagicianCardFlourish.tsx +341 -0
- package/lib/motion/shotcraft/upstream/demos/opening/orbit-ring-title-open/OrbitRingTitleOpen.tsx +389 -0
- package/lib/motion/shotcraft/upstream/demos/opening/spotlight-hero-card/SpotlightHeroCard.tsx +293 -0
- package/lib/motion/shotcraft/upstream/demos/opening/stroke-segment-build/StrokeSegmentBuild.tsx +183 -0
- package/lib/motion/shotcraft/upstream/demos/opening/text-as-mask/TextAsMask.tsx +245 -0
- package/lib/motion/shotcraft/upstream/demos/outro/grain-dissolve/GrainDissolve.tsx +222 -0
- package/lib/motion/shotcraft/upstream/demos/outro/logo-shrink-wordmark-lockup/LogoShrinkWordmarkLockup.tsx +223 -0
- package/lib/motion/shotcraft/upstream/demos/outro/neon-triple-marquee/NeonTripleMarquee.tsx +217 -0
- package/lib/motion/shotcraft/upstream/demos/outro/outro-group-photo-launch/OutroGroupPhotoLaunch.tsx +343 -0
- package/lib/motion/shotcraft/upstream/demos/outro/ui-strip-away-outro/UiStripAwayOutro.tsx +357 -0
- package/lib/motion/shotcraft/upstream/demos/outro/ui-to-brand-morph/IconFlipBloomLogo.tsx +187 -0
- package/lib/motion/shotcraft/upstream/demos/outro/ui-to-brand-morph/InputMorphsIntoLogo.tsx +333 -0
- package/lib/motion/shotcraft/upstream/demos/rhythm/beat-cut-moves/PaparazziFlash.tsx +274 -0
- package/lib/motion/shotcraft/upstream/demos/rhythm/beat-step-list-theme-cycle/BeatStepListThemeCycle.tsx +270 -0
- package/lib/motion/shotcraft/upstream/demos/rhythm/panel-grid-moves/ComicPanelSplit.tsx +430 -0
- package/lib/motion/shotcraft/upstream/demos/rhythm/quad-split-parallel-scenes/QuadSplitParallelScenes.tsx +252 -0
- package/lib/motion/shotcraft/upstream/demos/rhythm/rhythm-interrupt-moves/JumpCutPunchIn.tsx +106 -0
- package/lib/motion/shotcraft/upstream/demos/rhythm/sakuga-timing-shift/SakugaTimingShift.tsx +288 -0
- package/lib/motion/shotcraft/upstream/demos/rhythm/speed-ramp-freeze/FreezeAnnotateReal.tsx +362 -0
- package/lib/motion/shotcraft/upstream/demos/rhythm/trailer-grammar-moves/TrailerBumper.tsx +168 -0
- package/lib/motion/shotcraft/upstream/demos/transition/bottom-push-stack-wipe/BottomPushStackWipe.tsx +310 -0
- package/lib/motion/shotcraft/upstream/demos/transition/card-flip-reveal/CardFlipReveal.tsx +261 -0
- package/lib/motion/shotcraft/upstream/demos/transition/card-flock-tumble/CardFlockTumble.tsx +459 -0
- package/lib/motion/shotcraft/upstream/demos/transition/circle-match-iris/CircleMatchIris.tsx +294 -0
- package/lib/motion/shotcraft/upstream/demos/transition/gradient-transition/GradientTransition.tsx +161 -0
- package/lib/motion/shotcraft/upstream/demos/transition/line-carry-transition/LineCarryTransition.tsx +248 -0
- package/lib/motion/shotcraft/upstream/demos/transition/mosaic-reframe/MosaicReframe.tsx +359 -0
- package/lib/motion/shotcraft/upstream/demos/transition/page-turn-transitions/BarnDoorSplit.tsx +227 -0
- package/lib/motion/shotcraft/upstream/demos/transition/print-texture-transitions/InkBleedReveal.tsx +162 -0
- package/lib/motion/shotcraft/upstream/demos/transition/shot-transitions/PortalWipeV2.tsx +248 -0
- package/lib/motion/shotcraft/upstream/demos/transition/shot-transitions/WhipBrakeReal.tsx +186 -0
- package/lib/motion/shotcraft/upstream/demos/transition/tear-streak-transitions/GlitchDisplace.tsx +355 -0
- package/lib/motion/shotcraft/upstream/demos/transition/transition-hidden-cut/InvisibleCut.tsx +272 -0
- package/lib/motion/shotcraft/upstream/demos/transition/transition-hidden-cut/LightLeakBurn.tsx +262 -0
- package/lib/motion/shotcraft/upstream/demos/transition/transition-hidden-cut/VersusSlam.tsx +217 -0
- package/lib/motion/shotcraft/upstream/demos/transition/transition-travel/LetterformZoom.tsx +285 -0
- package/lib/motion/shotcraft/upstream/demos/transition/white-flash-logo-simplify-cut/WhiteFlashLogoSimplifyCut.tsx +205 -0
- package/lib/motion/shotcraft/upstream/demos/transition/wipe-transitions/BlindsSlice.tsx +178 -0
- package/lib/motion/shotcraft/upstream/demos/typography/blur-slide/BlurSlide.tsx +147 -0
- package/lib/motion/shotcraft/upstream/demos/typography/brace-expand/BraceExpand.tsx +143 -0
- package/lib/motion/shotcraft/upstream/demos/typography/brand-ink-open/BrandInkOpen.tsx +134 -0
- package/lib/motion/shotcraft/upstream/demos/typography/countdown-arc-scatter/CountdownArcScatter.tsx +217 -0
- package/lib/motion/shotcraft/upstream/demos/typography/flying-words/FlyingWords.tsx +198 -0
- package/lib/motion/shotcraft/upstream/demos/typography/glitch-cycle/GlitchCycle.tsx +221 -0
- package/lib/motion/shotcraft/upstream/demos/typography/gradient-word-sweep/GradientWordSweep.tsx +312 -0
- package/lib/motion/shotcraft/upstream/demos/typography/lead-word-zoom-assemble/LeadWordZoomAssemble.tsx +261 -0
- package/lib/motion/shotcraft/upstream/demos/typography/marker-underline-title/MarkerUnderlineTitle.tsx +121 -0
- package/lib/motion/shotcraft/upstream/demos/typography/outline-word-fill/OutlineWordFill.tsx +153 -0
- package/lib/motion/shotcraft/upstream/demos/typography/paper-title-card/PaperTitleCard.tsx +179 -0
- package/lib/motion/shotcraft/upstream/demos/typography/pill-chip-slot-cycle-handled/PillChipSlotCycleHandled.tsx +140 -0
- package/lib/motion/shotcraft/upstream/demos/typography/pill-slot-cycle/PillSlotCycle.tsx +309 -0
- package/lib/motion/shotcraft/upstream/demos/typography/text-column-converge/TextColumnConverge.tsx +191 -0
- package/lib/motion/shotcraft/upstream/demos/typography/title-demote-to-label/TitleDemoteToLabel.tsx +292 -0
- package/lib/motion/shotcraft/upstream/demos/typography/type-assembly-moves/LetterformDriftAssembly.tsx +135 -0
- package/lib/motion/shotcraft/upstream/demos/typography/type-assembly-moves/SplitTextStagger.tsx +124 -0
- package/lib/motion/shotcraft/upstream/demos/typography/type-assembly-moves/TextOnPath.tsx +255 -0
- package/lib/motion/shotcraft/upstream/demos/typography/type-entrance-moves/LetterDropPhysics.tsx +173 -0
- package/lib/motion/shotcraft/upstream/demos/typography/type-rhythm-sync/FontWeightPump.tsx +225 -0
- package/lib/motion/shotcraft/upstream/demos/typography/type-rhythm-sync/KaraokeFillSync.tsx +141 -0
- package/lib/motion/shotcraft/upstream/demos/typography/typewriter-moves/TypewriterErrorRetype.tsx +137 -0
- package/lib/motion/shotcraft/upstream/demos/typography/vertical-word-roll-blur-cycle/VerticalWordRollBlurCycle.tsx +147 -0
- package/lib/motion/shotcraft/upstream/demos/typography/word-relay-filmstrip/WordRelayFilmstrip.tsx +409 -0
- package/lib/motion/shotcraft/upstream/demos/typography/word-relay-geometry/WordRelayGeometry.tsx +280 -0
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/avatar-bracket-carousel/AvatarBracketCarousel.tsx +271 -0
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/bezier-source-converge-merge/BezierSourceConvergeMerge.tsx +385 -0
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/card-stack/CardStack.tsx +312 -0
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/carousel-3d/Carousel3D.tsx +303 -0
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/clipcard-looping/ClipCardLooping.tsx +77 -0
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/cloner-depth-echo/ClonerDepthEcho.tsx +311 -0
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/deck-deal-flyin/DeckDealFlyin.tsx +307 -0
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/doc-park-left-pill-deal/DocParkLeftPillDeal.tsx +349 -0
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/document-typewriter-reveal/DocumentTypewriterReveal.tsx +255 -0
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/draw-svg-trace/DrawSvgTrace.tsx +244 -0
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/element-body-moves/ContactShadowLift.tsx +217 -0
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/integration-hub-map/IntegrationHubMap.tsx +652 -0
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/list-reveal/ListReveal.tsx +153 -0
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/list-stack-press/ListStackPress.tsx +238 -0
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/neon-frame-forerun/NeonFrameForerun.tsx +324 -0
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/neon-frame-orbit-drop/NeonFrameForerunOrbit.tsx +354 -0
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/page-waterfall-wall/PageWaterfallWall.tsx +101 -0
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/page-waterfall-wall/VerticalTicker.tsx +129 -0
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/product-card-progressive-assemble/ProductCardProgressiveAssemble.tsx +297 -0
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/radial-wave/RadialWave.tsx +57 -0
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/research-card-stack-scroll/ResearchCardStackScroll.tsx +155 -0
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/row-embed/RowEmbed.tsx +175 -0
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/value-stagger-gradient/ValueStaggerGradient.tsx +153 -0
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/wall-reveal-moves/BentoLightUp.tsx +146 -0
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/wall-reveal-moves/WireframeDrawOn.tsx +226 -0
- package/lib/motion/shotcraft/upstream/gallery/api/library.json +1 -0
- package/lib/motion/shotcraft/upstream/manifest.json +2715 -0
- package/lib/motion/shotcraft/upstream/references/aesthetic-rules.md +193 -0
- package/lib/motion/shotcraft/upstream/references/final-review.md +121 -0
- package/lib/motion/shotcraft/upstream/references/guided-free-creation.md +199 -0
- package/lib/motion/shotcraft/upstream/references/jianying-export.md +183 -0
- package/lib/motion/shotcraft/upstream/references/music-beat-sync.md +257 -0
- package/lib/motion/shotcraft/upstream/references/pipeline.md +382 -0
- package/lib/motion/shotcraft/upstream/references/publish-upload-post.md +111 -0
- package/lib/motion/shotcraft/upstream/references/sequences/promo-energy-arc.md +50 -0
- package/lib/motion/shotcraft/upstream/references/sfx-sourcing.md +95 -0
- package/lib/motion/shotcraft/upstream/references/shots/camera/basic-3d-scene.md +41 -0
- package/lib/motion/shotcraft/upstream/references/shots/camera/crash-zoom-punch.md +52 -0
- package/lib/motion/shotcraft/upstream/references/shots/camera/cursor-flyover.md +39 -0
- package/lib/motion/shotcraft/upstream/references/shots/camera/depth-layer-moves.md +39 -0
- package/lib/motion/shotcraft/upstream/references/shots/camera/graze-face-tour.md +57 -0
- package/lib/motion/shotcraft/upstream/references/shots/camera/overhead-camera-moves.md +51 -0
- package/lib/motion/shotcraft/upstream/references/shots/camera/space-camera-moves.md +46 -0
- package/lib/motion/shotcraft/upstream/references/shots/camera/steep-tilt-glide.md +52 -0
- package/lib/motion/shotcraft/upstream/references/shots/camera/tension-camera-moves.md +43 -0
- package/lib/motion/shotcraft/upstream/references/shots/camera/terminal-3d.md +42 -0
- package/lib/motion/shotcraft/upstream/references/shots/data/before-after-slider-scrub.md +48 -0
- package/lib/motion/shotcraft/upstream/references/shots/data/chart-live-moves.md +52 -0
- package/lib/motion/shotcraft/upstream/references/shots/data/gauge-readout-moves.md +45 -0
- package/lib/motion/shotcraft/upstream/references/shots/data/scroll-brake-moves.md +46 -0
- package/lib/motion/shotcraft/upstream/references/shots/data/timeline-travel.md +44 -0
- package/lib/motion/shotcraft/upstream/references/shots/effects/assemble-then-type-flyin.md +63 -0
- package/lib/motion/shotcraft/upstream/references/shots/effects/aurora-bloom-bg-flip.md +54 -0
- package/lib/motion/shotcraft/upstream/references/shots/effects/brand-frame-snap.md +58 -0
- package/lib/motion/shotcraft/upstream/references/shots/effects/fui-hud-moves.md +35 -0
- package/lib/motion/shotcraft/upstream/references/shots/effects/glow-flyline-moves.md +53 -0
- package/lib/motion/shotcraft/upstream/references/shots/effects/icon-performance-moves.md +42 -0
- package/lib/motion/shotcraft/upstream/references/shots/effects/impact-feedback.md +50 -0
- package/lib/motion/shotcraft/upstream/references/shots/effects/light-play-moves.md +46 -0
- package/lib/motion/shotcraft/upstream/references/shots/effects/radial-ripple-phone-chips.md +56 -0
- package/lib/motion/shotcraft/upstream/references/shots/effects/riso-print-hits.md +49 -0
- package/lib/motion/shotcraft/upstream/references/shots/effects/scan-bracket-sweep.md +50 -0
- package/lib/motion/shotcraft/upstream/references/shots/effects/scanline-annotate-focus.md +53 -0
- package/lib/motion/shotcraft/upstream/references/shots/effects/scanline-assemble-flyin.md +53 -0
- package/lib/motion/shotcraft/upstream/references/shots/effects/slam-entrance-moves.md +55 -0
- package/lib/motion/shotcraft/upstream/references/shots/effects/spotlight-sweep-moves.md +52 -0
- package/lib/motion/shotcraft/upstream/references/shots/interaction/autolayout-gap-dial.md +60 -0
- package/lib/motion/shotcraft/upstream/references/shots/interaction/canvas-materialize-moves.md +57 -0
- package/lib/motion/shotcraft/upstream/references/shots/interaction/chip-grid-single-select-blackout.md +51 -0
- package/lib/motion/shotcraft/upstream/references/shots/interaction/collab-cursor-moves.md +41 -0
- package/lib/motion/shotcraft/upstream/references/shots/interaction/glass-pill-dictation-typing.md +53 -0
- package/lib/motion/shotcraft/upstream/references/shots/interaction/hashtag-to-pill-materialize.md +60 -0
- package/lib/motion/shotcraft/upstream/references/shots/interaction/picker-carousel-feature-cycle.md +55 -0
- package/lib/motion/shotcraft/upstream/references/shots/interaction/segmented-thumb-hero.md +57 -0
- package/lib/motion/shotcraft/upstream/references/shots/interaction/theme-switch-moves.md +47 -0
- package/lib/motion/shotcraft/upstream/references/shots/interaction/type-and-filter.md +37 -0
- package/lib/motion/shotcraft/upstream/references/shots/interaction/voice-waveform-live.md +54 -0
- package/lib/motion/shotcraft/upstream/references/shots/opening/brand-ink-open.md +36 -0
- package/lib/motion/shotcraft/upstream/references/shots/opening/crane-rise-reveal.md +56 -0
- package/lib/motion/shotcraft/upstream/references/shots/opening/dataviz-landscape-open.md +56 -0
- package/lib/motion/shotcraft/upstream/references/shots/opening/fracture.md +40 -0
- package/lib/motion/shotcraft/upstream/references/shots/opening/icon-field-colorize.md +60 -0
- package/lib/motion/shotcraft/upstream/references/shots/opening/letterspace-materialize.md +57 -0
- package/lib/motion/shotcraft/upstream/references/shots/opening/magician-card-flourish.md +73 -0
- package/lib/motion/shotcraft/upstream/references/shots/opening/orbit-ring-title-open.md +87 -0
- package/lib/motion/shotcraft/upstream/references/shots/opening/spotlight-hero-card.md +55 -0
- package/lib/motion/shotcraft/upstream/references/shots/opening/stroke-segment-build.md +50 -0
- package/lib/motion/shotcraft/upstream/references/shots/opening/text-as-mask.md +59 -0
- package/lib/motion/shotcraft/upstream/references/shots/outro/grain-dissolve.md +38 -0
- package/lib/motion/shotcraft/upstream/references/shots/outro/logo-shrink-wordmark-lockup.md +38 -0
- package/lib/motion/shotcraft/upstream/references/shots/outro/neon-triple-marquee.md +59 -0
- package/lib/motion/shotcraft/upstream/references/shots/outro/outro-group-photo-launch.md +39 -0
- package/lib/motion/shotcraft/upstream/references/shots/outro/ui-strip-away-outro.md +61 -0
- package/lib/motion/shotcraft/upstream/references/shots/outro/ui-to-brand-morph.md +52 -0
- package/lib/motion/shotcraft/upstream/references/shots/rhythm/beat-cut-moves.md +50 -0
- package/lib/motion/shotcraft/upstream/references/shots/rhythm/beat-step-list-theme-cycle.md +66 -0
- package/lib/motion/shotcraft/upstream/references/shots/rhythm/panel-grid-moves.md +43 -0
- package/lib/motion/shotcraft/upstream/references/shots/rhythm/quad-split-parallel-scenes.md +38 -0
- package/lib/motion/shotcraft/upstream/references/shots/rhythm/rhythm-interrupt-moves.md +38 -0
- package/lib/motion/shotcraft/upstream/references/shots/rhythm/sakuga-timing-shift.md +56 -0
- package/lib/motion/shotcraft/upstream/references/shots/rhythm/speed-ramp-freeze.md +44 -0
- package/lib/motion/shotcraft/upstream/references/shots/rhythm/trailer-grammar-moves.md +38 -0
- package/lib/motion/shotcraft/upstream/references/shots/transition/bottom-push-stack-wipe.md +63 -0
- package/lib/motion/shotcraft/upstream/references/shots/transition/card-flip-reveal.md +57 -0
- package/lib/motion/shotcraft/upstream/references/shots/transition/card-flock-tumble.md +63 -0
- package/lib/motion/shotcraft/upstream/references/shots/transition/circle-match-iris.md +58 -0
- package/lib/motion/shotcraft/upstream/references/shots/transition/gradient-transition.md +45 -0
- package/lib/motion/shotcraft/upstream/references/shots/transition/line-carry-transition.md +55 -0
- package/lib/motion/shotcraft/upstream/references/shots/transition/mosaic-reframe.md +49 -0
- package/lib/motion/shotcraft/upstream/references/shots/transition/page-turn-transitions.md +42 -0
- package/lib/motion/shotcraft/upstream/references/shots/transition/print-texture-transitions.md +42 -0
- package/lib/motion/shotcraft/upstream/references/shots/transition/shot-transitions.md +45 -0
- package/lib/motion/shotcraft/upstream/references/shots/transition/tear-streak-transitions.md +48 -0
- package/lib/motion/shotcraft/upstream/references/shots/transition/transition-hidden-cut.md +55 -0
- package/lib/motion/shotcraft/upstream/references/shots/transition/transition-travel.md +43 -0
- package/lib/motion/shotcraft/upstream/references/shots/transition/white-flash-logo-simplify-cut.md +41 -0
- package/lib/motion/shotcraft/upstream/references/shots/transition/wipe-transitions.md +42 -0
- package/lib/motion/shotcraft/upstream/references/shots/typography/blur-slide.md +59 -0
- package/lib/motion/shotcraft/upstream/references/shots/typography/brace-expand.md +55 -0
- package/lib/motion/shotcraft/upstream/references/shots/typography/countdown-arc-scatter.md +65 -0
- package/lib/motion/shotcraft/upstream/references/shots/typography/document-typewriter-reveal.md +42 -0
- package/lib/motion/shotcraft/upstream/references/shots/typography/flying-words.md +64 -0
- package/lib/motion/shotcraft/upstream/references/shots/typography/glitch-cycle.md +64 -0
- package/lib/motion/shotcraft/upstream/references/shots/typography/gradient-word-sweep.md +54 -0
- package/lib/motion/shotcraft/upstream/references/shots/typography/lead-word-zoom-assemble.md +91 -0
- package/lib/motion/shotcraft/upstream/references/shots/typography/marker-underline-title.md +51 -0
- package/lib/motion/shotcraft/upstream/references/shots/typography/outline-word-fill.md +66 -0
- package/lib/motion/shotcraft/upstream/references/shots/typography/paper-title-card.md +38 -0
- package/lib/motion/shotcraft/upstream/references/shots/typography/pill-chip-slot-cycle-handled.md +66 -0
- package/lib/motion/shotcraft/upstream/references/shots/typography/pill-slot-cycle.md +58 -0
- package/lib/motion/shotcraft/upstream/references/shots/typography/text-column-converge.md +61 -0
- package/lib/motion/shotcraft/upstream/references/shots/typography/title-demote-to-label.md +64 -0
- package/lib/motion/shotcraft/upstream/references/shots/typography/type-assembly-moves.md +45 -0
- package/lib/motion/shotcraft/upstream/references/shots/typography/type-entrance-moves.md +41 -0
- package/lib/motion/shotcraft/upstream/references/shots/typography/type-rhythm-sync.md +51 -0
- package/lib/motion/shotcraft/upstream/references/shots/typography/typewriter-moves.md +42 -0
- package/lib/motion/shotcraft/upstream/references/shots/typography/vertical-word-roll-blur-cycle.md +63 -0
- package/lib/motion/shotcraft/upstream/references/shots/typography/word-relay-filmstrip.md +57 -0
- package/lib/motion/shotcraft/upstream/references/shots/typography/word-relay-geometry.md +75 -0
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/avatar-bracket-carousel.md +59 -0
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/bezier-source-converge-merge.md +67 -0
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/card-stack.md +60 -0
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/carousel-3d.md +66 -0
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/cloner-depth-echo.md +40 -0
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/deck-deal-flyin.md +45 -0
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/doc-park-left-pill-deal.md +62 -0
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/draw-svg-trace.md +55 -0
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/element-body-moves.md +37 -0
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/integration-hub-map.md +55 -0
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/list-reveal.md +50 -0
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/list-stack-press.md +43 -0
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/neon-frame-forerun.md +55 -0
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/neon-frame-orbit-drop.md +51 -0
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/page-waterfall-wall.md +51 -0
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/product-card-progressive-assemble.md +56 -0
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/radial-wave.md +49 -0
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/research-card-stack-scroll.md +57 -0
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/row-embed.md +36 -0
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/value-stagger-gradient.md +64 -0
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/wall-reveal-moves.md +47 -0
- package/lib/motion/shotcraft/upstream/references/sound-design.md +170 -0
- package/lib/motion/shotcraft/upstream/references/workbench.md +157 -0
- package/lib/motion/shotcraft/upstream/template/TEMPLATE.md +103 -0
- package/lib/motion/shotcraft/upstream/template/THEMES.md +44 -0
- package/lib/motion/shotcraft/upstream/template/package.json +20 -0
- package/lib/motion/shotcraft/upstream/template/remotion.config.ts +6 -0
- package/lib/motion/shotcraft/upstream/template/src/Root.tsx +17 -0
- package/lib/motion/shotcraft/upstream/template/src/aifl/Caption.tsx +65 -0
- package/lib/motion/shotcraft/upstream/template/src/aifl/DigitRoll.tsx +48 -0
- package/lib/motion/shotcraft/upstream/template/src/aifl/FlashCut.tsx +24 -0
- package/lib/motion/shotcraft/upstream/template/src/aifl/Main.tsx +192 -0
- package/lib/motion/shotcraft/upstream/template/src/aifl/PaperTitleCard.tsx +111 -0
- package/lib/motion/shotcraft/upstream/template/src/aifl/live/PageCam.tsx +150 -0
- package/lib/motion/shotcraft/upstream/template/src/aifl/live/SceneDetail.tsx +158 -0
- package/lib/motion/shotcraft/upstream/template/src/aifl/live/SceneFlyIn.tsx +468 -0
- package/lib/motion/shotcraft/upstream/template/src/aifl/live/SceneOpen.tsx +552 -0
- package/lib/motion/shotcraft/upstream/template/src/aifl/live/SceneOutroLive.tsx +411 -0
- package/lib/motion/shotcraft/upstream/template/src/aifl/live/ScenePapers.tsx +200 -0
- package/lib/motion/shotcraft/upstream/template/src/aifl/live/SceneWbr.tsx +324 -0
- package/lib/motion/shotcraft/upstream/template/src/aifl/live-layout.json +389 -0
- package/lib/motion/shotcraft/upstream/template/src/index.ts +4 -0
- package/lib/motion/shotcraft/upstream/template/src/themes/ThemedFilm.tsx +7 -0
- package/lib/motion/shotcraft/upstream/template/src/themes/manifest.tsx +68 -0
- package/lib/motion/shotcraft/upstream/template/src/themes/palette-assets.json +1 -0
- package/lib/motion/shotcraft/upstream/template/src/themes/palette-assets.ts +24 -0
- package/lib/motion/shotcraft/upstream/template/src/themes/palettes.json +74 -0
- package/lib/motion/shotcraft/upstream/template/src/themes/visual-theme.tsx +91 -0
- package/lib/motion/shotcraft/upstream/template/src/workbench.ts +213 -0
- package/lib/motion/shotcraft/upstream/template/tsconfig.json +15 -0
- package/lib/motion/spec.js +113 -0
- package/lib/motion/style-engine.js +153 -0
- package/lib/motion/style-frames.js +271 -0
- package/lib/motion/sync.js +214 -0
- package/lib/motion/theme.js +121 -0
- package/lib/motion/video-runtime.js +192 -0
- package/lib/motion/voice.js +417 -0
- package/lib/motion-agent-files.js +82 -0
- package/lib/motion-agent-protocol.js +66 -0
- package/lib/motion-agent-tools.js +196 -0
- package/lib/motion-agent.js +171 -0
- package/lib/motion-capture.js +93 -0
- package/lib/motion-core.js +238 -0
- package/lib/motion-film-review.js +71 -0
- package/lib/motion-library.js +210 -0
- package/lib/motion-planner.js +254 -0
- package/lib/motion-project.js +87 -0
- package/lib/motion-render-worker.js +153 -0
- package/lib/motion-session.js +32 -0
- package/lib/motion-source.js +49 -0
- package/lib/motion-tasks.js +452 -0
- package/lib/motion-vision.js +44 -0
- package/lib/mxfile.js +27 -7
- package/lib/routing/node-runtime.js +14 -0
- package/lib/routing/router.js +211 -0
- package/lib/routing/vendor/README.md +96 -0
- package/lib/routing/vendor/libavoid-routing.js +753 -0
- package/lib/routing/vendor/libavoid.min.js +59 -0
- package/lib/shotcard-core.js +39 -0
- package/lib/shotcard-reference.js +56 -0
- package/lib/style-kernel.js +37 -3
- package/lib/task-patches.js +26 -2
- package/lib/video-export.js +49 -22
- package/package.json +34 -4
|
@@ -0,0 +1,676 @@
|
|
|
1
|
+
// ATELIER LINEA — "One Line". The whole film is one continuous stroke.
|
|
2
|
+
// Canvas2D, every frame a pure function of t. World units = poster pixels (the final frame at zoom 1).
|
|
3
|
+
// Round 1 refinement: source-over champagne-gold line, ink hook, branch->beam morph, punctuation holds,
|
|
4
|
+
// breaking-wave curl (浪), swell-to-coin hero with camera kick + reverse light pulse, bevelled medallion, signed-off end.
|
|
5
|
+
const Q = new URLSearchParams(location.search);
|
|
6
|
+
// reel v5 (?v5=1): the line writes the title 线条动画, window.linkAt(t), ?nolink=dot,tip,line,title,door. Without v5 nothing changes.
|
|
7
|
+
const V5 = Q.get('v5') === '1';
|
|
8
|
+
const NOLINK = new Set(V5 ? (Q.get('nolink') || '').split(',').filter(Boolean) : []);
|
|
9
|
+
const W = 1920, H = 1080, FPS = 30, DUR = V5 ? 11 : 10; // v5: +1 s of poster so the title holds readable
|
|
10
|
+
window.DEMO = { width: W, height: H, fps: FPS, duration: DUR, motionBlur: { samples: 4, shutter: 0.5 } };
|
|
11
|
+
|
|
12
|
+
const cues = await (await fetch('/demos/02-line-art/cues.json')).json();
|
|
13
|
+
if (V5) cues.camera.poster_center = [925, 590]; // v5: the poster rides up 30 px to make room for the big title
|
|
14
|
+
|
|
15
|
+
// ---------------------------------------------------------------- utils
|
|
16
|
+
const clamp = (x, a = 0, b = 1) => Math.min(b, Math.max(a, x));
|
|
17
|
+
const lerp = (a, b, t) => a + (b - a) * t;
|
|
18
|
+
const smooth = (a, b, x) => { const t = clamp((x - a) / (b - a)); return t * t * (3 - 2 * t); };
|
|
19
|
+
const smoother = (a, b, x) => { const t = clamp((x - a) / (b - a)); return t * t * t * (t * (t * 6 - 15) + 10); };
|
|
20
|
+
function cubicBezier(p1x, p1y, p2x, p2y) {
|
|
21
|
+
const bx = (t) => 3 * p1x * t * (1 - t) ** 2 + 3 * p2x * t * t * (1 - t) + t ** 3;
|
|
22
|
+
const by = (t) => 3 * p1y * t * (1 - t) ** 2 + 3 * p2y * t * t * (1 - t) + t ** 3;
|
|
23
|
+
return (x) => {
|
|
24
|
+
if (x <= 0) return 0; if (x >= 1) return 1;
|
|
25
|
+
let lo = 0, hi = 1;
|
|
26
|
+
for (let i = 0; i < 28; i++) { const m = (lo + hi) / 2; if (bx(m) < x) lo = m; else hi = m; }
|
|
27
|
+
return by((lo + hi) / 2);
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
const easeIO = cubicBezier(0.65, 0, 0.35, 1); // the style's signature ease
|
|
31
|
+
const easeOut = cubicBezier(0.16, 1, 0.3, 1);
|
|
32
|
+
const easeSwell = cubicBezier(0.24, 0.3, 0.2, 1); // line swells into the coin: ~15/38/58/73 % over the first 4 frames (r2: readable, not a snap)
|
|
33
|
+
const easePulse = cubicBezier(0.45, 0, 0.2, 1); // light runs back anchor -> seed (r2: slower, eased)
|
|
34
|
+
function mulberry(seed) { return () => { seed |= 0; seed = seed + 0x6D2B79F5 | 0; let t = Math.imul(seed ^ seed >>> 15, 1 | seed); t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t; return ((t ^ t >>> 14) >>> 0) / 4294967296; }; }
|
|
35
|
+
const rngN = mulberry(20260927); const LAT = Array.from({ length: 4096 }, () => rngN() * 2 - 1);
|
|
36
|
+
const vnoise = (x) => { const i = Math.floor(x), f = x - i, u = f * f * (3 - 2 * f); return lerp(LAT[i & 4095], LAT[(i + 1) & 4095], u); };
|
|
37
|
+
function monotone(xs, ys, m0scale = 1, mEnd = null) {
|
|
38
|
+
const n = xs.length, d = [], m = new Array(n);
|
|
39
|
+
for (let i = 0; i < n - 1; i++) d[i] = (ys[i + 1] - ys[i]) / (xs[i + 1] - xs[i]);
|
|
40
|
+
m[0] = d[0] * m0scale; m[n - 1] = mEnd == null ? d[n - 2] : mEnd;
|
|
41
|
+
for (let i = 1; i < n - 1; i++) {
|
|
42
|
+
if (d[i - 1] * d[i] <= 0) m[i] = 0;
|
|
43
|
+
else { const h0 = xs[i] - xs[i - 1], h1 = xs[i + 1] - xs[i], w1 = 2 * h1 + h0, w2 = h1 + 2 * h0; m[i] = (w1 + w2) / (w1 / d[i - 1] + w2 / d[i]); }
|
|
44
|
+
}
|
|
45
|
+
return (x) => {
|
|
46
|
+
if (x <= xs[0]) return ys[0]; if (x >= xs[n - 1]) return ys[n - 1];
|
|
47
|
+
let k = 0; while (x > xs[k + 1]) k++;
|
|
48
|
+
const h = xs[k + 1] - xs[k], s = (x - xs[k]) / h, s2 = s * s, s3 = s2 * s;
|
|
49
|
+
return (2 * s3 - 3 * s2 + 1) * ys[k] + (s3 - 2 * s2 + s) * h * m[k] + (-2 * s3 + 3 * s2) * ys[k + 1] + (s3 - s2) * h * m[k + 1];
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// ---------------------------------------------------------------- the one line (world coords)
|
|
54
|
+
// organic amplitude `a` = hand-drawn wobble (nature wobbles, architecture is ruled)
|
|
55
|
+
// r2 wave (left-breaking, toward the sun): the horizon runs to the toe, turns in a small rounded tip and comes back as a
|
|
56
|
+
// concave back (~7 deg off the sea at the toe, ~80 deg under the crest). It enters a ONE-turn counter-clockwise exponential
|
|
57
|
+
// spiral at its right point; the inner end exits straight up and the lift crosses the lip ONCE, at ~60 deg (checked numerically).
|
|
58
|
+
const WV = { cx: 1400, cy: 600, r0: 64, r1: 22, th0: 0, th1: -2 * Math.PI };
|
|
59
|
+
const wvPt = (u) => { const th = WV.th0 + u * (WV.th1 - WV.th0), r = WV.r0 * (WV.r1 / WV.r0) ** u; return [WV.cx + r * Math.cos(th), WV.cy + r * Math.sin(th)]; };
|
|
60
|
+
const wvDir = (u0, u1) => { const a = wvPt(u0), b = wvPt(u1), l = Math.hypot(b[0] - a[0], b[1] - a[1]); return [(b[0] - a[0]) / l, (b[1] - a[1]) / l]; };
|
|
61
|
+
const f3 = (v) => v.toFixed(3);
|
|
62
|
+
function curlD() { let d = ''; for (let k = 1; k <= 220; k++) { const [x, y] = wvPt(k / 220); d += `L${f3(x)},${f3(y)} `; } return d; }
|
|
63
|
+
function waveD() { const J = wvPt(0), dj = wvDir(0, 0.004), b0 = [1606, 721], l = Math.hypot(26, 3), bd = [-26 / l, -3 / l];
|
|
64
|
+
return `C1628,740 1632,724 1606,721 C${f3(b0[0] + 75 * bd[0])},${f3(b0[1] + 75 * bd[1])} ${f3(J[0] - 55 * dj[0])},${f3(J[1] - 55 * dj[1])} ${f3(J[0])},${f3(J[1])}`; }
|
|
65
|
+
function liftD() { const E = wvPt(1), de = wvDir(0.996, 1); return `C${f3(E[0] + 110 * de[0])},${f3(E[1] + 110 * de[1])} 1150,440 925,465`; }
|
|
66
|
+
let L_TENDRIL = 60;
|
|
67
|
+
const PIECES = [
|
|
68
|
+
{ n: 'ground0', a: 0.22, d: 'M-160,740 L272,740' }, // r2: longer run-in so frame 0 is a full slice of ink
|
|
69
|
+
{ n: 'seed', a: 0.3, d: 'C284,740 287,726 291,719 C294,713 298,709 302,706 C306,713 313,724 312,732 C311,739 302,742 296,740 C293,734 296,722 302,706' },
|
|
70
|
+
{ n: 'stem1', a: 0.4, d: 'C301,700 297,696 297,690' },
|
|
71
|
+
{ n: 'leaf1', a: 0.4, d: 'C288,694 267,691 253,674 C268,667 287,672 298,683' },
|
|
72
|
+
{ n: 'stem2', a: 0.4, d: 'C301,672 305,660 304,648' },
|
|
73
|
+
{ n: 'leaf2', a: 0.4, d: 'C314,650 335,646 349,628 C334,623 315,630 305,640' },
|
|
74
|
+
{ n: 'stem3', a: 0.4, d: 'C303,628 300,616 301,606' },
|
|
75
|
+
{ n: 'leaf3', a: 0.4, d: 'C293,607 279,603 270,589 C281,585 294,591 302,599' },
|
|
76
|
+
{ n: 'shoot', a: 0.3, d: 'C305,588 310,572 322,564 C334,558 346,560 358,560' },
|
|
77
|
+
{ n: 'tendril', a: 0.3, d: 'C372,560 384,552 386,540 C388,528 378,522 372,528' }, // uncurls into the beam
|
|
78
|
+
{ n: 'roof', a: 0.08, d: () => `M${(358 + L_TENDRIL).toFixed(3)},560 L660,560` },
|
|
79
|
+
{ n: 'pavilion', a: 0.06, d: 'L660,569 L462,569 L462,740 L529,740 L529,696 A22,22 0 0 1 573,696 L573,740 L660,740' },
|
|
80
|
+
{ n: 'tower', a: 0.05, d: 'L660,500 L742,470' },
|
|
81
|
+
{ n: 'tower2', a: 0.05, d: 'L742,740' },
|
|
82
|
+
{ n: 'sky', a: 0.05, d: 'L770,740 L770,600 L808,600 L808,562 L852,562 L852,740 L874,740 L874,668 A37,37 0 0 1 948,668 L948,740 L972,740 L972,590 L990,590 L996,528' },
|
|
83
|
+
{ n: 'sky2', a: 0.05, d: 'L1002,590 L1020,590 L1020,740' },
|
|
84
|
+
{ n: 'horizon', a: 0.14, d: 'L1600,740' },
|
|
85
|
+
{ n: 'wave', a: 0.3, d: waveD },
|
|
86
|
+
{ n: 'curl', a: 0.22, d: curlD() },
|
|
87
|
+
{ n: 'lift', a: 0.14, d: liftD },
|
|
88
|
+
{ n: 'ring', a: 0, d: 'A135,135 0 1 1 925,195 A135,135 0 1 1 925,465' },
|
|
89
|
+
{ n: 'foot', a: 0, d: 'A135,135 0 0 1 873,454.58' },
|
|
90
|
+
{ n: 'arch', a: 0, d: 'L873,318 A52,52 0 0 1 977,318 L977,454.58' },
|
|
91
|
+
];
|
|
92
|
+
const LOGO = new Set(['ring', 'foot', 'arch']);
|
|
93
|
+
const STEP = 0.5;
|
|
94
|
+
const svg = document.getElementById('svg');
|
|
95
|
+
const X = [], Y = [], S = [], P = [];
|
|
96
|
+
const pieceStart = {}, pieceEnd = {};
|
|
97
|
+
{
|
|
98
|
+
let s0 = 0, last = null;
|
|
99
|
+
PIECES.forEach((pc, pi) => {
|
|
100
|
+
const el = document.createElementNS('http://www.w3.org/2000/svg', 'path');
|
|
101
|
+
const dd = typeof pc.d === 'function' ? pc.d() : pc.d;
|
|
102
|
+
const d = dd.startsWith('M') ? dd : `M${last[0]},${last[1]} ${dd}`;
|
|
103
|
+
el.setAttribute('d', d); svg.appendChild(el);
|
|
104
|
+
const L = el.getTotalLength(), n = Math.max(2, Math.ceil(L / STEP));
|
|
105
|
+
pieceStart[pc.n] = s0;
|
|
106
|
+
for (let k = (pi === 0 ? 0 : 1); k <= n; k++) {
|
|
107
|
+
const p = el.getPointAtLength(L * k / n);
|
|
108
|
+
X.push(p.x); Y.push(p.y); S.push(s0 + L * k / n); P.push(pi);
|
|
109
|
+
}
|
|
110
|
+
s0 += L; pieceEnd[pc.n] = s0; last = [X[X.length - 1], Y[Y.length - 1]];
|
|
111
|
+
if (pc.n === 'tendril') L_TENDRIL = L;
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
const N = X.length, TOTAL = S[N - 1];
|
|
115
|
+
const AMP = new Float32Array(N);
|
|
116
|
+
for (let i = 0; i < N; i++) AMP[i] = PIECES[P[i]].a;
|
|
117
|
+
{
|
|
118
|
+
const tmp = Float32Array.from(AMP), R = 40;
|
|
119
|
+
for (let i = 0; i < N; i++) { let acc = 0, c = 0; for (let k = -R; k <= R; k += 4) { const j = clamp(i + k, 0, N - 1); acc += tmp[j]; c++; } AMP[i] = acc / c; }
|
|
120
|
+
}
|
|
121
|
+
const WX = new Float32Array(N), WY = new Float32Array(N);
|
|
122
|
+
for (let i = 0; i < N; i++) {
|
|
123
|
+
const a = Math.max(0, i - 2), b = Math.min(N - 1, i + 2);
|
|
124
|
+
let tx = X[b] - X[a], ty = Y[b] - Y[a]; const l = Math.hypot(tx, ty) || 1; tx /= l; ty /= l;
|
|
125
|
+
const w = AMP[i] * (0.75 * vnoise(S[i] / 17) + 0.45 * vnoise(S[i] / 5.5 + 300));
|
|
126
|
+
WX[i] = X[i] - ty * w; WY[i] = Y[i] + tx * w;
|
|
127
|
+
}
|
|
128
|
+
// corner density -> slow the pen into corners (tau = weighted length)
|
|
129
|
+
const ANG = new Float32Array(N), TURN = new Float32Array(N);
|
|
130
|
+
for (let i = 0; i < N; i++) { const a = Math.max(0, i - 1), b = Math.min(N - 1, i + 1); ANG[i] = Math.atan2(Y[b] - Y[a], X[b] - X[a]); }
|
|
131
|
+
for (let i = 1; i < N; i++) { let d = ANG[i] - ANG[i - 1]; while (d > Math.PI) d -= 2 * Math.PI; while (d < -Math.PI) d += 2 * Math.PI; TURN[i] = Math.abs(d); }
|
|
132
|
+
const CORN = new Float32Array(N);
|
|
133
|
+
{
|
|
134
|
+
const sig = 7 / STEP, R = Math.ceil(sig * 3), ker = [];
|
|
135
|
+
for (let k = -R; k <= R; k++) ker.push(Math.exp(-k * k / (2 * sig * sig)));
|
|
136
|
+
const ks = ker.reduce((a, b) => a + b, 0);
|
|
137
|
+
for (let i = 0; i < N; i++) { let acc = 0; for (let k = -R; k <= R; k++) { const j = i + k; if (j >= 0 && j < N) acc += TURN[j] * ker[k + R]; } CORN[i] = acc / ks / STEP; }
|
|
138
|
+
}
|
|
139
|
+
const KCORN = 9;
|
|
140
|
+
const TAU = new Float64Array(N);
|
|
141
|
+
for (let i = 1; i < N; i++) TAU[i] = TAU[i - 1] + (S[i] - S[i - 1]) * (1 + KCORN * Math.min(CORN[i], 0.3));
|
|
142
|
+
function idxAtS(s) { let lo = 0, hi = N - 1; while (hi - lo > 1) { const m = (lo + hi) >> 1; if (S[m] <= s) lo = m; else hi = m; } return lo; }
|
|
143
|
+
function tauAtS(s) { const i = idxAtS(s), j = Math.min(N - 1, i + 1), f = S[j] > S[i] ? (s - S[i]) / (S[j] - S[i]) : 0; return lerp(TAU[i], TAU[j], f); }
|
|
144
|
+
function sAtTau(tau) { let lo = 0, hi = N - 1; if (tau <= 0) return 0; if (tau >= TAU[N - 1]) return TOTAL; while (hi - lo > 1) { const m = (lo + hi) >> 1; if (TAU[m] <= tau) lo = m; else hi = m; } const f = (tau - TAU[lo]) / (TAU[hi] - TAU[lo] || 1); return lerp(S[lo], S[hi], f); }
|
|
145
|
+
const markerTau = (m) => {
|
|
146
|
+
let name = m, f = 0;
|
|
147
|
+
if (m.endsWith('>')) { name = m.slice(0, -1); f = 1; } else if (m.includes('@')) { [name, f] = m.split('@'); f = +f; }
|
|
148
|
+
return tauAtS(lerp(pieceStart[name], pieceEnd[name], f));
|
|
149
|
+
};
|
|
150
|
+
const DK = cues.draw; // repeated markers = punctuation holds (monotone spline eases in/out of them)
|
|
151
|
+
const tauOfT = monotone(DK.map((k) => k[0]), DK.map((k) => markerTau(k[1])), 1.3, 0);
|
|
152
|
+
const T_END = DK[DK.length - 1][0];
|
|
153
|
+
const headS = (t) => sAtTau(tauOfT(t));
|
|
154
|
+
const TD = new Float32Array(N);
|
|
155
|
+
{
|
|
156
|
+
let j = 0; const dt = 1 / 600;
|
|
157
|
+
for (let t = 0; t <= T_END + dt; t += dt) { const s = headS(t); while (j < N && S[j] <= s) { TD[j] = t; j++; } }
|
|
158
|
+
for (; j < N; j++) TD[j] = T_END;
|
|
159
|
+
}
|
|
160
|
+
// branch -> beam: during the shoot hold the tendril uncurls into the straight roof line
|
|
161
|
+
const iT0 = idxAtS(pieceStart.tendril), iT1 = idxAtS(pieceEnd.tendril);
|
|
162
|
+
const MX = new Float32Array(N);
|
|
163
|
+
for (let i = iT0; i <= iT1; i++) MX[i] = 358 + (S[i] - pieceStart.tendril);
|
|
164
|
+
const MORPH = cues.morph;
|
|
165
|
+
const morphAt = (t) => easeIO(clamp((t - MORPH[0]) / (MORPH[1] - MORPH[0])));
|
|
166
|
+
const PX = (i, m) => (m > 0 && i >= iT0 && i <= iT1) ? lerp(WX[i], MX[i], m) : WX[i];
|
|
167
|
+
const PY = (i, m) => (m > 0 && i >= iT0 && i <= iT1) ? lerp(WY[i], 560, m) : WY[i];
|
|
168
|
+
function pointAtS(s, t) {
|
|
169
|
+
const m = morphAt(t), i = idxAtS(s), j = Math.min(N - 1, i + 1), f = S[j] > S[i] ? clamp((s - S[i]) / (S[j] - S[i])) : 0;
|
|
170
|
+
return [lerp(PX(i, m), PX(j, m), f), lerp(PY(i, m), PY(j, m), f)];
|
|
171
|
+
}
|
|
172
|
+
const tipAt = (t) => pointAtS(headS(clamp(t, 0, T_END)), clamp(t, 0, T_END));
|
|
173
|
+
// brightness floor per point: landscape 0.4; the lift gathers light as it rises; logo stays lit
|
|
174
|
+
const FLOOR = new Float32Array(N);
|
|
175
|
+
for (let i = 0; i < N; i++) {
|
|
176
|
+
const nm = PIECES[P[i]].n;
|
|
177
|
+
if (LOGO.has(nm)) FLOOR[i] = 0.96;
|
|
178
|
+
else if (nm === 'lift') FLOOR[i] = lerp(0.4, 0.96, smoother(0.1, 1, (S[i] - pieceStart.lift) / (pieceEnd.lift - pieceStart.lift)));
|
|
179
|
+
else FLOOR[i] = 0.4;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// ---------------------------------------------------------------- camera
|
|
183
|
+
const ZK = cues.zoom;
|
|
184
|
+
const logZ = monotone(ZK.map((k) => k[0]), ZK.map((k) => Math.log(k[1])));
|
|
185
|
+
const CAM = cues.camera, FILL = cues.fill, WM = cues.wordmark, PULSE = cues.pulse, SEC = cues.sections;
|
|
186
|
+
// r2 camera clock: dT/dt eases to 0 over 4 frames before each hold, stays 0 through it, then runs fast (~2x peak) to catch up
|
|
187
|
+
const CT_DT = 1 / 600, CT = new Float64Array(Math.ceil(DUR / CT_DT) + 2);
|
|
188
|
+
{
|
|
189
|
+
const HA = 0.133, HR = 0.5;
|
|
190
|
+
const vel = (t) => { let v = 1; for (const [h0, h1] of cues.holds) {
|
|
191
|
+
const D = h1 - h0, c = (2 * D + HA + HR) / HR;
|
|
192
|
+
if (t >= h0 - HA && t < h0) v = Math.min(v, 1 - easeIO((t - h0 + HA) / HA));
|
|
193
|
+
else if (t >= h0 && t < h1) v = 0;
|
|
194
|
+
else if (t >= h1 && t < h1 + HR) { const q = (t - h1) / HR; v = easeIO(q) + c * Math.sin(Math.PI * q) ** 2; }
|
|
195
|
+
} return v; };
|
|
196
|
+
for (let i = 1; i < CT.length; i++) CT[i] = CT[i - 1] + CT_DT * 0.5 * (vel((i - 1) * CT_DT) + vel(i * CT_DT));
|
|
197
|
+
}
|
|
198
|
+
const camClock = (t) => { const x = clamp(t / CT_DT, 0, CT.length - 2), i = Math.floor(x); return lerp(CT[i], CT[i + 1], x - i); };
|
|
199
|
+
function camera(t) {
|
|
200
|
+
let cx = 0, cy = 0, ws = 0;
|
|
201
|
+
const tc = camClock(t);
|
|
202
|
+
for (let k = -16; k <= 16; k++) {
|
|
203
|
+
const dt = k * 0.05, w = Math.exp(-dt * dt / (2 * CAM.sigma * CAM.sigma));
|
|
204
|
+
const p = tipAt(tc + CAM.lead + dt); cx += p[0] * w; cy += p[1] * w; ws += w;
|
|
205
|
+
}
|
|
206
|
+
cx /= ws; cy /= ws;
|
|
207
|
+
const hw = 1 - smooth(0.1, 0.5, t); // r2 hook: the camera chases the whipping tip with a 2-frame lag, then settles
|
|
208
|
+
if (hw > 0) { const q = tipAt(t - cues.hook.lag); cx = lerp(cx, q[0] + cues.hook.lead_px / 5.8, hw); cy = lerp(cy, q[1], hw); }
|
|
209
|
+
const e1 = easeIO(clamp((t - CAM.logo_from) / (CAM.logo_to - CAM.logo_from)));
|
|
210
|
+
const e2 = easeIO(clamp((t - CAM.poster_from) / (CAM.poster_to - CAM.poster_from)));
|
|
211
|
+
cx = lerp(cx, CAM.logo_center[0], e1); cy = lerp(cy, CAM.logo_center[1], e1);
|
|
212
|
+
const hold = smooth(CAM.poster_to - 0.4, 10, t);
|
|
213
|
+
cx = lerp(cx, CAM.poster_center[0] + hold * 4, e2); cy = lerp(cy, CAM.poster_center[1] - hold * 2, e2);
|
|
214
|
+
let z = Math.exp(logZ(tc));
|
|
215
|
+
const kt = t - FILL.start; // camera kick on the hit: x1.03, decays over ~9 frames
|
|
216
|
+
if (kt > 0) z *= 1 + 0.03 * (1 - Math.exp(-kt / 0.012)) * Math.exp(-kt / 0.1);
|
|
217
|
+
const pz = clamp(t - cues.end_push.from, 0, V5 ? DUR - cues.end_push.from : 1); // continuous ~3 % push through the end hold (eases in, then constant speed)
|
|
218
|
+
if (pz > 0) z *= 1 + cues.end_push.amount * (pz < 0.25 ? pz * pz / 0.5 : pz - 0.125) / 0.875;
|
|
219
|
+
const roll = -0.016 * Math.sin(Math.PI * smooth(SEC.horizon - 0.2, SEC.ring + 0.9, t)) ** 2; // slight bank through the wave
|
|
220
|
+
return { cx, cy, z, roll };
|
|
221
|
+
}
|
|
222
|
+
const applyCam = (g, c) => { g.setTransform(1, 0, 0, 1, 0, 0); g.translate(W / 2, H / 2); g.rotate(c.roll); g.scale(c.z, c.z); g.translate(-c.cx, -c.cy); };
|
|
223
|
+
const toScreen = (c, x, y) => { const dx = (x - c.cx) * c.z, dy = (y - c.cy) * c.z, cs = Math.cos(c.roll), sn = Math.sin(c.roll); return [W / 2 + dx * cs - dy * sn, H / 2 + dx * sn + dy * cs]; };
|
|
224
|
+
|
|
225
|
+
// ---------------------------------------------------------------- assets
|
|
226
|
+
const grain = new Image(); grain.src = '/assets/textures/grain/grain_fine_2048.png'; await grain.decode();
|
|
227
|
+
await document.fonts.load("500 50px 'Cormorant Garamond'", 'ATELIER LINEA');
|
|
228
|
+
await document.fonts.load("300 26px 'Noto Serif SC'", '始于一线');
|
|
229
|
+
await document.fonts.ready;
|
|
230
|
+
|
|
231
|
+
// ---------------------------------------------------------------- canvases
|
|
232
|
+
const cv = document.getElementById('c'), ctx = cv.getContext('2d');
|
|
233
|
+
const mk = () => { const c = document.createElement('canvas'); c.width = W; c.height = H; return [c, c.getContext('2d')]; };
|
|
234
|
+
const [lineC, lg] = mk();
|
|
235
|
+
const [fillC, fg] = mk();
|
|
236
|
+
const [pulseC, pg] = mk();
|
|
237
|
+
const GOLD = [233, 215, 165], AGED = [150, 125, 80], HOT = [255, 246, 220], NAVY = [11, 19, 32];
|
|
238
|
+
const LW = +(Q.get("lw") || 3); // constant screen-space line width, whole film (the reel renders with ?lw=4.5)
|
|
239
|
+
const CHUNK = 12;
|
|
240
|
+
const MCX = 925, MCY = 330, MR = 135, FY = 454.58;
|
|
241
|
+
|
|
242
|
+
function lineColor(b) {
|
|
243
|
+
if (b <= 1) { const k = clamp((b - 0.4) / 0.6); return [lerp(AGED[0], GOLD[0], k), lerp(AGED[1], GOLD[1], k), lerp(AGED[2], GOLD[2], k)]; }
|
|
244
|
+
const k = clamp((b - 1) / 0.6); return [lerp(GOLD[0], HOT[0], k), lerp(GOLD[1], HOT[1], k), lerp(GOLD[2], HOT[2], k)];
|
|
245
|
+
}
|
|
246
|
+
function doorPath(g, closed) {
|
|
247
|
+
const aR = Math.atan2(FY - MCY, 52), aL = Math.atan2(FY - MCY, -52);
|
|
248
|
+
g.beginPath(); g.moveTo(873, FY); g.lineTo(873, 318); g.arc(925, 318, 52, Math.PI, Math.PI * 2); g.lineTo(977, FY);
|
|
249
|
+
if (closed) { g.arc(MCX, MCY, MR, aR, aL, false); g.closePath(); }
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
function drawBackground(c, t) {
|
|
253
|
+
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
|
254
|
+
ctx.globalCompositeOperation = 'source-over'; ctx.globalAlpha = 1; ctx.filter = 'none';
|
|
255
|
+
ctx.fillStyle = '#0B1320'; ctx.fillRect(0, 0, W, H);
|
|
256
|
+
const rg = ctx.createRadialGradient(W * 0.5, H * 0.46, 0, W * 0.5, H * 0.5, W * 0.62);
|
|
257
|
+
rg.addColorStop(0, 'rgba(26,40,62,0.55)'); rg.addColorStop(0.55, 'rgba(15,25,42,0.25)'); rg.addColorStop(1, 'rgba(4,8,14,0.0)');
|
|
258
|
+
ctx.fillStyle = rg; ctx.fillRect(0, 0, W, H);
|
|
259
|
+
const gz = 1 + (c.z - 1) * 0.55, gcx = lerp(925, c.cx, 0.55), gcy = lerp(552, c.cy, 0.55);
|
|
260
|
+
const sp = 48, r = 1.05;
|
|
261
|
+
ctx.fillStyle = `rgba(160,180,210,${0.075 + 0.05 * (1 - smooth(0.2, 0.5, t))})`;
|
|
262
|
+
const x0 = gcx - W / 2 / gz, x1 = gcx + W / 2 / gz, y0 = gcy - H / 2 / gz, y1 = gcy + H / 2 / gz;
|
|
263
|
+
for (let gx = Math.floor(x0 / sp) * sp; gx <= x1; gx += sp) for (let gy = Math.floor(y0 / sp) * sp; gy <= y1; gy += sp) {
|
|
264
|
+
const sx = W / 2 + (gx - gcx) * gz, sy = H / 2 + (gy - gcy) * gz;
|
|
265
|
+
ctx.fillRect(sx - r, sy - r, 2 * r, 2 * r);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
const MOTES = Array.from({ length: 44 }, (_, i) => { const r = mulberry(4000 + i * 17); return { x: r() * 2300 - 230, y: r() * 1250 - 80, d: 0.3 + r() * 1.3, s: 0.7 + r() * 1.6, a: 0.05 + r() * 0.11, ph: r() * 6.283, sp: 3 + r() * 9 }; });
|
|
270
|
+
function drawMotes(c, t) {
|
|
271
|
+
ctx.setTransform(1, 0, 0, 1, 0, 0); ctx.globalCompositeOperation = 'screen'; ctx.filter = 'none';
|
|
272
|
+
const [px, py] = CAM.poster_center;
|
|
273
|
+
for (const m of MOTES) {
|
|
274
|
+
const zl = 1 + (c.z - 1) * m.d, lx = lerp(px, c.cx, m.d), ly = lerp(py, c.cy, m.d);
|
|
275
|
+
const wx = m.x + 12 * Math.sin(t * 0.37 + m.ph), wy = m.y - t * m.sp + 6 * Math.sin(t * 0.61 + m.ph * 1.7);
|
|
276
|
+
const sx = W / 2 + (wx - lx) * zl, sy = H / 2 + (wy - ly) * zl;
|
|
277
|
+
if (sx < -60 || sx > W + 60 || sy < -60 || sy > H + 60) continue;
|
|
278
|
+
const r = m.s * (0.7 + 0.8 * m.d) * Math.sqrt(zl) * (m.d > 1.1 ? 3.2 : 1.6);
|
|
279
|
+
const a = m.a * (m.d > 1.1 ? 0.55 : 1) * (0.8 + 0.2 * Math.sin(t * 1.3 + m.ph));
|
|
280
|
+
const g = ctx.createRadialGradient(sx, sy, 0, sx, sy, r);
|
|
281
|
+
g.addColorStop(0, `rgba(226,196,138,${a})`); g.addColorStop(1, 'rgba(226,196,138,0)');
|
|
282
|
+
ctx.fillStyle = g; ctx.fillRect(sx - r, sy - r, 2 * r, 2 * r);
|
|
283
|
+
}
|
|
284
|
+
ctx.globalCompositeOperation = 'source-over';
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
function drawLine(c, t, sHead) {
|
|
288
|
+
lg.setTransform(1, 0, 0, 1, 0, 0); lg.clearRect(0, 0, W, H);
|
|
289
|
+
applyCam(lg, c);
|
|
290
|
+
lg.lineCap = 'round'; lg.lineJoin = 'round';
|
|
291
|
+
const iHead = idxAtS(sHead), m = morphAt(t);
|
|
292
|
+
const pu = clamp((t - PULSE.start) / (PULSE.end - PULSE.start));
|
|
293
|
+
const sp = TOTAL * (1 - easePulse(pu)); // reverse pulse: anchor -> seed
|
|
294
|
+
const pAmp = t > PULSE.start ? 0.9 * (1 - smooth(PULSE.end - 0.08, PULSE.end + 0.3, t)) : 0;
|
|
295
|
+
const BR = cues.breath, bu = clamp((t - BR.start) / (BR.end - BR.start)), bp = TOTAL * easeIO(bu) * 1.04 - 60;
|
|
296
|
+
const bAmp = 0.55 * smooth(BR.start, BR.start + 0.12, t) * (1 - smooth(BR.end - 0.1, BR.end + 0.1, t));
|
|
297
|
+
const logoW = 1 - smooth(FILL.start + 0.3, FILL.start + 0.6, t); // logo strokes hand over to the bevel
|
|
298
|
+
const AN = cues.anticip, an = smooth(AN[0], AN[1], t); // r2 anticipation: the ring thins to 1.5 px and heats
|
|
299
|
+
const anW = 1 - 0.5 * an * (1 - smooth(FILL.start, FILL.start + 0.1, t)), anH = an * (1 - smooth(FILL.start + 0.02, FILL.start + 0.25, t));
|
|
300
|
+
const pf = smooth(cues.camera.poster_from + 0.1, cues.camera.poster_to - 0.1, t); // r2: poster margin, ink tail dissolves on the left
|
|
301
|
+
pg.setTransform(1, 0, 0, 1, 0, 0); pg.clearRect(0, 0, W, H); applyCam(pg, c); pg.lineCap = 'round'; pg.lineJoin = 'round';
|
|
302
|
+
for (let i0 = 0; i0 < iHead; i0 += CHUNK) {
|
|
303
|
+
const i1 = Math.min(iHead, i0 + CHUNK), im = (i0 + i1) >> 1;
|
|
304
|
+
const age = t - TD[im];
|
|
305
|
+
let b = FLOOR[im] + (1 - FLOOR[im]) * (1 - smooth(0.2, 1.5, age));
|
|
306
|
+
if (t > PULSE.start) b = Math.max(b, lerp(FLOOR[im], 0.74, clamp((S[im] - sp) / 260))); // the pulse leaves the line lit
|
|
307
|
+
const pgs = pAmp > 0 ? pAmp * Math.exp(-(((S[im] - sp) / 300) ** 2)) : 0; b += pgs;
|
|
308
|
+
if (bAmp > 0) b += bAmp * Math.exp(-(((S[im] - bp) / 240) ** 2)); // end breath: light flows forward into the coin
|
|
309
|
+
let w = 1;
|
|
310
|
+
if (NOLINK.size) { const nm = PIECES[P[im]].n; if ((NOLINK.has('dot') && (nm === 'ring' || nm === 'foot')) || (NOLINK.has('line') && nm === 'horizon') || (NOLINK.has('door') && nm === 'arch')) continue; } // v5 ?nolink
|
|
311
|
+
if (LOGO.has(PIECES[P[im]].n)) { w = logoW * anW; if (w <= 0.01) continue; b = Math.max(b, 1 + 0.6 * anH); }
|
|
312
|
+
const taper0 = smooth(0, 130, S[im]), taper = taper0 * (P[im] === 0 ? lerp(1, smooth(185, 268, X[im]), pf) : 1); // ink tail; poster margin
|
|
313
|
+
const col = lineColor(b);
|
|
314
|
+
const r = lerp(NAVY[0], col[0], taper), g = lerp(NAVY[1], col[1], taper), bl = lerp(NAVY[2], col[2], taper);
|
|
315
|
+
lg.lineWidth = LW / c.z * w * (0.35 + 0.65 * taper0);
|
|
316
|
+
lg.strokeStyle = `rgb(${r | 0},${g | 0},${bl | 0})`;
|
|
317
|
+
lg.beginPath(); lg.moveTo(PX(i0, m), PY(i0, m));
|
|
318
|
+
for (let i = i0 + 1; i <= i1; i++) lg.lineTo(PX(i, m), PY(i, m));
|
|
319
|
+
if (i1 === iHead) { const p = pointAtS(sHead, t); lg.lineTo(p[0], p[1]); }
|
|
320
|
+
lg.stroke();
|
|
321
|
+
if (pgs > 0.03) { // r2: the travelling light gets a 6 px hot glow so the eye can follow it home
|
|
322
|
+
pg.lineWidth = 6 / c.z; pg.strokeStyle = `rgba(255,246,220,${(0.35 * pgs / 0.9 * taper).toFixed(3)})`;
|
|
323
|
+
pg.beginPath(); pg.moveTo(PX(i0, m), PY(i0, m)); for (let i = i0 + 1; i <= i1; i++) pg.lineTo(PX(i, m), PY(i, m)); pg.stroke();
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
function drawFill(c, t) {
|
|
329
|
+
if (t < FILL.start || NOLINK.has('dot')) return 0; // v5 ?nolink=dot: no coin, bevel, echo or bloom
|
|
330
|
+
const u = clamp((t - FILL.start) / FILL.swell), e = easeSwell(u);
|
|
331
|
+
const ri = Math.max(0, MR * (1 - Math.min(1, e)));
|
|
332
|
+
const OV = cues.overshoot, ov = t < OV[1] ? smooth(OV[0], OV[1], t) : 1 - smooth(OV[1], OV[2], t);
|
|
333
|
+
const ro = MR + 1.5 / c.z + MR * 0.04 * ov; // r2: 4 % outer overshoot, peaks 7.80, settled by 7.93
|
|
334
|
+
fg.setTransform(1, 0, 0, 1, 0, 0); fg.clearRect(0, 0, W, H); fg.globalCompositeOperation = 'source-over';
|
|
335
|
+
applyCam(fg, c);
|
|
336
|
+
const lgr = fg.createLinearGradient(815, 205, 1035, 455);
|
|
337
|
+
lgr.addColorStop(0, '#F2E0AE'); lgr.addColorStop(0.42, '#DDC284'); lgr.addColorStop(0.7, '#CCAB6C'); lgr.addColorStop(1, '#A8874E'); // r2: +8 %
|
|
338
|
+
fg.beginPath(); fg.arc(MCX, MCY, ro, 0, Math.PI * 2);
|
|
339
|
+
if (ri > 0.3) { fg.moveTo(MCX + ri, MCY); fg.arc(MCX, MCY, ri, 0, Math.PI * 2, true); }
|
|
340
|
+
fg.fillStyle = lgr; fg.fill('evenodd');
|
|
341
|
+
fg.globalCompositeOperation = 'destination-out'; doorPath(fg, true); fg.fillStyle = '#000'; fg.fill(); // the doorway stays carved
|
|
342
|
+
fg.globalCompositeOperation = 'source-atop';
|
|
343
|
+
const ra = 1 - smooth(0.62, 1, u); // r2: a 6 px molten rim (#FFF6DC -> #E9D7A5) leads the inner edge
|
|
344
|
+
if (ra > 0.01 && ri > 0.5) {
|
|
345
|
+
const w6 = 6 / c.z, rim = fg.createRadialGradient(MCX, MCY, Math.max(0, ri - 0.5), MCX, MCY, ri + w6 + 22 / c.z);
|
|
346
|
+
const k6 = w6 / (w6 + 22 / c.z);
|
|
347
|
+
rim.addColorStop(0, `rgba(255,246,220,${ra})`); rim.addColorStop(k6, `rgba(255,246,220,${0.85 * ra})`);
|
|
348
|
+
rim.addColorStop(Math.min(0.99, k6 + 0.25), `rgba(233,215,165,${0.3 * ra})`); rim.addColorStop(1, 'rgba(233,215,165,0)');
|
|
349
|
+
fg.fillStyle = rim; fg.fillRect(760, 160, 340, 340);
|
|
350
|
+
}
|
|
351
|
+
{ // r2 struck metal: a faint anisotropic (conic) sheen so the coin reads as metal, not print
|
|
352
|
+
const cg = fg.createConicGradient(-Math.PI / 4 + 0.25 * smooth(8.0, 10, t), MCX, MCY);
|
|
353
|
+
[[0, 0.1], [0.12, 0], [0.37, -0.08], [0.5, 0.1], [0.62, 0], [0.87, -0.08], [1, 0.1]].forEach(([k, a]) => cg.addColorStop(k, a >= 0 ? `rgba(255,248,230,${a})` : `rgba(60,40,15,${-a})`));
|
|
354
|
+
fg.fillStyle = cg; fg.fillRect(760, 160, 340, 340);
|
|
355
|
+
}
|
|
356
|
+
const sh = clamp((t - 9.2) / 0.76); // r2 end sheen: a narrow 18-degree glint band (~40 px on screen, a 0.35)
|
|
357
|
+
if (sh > 0 && sh < 1) {
|
|
358
|
+
const x = lerp(760, 1090, easeIO(sh)), nx = Math.cos(0.314), ny = -Math.sin(0.314), hw2 = 20 / c.z;
|
|
359
|
+
const sgr = fg.createLinearGradient(x - nx * hw2, MCY - ny * hw2, x + nx * hw2, MCY + ny * hw2);
|
|
360
|
+
const sa = 0.35 * Math.sin(Math.PI * sh) ** 0.5;
|
|
361
|
+
sgr.addColorStop(0, 'rgba(255,250,235,0)'); sgr.addColorStop(0.5, `rgba(255,250,235,${sa})`); sgr.addColorStop(1, 'rgba(255,250,235,0)');
|
|
362
|
+
fg.fillStyle = sgr; fg.fillRect(760, 160, 340, 340);
|
|
363
|
+
}
|
|
364
|
+
// directional bevel: light from the top-left; the doorway is carved in, so its lit edge faces bottom-right
|
|
365
|
+
const bev = smooth(FILL.start + 0.25, FILL.start + 0.55, t);
|
|
366
|
+
if (bev > 0) {
|
|
367
|
+
fg.globalCompositeOperation = 'source-over';
|
|
368
|
+
// r2 bevel: 1.5 px #FFF6DC highlight on the lit (top-left) arc, 1 px #6E5428 edge opposite
|
|
369
|
+
const gl = fg.createLinearGradient(MCX - 95, MCY - 95, MCX + 60, MCY + 60);
|
|
370
|
+
gl.addColorStop(0, `rgba(255,246,220,${0.8 * bev})`); gl.addColorStop(0.55, `rgba(255,246,220,${0.35 * bev})`); gl.addColorStop(1, 'rgba(255,246,220,0)');
|
|
371
|
+
fg.lineWidth = 1.5 / c.z; fg.strokeStyle = gl; fg.beginPath(); fg.arc(MCX, MCY, ro - 0.75 / c.z, Math.PI * 0.86, Math.PI * 1.86); fg.stroke();
|
|
372
|
+
const gd = fg.createLinearGradient(MCX + 95, MCY + 95, MCX - 60, MCY - 60);
|
|
373
|
+
gd.addColorStop(0, `rgba(110,84,40,${0.95 * bev})`); gd.addColorStop(0.6, `rgba(110,84,40,${0.4 * bev})`); gd.addColorStop(1, 'rgba(110,84,40,0)');
|
|
374
|
+
fg.lineWidth = 1 / c.z; fg.strokeStyle = gd; fg.beginPath(); fg.arc(MCX, MCY, ro - 0.5 / c.z, Math.PI * 1.86, Math.PI * 2.86); fg.stroke();
|
|
375
|
+
fg.lineWidth = 1.2 / c.z;
|
|
376
|
+
const g2 = fg.createLinearGradient(873, 266, 977, 454);
|
|
377
|
+
g2.addColorStop(0, `rgba(122,94,48,${0.95 * bev})`); g2.addColorStop(0.55, `rgba(200,170,110,${0.5 * bev})`); g2.addColorStop(1, `rgba(255,246,220,${0.9 * bev})`);
|
|
378
|
+
fg.strokeStyle = g2; doorPath(fg, false); fg.stroke();
|
|
379
|
+
}
|
|
380
|
+
fg.globalCompositeOperation = 'source-over';
|
|
381
|
+
ctx.setTransform(1, 0, 0, 1, 0, 0); ctx.globalAlpha = 1; ctx.globalCompositeOperation = 'source-over';
|
|
382
|
+
ctx.drawImage(fillC, 0, 0);
|
|
383
|
+
const EC = cues.echo, eq = clamp((t - EC[0]) / (EC[1] - EC[0])); // r2 echo: a 1 px ring of the line leaves the coin edge
|
|
384
|
+
if (eq > 0 && eq < 1) {
|
|
385
|
+
applyCam(ctx, c); ctx.lineWidth = 1 / c.z; ctx.strokeStyle = `rgba(240,222,176,${(0.75 * (1 - eq) ** 1.4).toFixed(3)})`;
|
|
386
|
+
ctx.beginPath(); ctx.arc(MCX, MCY, MR * (1 + 0.6 * (1 - (1 - eq) ** 2)), 0, Math.PI * 2); ctx.stroke(); ctx.setTransform(1, 0, 0, 1, 0, 0);
|
|
387
|
+
}
|
|
388
|
+
return Math.max(u, 1e-3);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
const glowAt = (sx, sy, r, a, col) => { if (a <= 0.002) return; const g = ctx.createRadialGradient(sx, sy, 0, sx, sy, r); g.addColorStop(0, `rgba(${col},${a})`); g.addColorStop(1, `rgba(${col},0)`); ctx.fillStyle = g; ctx.fillRect(sx - r, sy - r, 2 * r, 2 * r); };
|
|
392
|
+
function drawTip(c, t) {
|
|
393
|
+
const vis = 1 - smooth(cues.tip_fade[0], cues.tip_fade[1], t);
|
|
394
|
+
ctx.setTransform(1, 0, 0, 1, 0, 0); ctx.globalCompositeOperation = 'lighter'; ctx.filter = 'none';
|
|
395
|
+
if (vis > 0) {
|
|
396
|
+
const p = tipAt(t), [sx, sy] = toScreen(c, p[0], p[1]);
|
|
397
|
+
const hp = cues.holds.reduce((a, h) => a + Math.exp(-(((t - h[0] - 0.02) / 0.06) ** 2)), 0);
|
|
398
|
+
const fl = (1 + 0.05 * Math.sin(t * 29.0) + 0.04 * Math.sin(t * 13.7)) * (1 + 0.3 * hp); // r2: glow pulse on the hold notes
|
|
399
|
+
const bead = Math.exp(-(((t - cues.hook.brake) / 0.045) ** 2)); // r2: ink bead at the brake (thump)
|
|
400
|
+
const ig = Math.exp(-t / 0.1); // tiny ignition spark on frame 0 (the ink is the hook)
|
|
401
|
+
const cf = Math.exp(-(((t - FILL.start) / 0.06) ** 2)); // spark as the line closes on its anchor
|
|
402
|
+
glowAt(sx, sy, 40, 0.3 * ig + 0.35 * cf, '232,200,138');
|
|
403
|
+
glowAt(sx, sy, 56 * fl, 0.09 * vis, '214,178,112');
|
|
404
|
+
const q = tipAt(t - 1 / 120), [qx, qy] = toScreen(c, q[0], q[1]), ns = Math.min(8, Math.max(1, Math.ceil(Math.hypot(sx - qx, sy - qy) / 5)));
|
|
405
|
+
for (let j = 0; j < ns; j++) {
|
|
406
|
+
const f2 = j / ns, x = lerp(sx, qx, f2), y = lerp(sy, qy, f2), wj = (ns > 1 ? 1.6 / ns : 1) * (1 - 0.5 * f2);
|
|
407
|
+
glowAt(x, y, 15 * fl, 0.34 * vis * wj, '238,210,150');
|
|
408
|
+
glowAt(x, y, 3.2 * (j === 0 ? 1 + 0.6 * bead : 1), 0.95 * vis * (j === 0 ? 1 : wj * 0.6), '255,250,236');
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
ctx.globalCompositeOperation = 'source-over';
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
function drawText(c, t) {
|
|
415
|
+
if (t < WM.start) return;
|
|
416
|
+
ctx.globalCompositeOperation = 'source-over'; ctx.filter = 'none';
|
|
417
|
+
applyCam(ctx, c);
|
|
418
|
+
const word = 'ATELIER LINEA', size = 50, track = 0.46;
|
|
419
|
+
ctx.font = `500 ${size}px 'Cormorant Garamond'`; ctx.textBaseline = 'alphabetic';
|
|
420
|
+
const ws = [...word].map((ch) => ctx.measureText(ch).width);
|
|
421
|
+
const fin = ws.reduce((a, b) => a + b, 0) + track * size * (word.length - 1);
|
|
422
|
+
const cx = 925, y = 868, mid = (word.length - 1) / 2;
|
|
423
|
+
let x = cx - fin / 2;
|
|
424
|
+
[...word].forEach((ch, i) => {
|
|
425
|
+
const d = Math.abs(i - mid);
|
|
426
|
+
const u = clamp((t - WM.start - d * WM.stagger) / WM.dur), e = easeOut(u);
|
|
427
|
+
const spread = (1 - e) * 0.22 * size * (i - mid); // letters track in from wide
|
|
428
|
+
ctx.globalAlpha = smooth(0, 0.8, u) * 0.95;
|
|
429
|
+
ctx.fillStyle = '#E9D7A5';
|
|
430
|
+
ctx.fillText(ch, x + spread, y + (1 - e) * 6);
|
|
431
|
+
x += ws[i] + track * size;
|
|
432
|
+
});
|
|
433
|
+
const tu = clamp((t - WM.tagline) / 0.9), te = easeOut(tu);
|
|
434
|
+
if (tu > 0) {
|
|
435
|
+
const tag = '始于一线', ts = 26, tt = 0.5, ty = y + 36 + ts; // r2: 0.5 em so 一 belongs to the word
|
|
436
|
+
ctx.font = `300 ${ts}px 'Noto Serif SC'`;
|
|
437
|
+
const tw = [...tag].map((ch) => ctx.measureText(ch).width);
|
|
438
|
+
const tf = tw.reduce((a, b) => a + b, 0) + tt * ts * (tag.length - 1);
|
|
439
|
+
let tx = cx - tf / 2;
|
|
440
|
+
ctx.globalAlpha = te * 0.9; ctx.fillStyle = '#E9D7A5';
|
|
441
|
+
[...tag].forEach((ch, i) => { ctx.fillText(ch, tx, ty + (1 - te) * 4); tx += tw[i] + tt * ts; });
|
|
442
|
+
// the pen signs off: two hairline rules drawn outward from the tagline, each by a small glint
|
|
443
|
+
const ru = easeIO(clamp((t - cues.rules[0]) / (cues.rules[1] - cues.rules[0]))), hl = 24 * ru, ry = ty - 9.5, gap = 1.2 * ts; // r2: short 1 px rules, 1.2 em gap
|
|
444
|
+
ctx.globalAlpha = 0.55; ctx.fillStyle = '#E9D7A5'; const rh = 1 / c.z;
|
|
445
|
+
ctx.fillRect(cx - tf / 2 - gap - hl, ry - rh / 2, hl, rh); ctx.fillRect(cx + tf / 2 + gap, ry - rh / 2, hl, rh);
|
|
446
|
+
const gv = smooth(cues.rules[0] - 0.08, cues.rules[0] + 0.02, t) * (1 - smooth(cues.rules[1] - 0.05, cues.rules[1] + 0.15, t));
|
|
447
|
+
if (gv > 0) {
|
|
448
|
+
ctx.globalAlpha = 1;
|
|
449
|
+
const a = toScreen(c, cx - tf / 2 - gap - hl, ry), b = toScreen(c, cx + tf / 2 + gap + hl, ry);
|
|
450
|
+
ctx.setTransform(1, 0, 0, 1, 0, 0); ctx.globalCompositeOperation = 'lighter';
|
|
451
|
+
for (const [sx, sy] of [a, b]) { glowAt(sx, sy, 12, 0.3 * gv, '240,214,160'); glowAt(sx, sy, 2.2, 0.9 * gv, '255,250,236'); } // r2: no flare halo
|
|
452
|
+
ctx.globalCompositeOperation = 'source-over';
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
ctx.globalAlpha = 1; ctx.setTransform(1, 0, 0, 1, 0, 0);
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
// ---------------------------------------------------------------- v5 title: the gold line writes 线条动画 as outline type
|
|
459
|
+
// Alimama ShuHeiTi Bold outlines (tools/v5_title_glyphs.py → v5_title.json), world units, under the skyline. Each glyph is
|
|
460
|
+
// traced by pens that start together at its top-left vertices and run at one shared speed (short counters close first);
|
|
461
|
+
// glyphs start 0.08 s apart; the whole title flares once as it closes, then holds. Same core colour, width and glow as the line.
|
|
462
|
+
const TT = { size: 165, track: 0.2, top: 790, cx: 925, start: 8.45, stagger: 0.08, dur: 0.56,
|
|
463
|
+
lw: 7.5, // v5.2: title pen 7.5 screen px (the film's line stays LW = 4.5), reads at feed size
|
|
464
|
+
fill: 0.36, floodIn: 0.06, flood: 0.26, // v5.2: each glyph floods inward with soft gold as it closes (echo of the coin)
|
|
465
|
+
en: 'LINE ART', enSize: 33, enW: 600, enY: 992, enIn: 9.05, rules: [9.35, 9.7] };
|
|
466
|
+
const easeTitle = cubicBezier(0.45, 0, 0.25, 1);
|
|
467
|
+
let TITLE = null;
|
|
468
|
+
if (V5) {
|
|
469
|
+
const J = await (await fetch('/demos/02-line-art/v5_title.json')).json();
|
|
470
|
+
const k = TT.size / J.upm, raw = [];
|
|
471
|
+
let x = 0, minX = 1e9, maxX = -1e9, minY = 1e9, maxY = -1e9;
|
|
472
|
+
for (const g of J.glyphs) {
|
|
473
|
+
raw.push(g.contours.map((c) => { const pts = []; for (let i = 0; i < c.length; i += 2) { const px = x + c[i] * k, py = c[i + 1] * k; pts.push([px, py]);
|
|
474
|
+
minX = Math.min(minX, px); maxX = Math.max(maxX, px); minY = Math.min(minY, py); maxY = Math.max(maxY, py); } return pts; }));
|
|
475
|
+
x += (g.adv + TT.track * J.upm) * k;
|
|
476
|
+
}
|
|
477
|
+
const ox = TT.cx - (minX + maxX) / 2, oy = TT.top - minY;
|
|
478
|
+
TITLE = { glyphs: [], box: [minX + ox, minY + oy, maxX + ox, maxY + oy] };
|
|
479
|
+
raw.forEach((cs, gi) => {
|
|
480
|
+
const contours = cs.map((pts0) => {
|
|
481
|
+
const pts = pts0.map(([px, py]) => [px + ox, py + oy]);
|
|
482
|
+
let i0 = 0; pts.forEach((p, i) => { if (p[0] + p[1] < pts[i0][0] + pts[i0][1]) i0 = i; }); // pen starts top-left
|
|
483
|
+
const p = [...pts.slice(i0), ...pts.slice(0, i0), pts[i0]], cum = [0];
|
|
484
|
+
for (let i = 1; i < p.length; i++) cum.push(cum[i - 1] + Math.hypot(p[i][0] - p[i - 1][0], p[i][1] - p[i - 1][1]));
|
|
485
|
+
return { p, cum, L: cum[cum.length - 1] };
|
|
486
|
+
});
|
|
487
|
+
const path = new Path2D(); let gy0 = 1e9, gy1 = -1e9; // v5.2: the glyph body (nonzero: counters are holes) for the inner fill
|
|
488
|
+
for (const ct of contours) { path.moveTo(ct.p[0][0], ct.p[0][1]); for (const q of ct.p) { path.lineTo(q[0], q[1]); gy0 = Math.min(gy0, q[1]); gy1 = Math.max(gy1, q[1]); } path.closePath(); }
|
|
489
|
+
TITLE.glyphs.push({ contours, path, gy0, gy1, Lmax: Math.max(...contours.map((c) => c.L)), t0: TT.start + gi * TT.stagger });
|
|
490
|
+
});
|
|
491
|
+
TITLE.end = TT.start + (J.glyphs.length - 1) * TT.stagger + TT.dur;
|
|
492
|
+
await document.fonts.load(`${TT.enW} ${TT.enSize}px 'Cormorant Garamond'`, TT.en);
|
|
493
|
+
}
|
|
494
|
+
const titleS = (g, t) => easeTitle(clamp((t - g.t0) / TT.dur)) * g.Lmax;
|
|
495
|
+
function ctPoint(ct, s) {
|
|
496
|
+
let lo = 0, hi = ct.cum.length - 1; while (hi - lo > 1) { const m = (lo + hi) >> 1; if (ct.cum[m] <= s) lo = m; else hi = m; }
|
|
497
|
+
const f = ct.cum[hi] > ct.cum[lo] ? clamp((s - ct.cum[lo]) / (ct.cum[hi] - ct.cum[lo])) : 0;
|
|
498
|
+
return [lerp(ct.p[lo][0], ct.p[hi][0], f), lerp(ct.p[lo][1], ct.p[hi][1], f), lo];
|
|
499
|
+
}
|
|
500
|
+
function ctTrace(g2, ct, s0, s1) {
|
|
501
|
+
const a = ctPoint(ct, s0), b = ctPoint(ct, s1);
|
|
502
|
+
g2.beginPath(); g2.moveTo(a[0], a[1]);
|
|
503
|
+
for (let i = a[2] + 1; i <= b[2]; i++) g2.lineTo(ct.p[i][0], ct.p[i][1]);
|
|
504
|
+
g2.lineTo(b[0], b[1]);
|
|
505
|
+
}
|
|
506
|
+
const rgbS = (col, a = 1) => `rgba(${col[0] | 0},${col[1] | 0},${col[2] | 0},${a})`;
|
|
507
|
+
function drawTitleLines(c, t) {
|
|
508
|
+
if (!TITLE || t < TT.start || NOLINK.has('title')) return;
|
|
509
|
+
applyCam(lg, c); lg.lineCap = 'round'; lg.lineJoin = 'round'; lg.globalAlpha = 1;
|
|
510
|
+
const flash = 0.5 * Math.exp(-(((t - TITLE.end - 0.04) / 0.1) ** 2)); // the title lands: one flare on close
|
|
511
|
+
for (const g of TITLE.glyphs) { // v5.2: soft gold body. As a glyph closes it floods inward from its outline, like the ring → coin
|
|
512
|
+
const u = clamp((t - (g.t0 + TT.dur - TT.floodIn)) / TT.flood); if (u <= 0) continue;
|
|
513
|
+
const e = easeOut(u), gr = lg.createLinearGradient(0, g.gy0, 0, g.gy1);
|
|
514
|
+
const fa = TT.fill * (1 + 0.6 * flash); // warm amber so the body reads gold, not grey, over the navy; lit from the top like the coin
|
|
515
|
+
gr.addColorStop(0, `rgba(240,206,138,${fa.toFixed(3)})`); gr.addColorStop(1, `rgba(178,134,66,${(fa * 0.82).toFixed(3)})`);
|
|
516
|
+
lg.fillStyle = gr; lg.strokeStyle = gr;
|
|
517
|
+
if (u >= 1) { lg.fill(g.path, 'nonzero'); continue; }
|
|
518
|
+
lg.save(); lg.clip(g.path, 'nonzero'); lg.lineWidth = 80 * e; lg.stroke(g.path); lg.restore(); // inner edge moves inward
|
|
519
|
+
}
|
|
520
|
+
lg.lineWidth = TT.lw / c.z;
|
|
521
|
+
for (const g of TITLE.glyphs) {
|
|
522
|
+
const s = titleS(g, t); if (s <= 0) continue;
|
|
523
|
+
for (const ct of g.contours) {
|
|
524
|
+
const sd = Math.min(s, ct.L), open = sd < ct.L;
|
|
525
|
+
lg.strokeStyle = rgbS(lineColor(1 + flash)); ctTrace(lg, ct, 0, sd); if (!open) lg.closePath(); lg.stroke();
|
|
526
|
+
if (open) { lg.strokeStyle = rgbS(HOT, 0.75); ctTrace(lg, ct, Math.max(0, sd - 55), sd); lg.stroke(); } // fresh ink runs hot
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
lg.setTransform(1, 0, 0, 1, 0, 0);
|
|
530
|
+
}
|
|
531
|
+
function drawTitleTips(c, t) {
|
|
532
|
+
if (!TITLE || t < TT.start || t > TITLE.end + 0.05 || NOLINK.has('title')) return;
|
|
533
|
+
ctx.setTransform(1, 0, 0, 1, 0, 0); ctx.globalCompositeOperation = 'lighter'; ctx.filter = 'none';
|
|
534
|
+
for (const g of TITLE.glyphs) {
|
|
535
|
+
const s = titleS(g, t); if (s <= 0) continue;
|
|
536
|
+
for (const ct of g.contours) {
|
|
537
|
+
const a = clamp((ct.L - s) / 25) * clamp(s / 10); if (a <= 0) continue;
|
|
538
|
+
const p = ctPoint(ct, s), [sx, sy] = toScreen(c, p[0], p[1]);
|
|
539
|
+
glowAt(sx, sy, 22, 0.3 * a, '238,210,150'); glowAt(sx, sy, 5, 0.9 * a, '255,250,236'); // v5.2: nib sized to the 7.5 px pen
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
ctx.globalCompositeOperation = 'source-over';
|
|
543
|
+
}
|
|
544
|
+
function drawTextV5(c, t) { // small secondary line under the title, set like the old tagline, the pen's rules sign off
|
|
545
|
+
const tu = clamp((t - TT.enIn) / 0.9), te = easeOut(tu);
|
|
546
|
+
if (tu <= 0 || NOLINK.has('title')) return;
|
|
547
|
+
ctx.globalCompositeOperation = 'source-over'; ctx.filter = 'none';
|
|
548
|
+
applyCam(ctx, c);
|
|
549
|
+
const tag = TT.en, ts = TT.enSize, tt = 0.5, ty = TT.enY, cx = TT.cx;
|
|
550
|
+
ctx.font = `${TT.enW} ${ts}px 'Cormorant Garamond'`; ctx.textBaseline = 'alphabetic';
|
|
551
|
+
const tw = [...tag].map((ch) => ctx.measureText(ch).width);
|
|
552
|
+
const tf = tw.reduce((a, b) => a + b, 0) + tt * ts * (tag.length - 1);
|
|
553
|
+
let tx = cx - tf / 2;
|
|
554
|
+
ctx.globalAlpha = te * 0.95; ctx.fillStyle = '#E9D7A5';
|
|
555
|
+
[...tag].forEach((ch, i) => { ctx.fillText(ch, tx, ty + (1 - te) * 4); tx += tw[i] + tt * ts; });
|
|
556
|
+
const ru = easeIO(clamp((t - TT.rules[0]) / (TT.rules[1] - TT.rules[0]))), hl = 28 * ru, ry = ty - 0.3 * ts, gap = 1.1 * ts;
|
|
557
|
+
ctx.globalAlpha = 0.55 * te; const rh = 1 / c.z;
|
|
558
|
+
ctx.fillRect(cx - tf / 2 - gap - hl, ry - rh / 2, hl, rh); ctx.fillRect(cx + tf / 2 + gap, ry - rh / 2, hl, rh);
|
|
559
|
+
const gv = smooth(TT.rules[0] - 0.08, TT.rules[0] + 0.02, t) * (1 - smooth(TT.rules[1] - 0.05, TT.rules[1] + 0.15, t));
|
|
560
|
+
if (gv > 0) {
|
|
561
|
+
ctx.globalAlpha = 1;
|
|
562
|
+
const a = toScreen(c, cx - tf / 2 - gap - hl, ry), b = toScreen(c, cx + tf / 2 + gap + hl, ry);
|
|
563
|
+
ctx.setTransform(1, 0, 0, 1, 0, 0); ctx.globalCompositeOperation = 'lighter';
|
|
564
|
+
for (const [sx, sy] of [a, b]) { glowAt(sx, sy, 12, 0.3 * gv, '240,214,160'); glowAt(sx, sy, 2.2, 0.9 * gv, '255,250,236'); }
|
|
565
|
+
ctx.globalCompositeOperation = 'source-over';
|
|
566
|
+
}
|
|
567
|
+
ctx.globalAlpha = 1; ctx.setTransform(1, 0, 0, 1, 0, 0);
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
function drawFinish(t) {
|
|
571
|
+
ctx.setTransform(1, 0, 0, 1, 0, 0); ctx.filter = 'none';
|
|
572
|
+
const vg = ctx.createRadialGradient(W / 2, H / 2, H * 0.35, W / 2, H / 2, W * 0.66);
|
|
573
|
+
vg.addColorStop(0, 'rgba(0,0,0,0)'); vg.addColorStop(1, 'rgba(0,0,0,0.5)');
|
|
574
|
+
ctx.globalCompositeOperation = 'source-over'; ctx.fillStyle = vg; ctx.fillRect(0, 0, W, H);
|
|
575
|
+
const f = Math.floor(t * FPS + 1e-4), r = mulberry(f * 7919 + 13);
|
|
576
|
+
const ox = Math.floor(r() * 2048), oy = Math.floor(r() * 2048);
|
|
577
|
+
ctx.globalCompositeOperation = 'overlay'; ctx.globalAlpha = 0.1;
|
|
578
|
+
for (let x = -ox; x < W; x += 2048) for (let y = -oy; y < H; y += 2048) ctx.drawImage(grain, x, y);
|
|
579
|
+
ctx.globalAlpha = 1; ctx.globalCompositeOperation = 'source-over';
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
window.renderAt = async (t) => {
|
|
583
|
+
const c = camera(t);
|
|
584
|
+
const sHead = headS(clamp(t, 0, T_END));
|
|
585
|
+
drawBackground(c, t);
|
|
586
|
+
drawMotes(c, t);
|
|
587
|
+
const inh = smooth(cues.anticip[0], cues.anticip[1], t) * (1 - smooth(FILL.start + FILL.swell - 0.05, FILL.start + FILL.swell + 0.1, t));
|
|
588
|
+
if (inh > 0 && !NOLINK.has('dot')) { applyCam(ctx, c); ctx.fillStyle = `rgba(2,4,9,${(0.14 * inh).toFixed(3)})`; ctx.beginPath(); ctx.arc(MCX, MCY, MR - 1, 0, Math.PI * 2); ctx.fill(); ctx.setTransform(1, 0, 0, 1, 0, 0); } // r2 inhale
|
|
589
|
+
const fu = drawFill(c, t);
|
|
590
|
+
drawLine(c, t, sHead);
|
|
591
|
+
if (V5) drawTitleLines(c, t);
|
|
592
|
+
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
|
593
|
+
ctx.globalCompositeOperation = 'screen'; // warm glow under a true-colour core
|
|
594
|
+
ctx.filter = 'blur(16px)'; ctx.globalAlpha = 0.2; ctx.drawImage(lineC, 0, 0);
|
|
595
|
+
ctx.filter = 'blur(3px)'; ctx.globalAlpha = 0.3; ctx.drawImage(lineC, 0, 0);
|
|
596
|
+
ctx.filter = 'none'; ctx.globalAlpha = 1; ctx.globalCompositeOperation = 'source-over';
|
|
597
|
+
ctx.drawImage(lineC, 0, 0);
|
|
598
|
+
if (t > PULSE.start && t < PULSE.end + 0.4) { ctx.globalCompositeOperation = 'screen'; ctx.filter = 'blur(2px)'; ctx.drawImage(pulseC, 0, 0); ctx.filter = 'none'; ctx.globalCompositeOperation = 'source-over'; }
|
|
599
|
+
if (fu > 0) { // fill bloom: peaks one frame after the onset, settles to a soft halo
|
|
600
|
+
const fb = 0.1 + 0.36 * Math.exp(-(((t - FILL.start - 0.033) / 0.11) ** 2)); // r2: bloom capped at 60 %
|
|
601
|
+
ctx.globalCompositeOperation = 'screen';
|
|
602
|
+
ctx.filter = 'blur(28px)'; ctx.globalAlpha = clamp(fb); ctx.drawImage(fillC, 0, 0);
|
|
603
|
+
ctx.filter = 'blur(80px)'; ctx.globalAlpha = clamp(0.3 * Math.exp(-(((t - FILL.start - 0.05) / 0.2) ** 2))); ctx.drawImage(fillC, 0, 0);
|
|
604
|
+
}
|
|
605
|
+
ctx.filter = 'none'; ctx.globalAlpha = 1; ctx.globalCompositeOperation = 'source-over';
|
|
606
|
+
if (!NOLINK.has('tip')) drawTip(c, t);
|
|
607
|
+
if (V5) { drawTitleTips(c, t); drawTextV5(c, t); } else drawText(c, t);
|
|
608
|
+
drawFinish(t);
|
|
609
|
+
};
|
|
610
|
+
|
|
611
|
+
// ---------------------------------------------------------------- v5 link elements (1920x1080 frame px), a pure function of t
|
|
612
|
+
const hex = (col) => '#' + col.map((v) => Math.round(clamp(v, 0, 255)).toString(16).padStart(2, '0')).join('');
|
|
613
|
+
if (V5) window.linkAt = (t) => {
|
|
614
|
+
const c = camera(t), sHead = headS(clamp(t, 0, T_END)), out = [];
|
|
615
|
+
const [dx, dy] = toScreen(c, MCX, MCY);
|
|
616
|
+
if (t < FILL.start) { // the gold ring the line draws around the sun (6.458–6.97), then the doorway inside it
|
|
617
|
+
const ringFrac = clamp((sHead - pieceStart.ring) / (pieceEnd.ring - pieceStart.ring));
|
|
618
|
+
const an = smooth(cues.anticip[0], cues.anticip[1], t);
|
|
619
|
+
out.push({ id: 'dot', type: 'circle', x: dx, y: dy, r: MR * c.z, a: ringFrac, look: 'ring', fill: '#0B1320', stroke: hex(lineColor(1 + 0.6 * an)),
|
|
620
|
+
sw: LW * (1 - 0.5 * an), drawn: ringFrac, note: 'gold ring drawn by the one line (sun); navy inside; a/drawn = fraction of the circle drawn' });
|
|
621
|
+
} else { // the ring floods inward into the gold coin (medallion with a carved doorway)
|
|
622
|
+
const u = clamp((t - FILL.start) / FILL.swell), e = easeSwell(u);
|
|
623
|
+
const OV = cues.overshoot, ov = t < OV[1] ? smooth(OV[0], OV[1], t) : 1 - smooth(OV[1], OV[2], t);
|
|
624
|
+
out.push({ id: 'dot', type: 'circle', x: dx, y: dy, r: (MR + 1.5 / c.z + MR * 0.04 * ov) * c.z, a: 1, look: 'coin', fill: '#DDC284', stroke: '#FFF6DC', sw: 1.5,
|
|
625
|
+
grad: ['#F2E0AE', '#A8874E'], fill_frac: e, note: 'gold coin: brushed-gold disc (gradient top-left #F2E0AE → bottom-right #A8874E), 1.5 px bevel, dark arched doorway carved in; fill_frac = swell (inner radius = r·(1−fill_frac))' });
|
|
626
|
+
}
|
|
627
|
+
const vis = 1 - smooth(cues.tip_fade[0], cues.tip_fade[1], t);
|
|
628
|
+
if (vis > 0) { const p = tipAt(t), [sx, sy] = toScreen(c, p[0], p[1]);
|
|
629
|
+
out.push({ id: 'tip', type: 'circle', x: sx, y: sy, r: 15, a: vis, look: 'glow', fill: '#FFFAEC', stroke: '#EED296', sw: 0, note: 'pen nib: hot core r≈3 px + 15 px gold glow; it draws the one line' }); }
|
|
630
|
+
const lineAt = (s0, s1) => { // the drawn part of a straight run of the line (world y 740), with its current colour
|
|
631
|
+
const i = idxAtS((s0 + s1) / 2), age = t - TD[i], sp = TOTAL * (1 - easePulse(clamp((t - PULSE.start) / (PULSE.end - PULSE.start))));
|
|
632
|
+
let b = FLOOR[i] + (1 - FLOOR[i]) * (1 - smooth(0.2, 1.5, age)); if (t > PULSE.start) b = Math.max(b, lerp(FLOOR[i], 0.74, clamp((S[i] - sp) / 260)));
|
|
633
|
+
return hex(lineColor(b));
|
|
634
|
+
};
|
|
635
|
+
if (sHead > pieceStart.horizon) { // the horizon: the longest clean straight stretch of the line
|
|
636
|
+
const s1 = Math.min(sHead, pieceEnd.horizon), p0 = toScreen(c, X[idxAtS(pieceStart.horizon)], 740), p1 = toScreen(c, X[idxAtS(s1)], 740);
|
|
637
|
+
out.push({ id: 'line', type: 'line', x0: p0[0], y0: p0[1], x1: p1[0], y1: p1[1], w: LW, a: clamp((s1 - pieceStart.horizon) / 40), stroke: lineAt(pieceStart.horizon, s1),
|
|
638
|
+
note: 'horizon: the gold line runs flat from the last tower to the wave (drawn 5.135–5.393), left → right' });
|
|
639
|
+
}
|
|
640
|
+
if (sHead >= pieceEnd.horizon) {
|
|
641
|
+
const pf = smooth(cues.camera.poster_from + 0.1, cues.camera.poster_to - 0.1, t), g0 = toScreen(c, lerp(-160, 226, pf), 740), g1 = toScreen(c, 1600, 740);
|
|
642
|
+
out.push({ id: 'ground', type: 'line', x0: g0[0], y0: g0[1], x1: g1[0], y1: g1[1], w: LW, a: 1, stroke: lineAt(pieceStart.horizon, pieceEnd.horizon),
|
|
643
|
+
note: 'the whole baseline (ground + horizon) the city stands on; buildings rise from it' });
|
|
644
|
+
}
|
|
645
|
+
if (TITLE && t >= TT.start) {
|
|
646
|
+
const [x0, y0, x1, y1] = TITLE.box, [cx, cy] = toScreen(c, (x0 + x1) / 2, (y0 + y1) / 2);
|
|
647
|
+
const prog = TITLE.glyphs.reduce((a, g) => a + titleS(g, t) / g.Lmax, 0) / TITLE.glyphs.length;
|
|
648
|
+
out.push({ id: 'title', type: 'rect', x: cx, y: cy, w: (x1 - x0) * c.z, h: (y1 - y0) * c.z, rot: c.roll, a: prog, stroke: '#E9D7A5', sw: TT.lw,
|
|
649
|
+
fill: '#E9D7A5', fill_a: TT.fill * TITLE.glyphs.reduce((a, g) => a + easeOut(clamp((t - (g.t0 + TT.dur - TT.floodIn)) / TT.flood)), 0) / TITLE.glyphs.length,
|
|
650
|
+
note: '线条动画 outline type written by the gold line: ' + TT.lw + ' px gold outline (box = outline centreline) + soft gold inner fill (fill_a = fill opacity); a = fraction drawn (fully drawn ≥ ' + TITLE.end.toFixed(2) + ')' });
|
|
651
|
+
}
|
|
652
|
+
return out;
|
|
653
|
+
};
|
|
654
|
+
|
|
655
|
+
// timing export for audio (tools/dump_timing.mjs)
|
|
656
|
+
window.__timing = () => {
|
|
657
|
+
const out = { total: TOTAL, t_end: T_END, speed: [], corners: [], pieces: {} };
|
|
658
|
+
{ const target = 1 - (pieceStart.seed + 30) / TOTAL; let tt = PULSE.start; while (tt < PULSE.end && easePulse((tt - PULSE.start) / (PULSE.end - PULSE.start)) < target) tt += 1 / 600; out.pulse_home = +tt.toFixed(4); }
|
|
659
|
+
for (const pc of PIECES) out.pieces[pc.n] = [+TD[idxAtS(pieceStart[pc.n])].toFixed(4), +TD[Math.min(N - 1, idxAtS(pieceEnd[pc.n]))].toFixed(4), +(pieceEnd[pc.n] - pieceStart[pc.n]).toFixed(1), +(tauAtS(pieceEnd[pc.n]) - tauAtS(pieceStart[pc.n])).toFixed(1)];
|
|
660
|
+
for (let k = 0; k <= 1200; k++) {
|
|
661
|
+
const t = k / 120, c = camera(t);
|
|
662
|
+
const a = tipAt(t - 1 / 240), b = tipAt(t + 1 / 240);
|
|
663
|
+
out.speed.push(+(Math.hypot(b[0] - a[0], b[1] - a[1]) * 240 * c.z).toFixed(1));
|
|
664
|
+
}
|
|
665
|
+
let lastT = -1;
|
|
666
|
+
for (let i = 1; i < N - 1; i++) {
|
|
667
|
+
if (CORN[i] > 0.05 && CORN[i] >= CORN[i - 1] && CORN[i] >= CORN[i + 1] && TD[i] - lastT > 0.05) {
|
|
668
|
+
out.corners.push({ t: +TD[i].toFixed(4), piece: PIECES[P[i]].n, k: +CORN[i].toFixed(3), x: +X[i].toFixed(1) });
|
|
669
|
+
lastT = TD[i];
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
return out;
|
|
673
|
+
};
|
|
674
|
+
|
|
675
|
+
if (Q.has('t')) await window.renderAt(+Q.get('t'));
|
|
676
|
+
window.__ready = true;
|