Scenes
Web-first creative scenes — composable browser animations with explicit lifecycle, errors, and a shipped dither-reveal scene.
Overview
Marketing sites and portfolios often bolt on one-off canvas effects that are hard to reuse or tear down. Scenes is a small library (@svene/scenes) for named scene instances with normalized options, blend/dither uniforms, and a first-party ditherReveal implementation.
Capabilities
@svene/scenespackage with tree-shakeable exports (sideEffects: false)createDitherRevealscene with look presets (defineDitherRevealLook,ditherRevealLooks)- Shared lifecycle types:
SceneInstance,SceneStatus,SceneTarget - Structured errors:
SceneError,createSceneError,isSceneError - Bun build to browser ESM; separate
./dither-revealexport path - Examples workspace for integration demos
export const scene = {
ditherReveal: createDitherReveal
} as const;
export {
createDitherReveal,
defaultDitherRevealOptions,
defineDitherRevealLook,
ditherRevealLooks,
mergeDitherRevealOptions,
normalizeDitherRevealOptions,
resolveDitherRevealLook
} from "./scenes/dither-reveal";