Przejdź do treści
Biblioteka skilli
Projektowanie i UX · Budowanie i kod

creative-web-webgl

/creative-web-webgl

Dobiera i buduje sceny Three.js do stron na podstawie przekazu sekcji, z gotowymi przepisami shaderów, geometrii i materiałów.

Licencja
MIT
Ostatnia zmiana repozytorium
05.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
29
Skrypty
17
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 05.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 17 skryptów w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: assets/recipes/_stage.js, assets/recipes/blob.js, assets/recipes/caustics.js, assets/recipes/chrome.js, assets/recipes/crt.js, assets/recipes/dither.js, assets/recipes/flowfield.js, assets/recipes/glass.js, assets/recipes/halftone.js, assets/recipes/origami.js, assets/recipes/pagecurl.js, assets/recipes/ribbons.js, assets/recipes/topo.js, assets/recipes/voxels.js, assets/recipes/wireframe.js, scri

Co robi i kiedy

Dobiera i buduje sceny Three.js do stron na podstawie przekazu sekcji, z gotowymi przepisami shaderów, geometrii i materiałów.

Oryginalny opis (EN)

Picks and builds Three.js scenes for websites from the section's message instead of defaulting to particles — shader surfaces, geometry and type, glass, chrome and print materials, interaction, and a capped particle section. Ships 14 browser-tested recipes (noise blob, dither, topographic lines, ribbons, voxels, page curl, halftone, glass, curl-noise ink flow field, CRT warm-up, water caustics, origami fold, wireframe draw-on, chrome morph) that take bg, ink and accent colours from a design world, plus a React wrapper, a metaphor-to-scene table and a test harness. Use when a hero, story sectio

Jak działa

  1. Critical
  2. Rules of taste
  3. Picker: metaphor → scene
  4. Recipe contract
  5. React / Next.js scaffold (when writing a scene from scratch)
  6. Colour
  7. Performance budget
  8. Troubleshooting
  9. Verify
  10. Workflow
Sekcje z nagłówków SKILL.md, w oryginale · 197 linii, 1 895 słów
Podgląd SKILL.md
---
name: creative-web-webgl
description: Picks and builds Three.js scenes for websites from the section's message instead of defaulting to particles — shader surfaces, geometry and type, glass, chrome and print materials, interaction, and a capped particle section. Ships 14 browser-tested recipes (noise blob, dither, topographic lines, ribbons, voxels, page curl, halftone, glass, curl-noise ink flow field, CRT warm-up, water caustics, origami fold, wireframe draw-on, chrome morph) that take bg, ink and accent colours from a design world, plus a React wrapper, a metaphor-to-scene table and a test harness. Use when a hero, story section or auth screen needs a 3D or shader visual, when the user mentions three.js, WebGL or 3D animation, or says the visuals all look like stars or particles. Do NOT use for 2D UI motion (use creative-web-motion) or for games and product configurators.
license: MIT
compatibility: Works in Claude Code and claude.ai. Recipes need three 0.170+ as ESM; the harness needs python3, node and playwright.
metadata:
  author: afkanozdemir
  version: 1.0.1
  suite: creative-web
  tags: [frontend, design, motion]
---

# WebGL scene library

A scene is an argument, not a wallpaper. Pick it from **what the section is saying**, then pick the technique.

## Critical

- Write "This section says ___" first. The scene must act that sentence out; if it fits any page, it is wallpaper.
- At most one particle/point-cloud scene per site, and never the same scene on two pages.
- Text stays readable: the scene recedes where copy sits.
- Reduced motion renders the final frame once; content never depends on the scene.
- Colours come from the dealt world (`creative-web-worlds`), never from the recipe defaults on a real page.
- Read the browser console after the first render — GLSL errors leave a silent black canvas.

## Rules of taste

1. **Metaphor first.** Write one sentence: "This section says ___." The scene must act that sentence out
   (assemble, sort, reveal, erase, protect, connect…). If it would fit any page, it is wallpaper — change it.
2. **One particle scene per site, maximum.** Points and "starfields" are the default reflex. Reach for
   surfaces, geometry, typography and materials first. Particles are allowed only when the metaphor is
   literally about many small things becoming one (or one dissolving into many).
3. **Each page gets its own scene.** Never reuse the same hero scene on two pages.
4. **Text stays readable.** The scene recedes where copy sits (dark/quiet zones, vignette, or offset framing).
5. **Scroll tells the story.** `progress` 0 → 1 maps to a beginning, a middle and an end you can describe.
   The end state must be a good still image (it is also the reduced-motion frame).
6. **Monochrome by default** (ink on a ground). Colour is one brand accent, used on the *one* element that
   carries the message — never a rainbow gradient.

