Skip to content

Repository files navigation

Eden

A standalone WebGL art piece by Aylux (GitHub: K4bain). Not a portfolio. Not a tool. Art.

Every act of creation is an attempt to return to Eden.

The full creative brief, technical plan, and philosophy-to-code mapping live in EDEN_FULL_CONTEXT.md (one level up, in the project root). Read it before changing anything. Do not simplify. Do not water down.


Current state — Phase 3: Three.js + Cursor ✅

The Observer Effect is real. The visitor moves their cursor and the darkness moves back. Warm amber light blooms where they look. 1400 particles drift like Pascal's stars; they lean toward the cursor — slowly, like something alive drawn to warmth. The painted surface reveals itself only where the visitor illuminates it. The full text arc from Phase 2 runs on top: the exploration window, the revelation surge, EDEN's arrival.

| Phase | Status | What it adds | |-------|--------|| | 1 — The Shell | ✅ done | HTML/CSS foundation, layer stack, loading screen, typography, procedural textures | | 2 — GSAP Timeline | ✅ done | The full text arc: exploration window → EDEN reveal | | 3 — Three.js + Cursor | ✅ this session | Particle field (1400), cursor light, Observer Effect, 3D background plane | | 4 — Post-Processing + Polish | next | EffectComposer pipeline, sfumato/chromatic/grade shaders, final timing |


View it

Requires http:// — ES modules + importmap need a real server.

  • Desktop shortcut (Eden.lnk): double-click. Starts a Python/Node server on port 8765, opens your browser, and auto-kills the old server if you re-launch.
  • VS Code: right-click index.htmlOpen with Live Server.
  • Terminal: cd eden && python -m http.server 8765 then open http://localhost:8765/.
  • Verify without browser: node tools/verify.js.

File structure

eden/
├── index.html                  ← entry. loading-screen CSS INLINE in <head> (Gotcha #1)
├── style.css                   ← layer stack (§12), typography (§6/13), colors (§6), Phase 2/3 keyframes
├── start.bat                   ← Windows launcher: starts server + opens browser
├── js/
│   ├── main.js                 ← ES module orchestrator: detect → load → scene → timeline
│   ├── eden/
│   │   ├── loader.js           ← fonts.ready + textures + 1.2s min (Phase 3 extends)
│   │   ├── timeline.js         ← GSAP master timeline (the director)
│   │   └── cursor.js           ← 2D canvas cursor light + PointLight bridge (§17)
│   └── three/
│       ├── scene.js            ← renderer, camera, render loop, event wiring, resize
│       ├── particles.js        ← 1400/250 particle field (§8)
│       ├── lights.js           ← PointLight (cursor) + AmbientLight (Pascal's void)
│       └── background.js       ← painted surface plane, reveals on cursor/revelation
├── assets/
│   └── textures/
│       ├── bg-main.png         ← PLACEHOLDER (procedural) → replace with ImageFX .webp
│       ├── bg-atmosphere.png   ← PLACEHOLDER (procedural) → replace with ImageFX .webp
│       └── README.md           ← ImageFX prompts + how to swap in real art
├── fallback/
│   └── fallback.css            ← no-WebGL atmosphere (pure CSS)
└── tools/
    ├── generate-textures.js    ← regenerate the procedural placeholders
    └── verify.js               ← structural + Phase 3 wiring sanity check (65 checks)

What's placeholder vs. final

  • bg-main.png / bg-atmosphere.png — procedural value-noise textures, generated by node tools/generate-textures.js. They evoke the palette and read as atmospheric; they are not the final ImageFX art. See assets/textures/README.md for the prompts and the swap procedure.
  • Grain — inline SVG data URI in style.css (#grain). Replaced by grain.webp when the real tile is ready. The 3D normalMap in background.js is null until grain.webp lands.
  • Chromatic aberration — Phase 2 uses a brief CSS filter keyframe (.chromatic-active on #eden-content). Phase 4 replaces this with the GLSL ShaderPass on the WebGL composer for a true RGB-split on the canvas.

Everything else is final for its phase.


Decisions worth flagging

  1. "In the beginning." is italic — the brief doesn't specify. Italic at Garamond 300 reads as the most fragile possible whisper. One line to revert in style.css.
  2. .eden-name optical centering via margin-left/text-indent.
  3. bg-main is mix-blend-mode: multiply at opacity: 0.9 per §12. Intentionally dark — the cursor's PointLight reveals it. Swap in real art to see it fully.
  4. WebGL detection checks both webgl2 and webgl — broader than the brief's webgl2-only check. No downside.
  5. Exploration window: gesture- or idle-triggered, 8s minimum floor so the window can't be short-circuited (§3 "Death of the Author").
  6. Chromatic aberration is CSS for now — Phase 4 swaps for the real GLSL ShaderPass.
  7. Hard 6s safety timeout — the loading screen is never permanent. CDN blocked? Offline? Module error? The shell still shows.
  8. start.bat launcher — the desktop shortcut now starts a real HTTP server (Python or Node) then opens the browser, because ES modules require http://.
  9. Particles use a canvas-generated soft dot texture (64×64 radial gradient) instead of a loaded sprite. Looks like light, not squares. No external asset needed.
  10. Cursor light intensity animated with rAF, not GSAP, to keep the Three.js modules free of the GSAP global dependency.
  11. Background plane texture loaded async — the 3D scene boots immediately with a dark plane; the texture attaches when the fetch resolves, so the experience isn't gated on texture download.

Next session — Phase 4 (Post-Processing + Polish)

Hand the next AI this folder and EDEN_FULL_CONTEXT.md. The relevant prompt is "Prompt for Session 4 (Post-Processing + Polish)" in §20.

Concretely, Phase 4 will:

  • Add js/three/postprocessing.js + shaders/sfumato.glsl, chromatic.glsl, colorgrade.glsl.
  • Build the EffectComposer pipeline: RenderPass → UnrealBloomPass → FilmPass → ShaderPass(sfumato) → ShaderPass(colorgrade) → ShaderPass(chromatic).
  • Wire bloom strength to the revelation surge (0.5 → 1.0 → 0.7, 0.8s).
  • Disable FilmPass on Safari and mobile (Gotcha #4).
  • Replace the CSS chromatic keyframe with the real ShaderPass.
  • Final timing pass — "this is where you spend the most time." (§19)
  • Full test matrix: Chrome, Firefox, Safari, mobile, slow 3G, prefers-reduced-motion, no-WebGL, resize during experience.

The event hooks, resize handler, and mobile/no-WebGL paths are already wired. Phase 4 is the one-percent that separates good from unforgettable.

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages