dsh-drawai 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/lib/index.js +7777 -7719
- package/lib/motion/asset-pack.js +394 -394
- package/lib/motion/assets.js +291 -291
- package/lib/motion/demo-assets-lock.js +10 -10
- package/lib/motion/mgstyles/vendor/README.md +28 -28
- package/lib/motion/mgstyles/vendor/modules/d3/LICENSE +13 -13
- package/lib/motion/mgstyles/vendor/modules/d3/dist/d3.min.js +2 -2
- package/lib/motion/mgstyles/vendor/modules/opentype.js/LICENSE +20 -20
- package/lib/motion/mgstyles/vendor/modules/opentype.js/dist/opentype.mjs +14460 -14460
- package/lib/motion/mgstyles/vendor/modules/simplex-noise/LICENSE +21 -21
- package/lib/motion/mgstyles/vendor/modules/simplex-noise/dist/esm/simplex-noise.js +465 -465
- package/lib/motion/mgstyles/vendor/modules/topojson-client/LICENSE +13 -13
- package/lib/motion/mgstyles/vendor/modules/topojson-client/dist/topojson-client.min.js +2 -2
- package/lib/motion/render.js +179 -179
- package/lib/motion/shotcraft/upstream/SKILL.md +286 -286
- package/lib/motion/shotcraft/upstream/assets/lib/Caption.tsx +54 -54
- package/lib/motion/shotcraft/upstream/assets/lib/ClipCard.tsx +200 -200
- package/lib/motion/shotcraft/upstream/assets/lib/DigitRoll.tsx +45 -45
- package/lib/motion/shotcraft/upstream/assets/lib/FlashCut.tsx +20 -20
- package/lib/motion/shotcraft/upstream/assets/lib/FlatPanel.tsx +65 -65
- package/lib/motion/shotcraft/upstream/assets/lib/PageCam.tsx +151 -151
- package/lib/motion/shotcraft/upstream/assets/lib/VerticalTicker.tsx +129 -129
- package/lib/motion/shotcraft/upstream/assets/lib/helpers/camera.tsx +75 -75
- package/lib/motion/shotcraft/upstream/assets/lib/helpers/motion.ts +40 -40
- package/lib/motion/shotcraft/upstream/assets/lib/helpers/rand.ts +11 -11
- package/lib/motion/shotcraft/upstream/assets/lib/helpers/shake.ts +10 -10
- package/lib/motion/shotcraft/upstream/assets/scripts/build-readme-cover.mjs +49 -49
- package/lib/motion/shotcraft/upstream/assets/scripts/capture-template.mjs +210 -210
- package/lib/motion/shotcraft/upstream/assets/scripts/sfx-source.py +423 -423
- package/lib/motion/shotcraft/upstream/assets/scripts/smoke-render-demos.py +170 -170
- package/lib/motion/shotcraft/upstream/assets/scripts/test_sfx_source.py +157 -157
- package/lib/motion/shotcraft/upstream/demos/README.md +120 -120
- package/lib/motion/shotcraft/upstream/demos/_fixtures/Brand.tsx +112 -112
- package/lib/motion/shotcraft/upstream/demos/_fixtures/Fixtures.tsx +647 -647
- package/lib/motion/shotcraft/upstream/demos/_fixtures/Look.tsx +316 -316
- package/lib/motion/shotcraft/upstream/demos/_fixtures/Motion.tsx +82 -82
- package/lib/motion/shotcraft/upstream/demos/_fixtures/PageCam2D.tsx +115 -115
- package/lib/motion/shotcraft/upstream/demos/_fixtures/Polish.tsx +243 -243
- package/lib/motion/shotcraft/upstream/demos/_textures/live-layout.json +388 -388
- package/lib/motion/shotcraft/upstream/demos/camera/basic-3d-scene/Basic3DScene.tsx +250 -250
- package/lib/motion/shotcraft/upstream/demos/camera/crash-zoom-punch/CrashImpactReal.tsx +305 -305
- package/lib/motion/shotcraft/upstream/demos/camera/crash-zoom-punch/CrashZoomReal.tsx +246 -246
- package/lib/motion/shotcraft/upstream/demos/camera/cursor-flyover/CursorFlyover.tsx +390 -390
- package/lib/motion/shotcraft/upstream/demos/camera/depth-layer-moves/MultiplaneReal.tsx +138 -138
- package/lib/motion/shotcraft/upstream/demos/camera/graze-face-tour/GrazeFaceTour.tsx +542 -542
- package/lib/motion/shotcraft/upstream/demos/camera/overhead-camera-moves/OverheadTabletopDrop.tsx +315 -315
- package/lib/motion/shotcraft/upstream/demos/camera/overhead-camera-moves/TiltReveal.tsx +299 -299
- package/lib/motion/shotcraft/upstream/demos/camera/space-camera-moves/DroneDiveLanding.tsx +173 -173
- package/lib/motion/shotcraft/upstream/demos/camera/space-camera-moves/ExplodedView.tsx +348 -348
- package/lib/motion/shotcraft/upstream/demos/camera/steep-tilt-glide/SteepTiltGlide.tsx +366 -366
- package/lib/motion/shotcraft/upstream/demos/camera/tension-camera-moves/BulletTimeFreezeOrbit.tsx +279 -279
- package/lib/motion/shotcraft/upstream/demos/camera/tension-camera-moves/PullBackIsolation.tsx +184 -184
- package/lib/motion/shotcraft/upstream/demos/camera/terminal-3d/Terminal3D.tsx +390 -390
- package/lib/motion/shotcraft/upstream/demos/data/before-after-slider-scrub/BeforeAfterSliderScrub.tsx +155 -155
- package/lib/motion/shotcraft/upstream/demos/data/chart-live-moves/AxisRescaleShockV2.tsx +303 -303
- package/lib/motion/shotcraft/upstream/demos/data/chart-live-moves/OscilloscopeStreamV2.tsx +290 -290
- package/lib/motion/shotcraft/upstream/demos/data/chart-live-moves/UnitDotSwarmRegroupV2.tsx +278 -278
- package/lib/motion/shotcraft/upstream/demos/data/gauge-readout-moves/NeedleSweepSelftest.tsx +307 -307
- package/lib/motion/shotcraft/upstream/demos/data/gauge-readout-moves/TapeScrollFixedPointer.tsx +215 -215
- package/lib/motion/shotcraft/upstream/demos/data/scroll-brake-moves/BrakeReticleLock.tsx +299 -299
- package/lib/motion/shotcraft/upstream/demos/data/scroll-brake-moves/ChangelogScrollBrake.tsx +232 -232
- package/lib/motion/shotcraft/upstream/demos/data/timeline-travel/TimelineTravel.tsx +290 -290
- package/lib/motion/shotcraft/upstream/demos/effects/assemble-then-type-flyin/AssembleThenTypeFlyin.tsx +273 -273
- package/lib/motion/shotcraft/upstream/demos/effects/aurora-bloom-bg-flip/AuroraBloomBgFlip.tsx +167 -167
- package/lib/motion/shotcraft/upstream/demos/effects/brand-frame-snap/BrandFrameSnap.tsx +536 -536
- package/lib/motion/shotcraft/upstream/demos/effects/fui-hud-moves/ReticleLockOn.tsx +164 -164
- package/lib/motion/shotcraft/upstream/demos/effects/glow-flyline-moves/FlylineArc.tsx +175 -175
- package/lib/motion/shotcraft/upstream/demos/effects/glow-flyline-moves/GlowOrbAmbient.tsx +197 -197
- package/lib/motion/shotcraft/upstream/demos/effects/glow-flyline-moves/OrbFlylineRelay.tsx +241 -241
- package/lib/motion/shotcraft/upstream/demos/effects/icon-performance-moves/AttentionBounce.tsx +279 -279
- package/lib/motion/shotcraft/upstream/demos/effects/impact-feedback/AnimeImpact.tsx +230 -230
- package/lib/motion/shotcraft/upstream/demos/effects/impact-feedback/HitCounter.tsx +345 -345
- package/lib/motion/shotcraft/upstream/demos/effects/light-play-moves/SheenSweepRetry.tsx +275 -275
- package/lib/motion/shotcraft/upstream/demos/effects/light-play-moves/SpotlightSweepReveal.tsx +229 -229
- package/lib/motion/shotcraft/upstream/demos/effects/radial-ripple-phone-chips/RadialRipplePhoneChips.tsx +312 -312
- package/lib/motion/shotcraft/upstream/demos/effects/riso-print-hits/RisoMisregistrationHit.tsx +222 -222
- package/lib/motion/shotcraft/upstream/demos/effects/scan-bracket-sweep/ScanBracketSweep.tsx +295 -295
- package/lib/motion/shotcraft/upstream/demos/effects/scanline-annotate-focus/ScanlineAnnotateFocus.tsx +329 -329
- package/lib/motion/shotcraft/upstream/demos/effects/scanline-assemble-flyin/ScanlineAssembleFlyin.tsx +315 -315
- package/lib/motion/shotcraft/upstream/demos/effects/slam-entrance-moves/ImpactBurstKit.tsx +264 -264
- package/lib/motion/shotcraft/upstream/demos/effects/slam-entrance-moves/KanadaPerspectiveSnap.tsx +260 -260
- package/lib/motion/shotcraft/upstream/demos/effects/slam-entrance-moves/ScoreSlam.tsx +263 -263
- package/lib/motion/shotcraft/upstream/demos/effects/spotlight-sweep-moves/CornerSpotlightReveal.tsx +123 -123
- package/lib/motion/shotcraft/upstream/demos/effects/spotlight-sweep-moves/GlowWakeSleepPanel.tsx +187 -187
- package/lib/motion/shotcraft/upstream/demos/effects/spotlight-sweep-moves/SlideSpotlightPan.tsx +175 -175
- package/lib/motion/shotcraft/upstream/demos/interaction/autolayout-gap-dial/AutolayoutGapDial.tsx +305 -305
- package/lib/motion/shotcraft/upstream/demos/interaction/canvas-materialize-moves/DiagramCascadeBuild.tsx +350 -350
- package/lib/motion/shotcraft/upstream/demos/interaction/canvas-materialize-moves/PanelToCanvasMaterialize.tsx +352 -352
- package/lib/motion/shotcraft/upstream/demos/interaction/chip-grid-single-select-blackout/ChipGridSingleSelectBlackout.tsx +218 -218
- package/lib/motion/shotcraft/upstream/demos/interaction/collab-cursor-moves/CursorCastEnsemble.tsx +297 -297
- package/lib/motion/shotcraft/upstream/demos/interaction/glass-pill-dictation-typing/GlassPillDictationTyping.tsx +157 -157
- package/lib/motion/shotcraft/upstream/demos/interaction/hashtag-to-pill-materialize/HashtagToPillMaterialize.tsx +218 -218
- package/lib/motion/shotcraft/upstream/demos/interaction/picker-carousel-feature-cycle/PickerCarouselFeatureCycle.tsx +202 -202
- package/lib/motion/shotcraft/upstream/demos/interaction/segmented-thumb-hero/SegmentedThumbHero.tsx +265 -265
- package/lib/motion/shotcraft/upstream/demos/interaction/theme-switch-moves/PaletteThemeRipple.tsx +457 -457
- package/lib/motion/shotcraft/upstream/demos/interaction/theme-switch-moves/ThemeSweepToggle.tsx +446 -446
- package/lib/motion/shotcraft/upstream/demos/interaction/type-and-filter/TypeAndFilter.tsx +249 -249
- package/lib/motion/shotcraft/upstream/demos/interaction/voice-waveform-live/VoiceWaveformLive.tsx +278 -278
- package/lib/motion/shotcraft/upstream/demos/opening/crane-rise-reveal/CraneRiseReveal.tsx +332 -332
- package/lib/motion/shotcraft/upstream/demos/opening/dataviz-landscape-open/DatavizLandscapeOpen.tsx +358 -358
- package/lib/motion/shotcraft/upstream/demos/opening/fracture/Fracture.tsx +201 -201
- package/lib/motion/shotcraft/upstream/demos/opening/icon-field-colorize/IconFieldColorize.tsx +200 -200
- package/lib/motion/shotcraft/upstream/demos/opening/letterspace-materialize/LetterspaceMaterialize.tsx +208 -208
- package/lib/motion/shotcraft/upstream/demos/opening/magician-card-flourish/MagicianCardFlourish.tsx +341 -341
- package/lib/motion/shotcraft/upstream/demos/opening/orbit-ring-title-open/OrbitRingTitleOpen.tsx +389 -389
- package/lib/motion/shotcraft/upstream/demos/opening/spotlight-hero-card/SpotlightHeroCard.tsx +293 -293
- package/lib/motion/shotcraft/upstream/demos/opening/stroke-segment-build/StrokeSegmentBuild.tsx +183 -183
- package/lib/motion/shotcraft/upstream/demos/opening/text-as-mask/TextAsMask.tsx +245 -245
- package/lib/motion/shotcraft/upstream/demos/outro/grain-dissolve/GrainDissolve.tsx +222 -222
- package/lib/motion/shotcraft/upstream/demos/outro/logo-shrink-wordmark-lockup/LogoShrinkWordmarkLockup.tsx +223 -223
- package/lib/motion/shotcraft/upstream/demos/outro/neon-triple-marquee/NeonTripleMarquee.tsx +217 -217
- package/lib/motion/shotcraft/upstream/demos/outro/outro-group-photo-launch/OutroGroupPhotoLaunch.tsx +343 -343
- package/lib/motion/shotcraft/upstream/demos/outro/ui-strip-away-outro/UiStripAwayOutro.tsx +357 -357
- package/lib/motion/shotcraft/upstream/demos/outro/ui-to-brand-morph/IconFlipBloomLogo.tsx +187 -187
- package/lib/motion/shotcraft/upstream/demos/outro/ui-to-brand-morph/InputMorphsIntoLogo.tsx +333 -333
- package/lib/motion/shotcraft/upstream/demos/rhythm/beat-cut-moves/PaparazziFlash.tsx +274 -274
- package/lib/motion/shotcraft/upstream/demos/rhythm/beat-step-list-theme-cycle/BeatStepListThemeCycle.tsx +270 -270
- package/lib/motion/shotcraft/upstream/demos/rhythm/panel-grid-moves/ComicPanelSplit.tsx +430 -430
- package/lib/motion/shotcraft/upstream/demos/rhythm/quad-split-parallel-scenes/QuadSplitParallelScenes.tsx +252 -252
- package/lib/motion/shotcraft/upstream/demos/rhythm/rhythm-interrupt-moves/JumpCutPunchIn.tsx +106 -106
- package/lib/motion/shotcraft/upstream/demos/rhythm/sakuga-timing-shift/SakugaTimingShift.tsx +288 -288
- package/lib/motion/shotcraft/upstream/demos/rhythm/speed-ramp-freeze/FreezeAnnotateReal.tsx +362 -362
- package/lib/motion/shotcraft/upstream/demos/rhythm/trailer-grammar-moves/TrailerBumper.tsx +168 -168
- package/lib/motion/shotcraft/upstream/demos/transition/bottom-push-stack-wipe/BottomPushStackWipe.tsx +310 -310
- package/lib/motion/shotcraft/upstream/demos/transition/card-flip-reveal/CardFlipReveal.tsx +261 -261
- package/lib/motion/shotcraft/upstream/demos/transition/card-flock-tumble/CardFlockTumble.tsx +459 -459
- package/lib/motion/shotcraft/upstream/demos/transition/circle-match-iris/CircleMatchIris.tsx +294 -294
- package/lib/motion/shotcraft/upstream/demos/transition/gradient-transition/GradientTransition.tsx +161 -161
- package/lib/motion/shotcraft/upstream/demos/transition/line-carry-transition/LineCarryTransition.tsx +248 -248
- package/lib/motion/shotcraft/upstream/demos/transition/mosaic-reframe/MosaicReframe.tsx +359 -359
- package/lib/motion/shotcraft/upstream/demos/transition/page-turn-transitions/BarnDoorSplit.tsx +227 -227
- package/lib/motion/shotcraft/upstream/demos/transition/print-texture-transitions/InkBleedReveal.tsx +162 -162
- package/lib/motion/shotcraft/upstream/demos/transition/shot-transitions/PortalWipeV2.tsx +248 -248
- package/lib/motion/shotcraft/upstream/demos/transition/shot-transitions/WhipBrakeReal.tsx +186 -186
- package/lib/motion/shotcraft/upstream/demos/transition/tear-streak-transitions/GlitchDisplace.tsx +355 -355
- package/lib/motion/shotcraft/upstream/demos/transition/transition-hidden-cut/InvisibleCut.tsx +272 -272
- package/lib/motion/shotcraft/upstream/demos/transition/transition-hidden-cut/LightLeakBurn.tsx +262 -262
- package/lib/motion/shotcraft/upstream/demos/transition/transition-hidden-cut/VersusSlam.tsx +217 -217
- package/lib/motion/shotcraft/upstream/demos/transition/transition-travel/LetterformZoom.tsx +285 -285
- package/lib/motion/shotcraft/upstream/demos/transition/white-flash-logo-simplify-cut/WhiteFlashLogoSimplifyCut.tsx +205 -205
- package/lib/motion/shotcraft/upstream/demos/transition/wipe-transitions/BlindsSlice.tsx +178 -178
- package/lib/motion/shotcraft/upstream/demos/typography/blur-slide/BlurSlide.tsx +147 -147
- package/lib/motion/shotcraft/upstream/demos/typography/brace-expand/BraceExpand.tsx +143 -143
- package/lib/motion/shotcraft/upstream/demos/typography/brand-ink-open/BrandInkOpen.tsx +134 -134
- package/lib/motion/shotcraft/upstream/demos/typography/countdown-arc-scatter/CountdownArcScatter.tsx +217 -217
- package/lib/motion/shotcraft/upstream/demos/typography/flying-words/FlyingWords.tsx +198 -198
- package/lib/motion/shotcraft/upstream/demos/typography/glitch-cycle/GlitchCycle.tsx +221 -221
- package/lib/motion/shotcraft/upstream/demos/typography/gradient-word-sweep/GradientWordSweep.tsx +312 -312
- package/lib/motion/shotcraft/upstream/demos/typography/lead-word-zoom-assemble/LeadWordZoomAssemble.tsx +261 -261
- package/lib/motion/shotcraft/upstream/demos/typography/marker-underline-title/MarkerUnderlineTitle.tsx +121 -121
- package/lib/motion/shotcraft/upstream/demos/typography/outline-word-fill/OutlineWordFill.tsx +153 -153
- package/lib/motion/shotcraft/upstream/demos/typography/paper-title-card/PaperTitleCard.tsx +179 -179
- package/lib/motion/shotcraft/upstream/demos/typography/pill-chip-slot-cycle-handled/PillChipSlotCycleHandled.tsx +140 -140
- package/lib/motion/shotcraft/upstream/demos/typography/pill-slot-cycle/PillSlotCycle.tsx +309 -309
- package/lib/motion/shotcraft/upstream/demos/typography/text-column-converge/TextColumnConverge.tsx +191 -191
- package/lib/motion/shotcraft/upstream/demos/typography/title-demote-to-label/TitleDemoteToLabel.tsx +292 -292
- package/lib/motion/shotcraft/upstream/demos/typography/type-assembly-moves/LetterformDriftAssembly.tsx +135 -135
- package/lib/motion/shotcraft/upstream/demos/typography/type-assembly-moves/SplitTextStagger.tsx +124 -124
- package/lib/motion/shotcraft/upstream/demos/typography/type-assembly-moves/TextOnPath.tsx +255 -255
- package/lib/motion/shotcraft/upstream/demos/typography/type-entrance-moves/LetterDropPhysics.tsx +173 -173
- package/lib/motion/shotcraft/upstream/demos/typography/type-rhythm-sync/FontWeightPump.tsx +225 -225
- package/lib/motion/shotcraft/upstream/demos/typography/type-rhythm-sync/KaraokeFillSync.tsx +141 -141
- package/lib/motion/shotcraft/upstream/demos/typography/typewriter-moves/TypewriterErrorRetype.tsx +137 -137
- package/lib/motion/shotcraft/upstream/demos/typography/vertical-word-roll-blur-cycle/VerticalWordRollBlurCycle.tsx +147 -147
- package/lib/motion/shotcraft/upstream/demos/typography/word-relay-filmstrip/WordRelayFilmstrip.tsx +409 -409
- package/lib/motion/shotcraft/upstream/demos/typography/word-relay-geometry/WordRelayGeometry.tsx +280 -280
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/avatar-bracket-carousel/AvatarBracketCarousel.tsx +271 -271
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/bezier-source-converge-merge/BezierSourceConvergeMerge.tsx +385 -385
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/card-stack/CardStack.tsx +312 -312
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/carousel-3d/Carousel3D.tsx +303 -303
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/clipcard-looping/ClipCardLooping.tsx +77 -77
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/cloner-depth-echo/ClonerDepthEcho.tsx +311 -311
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/deck-deal-flyin/DeckDealFlyin.tsx +307 -307
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/doc-park-left-pill-deal/DocParkLeftPillDeal.tsx +349 -349
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/document-typewriter-reveal/DocumentTypewriterReveal.tsx +255 -255
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/draw-svg-trace/DrawSvgTrace.tsx +244 -244
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/element-body-moves/ContactShadowLift.tsx +217 -217
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/integration-hub-map/IntegrationHubMap.tsx +652 -652
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/list-reveal/ListReveal.tsx +153 -153
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/list-stack-press/ListStackPress.tsx +238 -238
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/neon-frame-forerun/NeonFrameForerun.tsx +324 -324
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/neon-frame-orbit-drop/NeonFrameForerunOrbit.tsx +354 -354
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/page-waterfall-wall/PageWaterfallWall.tsx +101 -101
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/page-waterfall-wall/VerticalTicker.tsx +129 -129
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/product-card-progressive-assemble/ProductCardProgressiveAssemble.tsx +297 -297
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/radial-wave/RadialWave.tsx +57 -57
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/research-card-stack-scroll/ResearchCardStackScroll.tsx +155 -155
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/row-embed/RowEmbed.tsx +175 -175
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/value-stagger-gradient/ValueStaggerGradient.tsx +153 -153
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/wall-reveal-moves/BentoLightUp.tsx +146 -146
- package/lib/motion/shotcraft/upstream/demos/ui-entrance/wall-reveal-moves/WireframeDrawOn.tsx +226 -226
- package/lib/motion/shotcraft/upstream/gallery/api/library.json +1 -1
- package/lib/motion/shotcraft/upstream/references/aesthetic-rules.md +193 -193
- package/lib/motion/shotcraft/upstream/references/final-review.md +121 -121
- package/lib/motion/shotcraft/upstream/references/guided-free-creation.md +199 -199
- package/lib/motion/shotcraft/upstream/references/jianying-export.md +183 -183
- package/lib/motion/shotcraft/upstream/references/music-beat-sync.md +257 -257
- package/lib/motion/shotcraft/upstream/references/pipeline.md +382 -382
- package/lib/motion/shotcraft/upstream/references/publish-upload-post.md +111 -111
- package/lib/motion/shotcraft/upstream/references/sequences/promo-energy-arc.md +50 -50
- package/lib/motion/shotcraft/upstream/references/sfx-sourcing.md +95 -95
- package/lib/motion/shotcraft/upstream/references/shots/camera/basic-3d-scene.md +41 -41
- package/lib/motion/shotcraft/upstream/references/shots/camera/crash-zoom-punch.md +52 -52
- package/lib/motion/shotcraft/upstream/references/shots/camera/cursor-flyover.md +39 -39
- package/lib/motion/shotcraft/upstream/references/shots/camera/depth-layer-moves.md +39 -39
- package/lib/motion/shotcraft/upstream/references/shots/camera/graze-face-tour.md +57 -57
- package/lib/motion/shotcraft/upstream/references/shots/camera/overhead-camera-moves.md +51 -51
- package/lib/motion/shotcraft/upstream/references/shots/camera/space-camera-moves.md +46 -46
- package/lib/motion/shotcraft/upstream/references/shots/camera/steep-tilt-glide.md +52 -52
- package/lib/motion/shotcraft/upstream/references/shots/camera/tension-camera-moves.md +43 -43
- package/lib/motion/shotcraft/upstream/references/shots/camera/terminal-3d.md +42 -42
- package/lib/motion/shotcraft/upstream/references/shots/data/before-after-slider-scrub.md +48 -48
- package/lib/motion/shotcraft/upstream/references/shots/data/chart-live-moves.md +52 -52
- package/lib/motion/shotcraft/upstream/references/shots/data/gauge-readout-moves.md +45 -45
- package/lib/motion/shotcraft/upstream/references/shots/data/scroll-brake-moves.md +46 -46
- package/lib/motion/shotcraft/upstream/references/shots/data/timeline-travel.md +44 -44
- package/lib/motion/shotcraft/upstream/references/shots/effects/assemble-then-type-flyin.md +63 -63
- package/lib/motion/shotcraft/upstream/references/shots/effects/aurora-bloom-bg-flip.md +54 -54
- package/lib/motion/shotcraft/upstream/references/shots/effects/brand-frame-snap.md +58 -58
- package/lib/motion/shotcraft/upstream/references/shots/effects/fui-hud-moves.md +35 -35
- package/lib/motion/shotcraft/upstream/references/shots/effects/glow-flyline-moves.md +53 -53
- package/lib/motion/shotcraft/upstream/references/shots/effects/icon-performance-moves.md +42 -42
- package/lib/motion/shotcraft/upstream/references/shots/effects/impact-feedback.md +50 -50
- package/lib/motion/shotcraft/upstream/references/shots/effects/light-play-moves.md +46 -46
- package/lib/motion/shotcraft/upstream/references/shots/effects/radial-ripple-phone-chips.md +56 -56
- package/lib/motion/shotcraft/upstream/references/shots/effects/riso-print-hits.md +49 -49
- package/lib/motion/shotcraft/upstream/references/shots/effects/scan-bracket-sweep.md +50 -50
- package/lib/motion/shotcraft/upstream/references/shots/effects/scanline-annotate-focus.md +53 -53
- package/lib/motion/shotcraft/upstream/references/shots/effects/scanline-assemble-flyin.md +53 -53
- package/lib/motion/shotcraft/upstream/references/shots/effects/slam-entrance-moves.md +55 -55
- package/lib/motion/shotcraft/upstream/references/shots/effects/spotlight-sweep-moves.md +52 -52
- package/lib/motion/shotcraft/upstream/references/shots/interaction/autolayout-gap-dial.md +60 -60
- package/lib/motion/shotcraft/upstream/references/shots/interaction/canvas-materialize-moves.md +57 -57
- package/lib/motion/shotcraft/upstream/references/shots/interaction/chip-grid-single-select-blackout.md +51 -51
- package/lib/motion/shotcraft/upstream/references/shots/interaction/collab-cursor-moves.md +41 -41
- package/lib/motion/shotcraft/upstream/references/shots/interaction/glass-pill-dictation-typing.md +53 -53
- package/lib/motion/shotcraft/upstream/references/shots/interaction/hashtag-to-pill-materialize.md +60 -60
- package/lib/motion/shotcraft/upstream/references/shots/interaction/picker-carousel-feature-cycle.md +55 -55
- package/lib/motion/shotcraft/upstream/references/shots/interaction/segmented-thumb-hero.md +57 -57
- package/lib/motion/shotcraft/upstream/references/shots/interaction/theme-switch-moves.md +47 -47
- package/lib/motion/shotcraft/upstream/references/shots/interaction/type-and-filter.md +37 -37
- package/lib/motion/shotcraft/upstream/references/shots/interaction/voice-waveform-live.md +54 -54
- package/lib/motion/shotcraft/upstream/references/shots/opening/brand-ink-open.md +36 -36
- package/lib/motion/shotcraft/upstream/references/shots/opening/crane-rise-reveal.md +56 -56
- package/lib/motion/shotcraft/upstream/references/shots/opening/dataviz-landscape-open.md +56 -56
- package/lib/motion/shotcraft/upstream/references/shots/opening/fracture.md +40 -40
- package/lib/motion/shotcraft/upstream/references/shots/opening/icon-field-colorize.md +60 -60
- package/lib/motion/shotcraft/upstream/references/shots/opening/letterspace-materialize.md +57 -57
- package/lib/motion/shotcraft/upstream/references/shots/opening/magician-card-flourish.md +73 -73
- package/lib/motion/shotcraft/upstream/references/shots/opening/orbit-ring-title-open.md +87 -87
- package/lib/motion/shotcraft/upstream/references/shots/opening/spotlight-hero-card.md +55 -55
- package/lib/motion/shotcraft/upstream/references/shots/opening/stroke-segment-build.md +50 -50
- package/lib/motion/shotcraft/upstream/references/shots/opening/text-as-mask.md +59 -59
- package/lib/motion/shotcraft/upstream/references/shots/outro/grain-dissolve.md +38 -38
- package/lib/motion/shotcraft/upstream/references/shots/outro/logo-shrink-wordmark-lockup.md +38 -38
- package/lib/motion/shotcraft/upstream/references/shots/outro/neon-triple-marquee.md +59 -59
- package/lib/motion/shotcraft/upstream/references/shots/outro/outro-group-photo-launch.md +39 -39
- package/lib/motion/shotcraft/upstream/references/shots/outro/ui-strip-away-outro.md +61 -61
- package/lib/motion/shotcraft/upstream/references/shots/outro/ui-to-brand-morph.md +52 -52
- package/lib/motion/shotcraft/upstream/references/shots/rhythm/beat-cut-moves.md +50 -50
- package/lib/motion/shotcraft/upstream/references/shots/rhythm/beat-step-list-theme-cycle.md +66 -66
- package/lib/motion/shotcraft/upstream/references/shots/rhythm/panel-grid-moves.md +43 -43
- package/lib/motion/shotcraft/upstream/references/shots/rhythm/quad-split-parallel-scenes.md +38 -38
- package/lib/motion/shotcraft/upstream/references/shots/rhythm/rhythm-interrupt-moves.md +38 -38
- package/lib/motion/shotcraft/upstream/references/shots/rhythm/sakuga-timing-shift.md +56 -56
- package/lib/motion/shotcraft/upstream/references/shots/rhythm/speed-ramp-freeze.md +44 -44
- package/lib/motion/shotcraft/upstream/references/shots/rhythm/trailer-grammar-moves.md +38 -38
- package/lib/motion/shotcraft/upstream/references/shots/transition/bottom-push-stack-wipe.md +63 -63
- package/lib/motion/shotcraft/upstream/references/shots/transition/card-flip-reveal.md +57 -57
- package/lib/motion/shotcraft/upstream/references/shots/transition/card-flock-tumble.md +63 -63
- package/lib/motion/shotcraft/upstream/references/shots/transition/circle-match-iris.md +58 -58
- package/lib/motion/shotcraft/upstream/references/shots/transition/gradient-transition.md +45 -45
- package/lib/motion/shotcraft/upstream/references/shots/transition/line-carry-transition.md +55 -55
- package/lib/motion/shotcraft/upstream/references/shots/transition/mosaic-reframe.md +49 -49
- package/lib/motion/shotcraft/upstream/references/shots/transition/page-turn-transitions.md +42 -42
- package/lib/motion/shotcraft/upstream/references/shots/transition/print-texture-transitions.md +42 -42
- package/lib/motion/shotcraft/upstream/references/shots/transition/shot-transitions.md +45 -45
- package/lib/motion/shotcraft/upstream/references/shots/transition/tear-streak-transitions.md +48 -48
- package/lib/motion/shotcraft/upstream/references/shots/transition/transition-hidden-cut.md +55 -55
- package/lib/motion/shotcraft/upstream/references/shots/transition/transition-travel.md +43 -43
- package/lib/motion/shotcraft/upstream/references/shots/transition/white-flash-logo-simplify-cut.md +41 -41
- package/lib/motion/shotcraft/upstream/references/shots/transition/wipe-transitions.md +42 -42
- package/lib/motion/shotcraft/upstream/references/shots/typography/blur-slide.md +59 -59
- package/lib/motion/shotcraft/upstream/references/shots/typography/brace-expand.md +55 -55
- package/lib/motion/shotcraft/upstream/references/shots/typography/countdown-arc-scatter.md +65 -65
- package/lib/motion/shotcraft/upstream/references/shots/typography/document-typewriter-reveal.md +42 -42
- package/lib/motion/shotcraft/upstream/references/shots/typography/flying-words.md +64 -64
- package/lib/motion/shotcraft/upstream/references/shots/typography/glitch-cycle.md +64 -64
- package/lib/motion/shotcraft/upstream/references/shots/typography/gradient-word-sweep.md +54 -54
- package/lib/motion/shotcraft/upstream/references/shots/typography/lead-word-zoom-assemble.md +91 -91
- package/lib/motion/shotcraft/upstream/references/shots/typography/marker-underline-title.md +51 -51
- package/lib/motion/shotcraft/upstream/references/shots/typography/outline-word-fill.md +66 -66
- package/lib/motion/shotcraft/upstream/references/shots/typography/paper-title-card.md +38 -38
- package/lib/motion/shotcraft/upstream/references/shots/typography/pill-chip-slot-cycle-handled.md +66 -66
- package/lib/motion/shotcraft/upstream/references/shots/typography/pill-slot-cycle.md +58 -58
- package/lib/motion/shotcraft/upstream/references/shots/typography/text-column-converge.md +61 -61
- package/lib/motion/shotcraft/upstream/references/shots/typography/title-demote-to-label.md +64 -64
- package/lib/motion/shotcraft/upstream/references/shots/typography/type-assembly-moves.md +45 -45
- package/lib/motion/shotcraft/upstream/references/shots/typography/type-entrance-moves.md +41 -41
- package/lib/motion/shotcraft/upstream/references/shots/typography/type-rhythm-sync.md +51 -51
- package/lib/motion/shotcraft/upstream/references/shots/typography/typewriter-moves.md +42 -42
- package/lib/motion/shotcraft/upstream/references/shots/typography/vertical-word-roll-blur-cycle.md +63 -63
- package/lib/motion/shotcraft/upstream/references/shots/typography/word-relay-filmstrip.md +57 -57
- package/lib/motion/shotcraft/upstream/references/shots/typography/word-relay-geometry.md +75 -75
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/avatar-bracket-carousel.md +59 -59
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/bezier-source-converge-merge.md +67 -67
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/card-stack.md +60 -60
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/carousel-3d.md +66 -66
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/cloner-depth-echo.md +40 -40
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/deck-deal-flyin.md +45 -45
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/doc-park-left-pill-deal.md +62 -62
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/draw-svg-trace.md +55 -55
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/element-body-moves.md +37 -37
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/integration-hub-map.md +55 -55
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/list-reveal.md +50 -50
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/list-stack-press.md +43 -43
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/neon-frame-forerun.md +55 -55
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/neon-frame-orbit-drop.md +51 -51
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/page-waterfall-wall.md +51 -51
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/product-card-progressive-assemble.md +56 -56
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/radial-wave.md +49 -49
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/research-card-stack-scroll.md +57 -57
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/row-embed.md +36 -36
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/value-stagger-gradient.md +64 -64
- package/lib/motion/shotcraft/upstream/references/shots/ui-entrance/wall-reveal-moves.md +47 -47
- package/lib/motion/shotcraft/upstream/references/sound-design.md +170 -170
- package/lib/motion/shotcraft/upstream/references/workbench.md +157 -157
- package/lib/motion/shotcraft/upstream/template/TEMPLATE.md +103 -103
- package/lib/motion/shotcraft/upstream/template/THEMES.md +44 -44
- package/lib/motion/shotcraft/upstream/template/package.json +20 -20
- package/lib/motion/shotcraft/upstream/template/remotion.config.ts +6 -6
- package/lib/motion/shotcraft/upstream/template/src/Root.tsx +17 -17
- package/lib/motion/shotcraft/upstream/template/src/aifl/Caption.tsx +65 -65
- package/lib/motion/shotcraft/upstream/template/src/aifl/DigitRoll.tsx +48 -48
- package/lib/motion/shotcraft/upstream/template/src/aifl/FlashCut.tsx +24 -24
- package/lib/motion/shotcraft/upstream/template/src/aifl/Main.tsx +192 -192
- package/lib/motion/shotcraft/upstream/template/src/aifl/PaperTitleCard.tsx +111 -111
- package/lib/motion/shotcraft/upstream/template/src/aifl/live/PageCam.tsx +150 -150
- package/lib/motion/shotcraft/upstream/template/src/aifl/live/SceneDetail.tsx +158 -158
- package/lib/motion/shotcraft/upstream/template/src/aifl/live/SceneFlyIn.tsx +468 -468
- package/lib/motion/shotcraft/upstream/template/src/aifl/live/SceneOpen.tsx +552 -552
- package/lib/motion/shotcraft/upstream/template/src/aifl/live/SceneOutroLive.tsx +411 -411
- package/lib/motion/shotcraft/upstream/template/src/aifl/live/ScenePapers.tsx +200 -200
- package/lib/motion/shotcraft/upstream/template/src/aifl/live/SceneWbr.tsx +324 -324
- package/lib/motion/shotcraft/upstream/template/src/aifl/live-layout.json +388 -388
- package/lib/motion/shotcraft/upstream/template/src/index.ts +4 -4
- package/lib/motion/shotcraft/upstream/template/src/themes/ThemedFilm.tsx +7 -7
- package/lib/motion/shotcraft/upstream/template/src/themes/manifest.tsx +68 -68
- package/lib/motion/shotcraft/upstream/template/src/themes/palette-assets.json +1 -1
- package/lib/motion/shotcraft/upstream/template/src/themes/palette-assets.ts +24 -24
- package/lib/motion/shotcraft/upstream/template/src/themes/palettes.json +74 -74
- package/lib/motion/shotcraft/upstream/template/src/themes/visual-theme.tsx +91 -91
- package/lib/motion/shotcraft/upstream/template/src/workbench.ts +213 -213
- package/lib/motion/shotcraft/upstream/template/tsconfig.json +15 -15
- package/lib/motion/style-frames.js +306 -306
- package/lib/motion/sync.js +214 -214
- package/lib/motion-project.js +105 -105
- package/lib/motion-render-worker.js +174 -174
- package/lib/routing/router.js +222 -222
- package/lib/routing/vendor/README.md +96 -96
- package/lib/routing/vendor/libavoid-routing.js +753 -753
- package/lib/routing/vendor/libavoid.min.js +59 -59
- package/lib/video-trace-pool.js +128 -128
- package/package.json +1 -1
- package/LICENSE +0 -4175
|
@@ -1,316 +1,316 @@
|
|
|
1
|
-
// Look 视觉系统(第二轮改版)——给 demo 一套"成片级"的美术方向:调色板 LOOKS、字号阶梯 TYPE、
|
|
2
|
-
// 有光源与空间感的舞台 <Stage>、逐字/逐词/逐行揭示 <TextReveal>、错峰分布 stagger、
|
|
3
|
-
// 泛光 glow、单次扫光 <Sheen>、确定性粒子 <Dust>、透视网格地面 <GridFloor>。
|
|
4
|
-
// 全部是 props / frame 的纯函数,确定性渲染(无 Math.random / Date)。依赖 remotion + react + ./Polish。
|
|
5
|
-
// 可选共享件——copy demo 时连同 Polish.tsx 一并带上并改 import 路径。
|
|
6
|
-
import React from 'react';
|
|
7
|
-
import { spring, useCurrentFrame } from 'remotion';
|
|
8
|
-
import { EASE, FONT, Grain, Vignette, tracking } from './Polish';
|
|
9
|
-
|
|
10
|
-
// ───────────────────────── 调色板 ─────────────────────────
|
|
11
|
-
// 每个 look = 一套完整的明暗、表面、文字、强调色与光色。一个镜头只用一个 look;
|
|
12
|
-
// 强调色只给主角/关键信息,accent2 只做点缀(≤ 画面 5%)。
|
|
13
|
-
|
|
14
|
-
export type LookName = 'midnight' | 'aurora' | 'ember' | 'graphite' | 'lime' | 'paper' | 'porcelain' | 'sand';
|
|
15
|
-
|
|
16
|
-
export type Look = {
|
|
17
|
-
name: LookName;
|
|
18
|
-
dark: boolean;
|
|
19
|
-
bg: [string, string, string]; // 舞台纵向渐变:顶 / 中 / 底
|
|
20
|
-
light: string; // 主光颜色(舞台光斑)
|
|
21
|
-
surface: string; // 面板底色
|
|
22
|
-
surface2: string; // 面板内次级底色 / 输入框
|
|
23
|
-
line: string; // 发丝线
|
|
24
|
-
ink: string; // 主文字
|
|
25
|
-
ink2: string; // 次级文字
|
|
26
|
-
ink3: string; // 弱文字 / 刻度
|
|
27
|
-
accent: string;
|
|
28
|
-
accent2: string;
|
|
29
|
-
onAccent: string; // 强调色上的文字
|
|
30
|
-
shadow: string; // 阴影色(带色相)
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export const LOOKS: Record<LookName, Look> = {
|
|
34
|
-
// 深蓝夜:科技产品、AI、数据——冷静、电光蓝
|
|
35
|
-
midnight: {
|
|
36
|
-
name: 'midnight', dark: true, bg: ['#0d1426', '#090d1a', '#05070e'], light: '#3d63ff',
|
|
37
|
-
surface: '#111827', surface2: '#172036', line: 'rgba(160,190,255,0.12)',
|
|
38
|
-
ink: '#f2f5ff', ink2: '#a9b4d0', ink3: '#5d6883', accent: '#5b8cff', accent2: '#3ee6d0', onAccent: '#050816', shadow: '#000208',
|
|
39
|
-
},
|
|
40
|
-
// 极光:发布、品牌、魔法感——紫粉渐变光
|
|
41
|
-
aurora: {
|
|
42
|
-
name: 'aurora', dark: true, bg: ['#140d24', '#0b0816', '#06040c'], light: '#8b5cf6',
|
|
43
|
-
surface: '#151024', surface2: '#1e1733', line: 'rgba(200,170,255,0.13)',
|
|
44
|
-
ink: '#f7f2ff', ink2: '#b9acd6', ink3: '#6a5f86', accent: '#a78bfa', accent2: '#f472b6', onAccent: '#0b0616', shadow: '#030108',
|
|
45
|
-
},
|
|
46
|
-
// 余烬:冲击、速度、能量——暖黑 + 橙
|
|
47
|
-
ember: {
|
|
48
|
-
name: 'ember', dark: true, bg: ['#1c100a', '#100906', '#070403'], light: '#ff6a2a',
|
|
49
|
-
surface: '#1a120e', surface2: '#251913', line: 'rgba(255,190,150,0.12)',
|
|
50
|
-
ink: '#fff5ee', ink2: '#d4b6a4', ink3: '#7d6455', accent: '#ff6b2c', accent2: '#ffc24b', onAccent: '#140802', shadow: '#050100',
|
|
51
|
-
},
|
|
52
|
-
// 石墨:电影感、克制、高级——近单色暗场,白为强调
|
|
53
|
-
graphite: {
|
|
54
|
-
name: 'graphite', dark: true, bg: ['#17181b', '#0e0f11', '#08080a'], light: '#c8ccd6',
|
|
55
|
-
surface: '#16171a', surface2: '#1e2024', line: 'rgba(255,255,255,0.09)',
|
|
56
|
-
ink: '#f4f4f2', ink2: '#a3a5ab', ink3: '#5c5f66', accent: '#ffffff', accent2: '#e4c58a', onAccent: '#0a0a0b', shadow: '#000000',
|
|
57
|
-
},
|
|
58
|
-
// 酸柠:运动、数据冲击、节奏——石墨底 + 荧光黄绿
|
|
59
|
-
lime: {
|
|
60
|
-
name: 'lime', dark: true, bg: ['#141612', '#0c0d0b', '#070806'], light: '#b8ff3a',
|
|
61
|
-
surface: '#141611', surface2: '#1c1f18', line: 'rgba(220,255,170,0.11)',
|
|
62
|
-
ink: '#f6f8f0', ink2: '#aab09e', ink3: '#5f6556', accent: '#c6f432', accent2: '#ffffff', onAccent: '#0b0d06', shadow: '#000000',
|
|
63
|
-
},
|
|
64
|
-
// 纸:编辑排版、文字、人文——暖白纸 + 墨 + 朱红
|
|
65
|
-
paper: {
|
|
66
|
-
name: 'paper', dark: false, bg: ['#f6f2ea', '#f0ebe1', '#e7e0d3'], light: '#fffaf0',
|
|
67
|
-
surface: '#fffdf8', surface2: '#f4efe5', line: 'rgba(40,30,20,0.12)',
|
|
68
|
-
ink: '#17130f', ink2: '#5e554b', ink3: '#9b9184', accent: '#e5432d', accent2: '#1f5c4a', onAccent: '#fffaf3', shadow: '#2a1d10',
|
|
69
|
-
},
|
|
70
|
-
// 瓷白:SaaS 产品界面、交互演示——冷白 + 钴蓝
|
|
71
|
-
porcelain: {
|
|
72
|
-
name: 'porcelain', dark: false, bg: ['#f7f9fc', '#eef2f8', '#e3e9f2'], light: '#ffffff',
|
|
73
|
-
surface: '#ffffff', surface2: '#f3f6fb', line: 'rgba(15,30,60,0.10)',
|
|
74
|
-
ink: '#0d1324', ink2: '#4c566e', ink3: '#8d96ab', accent: '#2f5bff', accent2: '#00b39a', onAccent: '#ffffff', shadow: '#0c1a3a',
|
|
75
|
-
},
|
|
76
|
-
// 沙:温暖、生活方式、柔和——米色 + 赤陶
|
|
77
|
-
sand: {
|
|
78
|
-
name: 'sand', dark: false, bg: ['#efe6da', '#e8ddce', '#ddd0bd'], light: '#fff6e8',
|
|
79
|
-
surface: '#fbf6ef', surface2: '#f1e9de', line: 'rgba(70,45,20,0.12)',
|
|
80
|
-
ink: '#221a12', ink2: '#6d5d4c', ink3: '#a4927d', accent: '#c4552d', accent2: '#3d5a80', onAccent: '#fff8f0', shadow: '#3a2410',
|
|
81
|
-
},
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
// hex → "r,g,b",配 rgba(${rgbOf(c)},a) 用
|
|
85
|
-
export const rgbOf = (hex: string) => {
|
|
86
|
-
const h = hex.replace('#', '');
|
|
87
|
-
const f = h.length === 3 ? h.split('').map((c) => c + c).join('') : h.slice(0, 6);
|
|
88
|
-
const n = parseInt(f, 16);
|
|
89
|
-
return `${(n >> 16) & 255},${(n >> 8) & 255},${n & 255}`;
|
|
90
|
-
};
|
|
91
|
-
export const alpha = (hex: string, a: number) => `rgba(${rgbOf(hex)},${a})`;
|
|
92
|
-
|
|
93
|
-
// ───────────────────────── 字体与字号阶梯 ─────────────────────────
|
|
94
|
-
// 1080p 成片的字号档(px)。要读的文字 ≥ body(Q11:辅助 ≥32px、叙事字幕 ≥56px);
|
|
95
|
-
// 画面主标题至少 h1。label 只用于刻度/角标这类"纹理"小字。
|
|
96
|
-
|
|
97
|
-
export const TYPE = { mega: 260, display: 180, h1: 120, h2: 84, h3: 60, body: 40, small: 32, label: 22 } as const;
|
|
98
|
-
|
|
99
|
-
export const SERIF = '"Iowan Old Style", "Palatino Linotype", Palatino, "Songti SC", Georgia, serif';
|
|
100
|
-
|
|
101
|
-
// 一行写出标题样式:字号 + 字重 + 按字号的字距 + 行高
|
|
102
|
-
export const type = (size: number, weight = 650, opts: { caps?: boolean; serif?: boolean; mono?: boolean } = {}): React.CSSProperties => ({
|
|
103
|
-
fontFamily: opts.mono ? FONT.mono : opts.serif ? SERIF : FONT.sans,
|
|
104
|
-
fontSize: size,
|
|
105
|
-
fontWeight: weight,
|
|
106
|
-
letterSpacing: opts.mono ? '0em' : tracking(size, opts.caps),
|
|
107
|
-
lineHeight: size >= 90 ? 0.94 : size >= 50 ? 1.05 : 1.3,
|
|
108
|
-
textTransform: opts.caps ? 'uppercase' : undefined,
|
|
109
|
-
fontVariantNumeric: 'tabular-nums',
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
// ───────────────────────── 时间 ─────────────────────────
|
|
113
|
-
|
|
114
|
-
const clamp01 = (x: number) => (x < 0 ? 0 : x > 1 ? 1 : x);
|
|
115
|
-
|
|
116
|
-
// n 个元素的错峰起点:总跨度 span 帧,按 ease 分布(EASE.exit = 越来越快、EASE.out = 先密后疏、linear = 等差)
|
|
117
|
-
export const stagger = (i: number, n: number, span: number, ease: (t: number) => number = EASE.linear) =>
|
|
118
|
-
n <= 1 ? 0 : ease(i / (n - 1)) * span;
|
|
119
|
-
|
|
120
|
-
// 物理弹簧(30fps):start 帧起跳;damping 低 = 回弹多(12 活泼 / 18 利落 / 26 无回弹)
|
|
121
|
-
export const springAt = (frame: number, start: number, opts: { damping?: number; stiffness?: number; mass?: number } = {}) =>
|
|
122
|
-
spring({ frame: frame - start, fps: 30, config: { damping: opts.damping ?? 18, stiffness: opts.stiffness ?? 170, mass: opts.mass ?? 1 } });
|
|
123
|
-
|
|
124
|
-
// ───────────────────────── 光 ─────────────────────────
|
|
125
|
-
|
|
126
|
-
// 泛光:给文字 / 发光元素的 text-shadow 或 drop-shadow 串(strength 0–1;只给主角)
|
|
127
|
-
export const glow = (color: string, strength = 0.6) =>
|
|
128
|
-
`0 0 ${(6 * strength).toFixed(1)}px ${alpha(color, 0.55 * strength)}, 0 0 ${(24 * strength).toFixed(1)}px ${alpha(color, 0.45 * strength)}, 0 0 ${(70 * strength).toFixed(1)}px ${alpha(color, 0.3 * strength)}`;
|
|
129
|
-
|
|
130
|
-
export const glowFilter = (color: string, strength = 0.6) =>
|
|
131
|
-
`drop-shadow(0 0 ${(8 * strength).toFixed(1)}px ${alpha(color, 0.6 * strength)}) drop-shadow(0 0 ${(30 * strength).toFixed(1)}px ${alpha(color, 0.35 * strength)})`;
|
|
132
|
-
|
|
133
|
-
// 舞台:带色相的纵向渐变 + 主光斑 + 强调色余光 + 可选地平线光带 + 暗角 + 颗粒。
|
|
134
|
-
// keyLight = 主光位置(0–1);fill = 余光位置;horizon = 地平线光带高度(0–1,不给则无);
|
|
135
|
-
// breathe = 光斑随时间极缓的明暗呼吸(0–1)。
|
|
136
|
-
// children 画在暗角/颗粒之下,只放背景装饰(GridFloor / Dust / 远景);主角放在 Stage 外面(之后),免得被暗角压暗。
|
|
137
|
-
// 多页叠放的镜头(擦除/转场)只画一个 Stage 做共享底,别每页各画一个——暗角和颗粒会叠两遍、接缝处露馅。
|
|
138
|
-
export const Stage: React.FC<{
|
|
139
|
-
look: Look; keyLight?: { x: number; y: number }; fill?: { x: number; y: number } | null;
|
|
140
|
-
horizon?: number; intensity?: number; breathe?: number; grain?: number; vignette?: number;
|
|
141
|
-
children?: React.ReactNode; style?: React.CSSProperties;
|
|
142
|
-
}> = ({ look, keyLight = { x: 0.5, y: 0.08 }, fill = { x: 0.85, y: 0.9 }, horizon, intensity = 1, breathe = 0, grain, vignette, children, style }) => {
|
|
143
|
-
const frame = useCurrentFrame();
|
|
144
|
-
const b = 1 + breathe * 0.12 * Math.sin(frame / 38);
|
|
145
|
-
const [t, m, btm] = look.bg;
|
|
146
|
-
const k = look.dark ? 0.55 * intensity * b : 0.9 * intensity;
|
|
147
|
-
const f = look.dark ? 0.22 * intensity : 0.1 * intensity;
|
|
148
|
-
return (
|
|
149
|
-
<div style={{ position: 'absolute', inset: 0, overflow: 'hidden', background: `linear-gradient(180deg, ${t} 0%, ${m} 52%, ${btm} 100%)`, ...style }}>
|
|
150
|
-
<div style={{
|
|
151
|
-
position: 'absolute', inset: 0,
|
|
152
|
-
background:
|
|
153
|
-
`radial-gradient(ellipse 58% 62% at ${keyLight.x * 100}% ${keyLight.y * 100}%, ${alpha(look.light, Math.min(1, k))} 0%, ${alpha(look.light, 0)} 70%)` +
|
|
154
|
-
(fill ? `, radial-gradient(ellipse 50% 46% at ${fill.x * 100}% ${fill.y * 100}%, ${alpha(look.accent2, f)} 0%, ${alpha(look.accent2, 0)} 72%)` : ''),
|
|
155
|
-
mixBlendMode: look.dark ? 'screen' : 'normal',
|
|
156
|
-
}} />
|
|
157
|
-
{horizon !== undefined && (
|
|
158
|
-
<div style={{
|
|
159
|
-
position: 'absolute', left: '-10%', right: '-10%', top: `${horizon * 100 - 9}%`, height: '18%',
|
|
160
|
-
background: `radial-gradient(ellipse 50% 50% at 50% 50%, ${alpha(look.light, look.dark ? 0.28 * intensity : 0.5)} 0%, ${alpha(look.light, 0)} 70%)`,
|
|
161
|
-
filter: 'blur(10px)',
|
|
162
|
-
}} />
|
|
163
|
-
)}
|
|
164
|
-
{children}
|
|
165
|
-
<Vignette strength={vignette ?? (look.dark ? 0.55 : 0.16)} color={look.shadow} inner={0.42} />
|
|
166
|
-
{(grain ?? (look.dark ? 0.09 : 0.05)) > 0 && (
|
|
167
|
-
<Grain opacity={grain ?? (look.dark ? 0.09 : 0.05)} blend={look.dark ? 'soft-light' : 'overlay'} />
|
|
168
|
-
)}
|
|
169
|
-
</div>
|
|
170
|
-
);
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
// 透视网格地面:地平线 horizon(0–1 帧高)以下铺一张向消失点收拢的网格(SVG 按透视公式直接算线,
|
|
174
|
-
// 线宽恒定不闪),近处亮、远处隐入地平线。scroll = 网格朝镜头滚动的距离(格数,随帧递增 = 前进感)。
|
|
175
|
-
export const GridFloor: React.FC<{ look: Look; horizon?: number; cell?: number; scroll?: number; opacity?: number; color?: string }> = ({
|
|
176
|
-
look, horizon = 0.62, cell = 1, scroll = 0, opacity = 0.5, color,
|
|
177
|
-
}) => {
|
|
178
|
-
const W = 1920, H = 1080, hy = horizon * H, cam = (H - hy) * 1.1, focal = 1;
|
|
179
|
-
const c = color ?? (look.dark ? look.accent : look.ink);
|
|
180
|
-
const rows: number[] = [];
|
|
181
|
-
const off = ((scroll % 1) + 1) % 1;
|
|
182
|
-
for (let i = 0; i < 40; i++) {
|
|
183
|
-
const z = (0.9 + i - off) * cell;
|
|
184
|
-
if (z > 0.2) rows.push(hy + (cam * focal) / z);
|
|
185
|
-
}
|
|
186
|
-
const cols = Array.from({ length: 41 }, (_, i) => (i - 20) * cell);
|
|
187
|
-
const id = React.useId().replace(/[^a-zA-Z0-9]/g, '');
|
|
188
|
-
return (
|
|
189
|
-
<svg width={W} height={H} viewBox={`0 0 ${W} ${H}`} style={{ position: 'absolute', inset: 0, opacity, pointerEvents: 'none' }}>
|
|
190
|
-
<defs>
|
|
191
|
-
<linearGradient id={`gf${id}`} x1="0" y1={hy} x2="0" y2={H} gradientUnits="userSpaceOnUse">
|
|
192
|
-
<stop offset="0" stopColor={c} stopOpacity={0} />
|
|
193
|
-
<stop offset="0.35" stopColor={c} stopOpacity={look.dark ? 0.45 : 0.22} />
|
|
194
|
-
<stop offset="1" stopColor={c} stopOpacity={look.dark ? 0.8 : 0.35} />
|
|
195
|
-
</linearGradient>
|
|
196
|
-
</defs>
|
|
197
|
-
<g stroke={`url(#gf${id})`} strokeWidth={1.5} fill="none">
|
|
198
|
-
{rows.filter((y) => y <= H + 2).map((y, i) => <line key={`r${i}`} x1={0} y1={y} x2={W} y2={y} />)}
|
|
199
|
-
{cols.map((xw, i) => {
|
|
200
|
-
const zNear = 0.25;
|
|
201
|
-
return <line key={`c${i}`} x1={W / 2 + (xw * W * 0.18) / zNear} y1={hy + cam / zNear} x2={W / 2} y2={hy} />;
|
|
202
|
-
})}
|
|
203
|
-
</g>
|
|
204
|
-
</svg>
|
|
205
|
-
);
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
const hash = (n: number) => {
|
|
209
|
-
const x = Math.sin(n * 91.345 + 47.853) * 43758.5453;
|
|
210
|
-
return x - Math.floor(x);
|
|
211
|
-
};
|
|
212
|
-
|
|
213
|
-
// 确定性浮尘 / 散景:count 个柔光点在画面里缓慢漂移(速度 drift px/帧),远小近大近虚。
|
|
214
|
-
// 只做氛围底层,别抢主角;暗场用。
|
|
215
|
-
export const Dust: React.FC<{ look: Look; count?: number; seed?: number; drift?: number; opacity?: number; color?: string }> = ({
|
|
216
|
-
look, count = 40, seed = 1, drift = 0.25, opacity = 0.7, color,
|
|
217
|
-
}) => {
|
|
218
|
-
const frame = useCurrentFrame();
|
|
219
|
-
const c = color ?? look.light;
|
|
220
|
-
return (
|
|
221
|
-
<div style={{ position: 'absolute', inset: 0, pointerEvents: 'none', opacity }}>
|
|
222
|
-
{Array.from({ length: count }, (_, i) => {
|
|
223
|
-
const z = hash(seed * 31 + i * 7.1);
|
|
224
|
-
const size = 2 + z * z * 16;
|
|
225
|
-
const x = (((hash(seed * 13 + i * 3.7) * 2120 + frame * drift * (0.4 + z)) % 2120) + 2120) % 2120 - 100;
|
|
226
|
-
const y = hash(seed * 17 + i * 5.3) * 1080 - frame * drift * 0.3 * (0.5 + z);
|
|
227
|
-
const tw = 0.5 + 0.5 * Math.sin(frame / (14 + z * 20) + i);
|
|
228
|
-
return (
|
|
229
|
-
<div key={i} style={{
|
|
230
|
-
position: 'absolute', left: x, top: ((y % 1180) + 1180) % 1180 - 50, width: size, height: size, borderRadius: '50%',
|
|
231
|
-
background: `radial-gradient(circle, ${alpha(c, 0.9)} 0%, ${alpha(c, 0)} 70%)`,
|
|
232
|
-
opacity: (0.25 + 0.75 * tw) * (0.3 + z * 0.7), filter: z > 0.7 ? `blur(${((z - 0.7) * 10).toFixed(1)}px)` : undefined,
|
|
233
|
-
}} />
|
|
234
|
-
);
|
|
235
|
-
})}
|
|
236
|
-
</div>
|
|
237
|
-
);
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
// 单次扫光:铺满父级(父级需 overflow:hidden + 圆角,Q4 裁进边界)的一道斜向高光,
|
|
241
|
-
// progress 0→1 从左扫到右;只给主角一次。
|
|
242
|
-
export const Sheen: React.FC<{ progress: number; color?: string; width?: number; angle?: number; strength?: number }> = ({
|
|
243
|
-
progress, color = '#ffffff', width = 0.22, angle = 18, strength = 0.35,
|
|
244
|
-
}) => {
|
|
245
|
-
if (progress <= 0 || progress >= 1) return null;
|
|
246
|
-
const p = -width + (1 + 2 * width) * progress;
|
|
247
|
-
return (
|
|
248
|
-
<div style={{
|
|
249
|
-
position: 'absolute', inset: 0, pointerEvents: 'none', mixBlendMode: 'soft-light',
|
|
250
|
-
background: `linear-gradient(${90 + angle}deg, transparent ${(p - width) * 100}%, ${alpha(color, strength)} ${p * 100}%, transparent ${(p + width) * 100}%)`,
|
|
251
|
-
}} />
|
|
252
|
-
);
|
|
253
|
-
};
|
|
254
|
-
|
|
255
|
-
// ───────────────────────── 文字揭示 ─────────────────────────
|
|
256
|
-
// 把一段文字拆成字 / 词 / 行,逐个按 variant 揭示:
|
|
257
|
-
// rise —— 从下方遮罩里升起(经典"字从线下冒出",最稳重)
|
|
258
|
-
// blur —— 由虚到实 + 轻微上浮(柔和、高级)
|
|
259
|
-
// drop —— 从上方落下带轻微过冲(活泼)
|
|
260
|
-
// scale —— 由大缩到位 + 淡入(冲击、口号)
|
|
261
|
-
// track —— 字距由宽收紧(品牌字标)
|
|
262
|
-
// start 起始帧、each 每个单元的动画时长、gap 单元间隔(帧)、ease 缓动。
|
|
263
|
-
// 返回 inline-block 行内结构,外层自己定位 / 排版。
|
|
264
|
-
|
|
265
|
-
type RevealVariant = 'rise' | 'blur' | 'drop' | 'scale' | 'track';
|
|
266
|
-
|
|
267
|
-
export const TextReveal: React.FC<{
|
|
268
|
-
text: string; start?: number; by?: 'char' | 'word' | 'line'; variant?: RevealVariant;
|
|
269
|
-
each?: number; gap?: number; ease?: (t: number) => number; style?: React.CSSProperties; unitStyle?: (i: number) => React.CSSProperties;
|
|
270
|
-
out?: { start: number; dur?: number };
|
|
271
|
-
}> = ({ text, start = 0, by = 'char', variant = 'rise', each = 18, gap, ease = EASE.snappy, style, unitStyle, out }) => {
|
|
272
|
-
const frame = useCurrentFrame();
|
|
273
|
-
const units = by === 'line' ? text.split('\n') : by === 'word' ? text.split(/(\s+)/) : Array.from(text);
|
|
274
|
-
const g = gap ?? (by === 'char' ? 1.6 : by === 'word' ? 4 : 7);
|
|
275
|
-
let k = 0;
|
|
276
|
-
const outT = out ? clamp01((frame - out.start) / (out.dur ?? 12)) : 0;
|
|
277
|
-
const outE = EASE.exit(outT);
|
|
278
|
-
return (
|
|
279
|
-
<span style={{ display: by === 'line' ? 'block' : 'inline', whiteSpace: 'pre', ...style }}>
|
|
280
|
-
{units.map((u, i) => {
|
|
281
|
-
if (by !== 'line' && /^\s+$/.test(u)) return <span key={i}>{u}</span>;
|
|
282
|
-
const idx = k++;
|
|
283
|
-
const p = ease(clamp01((frame - start - idx * g) / each));
|
|
284
|
-
const inner: React.CSSProperties = { display: 'inline-block', willChange: 'transform' };
|
|
285
|
-
if (variant === 'rise') {
|
|
286
|
-
// 位移 = 105% 字高 + 0.3em(盖过遮罩框的上下留白),未升起的字形不会从框底露出
|
|
287
|
-
inner.transform = `translateY(calc(${((1 - p) * 105 - outE * 105).toFixed(2)}% + ${((1 - p) * 0.3 - outE * 0.3).toFixed(3)}em))`;
|
|
288
|
-
} else if (variant === 'blur') {
|
|
289
|
-
inner.opacity = p * (1 - outE);
|
|
290
|
-
inner.filter = `blur(${((1 - p) * 14 + outE * 10).toFixed(2)}px)`;
|
|
291
|
-
inner.transform = `translateY(${((1 - p) * 0.25 - outE * 0.15).toFixed(3)}em)`;
|
|
292
|
-
} else if (variant === 'drop') {
|
|
293
|
-
const s = clamp01((frame - start - idx * g) / each);
|
|
294
|
-
inner.opacity = clamp01(s * 3) * (1 - outE);
|
|
295
|
-
inner.transform = `translateY(${((1 - EASE.overshoot(s)) * -0.6).toFixed(3)}em)`;
|
|
296
|
-
} else if (variant === 'scale') {
|
|
297
|
-
inner.opacity = clamp01(p * 2) * (1 - outE);
|
|
298
|
-
inner.transform = `scale(${(1 + (1 - p) * 0.6 + outE * 0.2).toFixed(3)})`;
|
|
299
|
-
inner.filter = p < 1 ? `blur(${((1 - p) * 8).toFixed(2)}px)` : undefined;
|
|
300
|
-
} else {
|
|
301
|
-
inner.opacity = p * (1 - outE);
|
|
302
|
-
inner.marginRight = `${((1 - p) * 0.5).toFixed(3)}em`;
|
|
303
|
-
}
|
|
304
|
-
const clip = variant === 'rise';
|
|
305
|
-
const body = <span style={{ ...inner, ...(unitStyle ? unitStyle(idx) : null) }}>{u}</span>;
|
|
306
|
-
return clip ? (
|
|
307
|
-
<span key={i} style={{ display: by === 'line' ? 'block' : 'inline-block', overflow: 'hidden', verticalAlign: 'top', padding: '0.06em 0.02em 0.22em', margin: '-0.06em -0.02em -0.22em' }}>
|
|
308
|
-
{body}
|
|
309
|
-
</span>
|
|
310
|
-
) : (
|
|
311
|
-
<React.Fragment key={i}>{body}</React.Fragment>
|
|
312
|
-
);
|
|
313
|
-
})}
|
|
314
|
-
</span>
|
|
315
|
-
);
|
|
316
|
-
};
|
|
1
|
+
// Look 视觉系统(第二轮改版)——给 demo 一套"成片级"的美术方向:调色板 LOOKS、字号阶梯 TYPE、
|
|
2
|
+
// 有光源与空间感的舞台 <Stage>、逐字/逐词/逐行揭示 <TextReveal>、错峰分布 stagger、
|
|
3
|
+
// 泛光 glow、单次扫光 <Sheen>、确定性粒子 <Dust>、透视网格地面 <GridFloor>。
|
|
4
|
+
// 全部是 props / frame 的纯函数,确定性渲染(无 Math.random / Date)。依赖 remotion + react + ./Polish。
|
|
5
|
+
// 可选共享件——copy demo 时连同 Polish.tsx 一并带上并改 import 路径。
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import { spring, useCurrentFrame } from 'remotion';
|
|
8
|
+
import { EASE, FONT, Grain, Vignette, tracking } from './Polish';
|
|
9
|
+
|
|
10
|
+
// ───────────────────────── 调色板 ─────────────────────────
|
|
11
|
+
// 每个 look = 一套完整的明暗、表面、文字、强调色与光色。一个镜头只用一个 look;
|
|
12
|
+
// 强调色只给主角/关键信息,accent2 只做点缀(≤ 画面 5%)。
|
|
13
|
+
|
|
14
|
+
export type LookName = 'midnight' | 'aurora' | 'ember' | 'graphite' | 'lime' | 'paper' | 'porcelain' | 'sand';
|
|
15
|
+
|
|
16
|
+
export type Look = {
|
|
17
|
+
name: LookName;
|
|
18
|
+
dark: boolean;
|
|
19
|
+
bg: [string, string, string]; // 舞台纵向渐变:顶 / 中 / 底
|
|
20
|
+
light: string; // 主光颜色(舞台光斑)
|
|
21
|
+
surface: string; // 面板底色
|
|
22
|
+
surface2: string; // 面板内次级底色 / 输入框
|
|
23
|
+
line: string; // 发丝线
|
|
24
|
+
ink: string; // 主文字
|
|
25
|
+
ink2: string; // 次级文字
|
|
26
|
+
ink3: string; // 弱文字 / 刻度
|
|
27
|
+
accent: string;
|
|
28
|
+
accent2: string;
|
|
29
|
+
onAccent: string; // 强调色上的文字
|
|
30
|
+
shadow: string; // 阴影色(带色相)
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const LOOKS: Record<LookName, Look> = {
|
|
34
|
+
// 深蓝夜:科技产品、AI、数据——冷静、电光蓝
|
|
35
|
+
midnight: {
|
|
36
|
+
name: 'midnight', dark: true, bg: ['#0d1426', '#090d1a', '#05070e'], light: '#3d63ff',
|
|
37
|
+
surface: '#111827', surface2: '#172036', line: 'rgba(160,190,255,0.12)',
|
|
38
|
+
ink: '#f2f5ff', ink2: '#a9b4d0', ink3: '#5d6883', accent: '#5b8cff', accent2: '#3ee6d0', onAccent: '#050816', shadow: '#000208',
|
|
39
|
+
},
|
|
40
|
+
// 极光:发布、品牌、魔法感——紫粉渐变光
|
|
41
|
+
aurora: {
|
|
42
|
+
name: 'aurora', dark: true, bg: ['#140d24', '#0b0816', '#06040c'], light: '#8b5cf6',
|
|
43
|
+
surface: '#151024', surface2: '#1e1733', line: 'rgba(200,170,255,0.13)',
|
|
44
|
+
ink: '#f7f2ff', ink2: '#b9acd6', ink3: '#6a5f86', accent: '#a78bfa', accent2: '#f472b6', onAccent: '#0b0616', shadow: '#030108',
|
|
45
|
+
},
|
|
46
|
+
// 余烬:冲击、速度、能量——暖黑 + 橙
|
|
47
|
+
ember: {
|
|
48
|
+
name: 'ember', dark: true, bg: ['#1c100a', '#100906', '#070403'], light: '#ff6a2a',
|
|
49
|
+
surface: '#1a120e', surface2: '#251913', line: 'rgba(255,190,150,0.12)',
|
|
50
|
+
ink: '#fff5ee', ink2: '#d4b6a4', ink3: '#7d6455', accent: '#ff6b2c', accent2: '#ffc24b', onAccent: '#140802', shadow: '#050100',
|
|
51
|
+
},
|
|
52
|
+
// 石墨:电影感、克制、高级——近单色暗场,白为强调
|
|
53
|
+
graphite: {
|
|
54
|
+
name: 'graphite', dark: true, bg: ['#17181b', '#0e0f11', '#08080a'], light: '#c8ccd6',
|
|
55
|
+
surface: '#16171a', surface2: '#1e2024', line: 'rgba(255,255,255,0.09)',
|
|
56
|
+
ink: '#f4f4f2', ink2: '#a3a5ab', ink3: '#5c5f66', accent: '#ffffff', accent2: '#e4c58a', onAccent: '#0a0a0b', shadow: '#000000',
|
|
57
|
+
},
|
|
58
|
+
// 酸柠:运动、数据冲击、节奏——石墨底 + 荧光黄绿
|
|
59
|
+
lime: {
|
|
60
|
+
name: 'lime', dark: true, bg: ['#141612', '#0c0d0b', '#070806'], light: '#b8ff3a',
|
|
61
|
+
surface: '#141611', surface2: '#1c1f18', line: 'rgba(220,255,170,0.11)',
|
|
62
|
+
ink: '#f6f8f0', ink2: '#aab09e', ink3: '#5f6556', accent: '#c6f432', accent2: '#ffffff', onAccent: '#0b0d06', shadow: '#000000',
|
|
63
|
+
},
|
|
64
|
+
// 纸:编辑排版、文字、人文——暖白纸 + 墨 + 朱红
|
|
65
|
+
paper: {
|
|
66
|
+
name: 'paper', dark: false, bg: ['#f6f2ea', '#f0ebe1', '#e7e0d3'], light: '#fffaf0',
|
|
67
|
+
surface: '#fffdf8', surface2: '#f4efe5', line: 'rgba(40,30,20,0.12)',
|
|
68
|
+
ink: '#17130f', ink2: '#5e554b', ink3: '#9b9184', accent: '#e5432d', accent2: '#1f5c4a', onAccent: '#fffaf3', shadow: '#2a1d10',
|
|
69
|
+
},
|
|
70
|
+
// 瓷白:SaaS 产品界面、交互演示——冷白 + 钴蓝
|
|
71
|
+
porcelain: {
|
|
72
|
+
name: 'porcelain', dark: false, bg: ['#f7f9fc', '#eef2f8', '#e3e9f2'], light: '#ffffff',
|
|
73
|
+
surface: '#ffffff', surface2: '#f3f6fb', line: 'rgba(15,30,60,0.10)',
|
|
74
|
+
ink: '#0d1324', ink2: '#4c566e', ink3: '#8d96ab', accent: '#2f5bff', accent2: '#00b39a', onAccent: '#ffffff', shadow: '#0c1a3a',
|
|
75
|
+
},
|
|
76
|
+
// 沙:温暖、生活方式、柔和——米色 + 赤陶
|
|
77
|
+
sand: {
|
|
78
|
+
name: 'sand', dark: false, bg: ['#efe6da', '#e8ddce', '#ddd0bd'], light: '#fff6e8',
|
|
79
|
+
surface: '#fbf6ef', surface2: '#f1e9de', line: 'rgba(70,45,20,0.12)',
|
|
80
|
+
ink: '#221a12', ink2: '#6d5d4c', ink3: '#a4927d', accent: '#c4552d', accent2: '#3d5a80', onAccent: '#fff8f0', shadow: '#3a2410',
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
// hex → "r,g,b",配 rgba(${rgbOf(c)},a) 用
|
|
85
|
+
export const rgbOf = (hex: string) => {
|
|
86
|
+
const h = hex.replace('#', '');
|
|
87
|
+
const f = h.length === 3 ? h.split('').map((c) => c + c).join('') : h.slice(0, 6);
|
|
88
|
+
const n = parseInt(f, 16);
|
|
89
|
+
return `${(n >> 16) & 255},${(n >> 8) & 255},${n & 255}`;
|
|
90
|
+
};
|
|
91
|
+
export const alpha = (hex: string, a: number) => `rgba(${rgbOf(hex)},${a})`;
|
|
92
|
+
|
|
93
|
+
// ───────────────────────── 字体与字号阶梯 ─────────────────────────
|
|
94
|
+
// 1080p 成片的字号档(px)。要读的文字 ≥ body(Q11:辅助 ≥32px、叙事字幕 ≥56px);
|
|
95
|
+
// 画面主标题至少 h1。label 只用于刻度/角标这类"纹理"小字。
|
|
96
|
+
|
|
97
|
+
export const TYPE = { mega: 260, display: 180, h1: 120, h2: 84, h3: 60, body: 40, small: 32, label: 22 } as const;
|
|
98
|
+
|
|
99
|
+
export const SERIF = '"Iowan Old Style", "Palatino Linotype", Palatino, "Songti SC", Georgia, serif';
|
|
100
|
+
|
|
101
|
+
// 一行写出标题样式:字号 + 字重 + 按字号的字距 + 行高
|
|
102
|
+
export const type = (size: number, weight = 650, opts: { caps?: boolean; serif?: boolean; mono?: boolean } = {}): React.CSSProperties => ({
|
|
103
|
+
fontFamily: opts.mono ? FONT.mono : opts.serif ? SERIF : FONT.sans,
|
|
104
|
+
fontSize: size,
|
|
105
|
+
fontWeight: weight,
|
|
106
|
+
letterSpacing: opts.mono ? '0em' : tracking(size, opts.caps),
|
|
107
|
+
lineHeight: size >= 90 ? 0.94 : size >= 50 ? 1.05 : 1.3,
|
|
108
|
+
textTransform: opts.caps ? 'uppercase' : undefined,
|
|
109
|
+
fontVariantNumeric: 'tabular-nums',
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
// ───────────────────────── 时间 ─────────────────────────
|
|
113
|
+
|
|
114
|
+
const clamp01 = (x: number) => (x < 0 ? 0 : x > 1 ? 1 : x);
|
|
115
|
+
|
|
116
|
+
// n 个元素的错峰起点:总跨度 span 帧,按 ease 分布(EASE.exit = 越来越快、EASE.out = 先密后疏、linear = 等差)
|
|
117
|
+
export const stagger = (i: number, n: number, span: number, ease: (t: number) => number = EASE.linear) =>
|
|
118
|
+
n <= 1 ? 0 : ease(i / (n - 1)) * span;
|
|
119
|
+
|
|
120
|
+
// 物理弹簧(30fps):start 帧起跳;damping 低 = 回弹多(12 活泼 / 18 利落 / 26 无回弹)
|
|
121
|
+
export const springAt = (frame: number, start: number, opts: { damping?: number; stiffness?: number; mass?: number } = {}) =>
|
|
122
|
+
spring({ frame: frame - start, fps: 30, config: { damping: opts.damping ?? 18, stiffness: opts.stiffness ?? 170, mass: opts.mass ?? 1 } });
|
|
123
|
+
|
|
124
|
+
// ───────────────────────── 光 ─────────────────────────
|
|
125
|
+
|
|
126
|
+
// 泛光:给文字 / 发光元素的 text-shadow 或 drop-shadow 串(strength 0–1;只给主角)
|
|
127
|
+
export const glow = (color: string, strength = 0.6) =>
|
|
128
|
+
`0 0 ${(6 * strength).toFixed(1)}px ${alpha(color, 0.55 * strength)}, 0 0 ${(24 * strength).toFixed(1)}px ${alpha(color, 0.45 * strength)}, 0 0 ${(70 * strength).toFixed(1)}px ${alpha(color, 0.3 * strength)}`;
|
|
129
|
+
|
|
130
|
+
export const glowFilter = (color: string, strength = 0.6) =>
|
|
131
|
+
`drop-shadow(0 0 ${(8 * strength).toFixed(1)}px ${alpha(color, 0.6 * strength)}) drop-shadow(0 0 ${(30 * strength).toFixed(1)}px ${alpha(color, 0.35 * strength)})`;
|
|
132
|
+
|
|
133
|
+
// 舞台:带色相的纵向渐变 + 主光斑 + 强调色余光 + 可选地平线光带 + 暗角 + 颗粒。
|
|
134
|
+
// keyLight = 主光位置(0–1);fill = 余光位置;horizon = 地平线光带高度(0–1,不给则无);
|
|
135
|
+
// breathe = 光斑随时间极缓的明暗呼吸(0–1)。
|
|
136
|
+
// children 画在暗角/颗粒之下,只放背景装饰(GridFloor / Dust / 远景);主角放在 Stage 外面(之后),免得被暗角压暗。
|
|
137
|
+
// 多页叠放的镜头(擦除/转场)只画一个 Stage 做共享底,别每页各画一个——暗角和颗粒会叠两遍、接缝处露馅。
|
|
138
|
+
export const Stage: React.FC<{
|
|
139
|
+
look: Look; keyLight?: { x: number; y: number }; fill?: { x: number; y: number } | null;
|
|
140
|
+
horizon?: number; intensity?: number; breathe?: number; grain?: number; vignette?: number;
|
|
141
|
+
children?: React.ReactNode; style?: React.CSSProperties;
|
|
142
|
+
}> = ({ look, keyLight = { x: 0.5, y: 0.08 }, fill = { x: 0.85, y: 0.9 }, horizon, intensity = 1, breathe = 0, grain, vignette, children, style }) => {
|
|
143
|
+
const frame = useCurrentFrame();
|
|
144
|
+
const b = 1 + breathe * 0.12 * Math.sin(frame / 38);
|
|
145
|
+
const [t, m, btm] = look.bg;
|
|
146
|
+
const k = look.dark ? 0.55 * intensity * b : 0.9 * intensity;
|
|
147
|
+
const f = look.dark ? 0.22 * intensity : 0.1 * intensity;
|
|
148
|
+
return (
|
|
149
|
+
<div style={{ position: 'absolute', inset: 0, overflow: 'hidden', background: `linear-gradient(180deg, ${t} 0%, ${m} 52%, ${btm} 100%)`, ...style }}>
|
|
150
|
+
<div style={{
|
|
151
|
+
position: 'absolute', inset: 0,
|
|
152
|
+
background:
|
|
153
|
+
`radial-gradient(ellipse 58% 62% at ${keyLight.x * 100}% ${keyLight.y * 100}%, ${alpha(look.light, Math.min(1, k))} 0%, ${alpha(look.light, 0)} 70%)` +
|
|
154
|
+
(fill ? `, radial-gradient(ellipse 50% 46% at ${fill.x * 100}% ${fill.y * 100}%, ${alpha(look.accent2, f)} 0%, ${alpha(look.accent2, 0)} 72%)` : ''),
|
|
155
|
+
mixBlendMode: look.dark ? 'screen' : 'normal',
|
|
156
|
+
}} />
|
|
157
|
+
{horizon !== undefined && (
|
|
158
|
+
<div style={{
|
|
159
|
+
position: 'absolute', left: '-10%', right: '-10%', top: `${horizon * 100 - 9}%`, height: '18%',
|
|
160
|
+
background: `radial-gradient(ellipse 50% 50% at 50% 50%, ${alpha(look.light, look.dark ? 0.28 * intensity : 0.5)} 0%, ${alpha(look.light, 0)} 70%)`,
|
|
161
|
+
filter: 'blur(10px)',
|
|
162
|
+
}} />
|
|
163
|
+
)}
|
|
164
|
+
{children}
|
|
165
|
+
<Vignette strength={vignette ?? (look.dark ? 0.55 : 0.16)} color={look.shadow} inner={0.42} />
|
|
166
|
+
{(grain ?? (look.dark ? 0.09 : 0.05)) > 0 && (
|
|
167
|
+
<Grain opacity={grain ?? (look.dark ? 0.09 : 0.05)} blend={look.dark ? 'soft-light' : 'overlay'} />
|
|
168
|
+
)}
|
|
169
|
+
</div>
|
|
170
|
+
);
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
// 透视网格地面:地平线 horizon(0–1 帧高)以下铺一张向消失点收拢的网格(SVG 按透视公式直接算线,
|
|
174
|
+
// 线宽恒定不闪),近处亮、远处隐入地平线。scroll = 网格朝镜头滚动的距离(格数,随帧递增 = 前进感)。
|
|
175
|
+
export const GridFloor: React.FC<{ look: Look; horizon?: number; cell?: number; scroll?: number; opacity?: number; color?: string }> = ({
|
|
176
|
+
look, horizon = 0.62, cell = 1, scroll = 0, opacity = 0.5, color,
|
|
177
|
+
}) => {
|
|
178
|
+
const W = 1920, H = 1080, hy = horizon * H, cam = (H - hy) * 1.1, focal = 1;
|
|
179
|
+
const c = color ?? (look.dark ? look.accent : look.ink);
|
|
180
|
+
const rows: number[] = [];
|
|
181
|
+
const off = ((scroll % 1) + 1) % 1;
|
|
182
|
+
for (let i = 0; i < 40; i++) {
|
|
183
|
+
const z = (0.9 + i - off) * cell;
|
|
184
|
+
if (z > 0.2) rows.push(hy + (cam * focal) / z);
|
|
185
|
+
}
|
|
186
|
+
const cols = Array.from({ length: 41 }, (_, i) => (i - 20) * cell);
|
|
187
|
+
const id = React.useId().replace(/[^a-zA-Z0-9]/g, '');
|
|
188
|
+
return (
|
|
189
|
+
<svg width={W} height={H} viewBox={`0 0 ${W} ${H}`} style={{ position: 'absolute', inset: 0, opacity, pointerEvents: 'none' }}>
|
|
190
|
+
<defs>
|
|
191
|
+
<linearGradient id={`gf${id}`} x1="0" y1={hy} x2="0" y2={H} gradientUnits="userSpaceOnUse">
|
|
192
|
+
<stop offset="0" stopColor={c} stopOpacity={0} />
|
|
193
|
+
<stop offset="0.35" stopColor={c} stopOpacity={look.dark ? 0.45 : 0.22} />
|
|
194
|
+
<stop offset="1" stopColor={c} stopOpacity={look.dark ? 0.8 : 0.35} />
|
|
195
|
+
</linearGradient>
|
|
196
|
+
</defs>
|
|
197
|
+
<g stroke={`url(#gf${id})`} strokeWidth={1.5} fill="none">
|
|
198
|
+
{rows.filter((y) => y <= H + 2).map((y, i) => <line key={`r${i}`} x1={0} y1={y} x2={W} y2={y} />)}
|
|
199
|
+
{cols.map((xw, i) => {
|
|
200
|
+
const zNear = 0.25;
|
|
201
|
+
return <line key={`c${i}`} x1={W / 2 + (xw * W * 0.18) / zNear} y1={hy + cam / zNear} x2={W / 2} y2={hy} />;
|
|
202
|
+
})}
|
|
203
|
+
</g>
|
|
204
|
+
</svg>
|
|
205
|
+
);
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
const hash = (n: number) => {
|
|
209
|
+
const x = Math.sin(n * 91.345 + 47.853) * 43758.5453;
|
|
210
|
+
return x - Math.floor(x);
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
// 确定性浮尘 / 散景:count 个柔光点在画面里缓慢漂移(速度 drift px/帧),远小近大近虚。
|
|
214
|
+
// 只做氛围底层,别抢主角;暗场用。
|
|
215
|
+
export const Dust: React.FC<{ look: Look; count?: number; seed?: number; drift?: number; opacity?: number; color?: string }> = ({
|
|
216
|
+
look, count = 40, seed = 1, drift = 0.25, opacity = 0.7, color,
|
|
217
|
+
}) => {
|
|
218
|
+
const frame = useCurrentFrame();
|
|
219
|
+
const c = color ?? look.light;
|
|
220
|
+
return (
|
|
221
|
+
<div style={{ position: 'absolute', inset: 0, pointerEvents: 'none', opacity }}>
|
|
222
|
+
{Array.from({ length: count }, (_, i) => {
|
|
223
|
+
const z = hash(seed * 31 + i * 7.1);
|
|
224
|
+
const size = 2 + z * z * 16;
|
|
225
|
+
const x = (((hash(seed * 13 + i * 3.7) * 2120 + frame * drift * (0.4 + z)) % 2120) + 2120) % 2120 - 100;
|
|
226
|
+
const y = hash(seed * 17 + i * 5.3) * 1080 - frame * drift * 0.3 * (0.5 + z);
|
|
227
|
+
const tw = 0.5 + 0.5 * Math.sin(frame / (14 + z * 20) + i);
|
|
228
|
+
return (
|
|
229
|
+
<div key={i} style={{
|
|
230
|
+
position: 'absolute', left: x, top: ((y % 1180) + 1180) % 1180 - 50, width: size, height: size, borderRadius: '50%',
|
|
231
|
+
background: `radial-gradient(circle, ${alpha(c, 0.9)} 0%, ${alpha(c, 0)} 70%)`,
|
|
232
|
+
opacity: (0.25 + 0.75 * tw) * (0.3 + z * 0.7), filter: z > 0.7 ? `blur(${((z - 0.7) * 10).toFixed(1)}px)` : undefined,
|
|
233
|
+
}} />
|
|
234
|
+
);
|
|
235
|
+
})}
|
|
236
|
+
</div>
|
|
237
|
+
);
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
// 单次扫光:铺满父级(父级需 overflow:hidden + 圆角,Q4 裁进边界)的一道斜向高光,
|
|
241
|
+
// progress 0→1 从左扫到右;只给主角一次。
|
|
242
|
+
export const Sheen: React.FC<{ progress: number; color?: string; width?: number; angle?: number; strength?: number }> = ({
|
|
243
|
+
progress, color = '#ffffff', width = 0.22, angle = 18, strength = 0.35,
|
|
244
|
+
}) => {
|
|
245
|
+
if (progress <= 0 || progress >= 1) return null;
|
|
246
|
+
const p = -width + (1 + 2 * width) * progress;
|
|
247
|
+
return (
|
|
248
|
+
<div style={{
|
|
249
|
+
position: 'absolute', inset: 0, pointerEvents: 'none', mixBlendMode: 'soft-light',
|
|
250
|
+
background: `linear-gradient(${90 + angle}deg, transparent ${(p - width) * 100}%, ${alpha(color, strength)} ${p * 100}%, transparent ${(p + width) * 100}%)`,
|
|
251
|
+
}} />
|
|
252
|
+
);
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
// ───────────────────────── 文字揭示 ─────────────────────────
|
|
256
|
+
// 把一段文字拆成字 / 词 / 行,逐个按 variant 揭示:
|
|
257
|
+
// rise —— 从下方遮罩里升起(经典"字从线下冒出",最稳重)
|
|
258
|
+
// blur —— 由虚到实 + 轻微上浮(柔和、高级)
|
|
259
|
+
// drop —— 从上方落下带轻微过冲(活泼)
|
|
260
|
+
// scale —— 由大缩到位 + 淡入(冲击、口号)
|
|
261
|
+
// track —— 字距由宽收紧(品牌字标)
|
|
262
|
+
// start 起始帧、each 每个单元的动画时长、gap 单元间隔(帧)、ease 缓动。
|
|
263
|
+
// 返回 inline-block 行内结构,外层自己定位 / 排版。
|
|
264
|
+
|
|
265
|
+
type RevealVariant = 'rise' | 'blur' | 'drop' | 'scale' | 'track';
|
|
266
|
+
|
|
267
|
+
export const TextReveal: React.FC<{
|
|
268
|
+
text: string; start?: number; by?: 'char' | 'word' | 'line'; variant?: RevealVariant;
|
|
269
|
+
each?: number; gap?: number; ease?: (t: number) => number; style?: React.CSSProperties; unitStyle?: (i: number) => React.CSSProperties;
|
|
270
|
+
out?: { start: number; dur?: number };
|
|
271
|
+
}> = ({ text, start = 0, by = 'char', variant = 'rise', each = 18, gap, ease = EASE.snappy, style, unitStyle, out }) => {
|
|
272
|
+
const frame = useCurrentFrame();
|
|
273
|
+
const units = by === 'line' ? text.split('\n') : by === 'word' ? text.split(/(\s+)/) : Array.from(text);
|
|
274
|
+
const g = gap ?? (by === 'char' ? 1.6 : by === 'word' ? 4 : 7);
|
|
275
|
+
let k = 0;
|
|
276
|
+
const outT = out ? clamp01((frame - out.start) / (out.dur ?? 12)) : 0;
|
|
277
|
+
const outE = EASE.exit(outT);
|
|
278
|
+
return (
|
|
279
|
+
<span style={{ display: by === 'line' ? 'block' : 'inline', whiteSpace: 'pre', ...style }}>
|
|
280
|
+
{units.map((u, i) => {
|
|
281
|
+
if (by !== 'line' && /^\s+$/.test(u)) return <span key={i}>{u}</span>;
|
|
282
|
+
const idx = k++;
|
|
283
|
+
const p = ease(clamp01((frame - start - idx * g) / each));
|
|
284
|
+
const inner: React.CSSProperties = { display: 'inline-block', willChange: 'transform' };
|
|
285
|
+
if (variant === 'rise') {
|
|
286
|
+
// 位移 = 105% 字高 + 0.3em(盖过遮罩框的上下留白),未升起的字形不会从框底露出
|
|
287
|
+
inner.transform = `translateY(calc(${((1 - p) * 105 - outE * 105).toFixed(2)}% + ${((1 - p) * 0.3 - outE * 0.3).toFixed(3)}em))`;
|
|
288
|
+
} else if (variant === 'blur') {
|
|
289
|
+
inner.opacity = p * (1 - outE);
|
|
290
|
+
inner.filter = `blur(${((1 - p) * 14 + outE * 10).toFixed(2)}px)`;
|
|
291
|
+
inner.transform = `translateY(${((1 - p) * 0.25 - outE * 0.15).toFixed(3)}em)`;
|
|
292
|
+
} else if (variant === 'drop') {
|
|
293
|
+
const s = clamp01((frame - start - idx * g) / each);
|
|
294
|
+
inner.opacity = clamp01(s * 3) * (1 - outE);
|
|
295
|
+
inner.transform = `translateY(${((1 - EASE.overshoot(s)) * -0.6).toFixed(3)}em)`;
|
|
296
|
+
} else if (variant === 'scale') {
|
|
297
|
+
inner.opacity = clamp01(p * 2) * (1 - outE);
|
|
298
|
+
inner.transform = `scale(${(1 + (1 - p) * 0.6 + outE * 0.2).toFixed(3)})`;
|
|
299
|
+
inner.filter = p < 1 ? `blur(${((1 - p) * 8).toFixed(2)}px)` : undefined;
|
|
300
|
+
} else {
|
|
301
|
+
inner.opacity = p * (1 - outE);
|
|
302
|
+
inner.marginRight = `${((1 - p) * 0.5).toFixed(3)}em`;
|
|
303
|
+
}
|
|
304
|
+
const clip = variant === 'rise';
|
|
305
|
+
const body = <span style={{ ...inner, ...(unitStyle ? unitStyle(idx) : null) }}>{u}</span>;
|
|
306
|
+
return clip ? (
|
|
307
|
+
<span key={i} style={{ display: by === 'line' ? 'block' : 'inline-block', overflow: 'hidden', verticalAlign: 'top', padding: '0.06em 0.02em 0.22em', margin: '-0.06em -0.02em -0.22em' }}>
|
|
308
|
+
{body}
|
|
309
|
+
</span>
|
|
310
|
+
) : (
|
|
311
|
+
<React.Fragment key={i}>{body}</React.Fragment>
|
|
312
|
+
);
|
|
313
|
+
})}
|
|
314
|
+
</span>
|
|
315
|
+
);
|
|
316
|
+
};
|