## Picker: metaphor → scene

| The section says… | Scene | Family |
|---|---|---|
| "It adapts / it's alive / thinking" | Noise blob with fresnel rim (`assets/recipes/blob.js`) | Shader surface |
| "Signal from noise / clarity emerges" | Bayer-dither field that resolves (`assets/recipes/dither.js`) | Shader surface |
| "We map the terrain / depth of knowledge" | Topographic contour lines (`assets/recipes/topo.js`) | Shader surface |
| "Light through water / calm, natural" | Caustics plane, choppy → deep and calm (`assets/recipes/caustics.js`) | Shader surface |
| "Growth / organic / emergent patterns" | Reaction–diffusion (ping-pong FBO) | Shader surface |
| "Flow / momentum / a hand-made idea taking shape" | Curl-noise ink strokes drawing themselves (`assets/recipes/flowfield.js`) | Shader surface |
| "Threads come together / connections" | Tube ribbons drawn along curves (`assets/recipes/ribbons.js`) | Geometry |
| "Built piece by piece / foundation" | Voxel build-up (`assets/recipes/voxels.js`) | Geometry |
| "Designed with care / blueprint / architecture" | Wireframe model drawn by a plotter pen (`assets/recipes/wireframe.js`) | Geometry |
| "Folded / compact / clever structure" | Miura-ori paper sheet folding (`assets/recipes/origami.js`) | Geometry |
| "Turn the page / documents / reading" | Page curl (`assets/recipes/pagecurl.js`) | Geometry |
| "Our name / a word that matters" | Extruded 3D type with bevel | Geometry & type |
| "Around the clock / continuous / cycle" | Curved text ring | Geometry & type |
| "Protected / boundary / inside vs outside" | Wireframe lattice shell with deflection | Geometry |
| "A library / an archive / many records" | Instanced card field | Geometry |
| "Only the relevant few" | Card carousel with highlighted picks | Geometry |
| "Print / editorial / tangible" | Halftone post-process (`assets/recipes/halftone.js`) | Materials |
| "Transparency / see-through / honest" | Glass shapes over text (`assets/recipes/glass.js`) | Materials |
| "Raw → refined / premium / precision" | Chrome object morphing lumpy → crisp (`assets/recipes/chrome.js`) | Materials |
| "Tuning in / going live / broadcast" | CRT screen warming up from snow (`assets/recipes/crt.js`) | Materials |
| "Retro / terminal / under the hood" | ASCII post-process | Materials |
| "Soft, tactile, fabric, flags, identity" | Cloth/flag plane with wind | Materials |
| "Your touch matters / exploration" | Cursor ribbon trail | Interaction |
| "Discover what's hidden" | Raycast hover reveal | Interaction |
| "Many become one / condense / focus" | Point scatter → clusters | Particles (limit 1) |
| "Erase / forget / let go" | Text-sampled particle dissolve | Particles (limit 1) |

Full entries with snippets, perf notes and reduced-motion states: `references/catalog.md`.
Tested, runnable recipes: `assets/recipes/*.js` (14). Earlier production scenes (React components):
`references/existing/*.md`.

## Recipe contract

Every recipe is framework-agnostic ESM:

```js
import { create } from './recipes/caustics.js'
const driver = { progress: 0, px: 0, py: 0 }
const dispose = create(hostElement, driver, { bg: '#0b0d0c', ink: '#efe9dc', accent: '#c4472a' })
driver.progress = 0.5
dispose()
```

- `driver` is a plain mutable object. Anything (GSAP ScrollTrigger, a form step, a slider) writes to it; the
  render loop eases toward it every frame (`p += (target - p) * 0.08`).
- `px`, `py` are pointer coordinates in −1…1 for parallax.
- Colour opts: the six newer recipes (`flowfield`, `crt`, `caustics`, `origami`, `wireframe`, `chrome`) take
  `bg`, `ink`, `accent` (hex number or `'#rrggbb'`). The original eight take `color` and `background`;
  the newer ones accept those names as fallbacks too.
- All recipes share `assets/recipes/_stage.js`: renderer, camera, resize observer, IntersectionObserver pause,
  `THREE.Timer`, dpr cap, reduced-motion handling and disposal. Copy it alongside any recipe.

React wrapper with GSAP ScrollTrigger: `references/react-wrapper.md`.

## React / Next.js scaffold (when writing a scene from scratch)

```tsx
// page.tsx (client component)
const Scene = dynamic(() => import('./Scene'), { ssr: false })
```

```tsx
// Scene.tsx
'use client'
export default function Scene({ driver, className }: { driver: Driver; className?: string }) {
    const ref = useRef<HTMLDivElement>(null)
    useEffect(() => {
        const host = ref.current
        if (!host) return
        const reduce = matchMedia('(prefers-reduced-motion: reduce)').matches
        const dpr = Math.min(devicePixelRatio, matchMedia('(max-width: 767px)').matches ? 1.5 : 1.75)
        const renderer = new THREE.WebGLRenderer({ antialias: true })
        renderer.setPixelRatio(dpr)
        host.appendChild(renderer.domElement)
        const ro = new ResizeObserver(resize)
        let visible = true
        const io = new IntersectionObserver(([e]) => (visible = e.isIntersecting))
        const timer = new THREE.Timer()
        timer.connect(document)
        const frame = () => { timer.update(); /* ease uniforms toward driver */ render() }
        if (reduce) frame()
        else renderer.setAnimationLoop(() => visible && frame())
        return () => { renderer.setAnimationLoop(null); ro.disconnect(); io.disconnect(); timer.disconnect(); /* dispose geometries, materials, textures, composer */ renderer.dispose(); host.removeChild(renderer.domElement) }
    }, [driver])
    return <div ref={ref} aria-hidden="true" className={className} />
}
```

- Host: `absolute inset-0 [&>canvas]:h-full [&>canvas]:w-full`, `aria-hidden`.
- Reduced motion: set `driver.progress` to the final value and render **one** frame. Content must not
  depend on the scene.
- Keep `progress` in "step units" (0..N) for multi-step stories; shaders use `clamp(uP - k, 0, 1)` per phase.

## Colour

- A design world from `creative-web-worlds` supplies the ground, ink and one accent. Pass them straight in as
  `{ bg, ink, accent }`; do not invent extra hues inside the scene.
- Monochrome: variation = alpha × brightness, never hue. The accent goes on one element (the pen head, the
  cursor block, one ink stroke, the crease underside, a reflected light strip).
- Light worlds: `flowfield` has `paper: true`; the others work with a light `bg` and dark `ink` as-is. Older
  recipes that use additive blending need normal blending on light grounds — switch it, don't just invert.
- Re-sync colours when the theme class changes (MutationObserver on `<html>`) by disposing and re-creating.

## Performance budget

| Item | Budget |
|---|---|
| Pixel ratio | ≤ 1.75 desktop, ≤ 1.5 mobile; full-screen fbm/voronoi shaders ×0.6 |
| Draw calls | < 20 per scene |
| Instances / points | ≤ 10k desktop, halve on mobile |
| Post-processing | ≤ 2 passes + OutputPass |
| Off-screen | loop paused via IntersectionObserver |
| First paint | scene loads via dynamic import after content; page is usable without it |

## Troubleshooting

- **GLSL reserved words** fail to compile and leave a black canvas: `asm`, `input`, `output`, `filter`,
  `sample`, `active`, `common`, `partition`, `half`, `fixed`, `superp`. Always read the console once.
- **Colours look darker than the tokens** in a `ShaderMaterial`: uniforms are linear; end the fragment shader
  with `#include <colorspace_fragment>` so the world's hex values match the page.
- **Hand-built triangle strips are invisible**: the winding is clockwise and back-face culled — flip the index
  order or use `side: THREE.DoubleSide`.
- A ring/orbit in a tilted plane goes **edge-on** while the group spins → keep it in the XZ plane, tilt the group.
- **Bloom blow-out**: hero objects scaling toward the camera + bloom turn white → cap scale ≈1.2×,
  brightness ≈0.85, bloom 0.5–0.8.
- **Chrome looks like grey plastic**: the environment is too evenly lit. Darken `RoomEnvironment`'s walls and
  keep its light panels, so reflections have contrast.
- **Portrait screens**: pull the camera back (or change layout) instead of shrinking geometry.
- **Canvas text** (textures, text-sampled particles): wait for `document.fonts.ready` and use the page's
  computed font family.
- `InstancedBufferGeometry.copy(new PlaneGeometry())`, then set `instanceCount`; set `frustumCulled = false`
  whenever the vertex shader moves vertices.
- `THREE.Clock` is deprecated → `THREE.Timer` + `timer.connect(document)`.
- Opacity fades on DOM text over a scene fail contrast checks mid-animation → animate position, not opacity,
  or keep opacity ≥ 0.45 on large text.

## Verify

Render every recipe or scene at progress 0, 0.5 and 1, desktop and portrait mobile, and read the console. A
static harness (importmap → local `three`, `python3 -m http.server`, Playwright screenshots) is enough; see
`references/catalog.md` › "Testing". Full page QA belongs to `creative-web-qa`.

## Workflow

