Pagenue v0.6.0
skills/light-rays-background/SKILL.md7 sectionsProprietary

Light rays background

The agent loads it when

A full-page animated background of 150 thin glowing threads that flow like a loose bundle of silk: they draw in from the top-right corner, pinch into a bright knot beside the hero, fan out, then sway from side to side behind every section as the page scrolls. Each thread has its own wave, streaks of light run along them, the bundle breathes, and the light fades out behind text so copy stays readable. Ships as one dependency-free TypeScript file (plus a no-build JS copy), CSS, a React/Next.js wrapper and Astro/vanilla wiring, with theme-aware colors for light and dark, reduced-motion support and cleanup. Use this whenever someone asks for flowing light rays, glowing lines or threads, a wave of lines, silk or fiber-optic strands, an aurora or light-trail background, a hero with light streaks, or a background that keeps flowing down the page as you scroll, even if they don't name the skill.

npx @codesudee/web-skills -s light-rays-background
Download .zip

Try it

01 · This page

The light behind this page is the skill

It runs the skill's own rays.ts. Scroll to watch it sway down the page. Change a setting and the bundle restarts with the new options, the same way startRays() would on your site.

02 · Why the bends stay smooth

Offset copies break, own curves don't

The same bundle, two ways. Left: one centre curve, with each thread pushed out along its normals. Right: each thread is its own spline through pushed-out control points, and the bundle narrows at the bend, which is what the skill does. Tighten the bend and watch the left side fold into corners.

Offset along normals
Own splines, narrow at the bend

Light rays background

A loose bundle of very thin glowing threads that comes in from the top right, pinches into one tight bright knot beside the hero, fans back out, then winds from side to side down the whole page behind the content. It runs on the web-skills home page. assets/rays.ts is that exact code with its settings turned into options, so copy it rather than rewriting it: the smooth bends, the text mask and the performance work took several rounds to get right.

What it does

  1. Entrance: 150 threads (80 on phones) draw in from the top-right corner over about 2 s, with a bright dot at each tip, and meet in the knot beside the hero.
  2. Shape: one continuous ribbon in page space. It enters from the top right, pinches into the hero’s knot, fans out to the bottom right, bends back inside the window, then sways from side to side down the page. Every bend sits inside the viewport, so the turn is always visible. The bundle widens and softens the further down it goes.
  3. Density: threads crowd together and glow almost solid at the bends, and spread apart with dark gaps on the straights. Most threads sit near the middle, so the edges are sparse and wispy, and about one in twelve strays. Dust floats around the bright bends, and specks near the cursor swell, brighten and drift away from it.
  4. Motion: the whole bundle sways slowly and breathes wider and narrower. Each thread runs its own wave, with its own speed and offset, so the bundle shimmers instead of moving as one block. Streaks of light run down about a third of the threads.
  5. Scroll: the bundle scrolls slightly slower than the content (parallax 0.85), so it reads as a layer behind it.
  6. Text stays readable: the light fades out under every line of text in the clear selectors, with a soft halo. It uses the text’s line boxes, so a wide heading only clears its words.
  7. Theme: additive glow on dark backgrounds, and faint see-through ink lines on light ones, where glow would wash out. Colors can be CSS variables, read again whenever the color scheme changes.
  8. Reduced motion: the same bundle, still, redrawn only when the page scrolls or resizes.

6 more sections

  • Files
  • Applying it to a project
  • Options (RaysOptions)
  • What makes it look right
  • Performance and accessibility
  • Gotchas

Create a free Pagenue account to read the whole skill, download it, and install it.

Sign in free to read the rest