forever components

Ukiyo-e Weather & Road

Sudden Rain

Up to 140 slanted rain streaks fall in two depth layers over a painted ukiyo-e scene: gradient sky, green hill, indigo river, and arched bridge silhouette.

canvasmedium complexitymoderate motion

Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited

Live demo — the real component, running in a sandbox. One self-contained HTML file, zero dependencies. Open it on the canvas →
Worth keeping? Votes steer what gets built next — sign in to cast one, free to read

When to use it

Ambient hero backgrounds with a Japanese art or painterly aesthetic. Loading screens or mood-setting interstices for cultural or travel content.

When not to

Layouts requiring legible text overlays — the constant rain motion competes with reading. Light-mode UIs where the muted palette feels out of place.

Working with an AI agent

Every component ships agent-ready metadata. An example instruction for this one:

Increase rain density by changing N to 220, steepen the slant by setting SLANT to -0.45, and shift the sky gradient to a stormy grey by changing PAL.sky to '#5a6a7a'. Theme: dark tokens live in :root, the light variant in :root[data-theme="light"]; ?theme=light or a {type:'forever:theme'} postMessage switches at runtime.

Safe to edit

  • rain count (N = Math.round(S.w*0.42), max 140)
  • slant angle (SLANT = -0.30)
  • drop speed range (340 + random*260)
  • palette colors (PAL object)
  • bridge position (by = H*0.66)
  • theme tokens (:root dark defaults + [data-theme=light] overrides)

Keep intact

  • DPR-aware fitCanvas with setTransform
  • visibilitychange pause/resume guard
  • prefers-reduced-motion static-frame fallback
  • IIFE wrapper
  • theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)

Known limitations

  • Background scene redrawn every frame (no offscreen cache) — minor CPU cost on large screens
  • Rain color hardcoded as rgba literals, not tied to PAL object

ukiyo-eraincanvasambientjapanesegenerative

More Ukiyo-e Weather & Road components

  • Bokashi SkyCanvas sky cycles dawn→day→dusk→night with bokashi gradients; sun/moon arcs overhead, stars appear at night, a bird drifts across, hills anchor the base.
  • Falling SnowSnow flakes drift and sway over a ukiyo-e night scene: indigo sky, snow-capped rooftops, and a lone layered pine. Static fallback for reduced-motion.
  • Distant MountainFour ukiyo-e hill silhouettes drift at different parallax rates past a snow-capped peak and glowing sun on a gradient indigo sky.
  • Plum BranchA ukiyo-e-style ume plum branch with 11 blossoms that bloom open petal-by-petal, sway gently, and re-bloom every 12 seconds against layered ink hills.
  • Boat on the SwellA small ferry rocks on sine-wave swells at dusk beneath a sienna sun and three circling gulls, rendered in ukiyo-e woodblock palette.
  • Lantern Path7 paper lanterns line a receding road in ukiyo-e woodblock style; sky and lanterns cycle through dusk and dawn as darkness falls and lifts.