@iamahmarfaraz/react-liquid-bg 1.0.0 → 1.0.1
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 +14 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# react-liquid-bg
|
|
1
|
+
# @iamahmarfaraz/react-liquid-bg
|
|
2
2
|
|
|
3
3
|
A high-performance WebGL liquid fluid background component for React.
|
|
4
4
|
|
|
5
5
|
Built and maintained by **Ahmar Faraz**.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
`@iamahmarfaraz/react-liquid-bg` provides a real-time, GPU-accelerated liquid simulation using WebGL and GLSL shaders.
|
|
8
8
|
It is designed for production React applications where visuals, performance, and clean architecture matter.
|
|
9
9
|
|
|
10
10
|
This is **not** a CSS animation or video background.
|
|
@@ -27,13 +27,13 @@ This is a real fluid simulation running entirely on the GPU.
|
|
|
27
27
|
## Installation
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
npm install react-liquid-bg
|
|
30
|
+
npm install @iamahmarfaraz/react-liquid-bg
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
or
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
yarn add react-liquid-bg
|
|
36
|
+
yarn add @iamahmarfaraz/react-liquid-bg
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
---
|
|
@@ -41,13 +41,15 @@ yarn add react-liquid-bg
|
|
|
41
41
|
## Basic Usage
|
|
42
42
|
|
|
43
43
|
```jsx
|
|
44
|
-
import LiquidBG from "react-liquid-bg";
|
|
44
|
+
import LiquidBG from "@iamahmarfaraz/react-liquid-bg";
|
|
45
45
|
|
|
46
46
|
function App() {
|
|
47
47
|
return (
|
|
48
48
|
<div className="relative min-h-screen">
|
|
49
49
|
<LiquidBG enabled={true} />
|
|
50
|
-
<div className="relative z-10">
|
|
50
|
+
<div className="relative z-10">
|
|
51
|
+
Your App Content
|
|
52
|
+
</div>
|
|
51
53
|
</div>
|
|
52
54
|
);
|
|
53
55
|
}
|
|
@@ -69,9 +71,12 @@ The simulation starts when `enabled` is true and pauses when false.
|
|
|
69
71
|
|
|
70
72
|
## Props
|
|
71
73
|
|
|
72
|
-
| Prop | Type |
|
|
73
|
-
|
|
74
|
-
| enabled | boolean |
|
|
74
|
+
| Prop | Type | Default | Description |
|
|
75
|
+
|-----|------|---------|-------------|
|
|
76
|
+
| enabled | boolean | true | Starts or pauses the fluid simulation |
|
|
77
|
+
| className | string | "" | Custom class for the canvas |
|
|
78
|
+
| style | object | {} | Inline styles for the canvas |
|
|
79
|
+
| pointerEvents | boolean | true | Enable or disable pointer interaction |
|
|
75
80
|
|
|
76
81
|
---
|
|
77
82
|
|
|
@@ -106,7 +111,6 @@ All heavy computation is done on the GPU for maximum performance.
|
|
|
106
111
|
- Velocity field updates
|
|
107
112
|
- Pressure correction
|
|
108
113
|
- Vorticity and curl
|
|
109
|
-
- Density transport
|
|
110
114
|
|
|
111
115
|
### Rendering Layer
|
|
112
116
|
- Shader-based rendering
|