@votax572002/fluxfx 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,101 @@
1
+ # FluxFX
2
+
3
+ FluxFX is a browser animation engine with **8 WebGL2 effects** and **5 DOM effects**. Use it from plain HTML, React, Next.js, or Astro to add interactive shader visuals and interface motion.
4
+
5
+ - **WebGL2 effects:** Aurora, Liquid Metal, Fluid, Ink, Aetheria, Prism 3D, Brush Reveal, Spotlight
6
+ - **DOM effects:** Tilt 3D, Magnetic, Depth Carousel, Motion Scrub, Scroll Path
7
+ - **Integrations:** HTML attributes, JavaScript API, React components and `useFX`
8
+ - **Lifecycle features:** cleanup helpers, viewport pausing, reduced-motion support, adaptive rendering controls
9
+
10
+ FluxFX is an animation engine. It does not provide AI models or AI APIs.
11
+
12
+ ## Documentation
13
+
14
+ **Full guides, effect references, and examples:** [fluxfx.dev](https://fluxfx.dev/)
15
+
16
+ - [Getting started](https://fluxfx.dev/docs/getting-started/)
17
+ - [All effects](https://fluxfx.dev/docs/effects/)
18
+ - [HTML and CDN](https://fluxfx.dev/docs/guides/html/)
19
+ - [React and Next.js](https://fluxfx.dev/docs/guides/react-nextjs/)
20
+ - [Astro](https://fluxfx.dev/docs/guides/astro/)
21
+ - [Engine API](https://fluxfx.dev/docs/api/)
22
+ - [Architecture](https://fluxfx.dev/docs/architecture/)
23
+
24
+ Machine-readable docs and the coding-agent skill are maintained in the [GitHub `docs/` folder](https://github.com/jagguCoder/fluxfx/tree/main/docs): [llms.txt](https://github.com/jagguCoder/fluxfx/blob/main/docs/llms.txt), [llms-full.txt](https://github.com/jagguCoder/fluxfx/blob/main/docs/llms-full.txt), [FluxFX skill](https://github.com/jagguCoder/fluxfx/blob/main/docs/skills/fluxfx/SKILL.md).
25
+
26
+ ## Install
27
+
28
+ ```bash
29
+ npm install @votax572002/fluxfx
30
+ ```
31
+
32
+ React is an optional peer dependency. Install it separately if you use the React entry point.
33
+
34
+ ## Quick start: HTML
35
+
36
+ The CDN bundle automatically initializes elements marked with `data-fx`.
37
+
38
+ ```html
39
+ <section
40
+ data-fx="aurora"
41
+ data-fx-speed="1"
42
+ data-fx-quality="medium"
43
+ style="min-height: 60vh;"
44
+ >
45
+ <h1>Interactive hero</h1>
46
+ </section>
47
+
48
+ <script src="https://unpkg.com/@votax572002/fluxfx/dist/fluxfx.min.js"></script>
49
+ ```
50
+
51
+ For a self-hosted bundle, use `dist/fluxfx.min.js` after building or installing the package.
52
+
53
+ ## Quick start: React
54
+
55
+ ```tsx
56
+ 'use client';
57
+
58
+ import { Aurora, Magnetic } from '@votax572002/fluxfx/react';
59
+
60
+ export function Hero() {
61
+ return (
62
+ <Aurora style={{ minHeight: '60vh', padding: '3rem' }}>
63
+ <h1>Interactive hero</h1>
64
+ <Magnetic strength={0.35}>
65
+ <button type="button">Explore</button>
66
+ </Magnetic>
67
+ </Aurora>
68
+ );
69
+ }
70
+ ```
71
+
72
+ In Next.js, keep browser effects inside a Client Component. See the [React and Next.js guide](https://fluxfx.dev/docs/guides/react-nextjs/).
73
+
74
+ ## Quick start: JavaScript API
75
+
76
+ ```ts
77
+ import { FluxFX } from '@votax572002/fluxfx';
78
+
79
+ const element = document.querySelector('#hero');
80
+ if (element) {
81
+ const destroy = FluxFX.apply(element, 'aurora', {
82
+ speed: 1.1,
83
+ quality: 'medium',
84
+ colors: ['#4f46e5', '#06b6d4', '#a855f7'],
85
+ });
86
+
87
+ // Call destroy() when the element is removed.
88
+ }
89
+ ```
90
+
91
+ `FluxFX.apply()` returns a cleanup function. The engine also provides `init()`, `update()`, `destroyAll()`, and `getStats()`. See the [Engine API reference](https://fluxfx.dev/docs/api/).
92
+
93
+ ## Browser and performance notes
94
+
95
+ WebGL effects require browser WebGL2 support. Worker rendering depends on browser support and falls back when unavailable. Actual performance varies by device, browser, effect, and page workload; FPS values are not guaranteed. Give WebGL containers a non-zero height, test on target devices, and keep essential content usable with reduced motion or without animation.
96
+
97
+ ## Package details
98
+
99
+ - npm: [`@votax572002/fluxfx`](https://www.npmjs.com/package/@votax572002/fluxfx)
100
+ - GitHub: [jagguCoder/fluxfx](https://github.com/jagguCoder/fluxfx)
101
+ - Documentation: [fluxfx.dev](https://fluxfx.dev/)