sheleg-design-skill 0.1.0 → 0.3.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 +40 -1
- package/bin/cli.js +8 -1
- package/cursor/rules/sheleg-design.mdc +48 -0
- package/package.json +3 -2
- package/plugins/sheleg-design/.claude-plugin/plugin.json +21 -0
- package/plugins/sheleg-design/commands/sheleg-design.md +13 -0
- package/{skill → plugins/sheleg-design/skills/sheleg-design}/SHELEG_DESIGN.md +19 -19
- package/plugins/sheleg-design/skills/sheleg-design/SKILL.md +74 -0
- package/skill/SKILL.md +0 -85
package/README.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# SHELEG Design — agent skill
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/sheleg-design-skill)
|
|
4
|
+
[](https://github.com/ssheleg/sheleg-design-skill/actions/workflows/validate.yml)
|
|
5
|
+
[](./LICENSE)
|
|
6
|
+
|
|
3
7
|
> A motion + particle interface methodology for building cinematic,
|
|
4
8
|
> scroll-driven landing pages — packaged as an installable agent skill for
|
|
5
9
|
> Cursor and Claude.
|
|
@@ -60,11 +64,25 @@ npx sheleg-design-skill --force
|
|
|
60
64
|
npx sheleg-design-skill --help
|
|
61
65
|
```
|
|
62
66
|
|
|
67
|
+
### Other install paths
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# Claude Code plugin (adds the /sheleg-design command too)
|
|
71
|
+
/plugin marketplace add ssheleg/sheleg-design-skill
|
|
72
|
+
/plugin install sheleg-design@sheleg-design-skill
|
|
73
|
+
|
|
74
|
+
# vercel-labs skills CLI (70+ agents)
|
|
75
|
+
npx skills add ssheleg/sheleg-design-skill
|
|
76
|
+
|
|
77
|
+
# POSIX fallback, no Node
|
|
78
|
+
curl -fsSL https://raw.githubusercontent.com/ssheleg/sheleg-design-skill/main/install.sh | sh
|
|
79
|
+
```
|
|
80
|
+
|
|
63
81
|
### What gets installed
|
|
64
82
|
|
|
65
83
|
| File | Purpose |
|
|
66
84
|
|---|---|
|
|
67
|
-
| `SKILL.md` | Agent-facing skill: discovery trigger
|
|
85
|
+
| `SKILL.md` | Agent-facing skill: discovery trigger, the principles, how to apply them, quick-reference rules, common mistakes |
|
|
68
86
|
| `SHELEG_DESIGN.md` | The full reference: architecture, layer-by-layer mechanics with code, the exact morph math, the DOM↔WebGL projection bridge, a build-from-scratch recipe, and the "why it works" |
|
|
69
87
|
|
|
70
88
|
After installing, a Cursor or Claude agent in that project can discover the
|
|
@@ -83,6 +101,27 @@ applies to any stack that can render to a canvas/WebGL surface and read scroll.
|
|
|
83
101
|
The installer is a single zero-dependency Node script, so `npx` runs instantly
|
|
84
102
|
with no install step and no supply-chain surface.
|
|
85
103
|
|
|
104
|
+
## Development
|
|
105
|
+
|
|
106
|
+
`python3 test/validate.py` checks repo consistency (manifests, version sync,
|
|
107
|
+
skill/command/rule front-matter, relative links); CI runs it plus a CLI smoke
|
|
108
|
+
test on every push and PR. Versioning is semver; bump `marketplace.json` +
|
|
109
|
+
`plugin.json` + `package.json` + `CHANGELOG.md` together — the validator
|
|
110
|
+
enforces the sync.
|
|
111
|
+
|
|
112
|
+
## По-русски (коротко)
|
|
113
|
+
|
|
114
|
+
SHELEG Design — методология кинематографичных скролл-лендингов: один
|
|
115
|
+
scroll-«клок» питает много дешёвых независимых слоёв (WebGL-частицы,
|
|
116
|
+
2D-фоллбек, параллакс, scrub-инструменты, прогресс-рейл), каждый деградирует
|
|
117
|
+
до спокойной статики. Ничего не кроссфейдится — формации «передислоцируются».
|
|
118
|
+
Установка: `npx sheleg-design-skill` (авто-детект `.cursor`/`.claude`), либо
|
|
119
|
+
плагин Claude Code — `/plugin marketplace add ssheleg/sheleg-design-skill`,
|
|
120
|
+
затем `/plugin install sheleg-design@sheleg-design-skill` (даст команду
|
|
121
|
+
`/sheleg-design`). Агент получает SKILL.md (принципы и порядок работы) и
|
|
122
|
+
SHELEG_DESIGN.md (полный референс: архитектура, точная математика морфа,
|
|
123
|
+
DOM↔WebGL-мост, рецепт сборки с нуля).
|
|
124
|
+
|
|
86
125
|
## License
|
|
87
126
|
|
|
88
127
|
MIT © ssheleg
|
package/bin/cli.js
CHANGED
|
@@ -14,7 +14,14 @@
|
|
|
14
14
|
const fs = require("fs");
|
|
15
15
|
const path = require("path");
|
|
16
16
|
|
|
17
|
-
const SKILL_DIR = path.join(
|
|
17
|
+
const SKILL_DIR = path.join(
|
|
18
|
+
__dirname,
|
|
19
|
+
"..",
|
|
20
|
+
"plugins",
|
|
21
|
+
"sheleg-design",
|
|
22
|
+
"skills",
|
|
23
|
+
"sheleg-design",
|
|
24
|
+
);
|
|
18
25
|
const SKILL_SLUG = "sheleg-design";
|
|
19
26
|
const FILES = ["SKILL.md", "SHELEG_DESIGN.md"];
|
|
20
27
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Apply SHELEG Design when building or upgrading a cinematic scroll-driven landing page, hero, or particle/WebGL scroll experience — or when scroll motion feels busy, janky, or out of sync
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SHELEG Design — single-clock scroll motion
|
|
7
|
+
|
|
8
|
+
A page feels cinematic from a **single source of truth** (measured scroll
|
|
9
|
+
position) driving **many cheap, layered, independently-degradable responses** —
|
|
10
|
+
not from many animations. If the project has the full skill installed
|
|
11
|
+
(`.cursor/skills/sheleg-design/`), read its `SKILL.md` and `SHELEG_DESIGN.md`
|
|
12
|
+
first; otherwise follow the contract below (self-contained on purpose).
|
|
13
|
+
|
|
14
|
+
## Five principles, in order
|
|
15
|
+
|
|
16
|
+
1. **One clock.** All motion derives from one measured scroll state in one
|
|
17
|
+
store; no layer measures scroll itself, so layers never drift out of phase.
|
|
18
|
+
2. **Read per frame, notify rarely.** Hot consumers (WebGL/canvas/progress
|
|
19
|
+
rail) read the store imperatively with zero framework renders; only coarse
|
|
20
|
+
act/section changes notify the framework.
|
|
21
|
+
3. **Hold, then redeploy.** Hold a formation ~80% of a section, then morph in
|
|
22
|
+
a short, phase-staggered, arc-curved wave. Crossfades between point sets
|
|
23
|
+
are banned.
|
|
24
|
+
4. **Earned motion.** Scrub only for instruments that narrate state over time
|
|
25
|
+
(charts, step flows); hover/entrance motion stays sub-500ms and never
|
|
26
|
+
gates content visibility.
|
|
27
|
+
5. **Degrade to calm.** `prefers-reduced-motion` / coarse pointer / no-WebGL
|
|
28
|
+
collapse to a static, fully-legible page. The effect is a bonus, never a
|
|
29
|
+
dependency.
|
|
30
|
+
|
|
31
|
+
## Non-negotiables
|
|
32
|
+
|
|
33
|
+
- One scroll store, two read paths: live getter for per-frame readers,
|
|
34
|
+
coarse subscription for framework-rendered UI.
|
|
35
|
+
- Storyboard in data: a `SCENES` registry (`{ anchor, formation, focusX,
|
|
36
|
+
energy }` per section); iterate on data before render loops.
|
|
37
|
+
- Smooth scroll (e.g. Lenis) driven from the animation library's ticker so
|
|
38
|
+
scrubbed instruments and the particle field share one inertia.
|
|
39
|
+
- Lazy-load GSAP/WebGL out of the initial bundle; mount WebGL one frame
|
|
40
|
+
after hydration paints.
|
|
41
|
+
- One ease + one small duration/stagger token set site-wide.
|
|
42
|
+
- Scrubbed SVG: `ease: 'none'`, `pathLength={1}`, always kill timelines and
|
|
43
|
+
triggers on cleanup.
|
|
44
|
+
- Animate only `transform` and `opacity`.
|
|
45
|
+
- Every layer ships its reduced-motion/fallback branch in the same commit.
|
|
46
|
+
- At most one parallax figure per viewport; no scrub on hero/entrances.
|
|
47
|
+
- Visual system (color, type, spacing, components) is finished before any
|
|
48
|
+
motion work starts.
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sheleg-design-skill",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "SHELEG Design — an agent skill for building cinematic, scroll-driven, particle-backed landing pages. Installs a SKILL.md + reference doc into your project so Cursor/Claude agents can build sites with a single-clock motion system, a scene-formation particle engine, and degrade-to-calm fallbacks.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"sheleg-design-skill": "bin/cli.js"
|
|
7
7
|
},
|
|
8
8
|
"files": [
|
|
9
9
|
"bin/",
|
|
10
|
-
"
|
|
10
|
+
"plugins/",
|
|
11
|
+
"cursor/",
|
|
11
12
|
"README.md",
|
|
12
13
|
"LICENSE"
|
|
13
14
|
],
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "sheleg-design",
|
|
3
|
+
"description": "SHELEG Design methodology for cinematic scroll-driven landing pages: a single scroll clock driving layered, degrade-to-calm motion (WebGL particle formations, 2D fallback, parallax, scrubbed instruments, progress rail). Ships the sheleg-design skill, the full architecture reference, and the /sheleg-design command.",
|
|
4
|
+
"version": "0.3.0",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "ssheleg"
|
|
7
|
+
},
|
|
8
|
+
"homepage": "https://github.com/ssheleg/sheleg-design-skill",
|
|
9
|
+
"repository": "https://github.com/ssheleg/sheleg-design-skill",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"design",
|
|
13
|
+
"motion",
|
|
14
|
+
"animation",
|
|
15
|
+
"particles",
|
|
16
|
+
"webgl",
|
|
17
|
+
"scroll",
|
|
18
|
+
"landing-page",
|
|
19
|
+
"claude-code"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Apply the SHELEG Design methodology (single-clock, layered, degrade-to-calm motion) to the current landing-page / hero / scroll-animation task
|
|
3
|
+
argument-hint: [what to build or upgrade]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Invoke the `sheleg-design` skill and apply it to the current request.
|
|
7
|
+
|
|
8
|
+
- Read the skill's SKILL.md, then its full reference `SHELEG_DESIGN.md`
|
|
9
|
+
(same directory) before designing anything.
|
|
10
|
+
- Task: $ARGUMENTS — if empty, ask what page or section to build/upgrade,
|
|
11
|
+
then proceed per the skill's "How to Apply" order.
|
|
12
|
+
- Follow the skill's non-negotiables (Quick Reference table) and ship every
|
|
13
|
+
layer's reduced-motion/fallback branch in the same commit.
|
|
@@ -158,7 +158,7 @@ to you" signal.
|
|
|
158
158
|
|
|
159
159
|
## 3. Layer 2 — Smooth scroll (one position per frame)
|
|
160
160
|
|
|
161
|
-
**File:** `src/components/
|
|
161
|
+
**File:** `src/components/motion/SmoothScroll.tsx`
|
|
162
162
|
|
|
163
163
|
Lenis provides inertial scrolling, but the important move is **driving Lenis
|
|
164
164
|
from the GSAP ticker** rather than its own rAF:
|
|
@@ -183,7 +183,7 @@ and keep native scroll. The store still runs, so the rail and nav stay in sync.
|
|
|
183
183
|
|
|
184
184
|
## 4. Layer 3 — The particle field (the scene-formation engine)
|
|
185
185
|
|
|
186
|
-
**File:** `src/components/
|
|
186
|
+
**File:** `src/components/webgl/SignalField.tsx`
|
|
187
187
|
|
|
188
188
|
This is the showpiece: ~936 points (`24 × 13 × 3`) that narrate the page section
|
|
189
189
|
by section. It is a single `THREE.Points` cloud whose target positions change
|
|
@@ -326,7 +326,7 @@ scrubbed scalar, scrolling back up rewinds the whole explosion frame-for-frame.
|
|
|
326
326
|
|
|
327
327
|
## 5. Layer 4 — The 2D fallback (SignalMesh)
|
|
328
328
|
|
|
329
|
-
**File:** `src/components/
|
|
329
|
+
**File:** `src/components/atmosphere/SignalMesh.tsx`
|
|
330
330
|
|
|
331
331
|
Touch and no-WebGL clients get a canvas mesh: two depth layers of grid nodes
|
|
332
332
|
with hairline links and traveling pulses, plus **stroke overlays** that fade in
|
|
@@ -399,18 +399,18 @@ particle "head" runs exactly where the line tip is being drawn.
|
|
|
399
399
|
|
|
400
400
|
Three small components, one mechanism each, all reading the same clock.
|
|
401
401
|
|
|
402
|
-
### FocalSpotlight — `src/components/
|
|
402
|
+
### FocalSpotlight — `src/components/motion/FocalSpotlight.tsx`
|
|
403
403
|
An `IntersectionObserver` with a generous center band (`rootMargin: -22% 0 -22% 0`)
|
|
404
404
|
toggles a `data-dim` attribute on sections outside the band. CSS dims them to
|
|
405
405
|
62% opacity. The reader's eye is always pulled to the active section. The finale
|
|
406
406
|
section is excluded (`:not(#finale)`) because it runs its own fade.
|
|
407
407
|
|
|
408
|
-
### ParallaxDrift — `src/components/
|
|
408
|
+
### ParallaxDrift — `src/components/motion/ParallaxDrift.tsx`
|
|
409
409
|
Wraps **at most one figure per viewport** in a GSAP `yPercent` scrub for a few
|
|
410
410
|
percent of depth drift. Restraint is the rule: parallax on everything is nausea;
|
|
411
411
|
parallax on the one hero figure is depth.
|
|
412
412
|
|
|
413
|
-
### ScrollRail — `src/components/
|
|
413
|
+
### ScrollRail — `src/components/atmosphere/ScrollRail.tsx`
|
|
414
414
|
A right-edge hairline whose fill is scaled imperatively (`scaleY(global)`) and
|
|
415
415
|
brightened by `velocity` — a live mission timeline, updated per frame with zero
|
|
416
416
|
React renders. Act markers deep-link to their anchor sections and use the coarse
|
|
@@ -420,7 +420,7 @@ React renders. Act markers deep-link to their anchor sections and use the coarse
|
|
|
420
420
|
|
|
421
421
|
## 8. Layer 7 — Reveal primitives (act-themed entrances)
|
|
422
422
|
|
|
423
|
-
**File:** `src/components/
|
|
423
|
+
**File:** `src/components/design/Reveal.tsx`
|
|
424
424
|
|
|
425
425
|
Entrances are not generic. Each narrative act has a reveal whose *physics* match
|
|
426
426
|
its meaning — this is Disney's "staging" applied to a scroll page:
|
|
@@ -487,7 +487,7 @@ The non-negotiables (each learned from a real bug here):
|
|
|
487
487
|
No component invents its own curve. Everything uses:
|
|
488
488
|
|
|
489
489
|
- **`EASE = cubic-bezier(0.16, 1, 0.3, 1)`** (an easeOutExpo-like signature),
|
|
490
|
-
mirrored in CSS as `--
|
|
490
|
+
mirrored in CSS as `--motion-ease`.
|
|
491
491
|
- **`DUR`** — `fast 0.18` / `base 0.32` / `slow 0.55` / `epic 0.8` seconds.
|
|
492
492
|
- **`STAGGER = 0.07`** — the standard interval between sibling reveals.
|
|
493
493
|
|
|
@@ -622,18 +622,18 @@ A pragmatic order that front-loads the parts everything else depends on.
|
|
|
622
622
|
| Lazy GSAP + reduced-motion gate | `src/lib/motion/gsap-client.ts` |
|
|
623
623
|
| DOM↔WebGL bridge | `src/lib/motion/field-sync.ts` |
|
|
624
624
|
| Interactive field gestures | `src/lib/motion/use-section-field.ts` |
|
|
625
|
-
| WebGL particle field | `src/components/
|
|
626
|
-
| 2D fallback field | `src/components/
|
|
627
|
-
| Field/fallback mode switch | `src/components/
|
|
628
|
-
| Constellation SVG overlay | `src/components/
|
|
629
|
-
| Progress rail | `src/components/
|
|
630
|
-
| Smooth scroll | `src/components/
|
|
631
|
-
| Attention dimming | `src/components/
|
|
632
|
-
| Figure parallax | `src/components/
|
|
633
|
-
| Reveal primitives | `src/components/
|
|
634
|
-
| Epilogue runway | `src/components/
|
|
625
|
+
| WebGL particle field | `src/components/webgl/SignalField.tsx` |
|
|
626
|
+
| 2D fallback field | `src/components/atmosphere/SignalMesh.tsx` |
|
|
627
|
+
| Field/fallback mode switch | `src/components/atmosphere/AtmosphereField.tsx` |
|
|
628
|
+
| Constellation SVG overlay | `src/components/atmosphere/ConstellationOverlay.tsx` |
|
|
629
|
+
| Progress rail | `src/components/atmosphere/ScrollRail.tsx` |
|
|
630
|
+
| Smooth scroll | `src/components/motion/SmoothScroll.tsx` |
|
|
631
|
+
| Attention dimming | `src/components/motion/FocalSpotlight.tsx` |
|
|
632
|
+
| Figure parallax | `src/components/motion/ParallaxDrift.tsx` |
|
|
633
|
+
| Reveal primitives | `src/components/design/Reveal.tsx` |
|
|
634
|
+
| Epilogue runway | `src/components/sections/FinaleSection.tsx` |
|
|
635
635
|
| Scrubbed instruments (examples) | `WhyNowChart.tsx`, `EcosystemDiagram.tsx`, `PinnedSteps.tsx` |
|
|
636
|
-
| CSS tokens +
|
|
636
|
+
| CSS tokens + motion styles | `src/app/motion.css` |
|
|
637
637
|
|
|
638
638
|
---
|
|
639
639
|
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sheleg-design
|
|
3
|
+
description: Use when building or upgrading a cinematic scroll-driven landing page, marketing site, or hero experience — a particle/WebGL background, scroll-linked animation, parallax, pinned or scrubbed sections, formation-morphing scenes — or when such a page feels busy or janky, or its motion layers drift out of sync. RU triggers - кинематографичный лендинг, скролл-анимация, лендинг с частицами. Pairs with an existing visual system, does not replace one.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SHELEG Design
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
A page feels cinematic not from many animations, but from a **single source of
|
|
11
|
+
truth** (measured scroll position) driving **many cheap, layered,
|
|
12
|
+
independently-degradable responses**. Centralize scroll into one store; layers
|
|
13
|
+
read it per frame and react in their own language. Nothing crossfades — things
|
|
14
|
+
*redeploy*. Every layer degrades to a calm static state.
|
|
15
|
+
|
|
16
|
+
**REQUIRED REFERENCE:** read [`SHELEG_DESIGN.md`](./SHELEG_DESIGN.md) (same
|
|
17
|
+
directory) before implementing — it holds the architecture, exact morph math,
|
|
18
|
+
the DOM↔WebGL bridge, the build recipe (§11), and the file map.
|
|
19
|
+
|
|
20
|
+
## When to Use
|
|
21
|
+
|
|
22
|
+
- Landing/marketing/hero pages where motion is a stated goal
|
|
23
|
+
- Particle or WebGL backgrounds tied to scroll; scenes that morph per section
|
|
24
|
+
- Scroll-linked charts, step flows, progress rails, parallax
|
|
25
|
+
- Existing scroll site that feels nervous, janky, or out of phase
|
|
26
|
+
|
|
27
|
+
**Not for:** docs, dashboards, static content sites — or any page whose visual
|
|
28
|
+
system or copy isn't finished yet. Fix those first; motion amplifies weakness.
|
|
29
|
+
|
|
30
|
+
## Core Pattern — five principles, in order
|
|
31
|
+
|
|
32
|
+
1. **One clock.** All motion derives from one measured scroll state; no layer
|
|
33
|
+
measures scroll itself, so layers can never drift out of phase.
|
|
34
|
+
2. **Read per frame, notify rarely.** Hot consumers (WebGL/canvas/rail) read
|
|
35
|
+
the store imperatively, zero framework renders; only coarse act/section
|
|
36
|
+
changes notify the framework.
|
|
37
|
+
3. **Hold, then redeploy.** Hold a formation ~80% of a section, then morph in a
|
|
38
|
+
short, phase-staggered, arc-curved wave. Crossfades are banned.
|
|
39
|
+
4. **Earned motion.** Scrub only for instruments that narrate state over time;
|
|
40
|
+
hover/entrance motion stays sub-500ms and never gates content.
|
|
41
|
+
5. **Degrade to calm.** Reduced-motion / coarse pointer / no-WebGL collapse to
|
|
42
|
+
a static, fully-legible page. The effect is a bonus, never a dependency.
|
|
43
|
+
|
|
44
|
+
## How to Apply
|
|
45
|
+
|
|
46
|
+
1. Visual system first (color, type, spacing, components).
|
|
47
|
+
2. Build bottom-up in the §11 layer order: scroll clock → smooth scroll →
|
|
48
|
+
particle field → 2D fallback → DOM choreography → reveals → scrubbed
|
|
49
|
+
instruments → optional DOM↔WebGL bridge. One small file per layer.
|
|
50
|
+
3. Storyboard in data: a `SCENES` registry (`{ anchor, formation, focusX,
|
|
51
|
+
energy }` per section); iterate on the data before touching render loops.
|
|
52
|
+
4. Ship each layer's reduced-motion/fallback branch in the same commit.
|
|
53
|
+
5. Verify: typecheck/lint/build; screenshot each scene mid-hold and mid-morph;
|
|
54
|
+
reduced-motion pass; narrow-viewport pass.
|
|
55
|
+
|
|
56
|
+
## Quick Reference
|
|
57
|
+
|
|
58
|
+
| Rule | Prevents |
|
|
59
|
+
|---|---|
|
|
60
|
+
| One scroll store, two read paths (live getter + coarse subscription) | layers drifting out of phase; render storms |
|
|
61
|
+
| Long hold, short smoothstepped morph tail | nervous, constantly-moving page |
|
|
62
|
+
| Per-point phase-staggered, perpendicular-arc migration | "screensaver" particle look |
|
|
63
|
+
| Smooth scroll driven from the animation library's ticker | scrub and field on different inertia |
|
|
64
|
+
| Lazy-load GSAP/WebGL; mount WebGL one frame after hydration | heavy initial bundle, hydration jank |
|
|
65
|
+
| One ease + tiny duration/stagger token set site-wide | motion reading as many systems, not one |
|
|
66
|
+
| Scrubbed SVG: `ease: 'none'`, `pathLength={1}`, kill timelines on cleanup | easing fighting scrub; leaked triggers |
|
|
67
|
+
| Animate only `transform`/`opacity` | layout thrash |
|
|
68
|
+
|
|
69
|
+
## Common Mistakes
|
|
70
|
+
|
|
71
|
+
- Paying the fallback/a11y tax "at the end" → it never ships. Same commit.
|
|
72
|
+
- Parallax on everything → nausea. At most one drifting figure per viewport.
|
|
73
|
+
- Scrub on hero/entrances → motion feels unearned; reserve scrub for
|
|
74
|
+
instruments.
|
package/skill/SKILL.md
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sheleg-design
|
|
3
|
-
description: Use when building or upgrading a cinematic, scroll-driven landing page, marketing site, or hero experience — especially one with a particle/WebGL background, scroll-linked animation, parallax, pinned/scrubbed sections, or formation-changing motion. SHELEG Design is a motion + systems methodology: one scroll "clock" drives many cheap, layered, independently-degradable responses (a particle field, a 2D fallback, attention dimming, parallax, scrubbed instruments, a progress rail) so the page reads as a single precision instrument. Read this before designing the motion architecture of such a site; it pairs with a visual system, not replaces one.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# SHELEG Design
|
|
7
|
-
|
|
8
|
-
A methodology for landing pages that feel *alive* without feeling busy. Full
|
|
9
|
-
reference (architecture, code-level mechanics, build-from-scratch recipe, file
|
|
10
|
-
map, and the deeper "why") lives in [`SHELEG_DESIGN.md`](./SHELEG_DESIGN.md) next
|
|
11
|
-
to this file — read it before implementing.
|
|
12
|
-
|
|
13
|
-
## The thesis
|
|
14
|
-
|
|
15
|
-
A page feels cinematic not from many animations, but from a **single source of
|
|
16
|
-
truth** (scroll position) driving **many cheap, layered responses** that are
|
|
17
|
-
individually quiet and collectively rich. Centralize scroll into one external
|
|
18
|
-
store; let independent layers read it per frame and react in their own language.
|
|
19
|
-
Nothing crossfades — things *redeploy*. Every layer degrades to a calm static
|
|
20
|
-
state.
|
|
21
|
-
|
|
22
|
-
## The five principles (apply in order)
|
|
23
|
-
|
|
24
|
-
1. **One clock.** All motion derives from one measured scroll state. Layers never
|
|
25
|
-
measure scroll independently, so they can never drift out of phase.
|
|
26
|
-
2. **Read per frame, notify rarely.** Hot consumers (WebGL/canvas/rail) read the
|
|
27
|
-
store imperatively each frame and cause zero React renders. Only coarse,
|
|
28
|
-
human-visible changes (the current "act"/section) notify the framework.
|
|
29
|
-
3. **Hold, then redeploy.** Hold a formation steady for ~80% of a section, then
|
|
30
|
-
morph in a short, phase-staggered, arc-curved wave. Ban crossfades.
|
|
31
|
-
4. **Earned motion.** Scrub belongs to instruments that narrate state over time
|
|
32
|
-
(charts, step flows). Hover/entrance motion stays sub-500ms and never gates
|
|
33
|
-
content visibility.
|
|
34
|
-
5. **Degrade to calm.** `prefers-reduced-motion` / coarse pointer / no-WebGL all
|
|
35
|
-
collapse to a static, fully-legible page. The effect is a bonus, never a
|
|
36
|
-
dependency.
|
|
37
|
-
|
|
38
|
-
## How to use this skill
|
|
39
|
-
|
|
40
|
-
When asked to build or upgrade such a site:
|
|
41
|
-
|
|
42
|
-
1. **Lay the visual system first** (color, type, spacing, components). Motion on
|
|
43
|
-
top of a weak visual system amplifies the weakness. SHELEG Design is the
|
|
44
|
-
motion layer — it assumes a visual foundation exists.
|
|
45
|
-
2. **Build bottom-up following the layer order** in `SHELEG_DESIGN.md` §11:
|
|
46
|
-
the scroll clock → smooth scroll → particle field → 2D fallback → DOM
|
|
47
|
-
choreography → reveal primitives → scrubbed instruments → (optional) DOM↔WebGL
|
|
48
|
-
bridge. Each layer is a small, single-responsibility file reading the one clock.
|
|
49
|
-
3. **Storyboard in data.** Express the narrative as a `SCENES` registry (one
|
|
50
|
-
`{ anchor, formation, focusX, energy }` per section). Iterate on the data
|
|
51
|
-
before touching render loops.
|
|
52
|
-
4. **Pay the fallback + a11y tax in the same commit** as each layer, never at the
|
|
53
|
-
end. Every animated component ships its reduced-motion branch immediately.
|
|
54
|
-
5. **Verify** with typecheck/lint/build, screenshots of each scene mid-hold and
|
|
55
|
-
mid-morph, a reduced-motion pass, and a narrow-viewport pass.
|
|
56
|
-
|
|
57
|
-
## Non-negotiables (each prevents a real failure mode)
|
|
58
|
-
|
|
59
|
-
- Centralize scroll in ONE store with two read paths: a live getter for
|
|
60
|
-
per-frame readers and a coarse subscription for framework-rendered UI.
|
|
61
|
-
- Hold-then-morph (long hold, short smoothstepped tail) — constant morphing
|
|
62
|
-
reads as nervous; this is the single biggest "calm" lever.
|
|
63
|
-
- Redeploy with a per-point phase-staggered, perpendicular-arc migration — this
|
|
64
|
-
is what makes a particle field read as premium rather than a screensaver.
|
|
65
|
-
- Drive smooth scroll (e.g. Lenis) from the animation library's ticker so
|
|
66
|
-
scrubbed instruments and the particle field share one inertia.
|
|
67
|
-
- Lazy-load heavy libs (GSAP/WebGL) out of the initial bundle; WebGL mounts one
|
|
68
|
-
frame after hydration paints.
|
|
69
|
-
- One ease + a tiny duration/stagger token set for the whole site; no component
|
|
70
|
-
invents its own curve.
|
|
71
|
-
- For scrubbed SVG: `ease: 'none'`, `pathLength={1}` to normalize paths, and
|
|
72
|
-
always kill timelines + triggers on cleanup.
|
|
73
|
-
- Animate only `transform` and `opacity`; reserve scrub for genuine instruments.
|
|
74
|
-
|
|
75
|
-
## When NOT to use it
|
|
76
|
-
|
|
77
|
-
Skip for static content sites, docs, dashboards, or anything where motion is not
|
|
78
|
-
a goal. Do not bolt the particle field onto a page whose visual system or copy
|
|
79
|
-
isn't finished — fix those first.
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
|
|
83
|
-
Read [`SHELEG_DESIGN.md`](./SHELEG_DESIGN.md) for the full architecture, code
|
|
84
|
-
mechanics, the exact morph math, the DOM↔WebGL projection bridge, the
|
|
85
|
-
build-from-scratch recipe, and the file map.
|