@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,55 @@
|
|
|
1
|
+
# Graphite UI
|
|
2
|
+
|
|
3
|
+
id: graphite-ui
|
|
4
|
+
Best for: software launches, app demos, feature reveals.
|
|
5
|
+
Mood: calm product film. Dark graphite, crisp UI, slow precise camera.
|
|
6
|
+
Reference piece: styles/graphite-ui/index.html (12 s, loops)
|
|
7
|
+
Gallery video: gallery/videos/graphite-ui.mp4
|
|
8
|
+
|
|
9
|
+
## Palette (hex)
|
|
10
|
+
- ground: #0E0F12
|
|
11
|
+
- panel: #17181C with a 1 px border #26282E
|
|
12
|
+
- text: #ECEDEF
|
|
13
|
+
- muted: #8A8F98
|
|
14
|
+
- accent: #3DD68C (one green: the button, the cursor, the "done")
|
|
15
|
+
|
|
16
|
+
## Type
|
|
17
|
+
- Display: Inter 600, tracking -0.03em
|
|
18
|
+
- UI text: Inter 500, 22 to 28 px
|
|
19
|
+
- Numbers: Inter 600, tabular figures
|
|
20
|
+
- Font links (paste into <head>; all fonts are free):
|
|
21
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap">
|
|
22
|
+
|
|
23
|
+
## Easing (numbers)
|
|
24
|
+
- land: cubic-bezier(0.16, 1, 0.3, 1) or expo.out, 0.6 s
|
|
25
|
+
- camera move: power3.inOut, 1.2 s
|
|
26
|
+
- list cascade: 0.04 s stagger
|
|
27
|
+
- no bounce, no elastic
|
|
28
|
+
|
|
29
|
+
## Motion rules
|
|
30
|
+
- Text reveals from behind a clean mask edge. No soft fades.
|
|
31
|
+
- The camera glides over the UI at an even speed. Mechanical, not handheld.
|
|
32
|
+
- Hold each idea long enough to read it (1.2 s or more).
|
|
33
|
+
- Match the stagger to how the app itself animates.
|
|
34
|
+
|
|
35
|
+
## Signature moves
|
|
36
|
+
- The app sits on a 3D camera: tilted wide, then flat and close, then turned away to make room for a headline.
|
|
37
|
+
- One green cursor clicks one green button. The label slides out and a check draws in.
|
|
38
|
+
- Rows tick off in a 0.12 s cascade: box fills, check draws, a strike line runs across.
|
|
39
|
+
- A clean wipe edge clears the list, so the piece can loop back to its first frame.
|
|
40
|
+
|
|
41
|
+
## Composition
|
|
42
|
+
12 columns, 120 px margins. UI panels on a 8 px grid, 16 px radius max.
|
|
43
|
+
The app is big and bleeds off the frame. Headlines hang off the left margin, the app sits right.
|
|
44
|
+
Use skeleton bars for UI text so the screen never carries more than 6 real words.
|
|
45
|
+
|
|
46
|
+
## With media
|
|
47
|
+
- Put real screenshots or screen recordings inside the panel, with the 1 px border and 16 px radius.
|
|
48
|
+
- Keep them on the same 3D camera as the app. Never float a raw screenshot on its own.
|
|
49
|
+
- Grade them a touch darker so the green accent stays the brightest thing on screen.
|
|
50
|
+
|
|
51
|
+
## Ban list
|
|
52
|
+
- orange on black
|
|
53
|
+
- purple gradients, glassmorphism, glow
|
|
54
|
+
- spinning 3D logos
|
|
55
|
+
- tiny unreadable UI
|
|
@@ -0,0 +1,238 @@
|
|
|
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="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap" />
|
|
7
|
+
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
|
|
8
|
+
<script src="studio.js"></script>
|
|
9
|
+
<style>
|
|
10
|
+
/* style: graphite-ui. Every colour comes from these tokens. */
|
|
11
|
+
:root {
|
|
12
|
+
--ground: #0E0F12; --panel: #17181C; --line: #26282E; --text: #ECEDEF; --muted: #8A8F98; --accent: #3DD68C;
|
|
13
|
+
--raise: rgba(236, 237, 239, 0.05); --skel: rgba(138, 143, 152, 0.62); --skel2: rgba(138, 143, 152, 0.3);
|
|
14
|
+
--dot: rgba(138, 143, 152, 0.2); --shadow: rgba(0, 0, 0, 0.6);
|
|
15
|
+
}
|
|
16
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
17
|
+
html, body { width: 1920px; height: 1080px; overflow: hidden; background: var(--ground); }
|
|
18
|
+
#root { position: relative; width: 1920px; height: 1080px; overflow: hidden; background: var(--ground);
|
|
19
|
+
font-family: 'Inter', sans-serif; color: var(--text); }
|
|
20
|
+
.abs { position: absolute; }
|
|
21
|
+
#dots { position: absolute; left: -400px; top: -300px; width: 2720px; height: 1680px;
|
|
22
|
+
background-image: radial-gradient(circle, var(--dot) 1.4px, transparent 1.6px); background-size: 40px 40px; }
|
|
23
|
+
#stage { position: absolute; inset: 0; perspective: 2200px; perspective-origin: 960px 540px; }
|
|
24
|
+
#app { position: absolute; left: 0; top: 0; width: 1400px; height: 880px; border-radius: 16px;
|
|
25
|
+
background: var(--panel); border: 1px solid var(--line); overflow: hidden; transform-origin: 700px 440px;
|
|
26
|
+
box-shadow: 0 60px 140px var(--shadow); }
|
|
27
|
+
#float { position: absolute; left: 0; top: 0; width: 1400px; height: 880px; transform-origin: 700px 440px; transform-style: preserve-3d; }
|
|
28
|
+
#toast { position: absolute; left: 380px; top: 600px; width: 580px; height: 132px; border-radius: 16px; background: var(--panel);
|
|
29
|
+
border: 1px solid var(--skel2); box-shadow: 0 30px 80px var(--shadow); }
|
|
30
|
+
#toastDot { position: absolute; left: 32px; top: 36px; width: 60px; height: 60px; border-radius: 50%; background: var(--accent);
|
|
31
|
+
display: flex; align-items: center; justify-content: center; }
|
|
32
|
+
.hl { position: absolute; height: 1px; background: var(--line); }
|
|
33
|
+
.vl { position: absolute; width: 1px; background: var(--line); }
|
|
34
|
+
.bar { position: absolute; border-radius: 999px; }
|
|
35
|
+
.mask { position: absolute; overflow: hidden; }
|
|
36
|
+
#title { left: 364px; top: 92px; font-size: 44px; font-weight: 600; letter-spacing: -0.03em; line-height: 64px; }
|
|
37
|
+
#btn { position: absolute; left: 1140px; top: 92px; width: 196px; height: 64px; border-radius: 12px;
|
|
38
|
+
background: var(--accent); overflow: hidden; transform-origin: 50% 50%; }
|
|
39
|
+
#btnLabel { position: absolute; left: 0; top: 0; width: 196px; height: 64px; line-height: 64px; text-align: center;
|
|
40
|
+
color: var(--ground); font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
|
|
41
|
+
#btnCheck { position: absolute; left: 0; top: 0; width: 196px; height: 64px; display: flex; align-items: center; justify-content: center; }
|
|
42
|
+
.row { position: absolute; left: 364px; width: 972px; height: 96px; overflow: hidden; }
|
|
43
|
+
.box { position: absolute; left: 0; top: 33px; width: 30px; height: 30px; border-radius: 9px; border: 2px solid var(--skel2); }
|
|
44
|
+
.boxFill { position: absolute; left: -2px; top: -2px; width: 30px; height: 30px; border-radius: 9px; background: var(--accent);
|
|
45
|
+
display: flex; align-items: center; justify-content: center; }
|
|
46
|
+
.strike { position: absolute; height: 2px; background: var(--muted); transform-origin: 0 50%; }
|
|
47
|
+
#headline { position: absolute; left: 120px; top: 0; font-size: 184px; font-weight: 600; letter-spacing: -0.03em; }
|
|
48
|
+
.hmask { position: absolute; left: 0; overflow: hidden; height: 214px; width: 1000px; }
|
|
49
|
+
.hword { position: absolute; left: 0; top: 0; line-height: 214px; white-space: nowrap; }
|
|
50
|
+
#cursor { position: absolute; left: 0; top: 0; width: 44px; height: 52px; }
|
|
51
|
+
#ring { position: absolute; left: 0; top: 0; width: 96px; height: 96px; margin: -48px 0 0 -48px; border-radius: 50%;
|
|
52
|
+
border: 2px solid var(--accent); }
|
|
53
|
+
#wipe { position: absolute; width: 2px; background: var(--text); }
|
|
54
|
+
</style>
|
|
55
|
+
</head>
|
|
56
|
+
<body>
|
|
57
|
+
<div id="root" data-composition-id="main" data-start="0" data-duration="12" data-width="1920" data-height="1080">
|
|
58
|
+
<div id="dots"></div>
|
|
59
|
+
<div id="stage"><div id="app"></div><div id="float"></div></div>
|
|
60
|
+
<div id="headline"></div>
|
|
61
|
+
<div id="ring"></div>
|
|
62
|
+
<svg id="cursor" viewBox="0 0 44 52"><path d="M4 3 L4 41 L14 32 L21 47 L28 44 L21 29 L35 29 Z"
|
|
63
|
+
fill="var(--accent)" stroke="var(--ground)" stroke-width="2.5" stroke-linejoin="round"/></svg>
|
|
64
|
+
</div>
|
|
65
|
+
<script>
|
|
66
|
+
const S = STUDIO, root = S.root, app = document.getElementById('app');
|
|
67
|
+
const el = (parent, cls, css, html) => { const d = document.createElement('div'); if (cls) d.className = cls;
|
|
68
|
+
Object.assign(d.style, css || {}); if (html != null) d.innerHTML = html; parent.appendChild(d); return d; };
|
|
69
|
+
const px = (v) => v + 'px';
|
|
70
|
+
const rnd = S.rng(7);
|
|
71
|
+
const CHECK = (size, stroke, color) => `<svg width="${size}" height="${size}" viewBox="0 0 24 24"><path class="ck" d="M5 12.5 L10 17.5 L19 7"
|
|
72
|
+
fill="none" stroke="${color}" stroke-width="${stroke}" stroke-linecap="round" stroke-linejoin="round" pathLength="1"
|
|
73
|
+
stroke-dasharray="1" stroke-dashoffset="1"/></svg>`;
|
|
74
|
+
|
|
75
|
+
// ---------- the app (world px, 1400 x 880) ----------
|
|
76
|
+
el(app, 'hl', { left: 0, top: px(56), width: px(1400) });
|
|
77
|
+
[24, 46, 68].forEach(x => el(app, 'bar', { left: px(x - 6), top: px(22), width: px(12), height: px(12), background: 'var(--line)' }));
|
|
78
|
+
el(app, 'bar', { left: px(560), top: px(16), width: px(280), height: px(24), background: 'var(--raise)', border: '1px solid var(--line)' });
|
|
79
|
+
el(app, 'vl', { left: px(300), top: px(56), height: px(824) });
|
|
80
|
+
// sidebar
|
|
81
|
+
const hi = el(app, '', { position: 'absolute', left: px(16), width: px(268), height: px(48), borderRadius: '10px', background: 'var(--raise)' });
|
|
82
|
+
const SIDE_Y = (i) => 92 + i * 52 + (i > 3 ? 36 : 0);
|
|
83
|
+
for (let i = 0; i < 7; i++) {
|
|
84
|
+
const y = SIDE_Y(i);
|
|
85
|
+
el(app, 'bar', { left: px(36), top: px(y + 14), width: px(20), height: px(20), borderRadius: '6px', background: 'var(--skel2)' });
|
|
86
|
+
el(app, 'bar', { left: px(72), top: px(y + 18), width: px(90 + Math.round(rnd() * 90)), height: px(12), background: 'var(--skel2)' });
|
|
87
|
+
}
|
|
88
|
+
el(app, 'hl', { left: px(32), top: px(SIDE_Y(4) - 18), width: px(236) });
|
|
89
|
+
// header
|
|
90
|
+
const title = el(app, 'mask abs', { left: px(364), top: px(92), height: px(64), width: px(400) });
|
|
91
|
+
title.innerHTML = '<div id="title" style="position:absolute;left:0;top:0">Today</div>';
|
|
92
|
+
const titleW = title.firstChild;
|
|
93
|
+
const btn = el(app, ''); btn.id = 'btn';
|
|
94
|
+
const btnLabel = el(btn, '', {}, 'Complete'); btnLabel.id = 'btnLabel';
|
|
95
|
+
const btnCheck = el(btn, '', {}, CHECK(34, 3, 'var(--ground)')); btnCheck.id = 'btnCheck';
|
|
96
|
+
const btnCk = btnCheck.querySelector('.ck');
|
|
97
|
+
el(app, 'bar', { left: px(364), top: px(186), width: px(972), height: px(6), background: 'var(--line)' });
|
|
98
|
+
const fill = el(app, 'bar', { left: px(364), top: px(186), width: px(972), height: px(6), background: 'var(--accent)', transformOrigin: '0 50%' });
|
|
99
|
+
// rows
|
|
100
|
+
const LIST_Y = 224, ROW_H = 96, N = 6;
|
|
101
|
+
const rows = [];
|
|
102
|
+
for (let i = 0; i < N; i++) {
|
|
103
|
+
const y = LIST_Y + i * ROW_H;
|
|
104
|
+
const r = el(app, 'row', { top: px(y) });
|
|
105
|
+
const line = el(r, 'hl', { left: 0, top: 0, width: px(972), transformOrigin: '0 50%' });
|
|
106
|
+
const box = el(r, 'box');
|
|
107
|
+
const boxFill = el(box, 'boxFill', {}, CHECK(22, 3.2, 'var(--ground)'));
|
|
108
|
+
const tw = 300 + Math.round(rnd() * 260), sw = 140 + Math.round(rnd() * 140);
|
|
109
|
+
const t1 = el(r, 'bar', { left: px(60), top: px(30), width: px(tw), height: px(16), background: 'var(--skel)' });
|
|
110
|
+
const t2 = el(r, 'bar', { left: px(60), top: px(56), width: px(sw), height: px(10), background: 'var(--skel2)' });
|
|
111
|
+
const strike = el(r, 'strike', { left: px(52), top: px(37), width: px(tw + 16) });
|
|
112
|
+
const tag = el(r, 'bar', { left: px(772), top: px(32), width: px(108), height: px(32), border: '2px solid var(--skel2)' });
|
|
113
|
+
const tagDot = el(r, 'bar', { left: px(788), top: px(44), width: px(8), height: px(8), background: 'var(--skel)' });
|
|
114
|
+
const av = el(r, 'bar', { left: px(924), top: px(30), width: px(36), height: px(36), background: 'var(--skel2)' });
|
|
115
|
+
rows.push({ r, line, box, boxFill, ck: boxFill.querySelector('.ck'), parts: [box, t1, t2, tag, tagDot, av], t1, t2, strike, tag, tagDot, av });
|
|
116
|
+
}
|
|
117
|
+
const flt = document.getElementById('float');
|
|
118
|
+
const toast = el(flt, ''); toast.id = 'toast';
|
|
119
|
+
const toastDot = el(toast, '', {}, CHECK(34, 3.2, 'var(--ground)')); toastDot.id = 'toastDot';
|
|
120
|
+
const toastCk = toastDot.querySelector('.ck');
|
|
121
|
+
el(toast, 'bar', { left: px(124), top: px(44), width: px(300), height: px(18), background: 'var(--skel)' });
|
|
122
|
+
el(toast, 'bar', { left: px(124), top: px(76), width: px(190), height: px(12), background: 'var(--skel2)' });
|
|
123
|
+
const wipe = el(app, ''); wipe.id = 'wipe';
|
|
124
|
+
Object.assign(wipe.style, { left: 0, top: px(176), height: px(LIST_Y + N * ROW_H - 176 + 8) });
|
|
125
|
+
|
|
126
|
+
// ---------- headline (screen px) ----------
|
|
127
|
+
const head = document.getElementById('headline');
|
|
128
|
+
const HL = ['Clear', 'the day.'];
|
|
129
|
+
const hmasks = HL.map((w, i) => { const m = el(head, 'hmask', { top: px(i * 192) }); const s = el(m, 'hword', {}, w); return s; });
|
|
130
|
+
head.style.top = px(540 - 203);
|
|
131
|
+
|
|
132
|
+
const cursor = document.getElementById('cursor'), ring = document.getElementById('ring'), dots = document.getElementById('dots');
|
|
133
|
+
|
|
134
|
+
// ---------- camera keyframes: centre x, centre y, scale, rotateX, rotateY, rotateZ ----------
|
|
135
|
+
const C0 = [1040, 640, 1.06, 32, 0, -11];
|
|
136
|
+
const C1 = [770, 650, 1.32, 3, 0, 0];
|
|
137
|
+
const C2 = [1670, 590, 1.12, 6, 22, 0];
|
|
138
|
+
const C2b = [1690, 470, 1.15, 8, 24, 0];
|
|
139
|
+
const mixC = (a, b, p) => a.map((v, i) => S.mix(v, b[i], p));
|
|
140
|
+
|
|
141
|
+
const T_WIPE = 9.3, WIPE_D = 0.8, T_RESET = T_WIPE + WIPE_D;
|
|
142
|
+
|
|
143
|
+
window.__timelines["main"] = S.play(function render(t) {
|
|
144
|
+
// camera
|
|
145
|
+
let c = C0;
|
|
146
|
+
c = mixC(c, C1, S.seg(t, 1.2, 1.2, 'power3.inOut'));
|
|
147
|
+
c = mixC(c, C2, S.seg(t, 4.4, 1.2, 'power3.inOut'));
|
|
148
|
+
c = mixC(c, C2b, S.seg(t, 6.4, 1.2, 'sine.inOut'));
|
|
149
|
+
c = mixC(c, C0, S.seg(t, 10.1, 1.3, 'power3.inOut'));
|
|
150
|
+
const dx = 10 * S.wave(t, 1), dy = 6 * S.wave(t, 1, 0.25), drz = 0.35 * S.wave(t, 1, 0.5);
|
|
151
|
+
const [cx, cy, sc, rx, ry, rz] = c;
|
|
152
|
+
const camT = `translate(${cx + dx - 700}px, ${cy + dy - 440}px) rotateX(${rx}deg) rotateY(${ry}deg) rotateZ(${rz + drz}deg) scale(${sc})`;
|
|
153
|
+
app.style.transform = camT; flt.style.transform = camT;
|
|
154
|
+
// the floating toast: rides 110 px above the app, so it slides against it as the camera glides
|
|
155
|
+
const ti = S.seg(t, 7.5, 0.6, 'expo.out'), to = S.seg(t, 9.0, 0.35, 'power3.in');
|
|
156
|
+
toast.style.opacity = t < 7.5 || t > 9.4 ? 0 : Math.min(1, S.seg(t, 7.5, 0.2, 'power2.out')) * (1 - to);
|
|
157
|
+
toast.style.transform = `translateZ(160px) translateY(${(1 - ti) * 40 + to * 28}px) scale(${0.92 + 0.08 * ti})`;
|
|
158
|
+
toastCk.style.strokeDashoffset = 1 - S.seg(t, 7.75, 0.35, 'power2.out');
|
|
159
|
+
// parallax: the dot field moves at a third of the camera
|
|
160
|
+
dots.style.transform = `translate(${(cx + dx - 1000) * 0.3}px, ${(cy + dy - 600) * 0.3}px) scale(${0.9 + sc * 0.12})`;
|
|
161
|
+
|
|
162
|
+
// rows: cascade in, tick off, wipe clear
|
|
163
|
+
const live = t < T_RESET;
|
|
164
|
+
const edge = S.seg(t, T_WIPE, WIPE_D, 'power3.inOut') * 1000 - 20;
|
|
165
|
+
let doneSum = 0;
|
|
166
|
+
rows.forEach((o, i) => {
|
|
167
|
+
const t0 = 0.1 + i * 0.06;
|
|
168
|
+
o.parts.forEach((p, k) => {
|
|
169
|
+
const a = live ? S.seg(t, t0 + k * 0.04, 0.6, 'expo.out') : 0;
|
|
170
|
+
p.style.transform = `translateY(${(1 - a) * 72}px)`;
|
|
171
|
+
});
|
|
172
|
+
const la = live ? S.seg(t, t0, 0.7, 'expo.out') : 0;
|
|
173
|
+
o.line.style.transform = `scaleX(${la})`;
|
|
174
|
+
const d = live ? S.seg(t, 3.15 + i * 0.12, 0.5, 'expo.out') : 0;
|
|
175
|
+
const ds = live ? S.seg(t, 3.15 + i * 0.12, 0.28, 'power2.out') : 0;
|
|
176
|
+
doneSum += d;
|
|
177
|
+
o.boxFill.style.opacity = ds > 0 ? 1 : 0;
|
|
178
|
+
o.boxFill.style.transform = `scale(${0.7 + 0.3 * d})`;
|
|
179
|
+
o.ck.style.strokeDashoffset = 1 - (live ? S.seg(t, 3.22 + i * 0.12, 0.3, 'power2.out') : 0);
|
|
180
|
+
o.strike.style.transform = `scaleX(${live ? S.seg(t, 3.25 + i * 0.12, 0.45, 'power3.out') : 0})`;
|
|
181
|
+
o.t1.style.opacity = 1 - 0.55 * d; o.t2.style.opacity = 1 - 0.5 * d;
|
|
182
|
+
o.tag.style.opacity = 1 - 0.5 * d; o.tagDot.style.opacity = 1 - 0.5 * d; o.av.style.opacity = 1 - 0.5 * d;
|
|
183
|
+
o.r.style.clipPath = live && t > T_WIPE ? `inset(0 0 0 ${Math.max(0, edge)}px)` : 'none';
|
|
184
|
+
});
|
|
185
|
+
// progress
|
|
186
|
+
fill.style.transform = `scaleX(${doneSum / N})`;
|
|
187
|
+
fill.style.clipPath = live && t > T_WIPE ? `inset(0 0 0 ${Math.max(0, edge)}px)` : 'none';
|
|
188
|
+
// the wipe edge
|
|
189
|
+
const wOn = live && t > T_WIPE + 0.02;
|
|
190
|
+
wipe.style.opacity = wOn ? Math.min(1, S.seg(t, T_WIPE, 0.12, 'power2.out')) * (1 - S.seg(t, T_RESET - 0.14, 0.14, 'power2.in')) : 0;
|
|
191
|
+
wipe.style.transform = `translateX(${364 + edge}px)`;
|
|
192
|
+
|
|
193
|
+
// button: press, label swaps to a check, then back during the wipe
|
|
194
|
+
const press = S.seg(t, 2.88, 0.08, 'power2.out') - S.seg(t, 2.96, 0.4, 'expo.out');
|
|
195
|
+
btn.style.transform = `scale(${1 - 0.05 * press})`;
|
|
196
|
+
const out1 = S.seg(t, 2.92, 0.22, 'power3.in'), in1 = S.seg(t, 3.04, 0.6, 'expo.out');
|
|
197
|
+
const out2 = S.seg(t, 11.0, 0.22, 'power3.in'), in2 = S.seg(t, 11.12, 0.6, 'expo.out');
|
|
198
|
+
btnLabel.style.transform = `translateY(${(t < 11.0 ? -out1 : 1 - in2) * 64}px)`;
|
|
199
|
+
btnCheck.style.transform = `translateY(${(t < 11.0 ? 1 - in1 : -out2) * 64}px)`;
|
|
200
|
+
btnCk.style.strokeDashoffset = t < 11.0 ? 1 - S.seg(t, 3.1, 0.35, 'power2.out') : 0;
|
|
201
|
+
|
|
202
|
+
// a new day: the title rolls over through its mask
|
|
203
|
+
const tr = t < 11.3 ? -S.seg(t, 11.15, 0.22, 'power3.in') : 1 - S.seg(t, 11.37, 0.6, 'expo.out');
|
|
204
|
+
titleW.style.transform = `translateY(${tr * 64}px)`;
|
|
205
|
+
// sidebar highlight steps down and back
|
|
206
|
+
const hp = S.seg(t, 8.0, 0.5, 'power3.inOut') - S.seg(t, 11.0, 0.5, 'power3.inOut');
|
|
207
|
+
hi.style.top = px(S.mix(SIDE_Y(1), SIDE_Y(2), hp));
|
|
208
|
+
|
|
209
|
+
// headline: rises from behind its masks, leaves up
|
|
210
|
+
hmasks.forEach((w, i) => {
|
|
211
|
+
const a = S.seg(t, 5.1 + i * 0.1, 0.7, 'expo.out'), b = S.seg(t, 8.4 + i * 0.06, 0.4, 'power3.in');
|
|
212
|
+
w.style.transform = `translateY(${((1 - a) - b) * 214}px)`;
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
// cursor: arcs in to the button, clicks, rides with it, leaves
|
|
216
|
+
const br = btn.getBoundingClientRect();
|
|
217
|
+
const bx = br.left + br.width * 0.56, by = br.top + br.height * 0.58;
|
|
218
|
+
const OFF = [1990, 1160], OUT = [2010, 1220];
|
|
219
|
+
let x = OFF[0], y = OFF[1];
|
|
220
|
+
if (t >= 1.7) {
|
|
221
|
+
const p = S.seg(t, 1.7, 1.1, 'power3.inOut');
|
|
222
|
+
x = S.mix(OFF[0], bx, p) - Math.sin(Math.PI * p) * 70;
|
|
223
|
+
y = S.mix(OFF[1], by, p) + Math.sin(Math.PI * p) * 40;
|
|
224
|
+
}
|
|
225
|
+
if (t >= 4.3) {
|
|
226
|
+
const p = S.seg(t, 4.3, 0.6, 'power2.in');
|
|
227
|
+
x = S.mix(bx, OUT[0], p); y = S.mix(by, OUT[1], p);
|
|
228
|
+
}
|
|
229
|
+
const cs = 1 - 0.14 * (S.seg(t, 2.84, 0.07, 'power2.out') - S.seg(t, 2.91, 0.3, 'expo.out'));
|
|
230
|
+
cursor.style.transform = `translate(${x - 4}px, ${y - 3}px) scale(${cs})`;
|
|
231
|
+
cursor.style.transformOrigin = '4px 3px';
|
|
232
|
+
const rp = S.seg(t, 2.9, 0.55, 'expo.out');
|
|
233
|
+
ring.style.opacity = t > 2.9 && t < 3.45 ? (1 - S.seg(t, 2.9, 0.55, 'power2.in')) * 0.9 : 0;
|
|
234
|
+
ring.style.transform = `translate(${bx}px, ${by}px) scale(${0.6 + 0.6 * rp})`;
|
|
235
|
+
}, { loop: true });
|
|
236
|
+
</script>
|
|
237
|
+
</body>
|
|
238
|
+
</html>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// studio.js: one clock for the whole piece (hack 4).
|
|
2
|
+
// Load it after GSAP and before your scene script.
|
|
3
|
+
// Your scene calls STUDIO.play(render). render(t) must draw the WHOLE frame from t alone.
|
|
4
|
+
// Same t in, same picture out. That makes renders exact, seekable, and loopable.
|
|
5
|
+
(function () {
|
|
6
|
+
// works from <head> or <body>: the root is looked up the first time it is needed
|
|
7
|
+
const R = () => document.querySelector('[data-composition-id]');
|
|
8
|
+
const num = (k) => +R().dataset[k];
|
|
9
|
+
const cache = {};
|
|
10
|
+
const S = {
|
|
11
|
+
get root() { return R(); },
|
|
12
|
+
get D() { return num('duration'); },
|
|
13
|
+
get W() { return num('width'); },
|
|
14
|
+
get H() { return num('height'); },
|
|
15
|
+
get V() { return S.H > S.W; }, // true for 9:16
|
|
16
|
+
get u() { return Math.min(S.W, S.H) / 1080; }, // 1 unit = 1 px at a 1080 short side
|
|
17
|
+
ease(name) { return cache[name] || (cache[name] = name === 'none' ? (p) => p : gsap.parseEase(name)); },
|
|
18
|
+
// eased 0..1 progress of a move that starts at `start` and lasts `dur`
|
|
19
|
+
seg(t, start, dur, ease) {
|
|
20
|
+
const p = Math.min(1, Math.max(0, (t - start) / dur));
|
|
21
|
+
return S.ease(ease || 'power3.out')(p);
|
|
22
|
+
},
|
|
23
|
+
mix(a, b, p) { return a + (b - a) * p; },
|
|
24
|
+
// a wave that always loops: use whole-number cycles
|
|
25
|
+
wave(t, cycles, offset) { return Math.sin(2 * Math.PI * ((cycles || 1) * t / S.D + (offset || 0))); },
|
|
26
|
+
// seeded random numbers (never use Math.random in a render)
|
|
27
|
+
rng(seed) {
|
|
28
|
+
let a = seed >>> 0;
|
|
29
|
+
return function () {
|
|
30
|
+
a = (a + 0x6d2b79f5) | 0;
|
|
31
|
+
let t = Math.imul(a ^ (a >>> 15), 1 | a);
|
|
32
|
+
t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;
|
|
33
|
+
return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
// one clock drives everything; loop:true wraps t so t = D draws the same frame as t = 0
|
|
37
|
+
play(render, opts) {
|
|
38
|
+
const loop = !opts || opts.loop !== false;
|
|
39
|
+
const D = S.D, root = S.root;
|
|
40
|
+
const clock = { t: 0 };
|
|
41
|
+
const tl = gsap.timeline({ paused: true });
|
|
42
|
+
// loop_check.py sets STUDIO_NO_WRAP so it can prove render(end) really equals render(0)
|
|
43
|
+
const wrap = loop && !window.STUDIO_NO_WRAP;
|
|
44
|
+
const draw = () => render(wrap ? clock.t % D : clock.t);
|
|
45
|
+
tl.to(clock, { t: D, duration: D, ease: 'none', onUpdate: draw }, 0);
|
|
46
|
+
draw();
|
|
47
|
+
// fonts can arrive after the first draw; draw again so text measured from them is right,
|
|
48
|
+
// even on frame 0 (seeking to the time you are already at does not redraw)
|
|
49
|
+
if (document.fonts && document.fonts.ready) document.fonts.ready.then(draw);
|
|
50
|
+
window.addEventListener('load', draw);
|
|
51
|
+
window.__timelines = window.__timelines || {};
|
|
52
|
+
window.__timelines[root.dataset.compositionId] = tl;
|
|
53
|
+
return tl;
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
window.STUDIO = S;
|
|
57
|
+
})();
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# A city that grows
|
|
2
|
+
|
|
3
|
+
id: growing-city
|
|
4
|
+
Best for: growth over time, yearly recaps, milestones, "look how far we came", building something step by step.
|
|
5
|
+
Mood: a calm toy-town island that builds itself, soft as a pastel morning, then lights up at dusk.
|
|
6
|
+
Reference piece: styles/growing-city/index.html (17.5 s, does not loop)
|
|
7
|
+
Gallery video: gallery/videos/growing-city.mp4
|
|
8
|
+
|
|
9
|
+
## Palette (hex)
|
|
10
|
+
- ground (sea, day): #BFE3E0, gradient #D2EEE9 to #ACD6D6
|
|
11
|
+
- grass: #CDE6B8 · sand: #F3E3C3 · earth: #E6D3AE · rock: #C9B28E · roads: #F4EFE6
|
|
12
|
+
- buildings: #F7EFDF, #ECDDC2, #DDD3EB, #E9E1F2, #F4E8E0, #E4D8C6
|
|
13
|
+
- house roofs: #C9BEDB, #D8C6AE, #BFB6D3 · glass: #A8BED3
|
|
14
|
+
- trees: #A9D497, light #CDEBB8, dark #88BC85
|
|
15
|
+
- shade tint: #6F6A93 by day, #2C2F6E by night (shadow sides are cool lilac, never grey)
|
|
16
|
+
- label ink: #2D4B53, turns cream #FAF4E8 at dusk
|
|
17
|
+
- dusk sea: #F4B6A0 to #968CC4 to #505A96 · night grade: #3A2870 multiply
|
|
18
|
+
- window light: #FFE2A0
|
|
19
|
+
- accent: coral #F27D72 (about 6 tower roofs, 5 house roofs and one car; nothing else)
|
|
20
|
+
|
|
21
|
+
## Type
|
|
22
|
+
- Display (month): Inter 700, 156 px, tracking -0.035em, line height 1.08
|
|
23
|
+
- Labels (count): Inter 600, 44 px, tabular numbers; the word after it is 500 at 62% opacity
|
|
24
|
+
- Font links (paste into <head>; all fonts are free):
|
|
25
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@500;600;700&display=swap">
|
|
26
|
+
|
|
27
|
+
## Easing (numbers)
|
|
28
|
+
- land (tile drop): back.out(1.3), 0.42 s, falls 1.4 units
|
|
29
|
+
- floor added: back.out(1.9), 0.32 s per floor
|
|
30
|
+
- trees pop: back.out(2.2) with a squash wobble
|
|
31
|
+
- month label in: expo.out, 0.4 s, rises 44 px; old month leaves up 36 px in 0.2 s (power2.in)
|
|
32
|
+
- count rolls: power3.out, 0.6 s
|
|
33
|
+
- camera: sine.inOut; orbit -16 to +10 deg over 12 s, pull back over 8.8 s
|
|
34
|
+
- dusk: sine.inOut, 1.6 s · windows switch on: 0.22 s each
|
|
35
|
+
- stagger: tiles by distance from the centre; windows in a wave from the core
|
|
36
|
+
|
|
37
|
+
## Motion rules
|
|
38
|
+
- The world grows on a clock: one month every 0.75 s. Every tick gives birth to a batch of buildings.
|
|
39
|
+
- Tall towers add one floor at a time, and each floor lands with a small overshoot.
|
|
40
|
+
- Things build from the centre out: tiles, then roads, then buildings, then trees.
|
|
41
|
+
- Secondary life never stops: cars on finished roads, boats with wakes, sea glints, ripples.
|
|
42
|
+
- The camera is always moving, but slowly: a gentle orbit plus a pull back as the island grows.
|
|
43
|
+
- One light from the top left. Shadows are soft, blurred and fall to the bottom right.
|
|
44
|
+
|
|
45
|
+
## Signature moves
|
|
46
|
+
- The island lays in like tiles falling into a tray, centre first.
|
|
47
|
+
- The month and the count tick up together while the skyline climbs.
|
|
48
|
+
- Dusk turns the sea peach and lilac, then windows, lamps and car lights switch on in a wave.
|
|
49
|
+
|
|
50
|
+
## Composition
|
|
51
|
+
- Isometric island in the centre, filling 60 to 80% of the frame width.
|
|
52
|
+
- Two labels only, top left at 112 px / 88 px. Nothing else on screen.
|
|
53
|
+
- Start close on the first tile; end wide on the lit city.
|
|
54
|
+
|
|
55
|
+
## With media
|
|
56
|
+
- Freeze the coded city on one frame, then dissolve (0.5 s, sine.inOut) into a still made to match that exact frame, pixel aligned.
|
|
57
|
+
- During the dissolve a warm light sweep crosses the windows (screen blend, 105 deg band, capped at 0.42 opacity so the midpoint does not wash out).
|
|
58
|
+
- Hard cut to a matching clip on its first frame. Measure the clip's camera push (here 3.15% per second) and copy it in code, so the coded version moves the same way.
|
|
59
|
+
- Fade the labels out before the dissolve. Keep the same camera and seed so code and footage line up.
|
|
60
|
+
|
|
61
|
+
## Ban list
|
|
62
|
+
- grey shadows or black outlines
|
|
63
|
+
- saturated colours other than the one coral
|
|
64
|
+
- flat boxes with no light (every block needs three shaded faces)
|
|
65
|
+
- more than two labels on screen
|
|
66
|
+
- fast cuts or a still camera
|