@auscera/cleoedits 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +62 -2
- package/cli.mjs +149 -0
- package/lib/dependencies.mjs +384 -0
- package/lib/run.mjs +114 -0
- package/lib/workspace.mjs +167 -0
- package/package.json +240 -3
- package/workspace/.agents/skills/cleoedits/SKILL.md +29 -0
- package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/audiogram.json +41 -0
- package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/facebook.json +48 -0
- package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/linkedin.json +48 -0
- package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/podcast.json +23 -0
- package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/reels.json +48 -0
- package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/shorts.json +48 -0
- package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/tiktok.json +48 -0
- package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/x.json +48 -0
- package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/youtube-shorts.json +48 -0
- package/workspace/.agents/skills/cleoedits/assets/ffmpeg_templates/youtube.json +48 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/assets/LICENSE-SimpleIcons +30 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/assets/logos.json +1 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/Anton-Regular.ttf +0 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/ArchivoBlack-Regular.ttf +0 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/InstrumentSerif-Italic.ttf +0 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/Inter.ttf +0 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/LICENSE-PermanentMarker.txt +202 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/Montserrat.ttf +0 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/OFL-Anton.txt +93 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/OFL-ArchivoBlack.txt +93 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/OFL-InstrumentSerif.txt +93 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/OFL-Inter.txt +93 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/OFL-Montserrat.txt +93 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/OFL-PlayfairDisplay.txt +93 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/OFL-Poppins.txt +93 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/OFL-SpaceMono.txt +93 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/PermanentMarker-Regular.ttf +0 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/PlayfairDisplay-Italic.ttf +0 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/PlayfairDisplay.ttf +0 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/Poppins-Black.ttf +0 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/Poppins-Bold.ttf +0 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/Poppins-ExtraBold.ttf +0 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/fonts/SpaceMono-Bold.ttf +0 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/models/LICENSE-MediaPipe +218 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/models/LICENSE-YuNet +21 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/models/NOTICE.md +4 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/models/selfie_segmenter.tflite +0 -0
- package/workspace/.agents/skills/cleoedits/assets/reel_effects/models/yunet.onnx +0 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/LICENSE +21 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/audio-app-ui/STYLE.md +65 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/blueprint/STYLE.md +53 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/blueprint/index.html +328 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/blueprint/studio.js +57 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/data-story/STYLE.md +65 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/data-story/index.html +575 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/design-app-ui/STYLE.md +68 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/editor-ui/STYLE.md +73 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/editorial-paper/STYLE.md +54 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/editorial-paper/index.html +189 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/editorial-paper/studio.js +57 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/explainer-diagram/STYLE.md +64 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/explainer-diagram/index.html +620 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/graphite-ui/STYLE.md +55 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/graphite-ui/index.html +238 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/graphite-ui/studio.js +57 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/growing-city/STYLE.md +66 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/growing-city/index.html +602 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/ink-line/STYLE.md +66 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/ink-line/index.html +777 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/midnight-grid/STYLE.md +56 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/midnight-grid/index.html +186 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/midnight-grid/studio.js +57 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/motion-app-ui/STYLE.md +68 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/paper-cut/STYLE.md +56 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/paper-cut/index.html +244 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/paper-cut/studio.js +57 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/paper-world/STYLE.md +67 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/paper-world/index.html +663 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/particle-field/STYLE.md +59 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/particle-field/index.html +395 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/poster-pop/STYLE.md +52 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/poster-pop/index.html +194 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/poster-pop/studio.js +57 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/risograph/STYLE.md +58 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/risograph/index.html +242 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/risograph/studio.js +57 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/swiss-grid/STYLE.md +53 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/swiss-grid/index.html +138 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/swiss-grid/studio.js +57 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/swiss-kinetic/STYLE.md +63 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/swiss-kinetic/index.html +599 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/time-travel/STYLE.md +65 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/time-travel/index.html +1297 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/weather-widget/STYLE.md +69 -0
- package/workspace/.agents/skills/cleoedits/assets/video_styles/weather-widget/index.html +674 -0
- package/workspace/.agents/skills/cleoedits/references/audio-clearervoice-elevenlabs.md +11 -0
- package/workspace/.agents/skills/cleoedits/references/ffmpeg-and-reels.md +15 -0
- package/workspace/.agents/skills/cleoedits/references/hyperframes-workflows.md +13 -0
- package/workspace/.agents/skills/cleoedits/references/kdenlive-cli-and-mcp.md +12 -0
- package/workspace/.agents/skills/cleoedits/references/motion-design-pipeline.md +7 -0
- package/workspace/.agents/skills/cleoedits/references/motion-taste-emil.md +5 -0
- package/workspace/.agents/skills/cleoedits/references/playwright-demo-capture.md +9 -0
- package/workspace/.agents/skills/cleoedits/references/remotion-workflows.md +13 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/LICENSE +21 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_ass_overlay.py +399 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/__init__.py +235 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/alpha.py +560 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/asr.py +1237 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/color.py +540 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/decision.py +2452 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/drawtext.py +290 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/emit.py +1309 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/emoji.py +518 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/fonts.py +875 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/pacing.py +263 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/pacing_edit.py +432 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/probe.py +1613 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/runner.py +3994 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/text.py +73 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/timeline.py +721 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_common/wrap.py +981 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_contract.py +2454 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_platforms.py +258 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_review.html +754 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_review.py +258 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/_smartcut.py +450 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/audio.py +867 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/background.py +136 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/batch.py +1409 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/broll.py +282 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/caption.py +2207 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/check.py +815 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/color.py +695 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/crop.py +91 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/cropdetect.py +214 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/cut.py +2076 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/deinterlace.py +90 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/denoise.py +94 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/export.py +1033 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/fit.py +729 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/freeze.py +197 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/graphics.py +920 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/grid.py +235 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/insert.py +142 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/join.py +1083 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/look.py +475 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/loop.py +395 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/loudness.py +397 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/metadata.py +416 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/multicam.py +414 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/overlay.py +766 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/pad.py +121 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/probe.py +145 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/proxy.py +93 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/redact.py +162 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/render.py +2424 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/report.py +354 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/reverse.py +114 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/scenes.py +439 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/sequence.py +285 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/silence.py +945 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/speedramp.py +193 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/sphere.py +137 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/stabilize.py +141 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/straighten.py +120 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/sync.py +500 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/verify.py +411 -0
- package/workspace/.agents/skills/cleoedits/scripts/ffmpeg/waveform.py +502 -0
- package/workspace/.agents/skills/cleoedits/scripts/kdenlive_builder.py +284 -0
- package/workspace/.agents/skills/cleoedits/scripts/motion/LICENSE-claude-motion +21 -0
- package/workspace/.agents/skills/cleoedits/scripts/motion/LICENSE-motion-design +21 -0
- package/workspace/.agents/skills/cleoedits/scripts/motion/_media.py +43 -0
- package/workspace/.agents/skills/cleoedits/scripts/motion/pacing_check.py +90 -0
- package/workspace/.agents/skills/cleoedits/scripts/motion/storyboard.py +77 -0
- package/workspace/.agents/skills/cleoedits/scripts/reel_effects/LICENSE +26 -0
- package/workspace/.agents/skills/cleoedits/scripts/reel_effects/fx.py +2717 -0
- package/workspace/.agents/skills/cleoedits/scripts/reel_effects/logos.py +194 -0
- package/workspace/.agents/skills/cleoedits/scripts/reel_effects/sfx.py +105 -0
- package/workspace/.agents/skills/cleoedits/scripts/reel_effects/trim.py +99 -0
- package/workspace/.agents/skills/cleoedits/scripts/reel_effects/words.py +60 -0
- package/workspace/.claude/commands/blender-3d.md +12 -0
- package/workspace/.claude/commands/business-short-form-reels.md +12 -0
- package/workspace/.claude/commands/color-grade.md +12 -0
- package/workspace/.claude/commands/cutout-grid-reel.md +12 -0
- package/workspace/.claude/commands/depth-ui-reel.md +12 -0
- package/workspace/.claude/commands/explainer-panel-reel.md +12 -0
- package/workspace/.claude/commands/freeze-frame.md +12 -0
- package/workspace/.claude/commands/glass-graph.md +12 -0
- package/workspace/.claude/commands/over-the-shoulder.md +12 -0
- package/workspace/.claude/commands/personal-short-form-reels.md +12 -0
- package/workspace/.claude/commands/ranking-format.md +12 -0
- package/workspace/.claude/commands/relight.md +12 -0
- package/workspace/.claude/commands/reverse-engineer.md +12 -0
- package/workspace/.claude/commands/text-behind.md +12 -0
- package/workspace/.claude/commands/tier-list.md +12 -0
- package/workspace/.claude-plugin/plugin.json +8 -0
- package/workspace/.npmignore +15 -0
- package/workspace/AGENTS.md +30 -0
- package/workspace/README.md +63 -0
- package/workspace/assets/fonts/TikTokSans-OFL.txt +93 -0
- package/workspace/assets/fonts/TikTokSans-Variable.ttf +0 -0
- package/workspace/assets/luts/clean_warm.cube +4917 -0
- package/workspace/assets/luts/golden_hour.cube +4917 -0
- package/workspace/assets/luts/moody_dark.cube +4917 -0
- package/workspace/assets/luts/teal_orange.cube +4917 -0
- package/workspace/assets/sfx/NOTICE.txt +1 -0
- package/workspace/assets/sfx/click.wav +0 -0
- package/workspace/assets/sfx/pop.wav +0 -0
- package/workspace/assets/sfx/riser.wav +0 -0
- package/workspace/assets/sfx/whoosh.wav +0 -0
- package/workspace/generators/hyperframes/index.html +39 -0
- package/workspace/generators/hyperframes/package.json +15 -0
- package/workspace/generators/hyperframes/pnpm-lock.yaml +1181 -0
- package/workspace/generators/hyperframes/pnpm-workspace.yaml +10 -0
- package/workspace/generators/remotion/eslint.config.mjs +3 -0
- package/workspace/generators/remotion/package.json +36 -0
- package/workspace/generators/remotion/pnpm-lock.yaml +4179 -0
- package/workspace/generators/remotion/pnpm-workspace.yaml +10 -0
- package/workspace/generators/remotion/remotion.config.ts +13 -0
- package/workspace/generators/remotion/src/Root.tsx +52 -0
- package/workspace/generators/remotion/src/index.css +1 -0
- package/workspace/generators/remotion/src/index.ts +4 -0
- package/workspace/generators/remotion/tsconfig.json +15 -0
- package/workspace/pipeline/scripts/_codec.py +28 -0
- package/workspace/pipeline/scripts/ai_media_api.py +109 -0
- package/workspace/pipeline/scripts/blender_render.py +166 -0
- package/workspace/pipeline/scripts/composite.py +49 -0
- package/workspace/pipeline/scripts/melt.sh +68 -0
- package/workspace/pipeline/scripts/normalize_audio.py +39 -0
- package/workspace/pipeline/scripts/person_matte.py +216 -0
- package/workspace/pipeline/scripts/record_demo.py +69 -0
- package/workspace/pipeline/scripts/whisper_cut.py +98 -0
- package/workspace-manifest.json +908 -0
|
@@ -0,0 +1,599 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=1920, height=1080" />
|
|
6
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
7
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
8
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@700&display=swap" />
|
|
9
|
+
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
|
|
10
|
+
<style>
|
|
11
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
12
|
+
html, body { margin: 0; width: 1920px; height: 1080px; overflow: hidden; background: #F1EEE6; }
|
|
13
|
+
#root { position: relative; width: 1920px; height: 1080px; overflow: hidden; background: #F1EEE6; }
|
|
14
|
+
#stage, #grain, #specks, #light, #vignette { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; }
|
|
15
|
+
#stage text { font-family: "Inter Tight", Arial, sans-serif; font-weight: 700; }
|
|
16
|
+
#grain { mix-blend-mode: multiply; opacity: 0.85; pointer-events: none; }
|
|
17
|
+
#specks { mix-blend-mode: screen; opacity: 0.5; pointer-events: none; }
|
|
18
|
+
#light {
|
|
19
|
+
left: -480px; top: -270px; width: 2880px; height: 1620px; pointer-events: none;
|
|
20
|
+
background: radial-gradient(ellipse 42% 46% at 34% 30%, rgba(255, 252, 244, 0.55), rgba(255, 252, 244, 0) 70%);
|
|
21
|
+
mix-blend-mode: soft-light;
|
|
22
|
+
}
|
|
23
|
+
#win { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; clip-path: url(#winClip); opacity: 0; }
|
|
24
|
+
.wl { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; }
|
|
25
|
+
#winPanel { opacity: 0; }
|
|
26
|
+
.wl svg { position: absolute; left: 0; top: 0; }
|
|
27
|
+
#winMove { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 50% 50%; }
|
|
28
|
+
#vignette {
|
|
29
|
+
pointer-events: none; mix-blend-mode: multiply;
|
|
30
|
+
background:
|
|
31
|
+
radial-gradient(ellipse 85% 80% at 40% 38%, rgba(0,0,0,0) 55%, rgba(92, 72, 48, 0.16) 100%),
|
|
32
|
+
linear-gradient(160deg, rgba(0,0,0,0) 55%, rgba(80, 60, 40, 0.07) 100%);
|
|
33
|
+
}
|
|
34
|
+
</style>
|
|
35
|
+
</head>
|
|
36
|
+
<body>
|
|
37
|
+
<div id="root" data-composition-id="main" data-start="0" data-duration="14" data-width="1920" data-height="1080">
|
|
38
|
+
<svg id="stage" class="clip" data-start="0" data-duration="14" data-track-index="0"
|
|
39
|
+
viewBox="0 0 1920 1080" width="1920" height="1080" xmlns="http://www.w3.org/2000/svg">
|
|
40
|
+
<defs id="defs"></defs>
|
|
41
|
+
<g id="world"></g>
|
|
42
|
+
</svg>
|
|
43
|
+
<div id="win"><div id="winMove">
|
|
44
|
+
<div id="winSkirt" class="wl"><svg width="1920" height="1080" viewBox="0 0 1920 1080" xmlns="http://www.w3.org/2000/svg">
|
|
45
|
+
<rect width="1920" height="1080" fill="#111111"/>
|
|
46
|
+
<g id="skirtDrift"><g id="skirtA"><path d="M 560 640 A 310 310 0 0 0 1180 640 Z" fill="#E63022"/><path d="M 640 640 A 230 120 0 0 1 1100 640 Z" fill="#B3241A"/></g></g>
|
|
47
|
+
</svg></div>
|
|
48
|
+
<div id="winPanel" class="wl"><svg width="1920" height="1080" viewBox="0 0 1920 1080" xmlns="http://www.w3.org/2000/svg">
|
|
49
|
+
<rect width="1920" height="1080" fill="#DDD7CD"/>
|
|
50
|
+
<rect y="880" width="1920" height="200" fill="#CBC4B8"/>
|
|
51
|
+
<ellipse id="pShadow" cx="930" cy="896" rx="190" ry="22" fill="#111111" opacity="0.18"/>
|
|
52
|
+
<g id="pFig"><g id="pBody">
|
|
53
|
+
<rect id="legL" x="919" y="600" width="24" height="200" fill="#111111"/>
|
|
54
|
+
<rect id="legR" x="919" y="600" width="24" height="200" fill="#111111"/>
|
|
55
|
+
<rect id="armL" x="930" y="358" width="200" height="22" fill="#111111"/>
|
|
56
|
+
<rect id="armR" x="930" y="358" width="200" height="22" fill="#111111"/>
|
|
57
|
+
<rect x="897" y="350" width="66" height="96" fill="#111111"/>
|
|
58
|
+
<circle cx="930" cy="296" r="46" fill="#111111"/>
|
|
59
|
+
<g id="pSkirt"><path d="M 755 440 A 175 175 0 0 0 1105 440 Z" fill="#E63022"/></g>
|
|
60
|
+
</g></g>
|
|
61
|
+
</svg></div>
|
|
62
|
+
</div></div>
|
|
63
|
+
<div id="light" class="clip" data-start="0" data-duration="14" data-track-index="1"></div>
|
|
64
|
+
<div id="vignette" class="clip" data-start="0" data-duration="14" data-track-index="2"></div>
|
|
65
|
+
<canvas id="grain" class="clip" data-start="0" data-duration="14" data-track-index="3" width="1920" height="1080"></canvas>
|
|
66
|
+
<canvas id="specks" class="clip" data-start="0" data-duration="14" data-track-index="4" width="1920" height="1080"></canvas>
|
|
67
|
+
</div>
|
|
68
|
+
<script>
|
|
69
|
+
// ============================================================
|
|
70
|
+
// Swiss kinetic type: a printed Swiss poster that moves on the beat.
|
|
71
|
+
// SVG on a 6 x 4 grid, one red dot that is the same object all the way through. 14 s, does not loop.
|
|
72
|
+
// Beats (120 BPM, beat = 0.5 s):
|
|
73
|
+
// 0.0-3.0 grid draws, red circle lands, hero word slams up, slices, rotates into a spine
|
|
74
|
+
// 3.0-7.5 circle shrinks to a full stop, word 2 steps through the rows like notes, word 3 wipes in, word 4 slams
|
|
75
|
+
// 7.5-11.0 poster slices out along the rows; word 4 grows giant, its letters become windows; the i opens into a panel
|
|
76
|
+
// 11.0-14 three black tiles stamp down, slide like a puzzle, the dot grows back into the big circle
|
|
77
|
+
// Change words: WORDS below. Each word needs a line in MET (see measureMET at the bottom).
|
|
78
|
+
// Change colours: RED (the one accent), INK, PAPER.
|
|
79
|
+
// ============================================================
|
|
80
|
+
(function () {
|
|
81
|
+
const DUR = 14.0;
|
|
82
|
+
const RED = '#E63022', INK = '#111111', PAPER = '#F1EEE6';
|
|
83
|
+
// ---------- words ----------
|
|
84
|
+
// hero: fills the width, then turns into a spine. melody: 5 letters step through the rows.
|
|
85
|
+
// tittle: must contain a dotless "ı" (the red dot becomes its dot). window: must contain an "i" (it opens into a panel).
|
|
86
|
+
// tiles: [top-left, top-right, bottom-left] at the start of the puzzle; the end reads tiles[1] / tiles[0] tiles[2].
|
|
87
|
+
const WORDS = { hero: 'Type', melody: 'moves', tittle: 'lıke', window: 'music', tiles: ['in', 'Made', 'code'] };
|
|
88
|
+
const FONT = 'Inter Tight';
|
|
89
|
+
const NS = 'http://www.w3.org/2000/svg';
|
|
90
|
+
const defs = document.getElementById('defs');
|
|
91
|
+
const world = document.getElementById('world');
|
|
92
|
+
|
|
93
|
+
// ---------- seeded PRNG ----------
|
|
94
|
+
function mulberry32(a) { return function () { a |= 0; a = (a + 0x6D2B79F5) | 0; let t = Math.imul(a ^ (a >>> 15), 1 | a); t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t; return ((t ^ (t >>> 14)) >>> 0) / 4294967296; }; }
|
|
95
|
+
const rnd = mulberry32(5150);
|
|
96
|
+
|
|
97
|
+
// ---------- helpers ----------
|
|
98
|
+
function el(tag, attrs, parent) { const e = document.createElementNS(NS, tag); if (attrs) for (const k in attrs) e.setAttribute(k, attrs[k]); if (parent) parent.appendChild(e); return e; }
|
|
99
|
+
// Inter Tight 700 metrics at 100px: [advance, inkLeft, inkRight, ascent, descent] from canvas measureText.
|
|
100
|
+
// Hard-coded so the layout never depends on font-load timing. "" and the word prefixes are needed too.
|
|
101
|
+
const MET = {"Type":[228.7,-1.9,226.7,72.8,20.5],"x":[54.1,-0.8,53.3,54.6,0],"m":[88.1,-4.4,83.7,55.3,0],"mo":[146.2,-4.4,144,55.3,1.1],"mov":[199.8,-4.4,199.7,55.3,1.1],"move":[254.3,-4.4,252.3,55.3,1.1],"moves":[307.2,-4.4,305.4,55.3,1.1],"l":[24,-4.4,19.5,72.8,0],"l\u0131ke":[156.9,-4.4,154.9,72.8,1.1],"\u0131":[24,-4.4,19.5,54.6,0],"music":[279.4,-4.4,277.3,76.9,1.1],"Made":[259.5,-4.7,257.5,72.8,1.1],"in":[83.1,-3.8,78.7,76.9,0],"code":[229.6,-2.2,227.6,72.8,1.1],"mus":[200,-4.4,198.1,55.3,1.1],"musi":[223.9,-4.4,220.1,76.9,1.1],"":[0,0,0,0,0]};
|
|
102
|
+
function M(s, size) { const m = MET[s], k = size / 100; return { w: m[0] * k, L: m[1] * k, R: m[2] * k, A: m[3] * k, D: m[4] * k }; }
|
|
103
|
+
function txt(parent, s, x, y, size, fill) { const t = el('text', { x: x, y: y, 'font-size': size, fill: fill, 'font-family': FONT, 'font-weight': 700 }, parent); t.textContent = s; return t; }
|
|
104
|
+
let fid = 0;
|
|
105
|
+
function blur(target, region) {
|
|
106
|
+
const id = 'mb' + (fid++);
|
|
107
|
+
const r = region || { x: '-20%', y: '-20%', w: '140%', h: '140%' };
|
|
108
|
+
const f = el('filter', { id: id, x: r.x, y: r.y, width: r.w, height: r.h, 'color-interpolation-filters': 'sRGB' }, defs);
|
|
109
|
+
const g = el('feGaussianBlur', { in: 'SourceGraphic', stdDeviation: '0 0' }, f);
|
|
110
|
+
target.setAttribute('filter', 'url(#' + id + ')');
|
|
111
|
+
return g;
|
|
112
|
+
}
|
|
113
|
+
function clip(id, x, y, w, h) { const c = el('clipPath', { id: id, clipPathUnits: 'userSpaceOnUse' }, defs); return el('rect', { x: x, y: y, width: w, height: h }, c); }
|
|
114
|
+
|
|
115
|
+
// ---------- grid: 6 cols x 4 rows ----------
|
|
116
|
+
const colL = k => 80 + 300 * k; // col 260, gutter 40
|
|
117
|
+
const rowT = r => 92 + 248 * r; // row 152, gutter 96
|
|
118
|
+
const rowB = r => rowT(r) + 152;
|
|
119
|
+
const GX0 = 80, GX1 = 1840, GY0 = 92, GY1 = 988;
|
|
120
|
+
|
|
121
|
+
const tl = gsap.timeline({ paused: true });
|
|
122
|
+
|
|
123
|
+
// paper base
|
|
124
|
+
el('rect', { x: 0, y: 0, width: 1920, height: 1080, fill: PAPER }, world);
|
|
125
|
+
|
|
126
|
+
const gridG = el('g', { id: 'grid', opacity: 0.6 }, world);
|
|
127
|
+
const posterG = el('g', {}, world);
|
|
128
|
+
const posterIn = el('g', { id: 'posterIn' }, posterG);
|
|
129
|
+
const vlines = [], hlines = [];
|
|
130
|
+
for (let k = 0; k < 6; k++) for (const x of [colL(k), colL(k) + 260]) {
|
|
131
|
+
vlines.push(el('line', { x1: x, y1: GY0, x2: x, y2: GY0 + 96, stroke: INK, 'stroke-opacity': 0.34, 'stroke-width': 1.5 }, gridG));
|
|
132
|
+
}
|
|
133
|
+
for (let r = 0; r < 4; r++) for (const y of [rowT(r), rowB(r)]) {
|
|
134
|
+
hlines.push(el('line', { x1: GX0, y1: y, x2: GX0 + 40, y2: y, stroke: INK, 'stroke-opacity': 0.34, 'stroke-width': 1.5 }, gridG));
|
|
135
|
+
}
|
|
136
|
+
vlines.forEach((l, i) => tl.to(l, { attr: { y2: GY1 }, duration: 0.55, ease: 'power3.out' }, 0.0 + i * 0.035));
|
|
137
|
+
hlines.forEach((l, i) => tl.to(l, { attr: { x2: GX1 }, duration: 0.55, ease: 'power3.out' }, 0.28 + i * 0.045));
|
|
138
|
+
function pulse(t, peak) { tl.fromTo(gridG, { opacity: peak || 1 }, { opacity: 0.6, duration: 0.45, ease: 'power2.out', immediateRender: false }, t); }
|
|
139
|
+
|
|
140
|
+
// ---------- TYPE ----------
|
|
141
|
+
const mT100 = M(WORDS.hero, 100);
|
|
142
|
+
const fT = Math.round(1760 / ((mT100.R + mT100.L) / 100));
|
|
143
|
+
const mT = M(WORDS.hero, fT);
|
|
144
|
+
const T_x = GX0 + mT.L, T_base = GY1 - mT.D, T_top = T_base - mT.A;
|
|
145
|
+
const exitType = el('g', {}, posterIn);
|
|
146
|
+
const typeOuter = el('g', {}, exitType);
|
|
147
|
+
const baseRule = el('rect', { x: GX0, y: 0, width: 0, height: 14, fill: RED }, typeOuter);
|
|
148
|
+
const typeClipRect = clip('typeClip', -400, -3000, 2800, 3000 + GY1 + 3);
|
|
149
|
+
const typeMask = el('g', { 'clip-path': 'url(#typeClip)' }, typeOuter);
|
|
150
|
+
const typeRise = el('g', {}, typeMask);
|
|
151
|
+
const typeBlur = blur(typeRise, { x: '-5%', y: '-40%', w: '110%', h: '180%' });
|
|
152
|
+
const ghostG = el('g', {}, typeRise);
|
|
153
|
+
txt(ghostG, WORDS.hero, T_x, T_base, fT, RED);
|
|
154
|
+
const inkH = GY1 - T_top;
|
|
155
|
+
const c1 = Math.round(T_top + inkH * 0.36), c2 = Math.round(T_top + inkH * 0.69);
|
|
156
|
+
const bands = [[-3000, c1], [c1, c2], [c2, 4000]];
|
|
157
|
+
const slices = bands.map((b, i) => {
|
|
158
|
+
clip('band' + i, -3000, b[0], 8000, b[1] - b[0]);
|
|
159
|
+
const g = el('g', { 'clip-path': 'url(#band' + i + ')' }, typeRise);
|
|
160
|
+
txt(g, WORDS.hero, T_x, T_base, fT, INK);
|
|
161
|
+
return g;
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
// ---------- MOVES ----------
|
|
165
|
+
const fM = Math.round(152 / (M('x', 100).A / 100));
|
|
166
|
+
const mMv = M(WORDS.melody, fM);
|
|
167
|
+
const MV_x = colL(2) + mMv.L, MV_base = rowB(0);
|
|
168
|
+
const exitMoves = el('g', {}, posterIn);
|
|
169
|
+
clip('movesClip', 600, -3000, 1280, 8000);
|
|
170
|
+
const movesImpact = el('g', {}, exitMoves);
|
|
171
|
+
const movesG = el('g', { 'clip-path': 'url(#movesClip)' }, movesImpact);
|
|
172
|
+
const letters = WORDS.melody.split('').map((ch, i) => {
|
|
173
|
+
const slide = el('g', {}, movesG);
|
|
174
|
+
const jump = el('g', {}, slide);
|
|
175
|
+
const b = blur(jump, { x: '-60%', y: '-120%', w: '220%', h: '340%' });
|
|
176
|
+
txt(jump, ch, MV_x + M(WORDS.melody.slice(0, i), fM).w, MV_base, fM, INK);
|
|
177
|
+
return { slide, jump, b };
|
|
178
|
+
});
|
|
179
|
+
const periodX = MV_x + mMv.w + 62, periodY = MV_base - 44;
|
|
180
|
+
|
|
181
|
+
// ---------- LIKE ----------
|
|
182
|
+
const fL = Math.round(400 / (M('l', 100).A / 100));
|
|
183
|
+
const DI = WORDS.tittle.indexOf('\u0131');
|
|
184
|
+
const mL = M(WORDS.tittle, fL);
|
|
185
|
+
const LK_x = colL(2) + mL.L, LK_base = rowB(2);
|
|
186
|
+
const exitLike = el('g', {}, posterIn);
|
|
187
|
+
const likeImpact = el('g', {}, exitLike);
|
|
188
|
+
const likeClipRect = clip('likeClip', 600, -3000, 80, 8000);
|
|
189
|
+
const likeG = el('g', { 'clip-path': 'url(#likeClip)' }, likeImpact);
|
|
190
|
+
txt(likeG, WORDS.tittle, LK_x, LK_base, fL, INK);
|
|
191
|
+
const iX = LK_x + M(WORDS.tittle.slice(0, DI), fL).w, mI = M('\u0131', fL);
|
|
192
|
+
const tittleX = iX + (-mI.L + mI.R) / 2, tittleY = rowT(1) + 44;
|
|
193
|
+
const wipe = el('rect', { x: colL(2), y: rowT(1), width: 96, height: 0, fill: RED }, posterIn);
|
|
194
|
+
|
|
195
|
+
// EQ bars beside "like"
|
|
196
|
+
const exitEQ = el('g', {}, posterIn);
|
|
197
|
+
const eq = [0, 1, 2, 3].map(i => el('rect', { x: 1692 + i * 40, y: rowB(2), width: 28, height: 0, fill: RED }, exitEQ));
|
|
198
|
+
|
|
199
|
+
// ---------- MUSIC ----------
|
|
200
|
+
const mMu = M(WORDS.window, fM);
|
|
201
|
+
const MU_x = colL(2) + mMu.L, MU_base = rowB(3);
|
|
202
|
+
const exitMusic = el('g', {}, world);
|
|
203
|
+
clip('musicClip', -400, rowT(3) - 160, 2800, 160 + 152 + 4);
|
|
204
|
+
const musicMask = el('g', { 'clip-path': 'url(#musicClip)' }, exitMusic);
|
|
205
|
+
const musicRise = el('g', {}, musicMask);
|
|
206
|
+
const musicBlur = blur(musicRise, { x: '-5%', y: '-60%', w: '110%', h: '220%' });
|
|
207
|
+
const musicGhost = el('g', {}, musicRise);
|
|
208
|
+
txt(musicGhost, WORDS.window, MU_x, MU_base, fM, RED);
|
|
209
|
+
txt(musicRise, WORDS.window, MU_x, MU_base, fM, INK);
|
|
210
|
+
|
|
211
|
+
// ---------- TILES (sliding puzzle) ----------
|
|
212
|
+
const TW = 860, TH = 400;
|
|
213
|
+
const SLOT = { TL: [80, 92], TR: [980, 92], BL: [80, 588], BR: [980, 588] };
|
|
214
|
+
const center = s => [SLOT[s][0] + TW / 2, SLOT[s][1] + TH / 2];
|
|
215
|
+
const tg = el('linearGradient', { id: 'tileGrad', x1: 0, y1: 0, x2: 0.25, y2: 1 }, defs);
|
|
216
|
+
el('stop', { offset: 0, 'stop-color': '#1d1c1a' }, tg); el('stop', { offset: 1, 'stop-color': '#0c0c0c' }, tg);
|
|
217
|
+
const shadowF = el('filter', { id: 'tshadow', x: '-20%', y: '-30%', width: '140%', height: '160%' }, defs);
|
|
218
|
+
el('feGaussianBlur', { stdDeviation: 18 }, shadowF);
|
|
219
|
+
const fTile = Math.floor((TW - 64) / (Math.max(...WORDS.tiles.map(w => M(w, 100).R + M(w, 100).L)) / 100));
|
|
220
|
+
function makeTile(word, slot) {
|
|
221
|
+
const g = el('g', {}, world);
|
|
222
|
+
const lift = el('g', {}, g);
|
|
223
|
+
const sh = el('rect', { x: 6, y: 14, width: TW - 12, height: TH - 6, fill: '#2a1d10', opacity: 0, filter: 'url(#tshadow)' }, lift);
|
|
224
|
+
const body = el('g', {}, lift);
|
|
225
|
+
const b = blur(body, { x: '-10%', y: '-10%', w: '120%', h: '120%' });
|
|
226
|
+
el('rect', { x: 0, y: 0, width: TW, height: TH, fill: 'url(#tileGrad)' }, body);
|
|
227
|
+
el('rect', { x: 0, y: 0, width: TW, height: 2, fill: '#ffffff', opacity: 0.09 }, body);
|
|
228
|
+
const m = M(word, fTile);
|
|
229
|
+
const inner = el('g', {}, body);
|
|
230
|
+
txt(inner, word, 32 + m.L, TH - 32, fTile, PAPER);
|
|
231
|
+
gsap.set(g, { x: SLOT[slot][0], y: SLOT[slot][1] });
|
|
232
|
+
gsap.set(lift, { opacity: 0, transformOrigin: '50% 50%' });
|
|
233
|
+
return { g, lift, sh, b, slot, inner };
|
|
234
|
+
}
|
|
235
|
+
const tIn = makeTile(WORDS.tiles[0], 'TL');
|
|
236
|
+
const tMade = makeTile(WORDS.tiles[1], 'TR');
|
|
237
|
+
const tCode = makeTile(WORDS.tiles[2], 'BL');
|
|
238
|
+
|
|
239
|
+
// ---------- THE RED DOT (one continuous object) ----------
|
|
240
|
+
const dotPos = el('g', {}, world);
|
|
241
|
+
const dotScale = el('g', {}, dotPos);
|
|
242
|
+
const dotSquash = el('g', {}, dotScale);
|
|
243
|
+
el('circle', { cx: 0, cy: 0, r: 200, fill: RED }, dotSquash);
|
|
244
|
+
const DOT = 0.22; // 88 px dot
|
|
245
|
+
gsap.set(dotPos, { x: 1560, y: 292, mixBlendMode: 'multiply' });
|
|
246
|
+
gsap.set(dotScale, { scale: 0.7, opacity: 0, transformOrigin: '50% 50%' });
|
|
247
|
+
gsap.set(dotSquash, { transformOrigin: '50% 50%' });
|
|
248
|
+
|
|
249
|
+
function squash(t, sx, sy, dur) {
|
|
250
|
+
tl.fromTo(dotSquash, { scaleX: sx, scaleY: sy }, { scaleX: 1, scaleY: 1, duration: dur || 0.4, ease: 'elastic.out(1, 0.45)', immediateRender: false }, t);
|
|
251
|
+
}
|
|
252
|
+
// ================== TIMELINE ==================
|
|
253
|
+
// 0.45 red baseline rule draws where "Type" will land
|
|
254
|
+
gsap.set(baseRule, { attr: { y: T_base + 4 } });
|
|
255
|
+
tl.to(baseRule, { attr: { width: GX1 - GX0 }, duration: 0.7, ease: 'power3.inOut' }, 0.2);
|
|
256
|
+
|
|
257
|
+
// 1.0 circle lands
|
|
258
|
+
tl.to(dotScale, { scale: 1, opacity: 1, duration: 0.55, ease: 'back.out(1.5)' }, 0.95);
|
|
259
|
+
pulse(1.0, 0.85);
|
|
260
|
+
|
|
261
|
+
// 1.5 SLAM "Type"
|
|
262
|
+
gsap.set(typeRise, { y: 780 });
|
|
263
|
+
gsap.set(ghostG, { x: -16, y: 40 });
|
|
264
|
+
tl.to(typeRise, { y: 0, duration: 0.36, ease: 'expo.out' }, 1.48);
|
|
265
|
+
tl.fromTo(typeBlur, { attr: { stdDeviation: '0 34' } }, { attr: { stdDeviation: '0 0' }, duration: 0.24, ease: 'power2.out', immediateRender: false }, 1.48);
|
|
266
|
+
tl.to(ghostG, { x: 0, y: 0, duration: 0.42, ease: 'power3.out' }, 1.58);
|
|
267
|
+
pulse(1.52);
|
|
268
|
+
tl.set(typeClipRect, { attr: { y: -3000, height: 8000 } }, 1.95);
|
|
269
|
+
|
|
270
|
+
// 2.0 slice
|
|
271
|
+
tl.to(slices[0], { x: -150, duration: 0.22, ease: 'power4.inOut' }, 1.92);
|
|
272
|
+
tl.to(slices[1], { x: 190, duration: 0.22, ease: 'power4.inOut' }, 1.95);
|
|
273
|
+
tl.to(slices[2], { x: -90, duration: 0.22, ease: 'power4.inOut' }, 1.98);
|
|
274
|
+
// 2.5 snap back + circle beat
|
|
275
|
+
tl.to(slices, { x: 0, duration: 0.26, ease: 'expo.out', stagger: 0.03 }, 2.46);
|
|
276
|
+
tl.to(dotScale, { scale: 0.9, duration: 0.08, ease: 'power2.out' }, 2.48);
|
|
277
|
+
tl.to(dotScale, { scale: 1, duration: 0.35, ease: 'elastic.out(1, 0.4)' }, 2.56);
|
|
278
|
+
tl.set(ghostG, { opacity: 0 }, 2.8);
|
|
279
|
+
|
|
280
|
+
// 3.0 rotate 90 into a spine (cols 1-2)
|
|
281
|
+
const tcx = GX0 + 880, tcy = (T_top + GY1) / 2;
|
|
282
|
+
const sS = (GY1 - GY0) / 1760;
|
|
283
|
+
const spineW = inkH * sS;
|
|
284
|
+
tl.to(typeOuter, { rotation: -90, scale: sS, x: GX0 + spineW / 2 - tcx, y: (GY0 + GY1) / 2 - tcy, svgOrigin: tcx + ' ' + tcy, duration: 0.46, ease: 'power4.inOut' }, 2.82);
|
|
285
|
+
// (rotation lands with a 1.5 degree overshoot and settles)
|
|
286
|
+
tl.to(typeOuter, { rotation: -88.5, svgOrigin: tcx + ' ' + tcy, duration: 0.1, ease: 'power2.out' }, 3.28);
|
|
287
|
+
tl.to(typeOuter, { rotation: -90, svgOrigin: tcx + ' ' + tcy, duration: 0.4, ease: 'elastic.out(1, 0.45)' }, 3.38);
|
|
288
|
+
pulse(3.05, 0.9);
|
|
289
|
+
|
|
290
|
+
// circle shrinks into the full stop of "moves"
|
|
291
|
+
tl.to(dotScale, { scale: DOT, duration: 0.5, ease: 'power3.inOut' }, 2.9);
|
|
292
|
+
tl.to(dotPos, { x: periodX, duration: 0.62, ease: 'power3.inOut' }, 2.9);
|
|
293
|
+
tl.to(dotPos, { y: periodY, duration: 0.62, ease: 'back.out(1.2)' }, 2.9);
|
|
294
|
+
squash(3.52, 1.35, 0.72, 0.45);
|
|
295
|
+
|
|
296
|
+
// 3.5 "moves" slides in
|
|
297
|
+
letters.forEach((L, i) => {
|
|
298
|
+
gsap.set(L.slide, { x: 1240 });
|
|
299
|
+
tl.to(L.slide, { x: 0, duration: 0.44, ease: 'expo.out' }, 3.02 + i * 0.03);
|
|
300
|
+
tl.fromTo(L.b, { attr: { stdDeviation: '46 0' } }, { attr: { stdDeviation: '0 0' }, duration: 0.3, ease: 'power2.out', immediateRender: false }, 3.02 + i * 0.03);
|
|
301
|
+
});
|
|
302
|
+
pulse(3.5, 0.85);
|
|
303
|
+
|
|
304
|
+
// 4.0 / 4.5 melody, 5.0 back in line
|
|
305
|
+
const melodies = [[4.0, [0, 1, 2, 3, 2]], [4.5, [3, 2, 1, 0, 1]], [5.0, [0, 0, 0, 0, 0]]];
|
|
306
|
+
// rows repeat if the melody word is longer than 5 letters
|
|
307
|
+
const LAST = letters.length - 1, rowOf = (rows, i) => rows[i % rows.length];
|
|
308
|
+
let prev = [0, 0, 0, 0, 0];
|
|
309
|
+
melodies.forEach(([t, rows]) => {
|
|
310
|
+
letters.forEach((L, i) => {
|
|
311
|
+
const st = t - 0.06 + i * 0.03;
|
|
312
|
+
if (rowOf(rows, i) !== rowOf(prev, i)) {
|
|
313
|
+
tl.to(L.jump, { y: rowOf(rows, i) * 248, duration: 0.3, ease: 'back.out(1.25)' }, st);
|
|
314
|
+
tl.fromTo(L.b, { attr: { stdDeviation: '0 26' } }, { attr: { stdDeviation: '0 0' }, duration: 0.2, ease: 'power2.out', immediateRender: false }, st);
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
// dot rides as the full stop of the last letter
|
|
318
|
+
const st = t - 0.06 + LAST * 0.03 + 0.05;
|
|
319
|
+
const yTo = periodY + rowOf(rows, LAST) * 248;
|
|
320
|
+
if (rowOf(rows, LAST) !== rowOf(prev, LAST)) {
|
|
321
|
+
tl.to(dotPos, { y: yTo, duration: 0.32, ease: 'back.out(1.4)' }, st);
|
|
322
|
+
squash(st + 0.2, 1.25, 0.8, 0.35);
|
|
323
|
+
}
|
|
324
|
+
prev = rows;
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
// 5.5 red bar wipe reveals "like"
|
|
328
|
+
tl.to(wipe, { attr: { height: 400 }, duration: 0.14, ease: 'power3.out' }, 5.46);
|
|
329
|
+
tl.to(wipe, { attr: { x: GX1 - 96 }, duration: 0.46, ease: 'power3.inOut' }, 5.58);
|
|
330
|
+
tl.to(likeClipRect, { attr: { width: GX1 - 96 - 600 }, duration: 0.46, ease: 'power3.inOut' }, 5.58);
|
|
331
|
+
tl.to(wipe, { attr: { x: GX1, width: 0 }, duration: 0.2, ease: 'power3.in' }, 6.04);
|
|
332
|
+
|
|
333
|
+
// 6.0 the dot hops from full stop to the tittle of "like"
|
|
334
|
+
const hopProxy = { p: 0 };
|
|
335
|
+
const hx0 = periodX, hy0 = periodY, hx1 = tittleX, hy1 = tittleY;
|
|
336
|
+
tl.to(hopProxy, {
|
|
337
|
+
p: 1, duration: 0.42, ease: 'power2.inOut',
|
|
338
|
+
onUpdate: () => {
|
|
339
|
+
const p = hopProxy.p;
|
|
340
|
+
gsap.set(dotPos, { x: hx0 + (hx1 - hx0) * p, y: hy0 + (hy1 - hy0) * p - Math.sin(Math.PI * p) * 150 });
|
|
341
|
+
}
|
|
342
|
+
}, 5.9);
|
|
343
|
+
squash(6.32, 1.3, 0.75, 0.45);
|
|
344
|
+
|
|
345
|
+
// 6.5 "music" slams up into row 4 + EQ bars
|
|
346
|
+
gsap.set(musicRise, { y: 330 });
|
|
347
|
+
gsap.set(musicGhost, { x: 14, y: 34 });
|
|
348
|
+
tl.to(musicRise, { y: 0, duration: 0.34, ease: 'expo.out' }, 6.46);
|
|
349
|
+
tl.fromTo(musicBlur, { attr: { stdDeviation: '0 30' } }, { attr: { stdDeviation: '0 0' }, duration: 0.22, ease: 'power2.out', immediateRender: false }, 6.46);
|
|
350
|
+
tl.to(musicGhost, { x: 0, y: 0, duration: 0.42, ease: 'power3.out' }, 6.56);
|
|
351
|
+
pulse(6.5);
|
|
352
|
+
[movesImpact, likeImpact].forEach((g, i) => {
|
|
353
|
+
tl.to(g, { y: 8, duration: 0.07, ease: 'power2.out' }, 6.52 + i * 0.03);
|
|
354
|
+
tl.to(g, { y: 0, duration: 0.4, ease: 'elastic.out(1, 0.5)' }, 6.59 + i * 0.03);
|
|
355
|
+
});
|
|
356
|
+
const eqH = [[6.5, [220, 340, 160, 280]], [7.0, [300, 150, 380, 210]]];
|
|
357
|
+
eqH.forEach(([t, hs]) => eq.forEach((r, i) => tl.to(r, { attr: { height: hs[i], y: rowB(2) - hs[i] }, duration: 0.2, ease: 'power4.out' }, t - 0.04 + i * 0.025)));
|
|
358
|
+
pulse(7.0, 0.8);
|
|
359
|
+
|
|
360
|
+
// ================== act 2: the window word gets a body ==================
|
|
361
|
+
function arcTo(t, from, to, dur, h) {
|
|
362
|
+
const pr = { p: 0 };
|
|
363
|
+
tl.to(pr, {
|
|
364
|
+
p: 1, duration: dur, ease: 'power3.inOut',
|
|
365
|
+
onUpdate: () => {
|
|
366
|
+
const p = pr.p;
|
|
367
|
+
gsap.set(dotPos, { x: from[0] + (to[0] - from[0]) * p, y: from[1] + (to[1] - from[1]) * p - Math.sin(Math.PI * p) * h });
|
|
368
|
+
}
|
|
369
|
+
}, t);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
// 7.5 the poster is sliced along the grid rows and the bands shear out; the window word stays and grows
|
|
373
|
+
const pb = [[-400, 292], [292, 764], [764, 1500]];
|
|
374
|
+
const pbands = pb.map((b, i) => {
|
|
375
|
+
clip('pband' + i, -4000, b[0], 10000, b[1] - b[0]);
|
|
376
|
+
const g = el('g', { 'clip-path': 'url(#pband' + i + ')', opacity: 0 }, world);
|
|
377
|
+
el('use', { href: '#posterIn' }, g);
|
|
378
|
+
const bl = blur(g, { x: '-10%', y: '-5%', w: '120%', h: '110%' });
|
|
379
|
+
return { g, bl };
|
|
380
|
+
});
|
|
381
|
+
world.insertBefore(pbands[0].g, posterG.nextSibling);
|
|
382
|
+
world.insertBefore(pbands[1].g, pbands[0].g.nextSibling);
|
|
383
|
+
world.insertBefore(pbands[2].g, pbands[1].g.nextSibling);
|
|
384
|
+
tl.set(posterG, { opacity: 0 }, 7.46);
|
|
385
|
+
pbands.forEach((B, i) => {
|
|
386
|
+
tl.set(B.g, { opacity: 1 }, 7.46);
|
|
387
|
+
const t = 7.46 + i * 0.05;
|
|
388
|
+
tl.to(B.g, { x: (i % 2 ? 2200 : -2200), duration: 0.3, ease: 'power4.in' }, t);
|
|
389
|
+
tl.fromTo(B.bl, { attr: { stdDeviation: '0 0' } }, { attr: { stdDeviation: '70 0' }, duration: 0.3, ease: 'power4.in', immediateRender: false }, t);
|
|
390
|
+
});
|
|
391
|
+
|
|
392
|
+
// giant window-word geometry (fills the width), and the clip that turns it into a window
|
|
393
|
+
const WI = WORDS.window.indexOf('i');
|
|
394
|
+
const m100 = M(WORDS.window, 100);
|
|
395
|
+
const fG = Math.round(1760 / ((m100.R + m100.L) / 100));
|
|
396
|
+
const kG = fG / 100;
|
|
397
|
+
const mG = M(WORDS.window, fG);
|
|
398
|
+
const G_x = GX0 + mG.L, G_base = Math.round(540 + 0.357 * fG);
|
|
399
|
+
const iAdv = M(WORDS.window.slice(0, WI), fG).w, mIG = M('\u0131', fG);
|
|
400
|
+
const dc = el('clipPath', { id: 'winClip', clipPathUnits: 'userSpaceOnUse' }, defs);
|
|
401
|
+
const cMus = txt(dc, WORDS.window.slice(0, WI), G_x, G_base, fG, '#000');
|
|
402
|
+
// the i is drawn as a plain stem rect so it can open into the panel
|
|
403
|
+
const cStem = el('rect', { x: G_x + iAdv - mIG.L, y: G_base - mIG.A, width: mIG.R + mIG.L, height: mIG.A }, dc);
|
|
404
|
+
const cC = txt(dc, WORDS.window.slice(WI + 1), G_x + M(WORDS.window.slice(0, WI + 1), fG).w, G_base, fG, '#000');
|
|
405
|
+
const gTitX = G_x + iAdv + (mIG.R - mIG.L) / 2, gTitY = G_base - M('l', fG).A + 44;
|
|
406
|
+
|
|
407
|
+
// the black word scales up from row 4 to the giant word (cut on motion with the slice-out)
|
|
408
|
+
tl.to(exitMusic, { scale: fG / fM, x: G_x - MU_x, y: G_base - MU_base, svgOrigin: MU_x + ' ' + MU_base, duration: 0.46, ease: 'power4.inOut' }, 7.5);
|
|
409
|
+
tl.to(eq, { attr: { height: 0, y: rowB(2) }, duration: 0.2, ease: 'power4.in', stagger: 0.02 }, 7.44);
|
|
410
|
+
// the dot leaves the "like" tittle and lands on the giant i
|
|
411
|
+
arcTo(7.52, [tittleX, tittleY], [gTitX, gTitY], 0.44, 180);
|
|
412
|
+
squash(7.96, 1.35, 0.72, 0.45);
|
|
413
|
+
|
|
414
|
+
// 8.0 HARD CUT: the black letters become windows, a red skirt spins inside them
|
|
415
|
+
tl.set(exitMusic, { opacity: 0 }, 7.97);
|
|
416
|
+
tl.set('#win', { opacity: 1 }, 7.97);
|
|
417
|
+
gsap.set('#winMove', { x: -180, y: -220, scale: 2.0 });
|
|
418
|
+
tl.to('#winMove', { x: -120, y: -230, scale: 2.12, duration: 1.27, ease: 'none' }, 7.97);
|
|
419
|
+
// a red skirt shape spins inside the letterforms
|
|
420
|
+
tl.fromTo('#skirtA', { rotation: -40, svgOrigin: '870 640' }, { rotation: 420, svgOrigin: '870 640', duration: 1.6, ease: 'power1.inOut' }, 7.8);
|
|
421
|
+
tl.fromTo('#skirtDrift', { x: -60, y: 30 }, { x: 140, y: -20, duration: 1.6, ease: 'sine.inOut' }, 7.8);
|
|
422
|
+
// pictogram dancer in the panel (Swiss sports-pictogram style): leaps on the beat
|
|
423
|
+
gsap.set('#armL', { rotation: -160, svgOrigin: '930 369' });
|
|
424
|
+
gsap.set('#armR', { rotation: -20, svgOrigin: '930 369' });
|
|
425
|
+
gsap.set('#legL', { rotation: 6, svgOrigin: '931 600' });
|
|
426
|
+
gsap.set('#legR', { rotation: -6, svgOrigin: '931 600' });
|
|
427
|
+
gsap.set('#pFig', { y: 80 });
|
|
428
|
+
[[9.6, 10.0], [10.25, 10.5], [10.75, 11.0]].forEach(([up, peak]) => {
|
|
429
|
+
tl.to('#pFig', { y: -190, duration: peak - up, ease: 'power2.out' }, up);
|
|
430
|
+
tl.to('#pFig', { y: 80, duration: 0.24, ease: 'power2.in' }, peak + 0.02);
|
|
431
|
+
[['#armL', -160, -128], ['#armR', -20, -52]].forEach(([id, r0, r1]) => {
|
|
432
|
+
tl.to(id, { rotation: r1, svgOrigin: '930 369', duration: peak - up, ease: 'power2.out' }, up);
|
|
433
|
+
tl.to(id, { rotation: r0, svgOrigin: '930 369', duration: 0.24, ease: 'power2.in' }, peak + 0.02);
|
|
434
|
+
});
|
|
435
|
+
[['#legL', 6, 62], ['#legR', -6, -62]].forEach(([id, r0, r1]) => {
|
|
436
|
+
tl.to(id, { rotation: r1, svgOrigin: '931 600', duration: peak - up, ease: 'power2.out' }, up);
|
|
437
|
+
tl.to(id, { rotation: r0, svgOrigin: '931 600', duration: 0.24, ease: 'power2.in' }, peak + 0.02);
|
|
438
|
+
});
|
|
439
|
+
tl.to('#pSkirt', { rotation: 14, svgOrigin: '930 440', duration: peak - up, ease: 'power2.out' }, up);
|
|
440
|
+
tl.to('#pSkirt', { rotation: -8, svgOrigin: '930 440', duration: 0.24, ease: 'power2.in' }, peak + 0.02);
|
|
441
|
+
tl.to('#pShadow', { attr: { rx: 110 }, opacity: 0.08, duration: peak - up, ease: 'power2.out' }, up);
|
|
442
|
+
tl.to('#pShadow', { attr: { rx: 190 }, opacity: 0.18, duration: 0.24, ease: 'power2.in' }, peak + 0.02);
|
|
443
|
+
tl.fromTo('#pBody', { scaleY: 0.88, scaleX: 1.06, svgOrigin: '930 800' }, { scaleY: 1, scaleX: 1, svgOrigin: '930 800', duration: 0.3, ease: 'elastic.out(1, 0.5)', immediateRender: false }, peak + 0.26);
|
|
444
|
+
});
|
|
445
|
+
pulse(8.0);
|
|
446
|
+
// beat kicks while the skirt spins
|
|
447
|
+
[8.5, 9.0].forEach(t => {
|
|
448
|
+
tl.to(dotPos, { y: gTitY - 46, duration: 0.12, ease: 'power2.out' }, t - 0.12);
|
|
449
|
+
tl.to(dotPos, { y: gTitY, duration: 0.14, ease: 'power2.in' }, t);
|
|
450
|
+
squash(t + 0.14, 1.3, 0.75, 0.35);
|
|
451
|
+
pulse(t, 0.8);
|
|
452
|
+
});
|
|
453
|
+
|
|
454
|
+
// 9.25 BREAKOUT: the stem of the i opens into a full grid panel (cols 4-6), the other letters shear away
|
|
455
|
+
const PX = colL(3), PY = GY0, PW = GX1 - colL(3), PH = GY1 - GY0;
|
|
456
|
+
const floorY = rowB(2) - 44;
|
|
457
|
+
const bars = [];
|
|
458
|
+
for (let c = 0; c < 3; c++) for (const off of [0, 150]) bars.push(el('rect', { x: colL(c) + off, y: rowB(2), width: 110, height: 0, fill: RED }, world));
|
|
459
|
+
const eqSets = [[9.75, [260, 420, 340, 560, 300, 200]], [10.0, [420, 300, 600, 260, 380, 240]], [10.5, [220, 520, 300, 460, 600, 340]]];
|
|
460
|
+
const topOf = hs => { let k = 0; hs.forEach((h, i) => { if (h > hs[k]) k = i; }); return [colL(Math.floor(k / 2)) + (k % 2) * 150 + 55, rowB(2) - hs[k] - 44]; };
|
|
461
|
+
// dot hops off the word before it breaks, onto the floor where the bars will rise
|
|
462
|
+
const firstTop = topOf(eqSets[0][1]);
|
|
463
|
+
arcTo(9.06, [gTitX, gTitY], [firstTop[0], floorY], 0.42, 200);
|
|
464
|
+
squash(9.48, 1.3, 0.75, 0.4);
|
|
465
|
+
tl.to(cMus, { x: -1900, duration: 0.34, ease: 'power4.in' }, 9.18);
|
|
466
|
+
tl.to(cC, { x: 900, duration: 0.34, ease: 'power4.in' }, 9.2);
|
|
467
|
+
tl.to(cStem, { attr: { x: PX, y: PY, width: PW, height: PH }, duration: 0.52, ease: 'power4.inOut' }, 9.24);
|
|
468
|
+
tl.to('#winMove', { x: 477, y: 8, scale: 0.9, duration: 0.52, ease: 'power4.inOut' }, 9.24);
|
|
469
|
+
tl.to('#winPanel', { opacity: 1, duration: 0.4, ease: 'power2.inOut' }, 9.3);
|
|
470
|
+
tl.to('#winMove', { x: 470, y: 14, scale: 0.93, duration: 1.3, ease: 'none' }, 9.76);
|
|
471
|
+
pulse(9.75);
|
|
472
|
+
|
|
473
|
+
// 9.75 the pictogram dancer leaps in the panel; red EQ bars pulse on the beat; the dot rides the tallest bar
|
|
474
|
+
let prevH = [0, 0, 0, 0, 0, 0];
|
|
475
|
+
eqSets.forEach(([t, hs], si) => {
|
|
476
|
+
bars.forEach((r, i) => tl.to(r, { attr: { height: hs[i], y: rowB(2) - hs[i] }, duration: 0.22, ease: 'power4.out' }, t - 0.04 + i * 0.02));
|
|
477
|
+
const tp = topOf(hs);
|
|
478
|
+
if (si === 0) {
|
|
479
|
+
tl.to(dotPos, { y: tp[1], duration: 0.22, ease: 'power4.out' }, t - 0.04 + 3 * 0.02);
|
|
480
|
+
} else {
|
|
481
|
+
const fromTp = topOf(eqSets[si - 1][1]);
|
|
482
|
+
arcTo(t - 0.2, fromTp, tp, 0.26, 90);
|
|
483
|
+
squash(t + 0.06, 1.3, 0.75, 0.35);
|
|
484
|
+
}
|
|
485
|
+
if (si > 0) pulse(t, 0.8);
|
|
486
|
+
prevH = hs;
|
|
487
|
+
});
|
|
488
|
+
// small black window-word label rises into row 4 under the bars
|
|
489
|
+
const mu2 = M(WORDS.window, fM);
|
|
490
|
+
clip('mu2Clip', -400, rowT(3) - 120, 2800, 120 + 152 + 4);
|
|
491
|
+
const mu2Mask = el('g', { 'clip-path': 'url(#mu2Clip)' }, world);
|
|
492
|
+
const mu2Rise = el('g', {}, mu2Mask);
|
|
493
|
+
txt(mu2Rise, WORDS.window, GX0 + mu2.L, rowB(3), fM, INK);
|
|
494
|
+
gsap.set(mu2Rise, { y: 300 });
|
|
495
|
+
tl.to(mu2Rise, { y: 0, duration: 0.36, ease: 'expo.out' }, 9.72);
|
|
496
|
+
bars.forEach(r => world.insertBefore(r, tIn.g));
|
|
497
|
+
world.insertBefore(mu2Mask, tIn.g);
|
|
498
|
+
|
|
499
|
+
// 11.25 out: panel closes back to a slit, bars and label drop
|
|
500
|
+
tl.to(cStem, { attr: { x: PX + PW / 2, width: 0 }, duration: 0.26, ease: 'power4.in' }, 11.0);
|
|
501
|
+
tl.set('#win', { opacity: 0 }, 11.28);
|
|
502
|
+
tl.to(bars, { attr: { height: 0, y: rowB(2) }, duration: 0.2, ease: 'power4.in', stagger: 0.02 }, 11.0);
|
|
503
|
+
pulse(11.0, 0.8);
|
|
504
|
+
tl.to(mu2Rise, { y: 300, duration: 0.24, ease: 'power4.in' }, 11.02);
|
|
505
|
+
tl.set(dotPos, { mixBlendMode: 'normal' }, 11.3);
|
|
506
|
+
|
|
507
|
+
// 11.5 tiles stamp down on 16ths
|
|
508
|
+
[[tIn, 11.5], [tMade, 11.625], [tCode, 11.75]].forEach(([T, t]) => {
|
|
509
|
+
tl.set(T.lift, { opacity: 1 }, t - 0.15);
|
|
510
|
+
tl.fromTo(T.lift, { scale: 1.14 }, { scale: 1, duration: 0.15, ease: 'power3.in', immediateRender: false }, t - 0.15);
|
|
511
|
+
tl.fromTo(T.sh, { attr: { y: 60, opacity: 0.0 } }, { attr: { y: 14, opacity: 0.3 }, duration: 0.15, ease: 'power3.in', immediateRender: false }, t - 0.15);
|
|
512
|
+
tl.to(T.lift, { scale: 0.985, duration: 0.05, ease: 'power2.out' }, t);
|
|
513
|
+
tl.to(T.lift, { scale: 1, duration: 0.3, ease: 'elastic.out(1, 0.5)' }, t + 0.05);
|
|
514
|
+
pulse(t, 0.9);
|
|
515
|
+
});
|
|
516
|
+
const lastTop = topOf(eqSets[eqSets.length - 1][1]);
|
|
517
|
+
arcTo(11.06, [lastTop[0], lastTop[1]], center('BR'), 0.44, 180);
|
|
518
|
+
squash(11.5, 1.3, 0.75, 0.4);
|
|
519
|
+
|
|
520
|
+
// sliding puzzle: 3 moves, the dot swaps places with each tile
|
|
521
|
+
let gap = 'BR';
|
|
522
|
+
const moves = [[tCode, 12.0, 0.3], [tIn, 12.5, 0.3], [tMade, 12.75, 0.22]];
|
|
523
|
+
moves.forEach(([T, beat, dur]) => {
|
|
524
|
+
const from = T.slot, to = gap;
|
|
525
|
+
const st = beat - dur * 0.5;
|
|
526
|
+
const horiz = SLOT[from][1] === SLOT[to][1];
|
|
527
|
+
tl.to(T.g, { x: SLOT[to][0], y: SLOT[to][1], duration: dur, ease: 'power4.inOut' }, st);
|
|
528
|
+
tl.fromTo(T.b, { attr: { stdDeviation: '0 0' } }, { keyframes: [{ attr: { stdDeviation: horiz ? '30 0' : '0 22' }, duration: dur * 0.5, ease: 'power2.in' }, { attr: { stdDeviation: '0 0' }, duration: dur * 0.5, ease: 'power2.out' }], immediateRender: false }, st);
|
|
529
|
+
tl.to(T.lift, { scale: 1.03, duration: dur * 0.45, ease: 'power2.out' }, st);
|
|
530
|
+
const dx = SLOT[to][0] - SLOT[from][0], dy = SLOT[to][1] - SLOT[from][1];
|
|
531
|
+
tl.to(T.inner, { x: -Math.sign(dx) * 22, y: -Math.sign(dy) * 16, duration: dur * 0.7, ease: 'power2.in' }, st);
|
|
532
|
+
tl.to(T.inner, { x: 0, y: 0, duration: 0.45, ease: 'elastic.out(1, 0.5)' }, st + dur * 0.7);
|
|
533
|
+
tl.to(T.lift, { scale: 1, duration: dur * 0.9, ease: 'back.out(2)' }, st + dur * 0.45);
|
|
534
|
+
tl.to(T.sh, { attr: { y: 40, opacity: 0.22 }, duration: dur * 0.45, ease: 'power2.out' }, st);
|
|
535
|
+
tl.to(T.sh, { attr: { y: 14, opacity: 0.3 }, duration: dur * 0.6, ease: 'power2.in' }, st + dur * 0.45);
|
|
536
|
+
arcTo(st, center(to), center(from), dur, horiz ? 110 : 0);
|
|
537
|
+
squash(st + dur, 1.25, 0.8, 0.3);
|
|
538
|
+
T.slot = to; gap = from;
|
|
539
|
+
});
|
|
540
|
+
|
|
541
|
+
// 13.25 the dot becomes the big circle again, in the place it started
|
|
542
|
+
tl.to(dotPos, { x: 1560, y: 292, duration: 0.5, ease: 'expo.out' }, 13.17);
|
|
543
|
+
tl.to(dotScale, { scale: 1, duration: 0.6, ease: 'back.out(1.6)' }, 13.17);
|
|
544
|
+
pulse(13.25);
|
|
545
|
+
[[tMade, -12, 0], [tCode, 0, 10], [tIn, 0, 10]].forEach(([T, dx, dy], i) => {
|
|
546
|
+
tl.to(T.lift, { x: dx, y: dy, duration: 0.08, ease: 'power2.out' }, 13.25 + i * 0.02);
|
|
547
|
+
tl.to(T.lift, { x: 0, y: 0, duration: 0.5, ease: 'elastic.out(1, 0.45)' }, 13.33 + i * 0.02);
|
|
548
|
+
});
|
|
549
|
+
|
|
550
|
+
// slow drifting light across the paper (whole piece)
|
|
551
|
+
tl.fromTo('#light', { x: -140, y: -40 }, { x: 160, y: 50, duration: DUR, ease: 'none' }, 0);
|
|
552
|
+
tl.set({}, {}, DUR);
|
|
553
|
+
|
|
554
|
+
// ---------- paper grain + ink specks (static, seeded) ----------
|
|
555
|
+
(function grain() {
|
|
556
|
+
const W = 1920, H = 1080;
|
|
557
|
+
const g = document.getElementById('grain').getContext('2d');
|
|
558
|
+
// low-frequency mottling
|
|
559
|
+
const sw = 96, shh = 54, small = document.createElement('canvas'); small.width = sw; small.height = shh;
|
|
560
|
+
const sc = small.getContext('2d'); const sd = sc.createImageData(sw, shh);
|
|
561
|
+
for (let i = 0; i < sw * shh; i++) { const v = 255 - rnd() * 9; sd.data[i * 4] = v; sd.data[i * 4 + 1] = v - 2; sd.data[i * 4 + 2] = v - 6; sd.data[i * 4 + 3] = 255; }
|
|
562
|
+
sc.putImageData(sd, 0, 0);
|
|
563
|
+
g.imageSmoothingEnabled = true; g.drawImage(small, 0, 0, W, H);
|
|
564
|
+
// fine grain
|
|
565
|
+
const img = g.getImageData(0, 0, W, H); const d = img.data;
|
|
566
|
+
for (let i = 0; i < W * H; i++) { const n = rnd(); const k = n * n * 34; d[i * 4] -= k; d[i * 4 + 1] -= k; d[i * 4 + 2] -= k * 1.1; }
|
|
567
|
+
g.putImageData(img, 0, 0);
|
|
568
|
+
// paper fibres
|
|
569
|
+
g.lineCap = 'round';
|
|
570
|
+
for (let i = 0; i < 520; i++) {
|
|
571
|
+
const x = rnd() * W, y = rnd() * H, a = rnd() * Math.PI, l = 6 + rnd() * 22;
|
|
572
|
+
g.strokeStyle = 'rgba(120, 100, 80,' + (0.05 + rnd() * 0.08) + ')'; g.lineWidth = 0.6 + rnd() * 0.8;
|
|
573
|
+
g.beginPath(); g.moveTo(x, y); g.quadraticCurveTo(x + Math.cos(a) * l * 0.5 + (rnd() - 0.5) * 6, y + Math.sin(a) * l * 0.5 + (rnd() - 0.5) * 6, x + Math.cos(a) * l, y + Math.sin(a) * l); g.stroke();
|
|
574
|
+
}
|
|
575
|
+
// ink specks: light flecks that only show on black ink (screen blend)
|
|
576
|
+
const s = document.getElementById('specks').getContext('2d');
|
|
577
|
+
const si = s.createImageData(W, H); const q = si.data;
|
|
578
|
+
for (let i = 0; i < W * H; i++) { const n = rnd(); const v = n > 0.985 ? 30 + rnd() * 50 : n * 14; q[i * 4] = v; q[i * 4 + 1] = v; q[i * 4 + 2] = v; q[i * 4 + 3] = 255; }
|
|
579
|
+
s.putImageData(si, 0, 0);
|
|
580
|
+
})();
|
|
581
|
+
|
|
582
|
+
window.__timelines = window.__timelines || {};
|
|
583
|
+
window.__timelines['main'] = tl;
|
|
584
|
+
tl.seek(0);
|
|
585
|
+
})();
|
|
586
|
+
|
|
587
|
+
// Changed a word? Open this page in Chrome, then run measureMET(['yourword', 'yourwo', ...]) in the console
|
|
588
|
+
// and paste the printed lines into MET. Include every prefix the code asks for (melody prefixes, window prefixes).
|
|
589
|
+
async function measureMET(words) {
|
|
590
|
+
await document.fonts.load('700 100px "Inter Tight"');
|
|
591
|
+
const c = document.createElement('canvas').getContext('2d'); c.font = '700 100px "Inter Tight"';
|
|
592
|
+
const out = {};
|
|
593
|
+
words.forEach(w => { const m = c.measureText(w); out[w] = [m.width, m.actualBoundingBoxLeft, m.actualBoundingBoxRight, m.actualBoundingBoxAscent, m.actualBoundingBoxDescent].map(v => Math.round(v * 10) / 10); });
|
|
594
|
+
console.log(JSON.stringify(out));
|
|
595
|
+
return out;
|
|
596
|
+
}
|
|
597
|
+
</script>
|
|
598
|
+
</body>
|
|
599
|
+
</html>
|