1. State the metaphor sentence; choose a row in the picker above (or `references/catalog.md`).
2. Copy the matching recipe from `assets/recipes/` together with `assets/recipes/_stage.js`, or adapt a production example in `references/existing/`.
3. Feed the dealt world's tokens into the recipe's colour opts (`bg`, `ink`, `accent` from `creative-web-worlds`).
4. Wrap it with `references/react-wrapper.md` and drive `driver.progress` from ScrollTrigger (see `creative-web-motion`). Place it in the section the page plan calls for (`creative-web-pages`); product UI mocks next to it come from `creative-web-widgets`.
5. Test the recipe in isolation: `bash scripts/harness/setup.sh /path/to/project`, then `cd scripts/harness && python3 -m http.server 8765 &` and `node run.mjs <recipe>`. Expected: `ok` for every recipe and viewport (console errors and warnings fail), exit code 0, screenshots in `shots/`. Remove the `three`, `recipes`, `node_modules` links and `shots/` afterwards.
6. Check the screenshots at progress 0, 0.5 and 1 for whiteout, cropping on portrait screens and collisions with copy, then run `creative-web-qa` on the real page.

## Examples

**User says:** "Our privacy page needs a hero animation, but not another particle sphere."
**Actions:** metaphor "your data stays inside a boundary" → wireframe lattice shell (geometry) → progress assembles the shell, outside motion deflects → final frame works as a still.
**Result:** a protective-boundary scene that is different from the home page.

**User says:** "Add a 3D visual to the 'documents' section."
**Actions:** metaphor "turn the page" → `assets/recipes/pagecurl.js` → React wrapper → harness test → QA.
**Result:** a page that curls into a two-page spread as the reader scrolls.

**User says:** "The 'how we build' section on our paper-white site needs something crafted."
**Actions:** metaphor "designed with care, line by line" → `assets/recipes/wireframe.js` with the world's `bg`, `ink`, `accent` → plotter draws the building bottom-up, then turns → harness on desktop and mobile.
**Result:** an ink-on-paper blueprint whose only colour is the pen, matching the page tokens.
Pliki w paczce (29)
  • SKILL.md 14 KB
  • assets/recipes/_stage.js 5 KB
  • assets/recipes/blob.js 2 KB
  • assets/recipes/caustics.js 4 KB
  • assets/recipes/chrome.js 5 KB
  • assets/recipes/crt.js 7 KB
  • assets/recipes/dither.js 3 KB
  • assets/recipes/flowfield.js 9 KB
  • assets/recipes/glass.js 4 KB
  • assets/recipes/halftone.js 4 KB
  • assets/recipes/origami.js 7 KB
  • assets/recipes/pagecurl.js 5 KB
  • assets/recipes/ribbons.js 4 KB
  • assets/recipes/topo.js 2 KB
  • assets/recipes/voxels.js 3 KB
  • assets/recipes/wireframe.js 6 KB
  • references/catalog.md 17 KB
  • references/react-wrapper.md 3 KB
  • references/existing/Constellation.md 10 KB
  • references/existing/Dissolve.md 8 KB
  • references/existing/Distill.md 8 KB
  • references/existing/Enclave.md 11 KB
  • references/existing/InkField.md 5 KB
  • references/existing/Orb.md 9 KB
  • references/existing/QueryField.md 16 KB
  • references/existing/SourceRing.md 7 KB
  • scripts/harness/index.html 1 KB
  • scripts/harness/run.mjs 2 KB
  • scripts/harness/setup.sh 1 KB

Wersje

W bazie nie ma innych skilli o nazwie creative-web-webgl.

Migawka bazy z 13.11.2026 · wersja paczki 46d4dee084cf (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100web-3d
    Dodaje do stron 3D i WebGL interaktywne obiekty, podglądy produktów, cząsteczki i sceny, z kontrolą wagi i zapasowym widokiem.
  • 100creative-web
    Buduje, przeprojektowuje i audytuje strony z animacjami three.js i GSAP, które wyglądają na zaprojektowane i odróżniają się od siebie.
  • 100webgl-atmosphere
    Decyduje, czy scena potrzebuje WebGL, i buduje ją w Three.js lub OGL, z efektami shaderów, limitami DPR i obrazem zapasowym.
  • 100frontend-particles
    Buduje warstwę cząsteczek na stronie: emisję, czas życia, ruch, interakcję z kursorem i wydajność, z wyborem Canvas, WebGL lub CSS.
  • 90animation-styles
    Podaje gotowe style animacji, np. płynną deformację, neon, glitch czy halftone, do stron, bohaterów, teł i loaderów.
  • 100creative-web-worlds
    Podaje dwadzieścia gotowych światów projektowych dla stron z three.js i GSAP, z materiałem, kolorami, typografią i zasadami ruchu.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.