@votax572002/fluxfx 0.1.6 → 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.
Files changed (2) hide show
  1. package/README.md +39 -44
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,27 +1,11 @@
1
1
  # FluxFX
2
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.
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
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).
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
25
9
 
26
10
  ## Install
27
11
 
@@ -29,32 +13,29 @@ Machine-readable docs and the coding-agent skill are maintained in the [GitHub `
29
13
  npm install @votax572002/fluxfx
30
14
  ```
31
15
 
32
- React is an optional peer dependency. Install it separately if you use the React entry point.
16
+ React is an optional peer dependency. Install it separately when using the React entry point:
17
+
18
+ ```bash
19
+ npm install react
20
+ ```
33
21
 
34
22
  ## Quick start: HTML
35
23
 
36
- The CDN bundle automatically initializes elements marked with `data-fx`.
24
+ Load the CDN bundle and mark an element with `data-fx`. FluxFX initializes it automatically.
37
25
 
38
26
  ```html
39
- <section
40
- data-fx="aurora"
41
- data-fx-speed="1"
42
- data-fx-quality="medium"
43
- style="min-height: 60vh;"
44
- >
27
+ <section data-fx="aurora" data-fx-speed="1" style="min-height: 60vh">
45
28
  <h1>Interactive hero</h1>
46
29
  </section>
47
30
 
48
- <script src="https://unpkg.com/@votax572002/fluxfx/dist/fluxfx.min.js"></script>
31
+ <script src="https://cdn.jsdelivr.net/npm/@votax572002/fluxfx/dist/fluxfx.min.js"></script>
49
32
  ```
50
33
 
51
- For a self-hosted bundle, use `dist/fluxfx.min.js` after building or installing the package.
34
+ For a self-hosted setup, use `dist/fluxfx.min.js` from the installed package.
52
35
 
53
36
  ## Quick start: React
54
37
 
55
38
  ```tsx
56
- 'use client';
57
-
58
39
  import { Aurora, Magnetic } from '@votax572002/fluxfx/react';
59
40
 
60
41
  export function Hero() {
@@ -69,33 +50,47 @@ export function Hero() {
69
50
  }
70
51
  ```
71
52
 
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/).
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/).
73
54
 
74
55
  ## Quick start: JavaScript API
75
56
 
76
57
  ```ts
77
58
  import { FluxFX } from '@votax572002/fluxfx';
78
59
 
79
- const element = document.querySelector('#hero');
60
+ const element = document.querySelector<HTMLElement>('#hero');
61
+
80
62
  if (element) {
81
- const destroy = FluxFX.apply(element, 'aurora', {
63
+ const cleanup = FluxFX.apply(element, 'aurora', {
82
64
  speed: 1.1,
83
65
  quality: 'medium',
84
66
  colors: ['#4f46e5', '#06b6d4', '#a855f7'],
85
67
  });
86
68
 
87
- // Call destroy() when the element is removed.
69
+ // Call cleanup() when the element is removed.
88
70
  }
89
71
  ```
90
72
 
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/).
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).
92
87
 
93
- ## Browser and performance notes
88
+ ## Browser support and performance
94
89
 
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.
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.
96
91
 
97
- ## Package details
92
+ ## Project links
98
93
 
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/)
94
+ - [Documentation](https://fluxfx.dev/)
95
+ - [GitHub repository](https://github.com/jagguCoder/fluxfx)
96
+ - [npm package](https://www.npmjs.com/package/@votax572002/fluxfx)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@votax572002/fluxfx",
3
- "version": "0.1.6",
4
- "description": "A collection of WebGL shaders and DOM effects for creative coding.",
3
+ "version": "0.1.7",
4
+ "description": "TypeScript animation library with 8 WebGL2 shader effects and 6 DOM motion effects for HTML, React, Next.js, and Astro.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "files": [