Skip to content
HN On Hacker News ↗

GitHub - paradise-runner/background-clouds: an ambient relaxing set of background clouds to float lazily by

▲ 23 points 10 comments by dividedcomet 2w ago HN discussion ↗

Pangram verdict · v3.3

We believe that this document is fully AI-generated

99 %

AI likelihood · overall

AI
0% human-written 100% AI-generated
SEGMENTS · HUMAN 0 of 1
SEGMENTS · AI 1 of 1
WORD COUNT 206
PEAK AI % 99% · §1
Analyzed
Jul 15
backend: pangram/v3.3
Segments scanned
1 windows
avg 206 words each
Distribution
0 / 100%
human / AI fraction
Verdict
AI
Pangram v3.3

Article text · 206 words · 1 segments analyzed

Human AI-generated
§1 AI · 99%

background-clouds adds a lightweight, animated low-poly cloud bank behind a website. It uses a single canvas, has no runtime dependencies, pauses motion when the user prefers reduced motion, and exposes lifecycle methods for single-page apps.

Install npm install background-clouds Use import { createCloudBackground } from "background-clouds";

const clouds = createCloudBackground({ canvas: document.querySelector("#background-clouds"), seed: "my-site", speed: 0.8, opacity: 0.9 });

// Later, for example when unmounting a route: clouds.destroy(); <canvas id="background-clouds" aria-hidden="true"></canvas> #background-clouds { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; } The canvas must be available before calling createCloudBackground. The returned controller has start(), stop(), resize(), setSeed(seed), and destroy() methods. seed may be a string or number; using the same seed produces the same cloud layout. speed and opacity default to 1 and accept non-negative numbers. Options

Option Default Description

canvas required The <canvas> element to render into.

seed random A stable string or number for deterministic cloud placement.

speed 1 Drift multiplier. Set to 0 for still clouds.

opacity 1 Overall cloud opacity multiplier.

pixelRatio 2 Maximum device-pixel ratio used for rendering.

reducedMotion media query Set explicitly to override prefers-reduced-motion.

The package owns only the canvas pixels. Set the canvas’s stacking order, background color, and positioning in your site CSS.