@votax572002/fluxfx 0.1.5 → 0.1.7

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 CHANGED
@@ -1,63 +1,96 @@
1
- ---
2
- id: docs-index
3
- title: FluxFX Docs — Index
4
- type: index
5
- tags: [fluxfx, docs, index, rag]
6
- ---
7
-
8
- # FluxFX Docs
9
-
10
- FluxFX ek reusable front-end animation library hai (WebGL2 + DOM effects). Ye folder RAG (retrieval) ke liye design kiya gaya hai — har file self-contained hai aur apna context khud batati hai.
11
-
12
- ## Folder Structure
13
-
14
- ```
15
- docs/
16
- ├── README.md ← ye file (index)
17
- ├── overview.md ← FluxFX kya hai, architecture, kab use / kab nahi
18
- ├── getting-started.md ← install, setup, pehla effect
19
- ├── effects/
20
- │ ├── _catalog.md ← saare 11 effects ek table mein
21
- │ ├── aurora.md
22
- │ ├── liquid-metal.md
23
- │ ├── fluid.md
24
- │ ├── ink.md
25
- │ ├── aetheria.md
26
- │ ├── prism-3d.md
27
- │ ├── brush-reveal.md
28
- │ ├── spotlight.md
29
- │ ├── tilt-3d.md
30
- │ ├── magnetic.md
31
- │ └── depth-carousel.md
32
- ├── usage/
33
- │ ├── html.md ← data-fx-* attributes
34
- │ ├── react.md ← components + useFX
35
- │ └── nextjs.md ← App Router + 'use client'
36
- ├── reference/
37
- │ ├── engine-api.md ← init, apply, destroyAll, getStats, effects combine
38
- │ ├── faq-troubleshooting.md ← Q&A format
39
- │ └── known-issues.md ← docs mein jo inconsistencies hain (review ke liye)
40
- └── manifest.json ← machine-readable list (RAG ingestion ke liye)
41
- ```
42
-
43
- ## Kaunsa Sawaal Kahan Milega
44
-
45
- | Sawaal | File |
46
- |---|---|
47
- | FluxFX kya hai, kaise kaam karta hai? | `overview.md` |
48
- | Install / setup kaise karein? | `getting-started.md` |
49
- | Koi specific effect ke options / defaults? | `effects/<effect-name>.md` |
50
- | Saare effects ek nazar mein? | `effects/_catalog.md` |
51
- | HTML mein `data-fx-*` kaise likhein? | `usage/html.md` |
52
- | React / Next.js mein kaise use karein? | `usage/react.md`, `usage/nextjs.md` |
53
- | `init`, `apply`, `destroyAll`, effects combine? | `reference/engine-api.md` |
54
- | Kuch kaam nahi kar raha | `reference/faq-troubleshooting.md` |
55
-
56
- ## RAG Ke Liye Conventions
57
-
58
- 1. **Har file ke top par frontmatter** hai (`id`, `title`, `type`, `tags`, `related`) — isse metadata filtering aur citation easy hoti hai.
59
- 2. **Chunking:** `## H2` heading par split karein. Har H2 section apne aap mein poora hai (effect ka naam section ke andar repeat kiya gaya hai, "ye effect" jaise vague references nahi).
60
- 3. **Ek effect = ek file.** "aurora ke options kya hain?" jaisa query seedha `effects/aurora.md` par land karega.
61
- 4. **Consistent terms:** effect ke naam hamesha backticks mein (`aurora`, `liquid-metal`), HTML attribute `data-fx-*`, JS option camelCase.
62
- 5. **Language:** Hinglish (Hindi + English). Retrieval ke liye English keywords frontmatter `tags` mein diye gaye hain.
63
- 6. **Unknown values** (jo abhi documented nahi hain) `—` ya "documented nahi" se mark hain — kuch guess nahi kiya gaya.
1
+ # FluxFX
2
+
3
+ FluxFX is a TypeScript animation library for interactive web interfaces. It provides **8 WebGL2 shader effects** and **6 DOM motion effects** for plain HTML, JavaScript, React, Next.js, and Astro.
4
+
5
+ - **WebGL2:** Aurora, Liquid Metal, Fluid, Ink, Aetheria, Prism 3D, Brush Reveal, Spotlight
6
+ - **DOM:** Tilt 3D, Magnetic, Depth Carousel, Motion Scrub, Scroll Path, Card Stack
7
+ - **Integrations:** HTML data attributes, JavaScript API, typed React components, and `useFX`
8
+ - **Controls:** cleanup helpers, reduced-motion support, viewport pausing, and adaptive rendering options
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ npm install @votax572002/fluxfx
14
+ ```
15
+
16
+ React is an optional peer dependency. Install it separately when using the React entry point:
17
+
18
+ ```bash
19
+ npm install react
20
+ ```
21
+
22
+ ## Quick start: HTML
23
+
24
+ Load the CDN bundle and mark an element with `data-fx`. FluxFX initializes it automatically.
25
+
26
+ ```html
27
+ <section data-fx="aurora" data-fx-speed="1" style="min-height: 60vh">
28
+ <h1>Interactive hero</h1>
29
+ </section>
30
+
31
+ <script src="https://cdn.jsdelivr.net/npm/@votax572002/fluxfx/dist/fluxfx.min.js"></script>
32
+ ```
33
+
34
+ For a self-hosted setup, use `dist/fluxfx.min.js` from the installed package.
35
+
36
+ ## Quick start: React
37
+
38
+ ```tsx
39
+ import { Aurora, Magnetic } from '@votax572002/fluxfx/react';
40
+
41
+ export function Hero() {
42
+ return (
43
+ <Aurora style={{ minHeight: '60vh', padding: '3rem' }}>
44
+ <h1>Interactive hero</h1>
45
+ <Magnetic strength={0.35}>
46
+ <button type="button">Explore</button>
47
+ </Magnetic>
48
+ </Aurora>
49
+ );
50
+ }
51
+ ```
52
+
53
+ In Next.js, use FluxFX in a Client Component (`'use client'`). See the [React and Next.js guide](https://fluxfx.dev/docs/guides/react-nextjs/).
54
+
55
+ ## Quick start: JavaScript API
56
+
57
+ ```ts
58
+ import { FluxFX } from '@votax572002/fluxfx';
59
+
60
+ const element = document.querySelector<HTMLElement>('#hero');
61
+
62
+ if (element) {
63
+ const cleanup = FluxFX.apply(element, 'aurora', {
64
+ speed: 1.1,
65
+ quality: 'medium',
66
+ colors: ['#4f46e5', '#06b6d4', '#a855f7'],
67
+ });
68
+
69
+ // Call cleanup() when the element is removed.
70
+ }
71
+ ```
72
+
73
+ `FluxFX.apply()` returns a cleanup function. The engine also provides `init()`, `update()`, `destroyAll()`, and `getStats()`.
74
+
75
+ ## Documentation
76
+
77
+ - [Getting started](https://fluxfx.dev/docs/getting-started/)
78
+ - [Effect gallery](https://fluxfx.dev/docs/effects/)
79
+ - [HTML and CDN guide](https://fluxfx.dev/docs/guides/html/)
80
+ - [React and Next.js guide](https://fluxfx.dev/docs/guides/react-nextjs/)
81
+ - [Astro guide](https://fluxfx.dev/docs/guides/astro/)
82
+ - [Engine API](https://fluxfx.dev/docs/api/)
83
+ - [Architecture](https://fluxfx.dev/docs/architecture/)
84
+ - [Examples](https://fluxfx.dev/docs/examples/)
85
+
86
+ Machine-readable documentation and the coding-agent skill are in [`docs/`](https://github.com/jagguCoder/fluxfx/tree/main/docs), including [`llms.txt`](https://github.com/jagguCoder/fluxfx/blob/main/docs/llms.txt) and the [FluxFX skill](https://github.com/jagguCoder/fluxfx/blob/main/docs/skills/fluxfx/SKILL.md).
87
+
88
+ ## Browser support and performance
89
+
90
+ WebGL effects require WebGL2. DOM effects do not create a WebGL context. Worker rendering uses browser capabilities when available and falls back when it cannot. Performance depends on the device, browser, effect, and page workload; test on your target devices and keep essential content usable when motion is reduced or unavailable.
91
+
92
+ ## Project links
93
+
94
+ - [Documentation](https://fluxfx.dev/)
95
+ - [GitHub repository](https://github.com/jagguCoder/fluxfx)
96
+ - [npm package](https://www.npmjs.com/package/@votax572002/fluxfx)