Start with fx-canvas, then add
the pieces you keep reusing — SDF, noise, raymarching, multipass/FBO, GPU
particles and frame export — maintained together. For a 3D scene with meshes,
models and lights, use three.js or Babylon.js instead.
frapx is split into several small packages instead of one big one. The
prefix in the package name tells you what kind of package it is — you
never need to guess:
fx-* — effect runtimes
Instantiate directly in your app. @frapx/fx-canvas
drives a full-screen WebGL fragment shader as a background or overlay.
This is what most people install first. @frapx/fx-passes
chains passes and accumulates samples for anti-aliased, motion-blurred
video frames (WebGL2). @frapx/fx-particles
draws GPU particles — snow, dust, sparkles, confetti — from presets, with
reproducible frames for export (WebGL2).
react-* — framework bindings
A thin React wrapper around an fx-* package. @frapx/react-canvas
wraps @frapx/fx-canvas as a <ShaderBackground /> component and a
useShaderBackground() hook, and @frapx/react-particles
wraps @frapx/fx-particles as <Particles /> and useParticles().
glsl-* — GLSL snippets
Plain GLSL source strings you concatenate into your own fragment
shader — not a runtime, no instantiation. @frapx/glsl-noise
(3D noise), @frapx/glsl-flowmap
(flowmap decode/advection), @frapx/glsl-sdf
(2D/3D signed distance functions), @frapx/glsl-raymarch
(raymarching loop, shadows and camera rays) and @frapx/glsl-sdf-volume
(meshes baked in Blender as 3D SDFs) are available today.
tool-* — tools
Export and production utilities built on an fx-* instance, not effects
themselves. @frapx/tool-capture
renders deterministic 8-bit or 16-bit PNG sequences to a folder or a ZIP
in the browser, and @frapx/tool-render
renders the same page from the command line, resumably, without a tab open.
@frapx/tool-dev shows shader compile
errors on the page while you hot reload.
core — internal engine
@frapx/core is the shared WebGL lifecycle
host every fx-* package is built on. You install it transitively — as
an fx-* package’s dependency — and never import it directly.
All five packages were renamed on 2026-07-12 to this prefix scheme. No public
API changed — only package names and import paths. See the
migration guide for the full old → new mapping.