@orphnet/canvas-bg
38 production-grade visual effects for Vue 3 and Nuxt 4 — particles, weather, cosmic scenes, waves and text treatments. SSR-safe, lazy three.js, and eight performance guardrails baked in.
↑ that's not a video. it's the library.
Every effect plugs into the same Scene/Layer primitives, so you can stack them — a Sky beneath an Aurora beneath a Starfield, all sharing one RAF loop.
Server renders a sized <div> only — never a stray canvas. Engine boots inside onMounted, swaps the poster image for the live canvas, and tears down cleanly on unmount.
Pause when off-screen, pause when tab hidden, respect prefers-reduced-motion, FPS cap, DPR cap, IntersectionObserver, ResizeObserver debounce, mobile-tier downgrade.
Particle and weather effects ship pure canvas2d. Three and Pixi only load when an effect that needs them mounts — so a project using only <Snow /> never pulls a single byte of WebGL bundle.
Each effect ships variant presets, individual convenience props, and a raw config escape hatch. Composition uses the standard Scene/Layer/Effect primitives — stack as deep as you like.
# Bun bun add @orphnet/canvas-bg # Or with npm / pnpm / yarn npm i @orphnet/canvas-bg
<script setup lang="ts">
// Nuxt 4: add '@orphnet/canvas-bg/nuxt' to modules
// and components auto-register.
</script>
<template>
<CanvasScene class="absolute inset-0">
<Aurora preset="northernLights" />
<Starfield :count="200" />
</CanvasScene>
</template>