# FluxFX Documentation — Full Context for AI Assistants Canonical source: https://fluxfx.dev/ Repository: https://github.com/jagguCoder/fluxfx npm package: https://www.npmjs.com/package/@votax572002/fluxfx FluxFX is a TypeScript library for adding interactive animation effects to web pages. It currently documents eleven built-in effects: eight WebGL2 effects and three DOM effects. Integrations include plain HTML, React, Next.js, and Astro. It provides visual effects; it does not generate AI content, call AI models, or provide an AI API. ## Install and use For npm projects, install `@votax572002/fluxfx`. The core entry is `@votax572002/fluxfx`; React components and hooks are exported from `@votax572002/fluxfx/react`. React is an optional peer dependency. Follow the integration guides for framework-specific client boundaries and initialization details. Plain HTML can use the distributed `fluxfx.min.js` bundle and `data-fx` attributes. Ensure a WebGL effect container has a visible width and height. In JavaScript, `FluxFX.init()` scans the document for declarative effects, while `FluxFX.apply(element, effectName, options)` mounts one effect and returns a cleanup function. Call cleanup when the target is removed. `destroyAll()` removes active effects. Examples and current package instructions: - https://fluxfx.dev/docs/getting-started/ - https://fluxfx.dev/docs/guides/html/ - https://fluxfx.dev/docs/guides/react-nextjs/ - https://fluxfx.dev/docs/guides/astro/ ## Built-in effects ### WebGL2 - `aurora`: animated aurora ribbons and gradients. - `liquid-metal`: reflective liquid-metal appearance. - `fluid`: pointer-reactive fluid simulation. - `ink`: ink dispersion and curl details. - `aetheria`: ink-like ribbons with light and dark presentation options. - `prism-3d`: raymarched 3D forms. - `brush-reveal`: cursor-driven transition between two images. - `spotlight`: studio-style radial lighting backdrop. ### DOM - `tilt-3d`: pointer-based perspective tilt, with optional glare. - `magnetic`: subtle pointer attraction for interactive elements. - `depth-carousel`: DOM-based depth and parallax presentation for slides/cards. See the effect-specific pages for supported options and examples: https://fluxfx.dev/docs/effects/. ## Engine and rendering behavior The engine registers effects and mounts them onto elements. A shared ticker coordinates active effects. WebGL2 is required for shader effects. Some rendering can run through OffscreenCanvas in a worker when browser support permits; fallback behavior and available options are described in the architecture guide. WebGL effects can pause when outside the viewport, respect reduced-motion preferences, and adapt rendering resolution. These mechanisms improve control but do not promise a particular FPS, device compatibility, or battery saving percentage. Use `quality` to select `low`, `medium`, or `high`; the practical tradeoff depends on hardware and effect. Limit the number of simultaneous WebGL effects on constrained devices. Keep content readable and functional if animation is unavailable, disabled, or reduced. Detailed references: - https://fluxfx.dev/docs/architecture/ - https://fluxfx.dev/docs/api/ - https://fluxfx.dev/docs/guides/color-blending/ - https://fluxfx.dev/docs/guides/custom-effects/ ## AI-generated assets FluxFX can present assets made with image-generation tools. For example, Brush Reveal accepts a base image and a reveal image; aligned framing between both images makes the transition easier to follow. Image generation itself happens outside FluxFX. Follow asset licensing, consent, accessibility, and client review requirements for the project using those images. Guide for using FluxFX references with AI coding assistants: https://fluxfx.dev/docs/guides/ai/. ## Adoption and agency review Before shipping in a client project, verify the current npm version, repository license, browser/device support, actual performance on target hardware, and maintenance/support expectations. Pin a reviewed package version, test reduced-motion and WebGL-unavailable behavior, and make cleanup part of the component lifecycle. Do not present demo FPS or showcase behavior as a universal benchmark. ## FAQ **Does FluxFX work without React?** Yes. The library documents HTML/CDN use as well as framework integrations. **Does every effect need WebGL?** No. Tilt 3D, Magnetic, and Depth Carousel are DOM effects. The other listed effects use WebGL2. **Does FluxFX require an AI provider?** No. AI-generated assets can be inputs for visual experiences, but FluxFX does not call AI providers. **Can it guarantee 60 FPS?** No. Performance depends on runtime conditions and hardware. Treat FPS figures as implementation targets or demonstrations. **Where are current API details?** Use the effect references and Engine API linked above; when docs and package behavior differ, confirm against the installed package and source code.