@fest-lib/image
Orientation-aware wallpaper canvas + K-Means seeds for Veela (--color-primary / secondary / tertiary).
Caches the last wallpaper URL and seed colors so a reload can skip re-clustering. Paint target: [data-app-layer="canvas"] canvas[is="ui-canvas"].
core · dom · object · lure
└── fest/image ← you are here
└── shell wallpaper · Material You seed
npm install @fest-lib/core @fest-lib/dom @fest-lib/object @fest-lib/lure @fest-lib/imagePeers: core, dom, object, lure. Also uses culori.
import {
setAppWallpaper,
setAppWallpaperFromBlob,
applyThemeFromWallpaper,
syncAppWallpaperOrient
} from "@fest-lib/image";
setAppWallpaper("/wallpapers/desk.jpg");
await applyThemeFromWallpaper("/wallpapers/desk.jpg");
syncAppWallpaperOrient();
await setAppWallpaperFromBlob(file); // Blob | FilesetAppWallpaper(url) is sync at the call site (persist + theme run in the background). applyThemeFromWallpaper(url, { force: true }) re-clusters even if the URL matches the cache.
| Path | Role |
|---|---|
src/engine/KMean.ts |
dominant colors |
src/engine/WallpaperTheme.ts |
seeds → theme hosts |
src/canvas/Canvas.ts |
cover / orient paint |
src/canvas/Canvas-2.ts |
app wallpaper layer + IDB |
Do not rewrite K-Means or the Canvas-2 paint path unless that is the task — they are the SoT for shell wallpaper.
cd modules/projects/image.ts
npm run dev
npm run build
npm run publishLicense: MIT.