@rippleflow/water-distortion 0.1.2
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/LICENSE +21 -0
- package/README.md +202 -0
- package/dist/WaterDistortion.d.ts +56 -0
- package/dist/WaterDistortion.d.ts.map +1 -0
- package/dist/core/math.d.ts +10 -0
- package/dist/core/math.d.ts.map +1 -0
- package/dist/core/trailEngine.d.ts +46 -0
- package/dist/core/trailEngine.d.ts.map +1 -0
- package/dist/core/waterInteraction.d.ts +58 -0
- package/dist/core/waterInteraction.d.ts.map +1 -0
- package/dist/core/waterRenderer.d.ts +66 -0
- package/dist/core/waterRenderer.d.ts.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/water-distortion.cjs +251 -0
- package/dist/water-distortion.cjs.map +1 -0
- package/dist/water-distortion.js +1240 -0
- package/dist/water-distortion.js.map +1 -0
- package/package.json +55 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 RippleFlow contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# RippleFlow Water Distortion
|
|
2
|
+
|
|
3
|
+
A React + Vite + TypeScript package for cursor-driven water on portfolio-style interfaces. RippleFlow now uses a low-resolution heightfield simulation: pointer movement stamps local trough/ridge wakes, the wave equation propagates them outward, and a WebGL material turns the heightfield into refraction, specular highlights, crests, and experimental ripple-driven caustic light.
|
|
4
|
+
|
|
5
|
+
Foreground content stays sharp and interactive. Background content can be sampled directly by WebGL in `texture` / `canvas` mode for the strongest refraction, or rendered as live DOM in `dom` mode.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @rippleflow/water-distortion
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
React and React DOM are peer dependencies:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install react react-dom
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import { WaterDistortion } from "@rippleflow/water-distortion";
|
|
23
|
+
|
|
24
|
+
export function Hero() {
|
|
25
|
+
return (
|
|
26
|
+
<WaterDistortion
|
|
27
|
+
mode="texture"
|
|
28
|
+
wakeStrength={0.54}
|
|
29
|
+
interactionRadius={25}
|
|
30
|
+
troughStrength={0.92}
|
|
31
|
+
ridgeStrength={0.46}
|
|
32
|
+
ridgeOffset={10}
|
|
33
|
+
wakeLength={84}
|
|
34
|
+
velocityScale={1}
|
|
35
|
+
velocityClamp={1.35}
|
|
36
|
+
cursorSmoothing={0.2}
|
|
37
|
+
segmentSpacing={18}
|
|
38
|
+
damping={0.98}
|
|
39
|
+
waveSpeed={0.4}
|
|
40
|
+
normalScale={20}
|
|
41
|
+
refractionStrength={0.7}
|
|
42
|
+
specularIntensity={1}
|
|
43
|
+
crestIntensity={0.2}
|
|
44
|
+
causticIntensity={0}
|
|
45
|
+
simulationResolution={192}
|
|
46
|
+
texture="/work-collage.jpg"
|
|
47
|
+
underlay={
|
|
48
|
+
<img
|
|
49
|
+
src="/work-collage.jpg"
|
|
50
|
+
alt=""
|
|
51
|
+
style={{ width: "100%", height: "100%", objectFit: "cover" }}
|
|
52
|
+
/>
|
|
53
|
+
}
|
|
54
|
+
style={{ minHeight: 620 }}
|
|
55
|
+
>
|
|
56
|
+
<section>
|
|
57
|
+
<h1>Portfolio title stays crisp</h1>
|
|
58
|
+
<a href="/work">View work</a>
|
|
59
|
+
</section>
|
|
60
|
+
</WaterDistortion>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
For true shader refraction, provide a texture source:
|
|
66
|
+
|
|
67
|
+
```tsx
|
|
68
|
+
<WaterDistortion
|
|
69
|
+
mode="texture"
|
|
70
|
+
texture="/hero-background.jpg"
|
|
71
|
+
wakeStrength={0.8}
|
|
72
|
+
underlay={<img src="/hero-background.jpg" alt="" />}
|
|
73
|
+
>
|
|
74
|
+
<HeroCopy />
|
|
75
|
+
</WaterDistortion>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
`WaterLayer` is exported as an alias of `WaterDistortion`.
|
|
79
|
+
|
|
80
|
+
## React API
|
|
81
|
+
|
|
82
|
+
| Prop | Type | Default | Notes |
|
|
83
|
+
| --- | --- | --- | --- |
|
|
84
|
+
| `underlay` | `ReactNode` | `undefined` | Live DOM/background content behind the water. Recommended in `dom` mode and useful as a fallback in texture modes. |
|
|
85
|
+
| `children` | `ReactNode` | `undefined` | Foreground content rendered above the water. |
|
|
86
|
+
| `foreground` | `ReactNode` | `undefined` | Explicit foreground prop; takes precedence over `children`. |
|
|
87
|
+
| `mode` | `"dom" \| "texture" \| "canvas"` | `"texture"` | Chooses live-DOM overlay mode or true WebGL background sampling. |
|
|
88
|
+
| `texture` | `TexImageSource \| string` | `undefined` | Image/canvas/video source sampled by WebGL in `texture` or `canvas` mode. URL strings are loaded with `crossOrigin="anonymous"`. |
|
|
89
|
+
| `interactionMode` | `"move" \| "click" \| "drag" \| "event"` | `"move"` | Chooses pointer-movement wakes, one ripple per pointer down, press ripples plus held-drag wakes, or programmatic ripples only. |
|
|
90
|
+
| `runInBackground` | `boolean` | `false` | Continues stepping while hidden or unfocused and catches up elapsed time when the browser throttles background callbacks. |
|
|
91
|
+
| `pauseKey` | `string` | `undefined` | Toggles simulation pausing when this [`KeyboardEvent.code`](https://developer.mozilla.org/docs/Web/API/KeyboardEvent/code) is pressed, such as `Space` or `KeyP`. Keyboard input in interactive controls is ignored. |
|
|
92
|
+
| `wakeStrength` | `number` | `0.54` | Overall pointer wake strength. Slow drags stay subtle; fast movement is clamped before it reaches the shader. |
|
|
93
|
+
| `rippleStrength` | `number` | `undefined` | Compatibility alias for `wakeStrength`. |
|
|
94
|
+
| `strength` | `number` | `undefined` | Legacy alias mapped to `wakeStrength` as `strength / 48`. |
|
|
95
|
+
| `interactionRadius` | `number` | `25` | Width in CSS pixels of the moving virtual finger/body that parts the water. |
|
|
96
|
+
| `troughStrength` | `number` | `0.92` | Strength of the narrow negative trough along the pointer path. |
|
|
97
|
+
| `ridgeStrength` | `number` | `0.46` | Strength of the paired side ridges beside the trough. |
|
|
98
|
+
| `ridgeOffset` | `number` | `10` | Side-ridge offset from the path centerline in CSS pixels. |
|
|
99
|
+
| `wakeLength` | `number` | `84` | Base trailing wake length in CSS pixels. Fast movement scales it longer. |
|
|
100
|
+
| `velocityScale` | `number` | `1` | Multiplier applied before pointer speed is clamped. |
|
|
101
|
+
| `velocityClamp` | `number` | `1.35` | Pointer speed in CSS pixels per millisecond that maps to full wake strength. |
|
|
102
|
+
| `cursorSmoothing` | `number` | `0.2` | Low-pass smoothing for the virtual finger position and speed. |
|
|
103
|
+
| `segmentSpacing` | `number` | `18` | Maximum CSS-pixel spacing before long pointer moves are subdivided into connected wake segments. |
|
|
104
|
+
| `damping` | `number` | `0.98` | Per-step velocity damping. Higher values let waves travel longer. |
|
|
105
|
+
| `dissipation` | `number` | `undefined` | Legacy alias for `damping`. |
|
|
106
|
+
| `waveSpeed` | `number` | `0.4` | Stiffness of the damped wave equation. |
|
|
107
|
+
| `normalScale` | `number` | `20` | Height-gradient scale used to compute visible water normals. |
|
|
108
|
+
| `refractionStrength` | `number` | `0.7` | Amount of normal-driven texture displacement in texture/canvas modes. |
|
|
109
|
+
| `specularIntensity` | `number` | `1` | Strength of fixed-light specular highlights. |
|
|
110
|
+
| `crestIntensity` | `number` | `0.2` | Visibility of height-gradient crests and troughs. |
|
|
111
|
+
| `causticIntensity` | `number` | `0` | Experimental ripple-driven caustic light that fades when the simulated surface is calm. |
|
|
112
|
+
| `simulationResolution` | `number` | `192` | Longest side of the simulation texture. Clamped to `64...384`. |
|
|
113
|
+
| `idleTimeout` | `number` | `900` | Minimum active time after input before the renderer begins checking whether ripples have faded enough to sleep. |
|
|
114
|
+
| `className` | `string` | `undefined` | Applied to the container. |
|
|
115
|
+
| `style` | `CSSProperties` | `undefined` | Merged onto the container. The component enforces relative positioning, hidden overflow, and isolation. |
|
|
116
|
+
| `reducedMotion` | `"respect" \| "disable" \| "ignore"` | `"respect"` | `respect` disables wave input when `prefers-reduced-motion: reduce` matches. |
|
|
117
|
+
|
|
118
|
+
Programmatic ripples use normalized container coordinates through the component ref:
|
|
119
|
+
|
|
120
|
+
~~~tsx
|
|
121
|
+
import { useEffect, useRef } from "react";
|
|
122
|
+
import {
|
|
123
|
+
WaterDistortion,
|
|
124
|
+
type WaterDistortionHandle
|
|
125
|
+
} from "@rippleflow/water-distortion";
|
|
126
|
+
|
|
127
|
+
function EventDrivenWater() {
|
|
128
|
+
const waterRef = useRef<WaterDistortionHandle>(null);
|
|
129
|
+
|
|
130
|
+
useEffect(() => {
|
|
131
|
+
waterRef.current?.triggerRipple({ x: 0.5, y: 0.5 });
|
|
132
|
+
}, []);
|
|
133
|
+
|
|
134
|
+
return <WaterDistortion ref={waterRef} interactionMode="event" />;
|
|
135
|
+
}
|
|
136
|
+
~~~
|
|
137
|
+
|
|
138
|
+
The older `blur`, `maxTrailPoints`, `maxStamps`, and `trailSpacing` props remain accepted for source compatibility, but the heightfield renderer does not use the old trail-stamp engine.
|
|
139
|
+
|
|
140
|
+
## Modes
|
|
141
|
+
|
|
142
|
+
### `dom`
|
|
143
|
+
|
|
144
|
+
Use `dom` when the background is arbitrary live React/DOM content. The DOM underlay is rendered normally, foreground content stays sharp, and the WebGL canvas draws transparent water highlights derived from the heightfield.
|
|
145
|
+
|
|
146
|
+
Browsers do not provide an efficient, general API for sampling arbitrary live DOM into WebGL every frame. RippleFlow therefore does not pretend to perform perfect DOM refraction. The visible water material comes from heightfield normals, specular, crest, and caustic lighting, so ripples remain readable even when the DOM itself is not displaced.
|
|
147
|
+
|
|
148
|
+
### `texture` / `canvas`
|
|
149
|
+
|
|
150
|
+
Use `texture` or `canvas` when you can provide an image, video, canvas, or URL that WebGL can sample. This path gives the best visual quality because the shader offsets the sampled background with `normal.xy` from the water heightfield.
|
|
151
|
+
|
|
152
|
+
If no `texture` is supplied in these modes, RippleFlow renders a procedural gradient background so the playground and demos still show true refraction.
|
|
153
|
+
|
|
154
|
+
## How It Works
|
|
155
|
+
|
|
156
|
+
- A WebGL renderer maintains two ping-pong floating-point simulation textures.
|
|
157
|
+
- Each texel stores height and velocity.
|
|
158
|
+
- Every fixed step samples neighboring heights, accelerates velocity toward the neighbor average, applies damping, and integrates height.
|
|
159
|
+
- Pointer input uses `pointermove` plus `getCoalescedEvents()` where available, then low-pass filters samples into a virtual cursor.
|
|
160
|
+
- Pointer movement is stamped as continuous SDF/capsule wake segments, not repeated timed circles.
|
|
161
|
+
- Each segment uses a directional profile: center trough, paired side ridges, a trailing wake mask, and subtle behind-only wavelets.
|
|
162
|
+
- The material pass computes normals from height gradients, then combines refraction, specular highlights, crest/trough visibility, and projected caustic light that fades with ripple activity.
|
|
163
|
+
- The animation loop runs while input is active, then sleeps after ripples measure as visually quiet.
|
|
164
|
+
|
|
165
|
+
## Performance Notes
|
|
166
|
+
|
|
167
|
+
- The simulation resolution defaults to `192`, while the visible canvas still matches the container size.
|
|
168
|
+
- Keep `simulationResolution` around `128...256` for most portfolio hero sections.
|
|
169
|
+
- The renderer uses refs and an imperative animation loop; React state is not updated per frame.
|
|
170
|
+
- `ResizeObserver` keeps the canvas responsive.
|
|
171
|
+
- `IntersectionObserver` and `document.visibilityState` pause offscreen or hidden work when available.
|
|
172
|
+
- `toDataURL()` is not used in the primary render path.
|
|
173
|
+
- Dynamic canvas/video texture sources may be uploaded each rendered frame in `canvas`/`texture` mode.
|
|
174
|
+
- `prefers-reduced-motion` is respected by default.
|
|
175
|
+
|
|
176
|
+
## Browser Notes
|
|
177
|
+
|
|
178
|
+
The primary path uses WebGL2 with floating-point render targets. A WebGL1 path is attempted when float textures and float color buffers are available. Current Chrome, Safari, and Firefox support the WebGL2 path on modern desktop systems; older browsers or restricted GPU environments may fall back to showing only the underlay and foreground.
|
|
179
|
+
|
|
180
|
+
Useful APIs:
|
|
181
|
+
|
|
182
|
+
- WebGL2: https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext
|
|
183
|
+
- PointerEvent.getCoalescedEvents(): https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/getCoalescedEvents
|
|
184
|
+
- ResizeObserver: https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver
|
|
185
|
+
- IntersectionObserver: https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserver
|
|
186
|
+
|
|
187
|
+
## Demo
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
npm install
|
|
191
|
+
npm run dev
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Open the local Vite URL and move across the hero. The `/playground` controls adjust wake shape, smoothing, segment spacing, damping, wave speed, normal scale, refraction, specular, crest/caustic intensity, and simulation resolution.
|
|
195
|
+
|
|
196
|
+
## Quality
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
npm test
|
|
200
|
+
npm run typecheck
|
|
201
|
+
npm run build
|
|
202
|
+
```
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from "react";
|
|
2
|
+
import { type WaterRenderMode, type WaterTextureSource } from "./core/waterRenderer";
|
|
3
|
+
export type ReducedMotionBehavior = "respect" | "disable" | "ignore";
|
|
4
|
+
export type WaterInteractionMode = "move" | "click" | "drag" | "event";
|
|
5
|
+
export interface WaterRipplePosition {
|
|
6
|
+
/** Horizontal position normalized from 0 (left) to 1 (right). */
|
|
7
|
+
x: number;
|
|
8
|
+
/** Vertical position normalized from 0 (top) to 1 (bottom). */
|
|
9
|
+
y: number;
|
|
10
|
+
}
|
|
11
|
+
export interface WaterDistortionHandle {
|
|
12
|
+
triggerRipple(position: WaterRipplePosition): void;
|
|
13
|
+
}
|
|
14
|
+
export interface WaterDistortionProps {
|
|
15
|
+
underlay?: ReactNode;
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
foreground?: ReactNode;
|
|
18
|
+
mode?: WaterRenderMode;
|
|
19
|
+
texture?: WaterTextureSource;
|
|
20
|
+
rippleStrength?: number;
|
|
21
|
+
wakeStrength?: number;
|
|
22
|
+
interactionRadius?: number;
|
|
23
|
+
troughStrength?: number;
|
|
24
|
+
ridgeStrength?: number;
|
|
25
|
+
ridgeOffset?: number;
|
|
26
|
+
wakeLength?: number;
|
|
27
|
+
velocityScale?: number;
|
|
28
|
+
velocityClamp?: number;
|
|
29
|
+
cursorSmoothing?: number;
|
|
30
|
+
segmentSpacing?: number;
|
|
31
|
+
strength?: number;
|
|
32
|
+
damping?: number;
|
|
33
|
+
dissipation?: number;
|
|
34
|
+
waveSpeed?: number;
|
|
35
|
+
normalScale?: number;
|
|
36
|
+
refractionStrength?: number;
|
|
37
|
+
specularIntensity?: number;
|
|
38
|
+
crestIntensity?: number;
|
|
39
|
+
causticIntensity?: number;
|
|
40
|
+
simulationResolution?: number;
|
|
41
|
+
idleTimeout?: number;
|
|
42
|
+
blur?: number;
|
|
43
|
+
maxTrailPoints?: number;
|
|
44
|
+
maxStamps?: number;
|
|
45
|
+
trailSpacing?: number;
|
|
46
|
+
className?: string;
|
|
47
|
+
style?: CSSProperties;
|
|
48
|
+
reducedMotion?: ReducedMotionBehavior;
|
|
49
|
+
interactionMode?: WaterInteractionMode;
|
|
50
|
+
runInBackground?: boolean;
|
|
51
|
+
pauseKey?: string;
|
|
52
|
+
}
|
|
53
|
+
export declare const WaterDistortion: import("react").ForwardRefExoticComponent<WaterDistortionProps & import("react").RefAttributes<WaterDistortionHandle>>;
|
|
54
|
+
export declare const WaterLayer: import("react").ForwardRefExoticComponent<WaterDistortionProps & import("react").RefAttributes<WaterDistortionHandle>>;
|
|
55
|
+
export type { WaterRenderMode, WaterTextureSource };
|
|
56
|
+
//# sourceMappingURL=WaterDistortion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WaterDistortion.d.ts","sourceRoot":"","sources":["../src/WaterDistortion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAStD,OAAO,EAEL,KAAK,eAAe,EAEpB,KAAK,kBAAkB,EACxB,MAAM,sBAAsB,CAAC;AAS9B,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AACrE,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AAEvE,MAAM,WAAW,mBAAmB;IAClC,iEAAiE;IACjE,CAAC,EAAE,MAAM,CAAC;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C;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,aAAa,CAAC,EAAE,qBAAqB,CAAC;IACtC,eAAe,CAAC,EAAE,oBAAoB,CAAC;IACvC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAkOD,eAAO,MAAM,eAAe,wHAwqB1B,CAAC;AAEH,eAAO,MAAM,UAAU,wHAAkB,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface Vector2 {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
}
|
|
5
|
+
export declare function clamp(value: number, min: number, max: number): number;
|
|
6
|
+
export declare function distance(a: Vector2, b: Vector2): number;
|
|
7
|
+
export declare function lerp(a: number, b: number, amount: number): number;
|
|
8
|
+
export declare function normalize(vector: Vector2): Vector2;
|
|
9
|
+
export declare function smoothVector(previous: Vector2, next: Vector2, amount: number): Vector2;
|
|
10
|
+
//# sourceMappingURL=math.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../src/core/math.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAErE;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,MAAM,CAEvD;AAED,wBAAgB,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED,wBAAgB,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAWlD;AAED,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,OAAO,EACjB,IAAI,EAAE,OAAO,EACb,MAAM,EAAE,MAAM,GACb,OAAO,CAKT"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export interface TrailPoint {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
t: number;
|
|
5
|
+
}
|
|
6
|
+
export interface TrailStamp {
|
|
7
|
+
active: boolean;
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
vx: number;
|
|
11
|
+
vy: number;
|
|
12
|
+
strength: number;
|
|
13
|
+
radius: number;
|
|
14
|
+
stretch: number;
|
|
15
|
+
ageMs: number;
|
|
16
|
+
}
|
|
17
|
+
export interface TrailEngineOptions {
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
dissipation: number;
|
|
21
|
+
maxStamps: number;
|
|
22
|
+
maxTrailPoints: number;
|
|
23
|
+
trailSpacing: number;
|
|
24
|
+
}
|
|
25
|
+
export declare class WaterTrailEngine {
|
|
26
|
+
private options;
|
|
27
|
+
private points;
|
|
28
|
+
private stampPool;
|
|
29
|
+
private nextStampIndex;
|
|
30
|
+
private lastStampPoint;
|
|
31
|
+
private smoothedVelocity;
|
|
32
|
+
private lastStepTime;
|
|
33
|
+
constructor(options?: Partial<TrailEngineOptions>);
|
|
34
|
+
configure(options: Partial<TrailEngineOptions>): void;
|
|
35
|
+
resize(width: number, height: number): void;
|
|
36
|
+
addPoint(x: number, y: number, time: number): boolean;
|
|
37
|
+
step(time: number): boolean;
|
|
38
|
+
reset(): void;
|
|
39
|
+
endStroke(): void;
|
|
40
|
+
getStamps(): readonly TrailStamp[];
|
|
41
|
+
getPoints(): readonly TrailPoint[];
|
|
42
|
+
hasVisibleStamps(): boolean;
|
|
43
|
+
private stampAlongSegment;
|
|
44
|
+
private writeStamp;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=trailEngine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trailEngine.d.ts","sourceRoot":"","sources":["../../src/core/trailEngine.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,UAAU;IACzB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACtB;AAqDD,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,MAAM,CAAoB;IAClC,OAAO,CAAC,SAAS,CAAe;IAChC,OAAO,CAAC,cAAc,CAAK;IAC3B,OAAO,CAAC,cAAc,CAAyB;IAC/C,OAAO,CAAC,gBAAgB,CAAkB;IAC1C,OAAO,CAAC,YAAY,CAAqB;gBAE7B,OAAO,GAAE,OAAO,CAAC,kBAAkB,CAAM;IAQrD,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,IAAI;IA6BrD,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAI3C,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO;IA+CrD,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IA4B3B,KAAK,IAAI,IAAI;IAWb,SAAS,IAAI,IAAI;IAMjB,SAAS,IAAI,SAAS,UAAU,EAAE;IAIlC,SAAS,IAAI,SAAS,UAAU,EAAE;IAIlC,gBAAgB,IAAI,OAAO;IAI3B,OAAO,CAAC,iBAAiB;IA4BzB,OAAO,CAAC,UAAU;CAgCnB"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export interface PointerSample {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
time: number;
|
|
5
|
+
}
|
|
6
|
+
export interface WaterDisturbance {
|
|
7
|
+
ax: number;
|
|
8
|
+
ay: number;
|
|
9
|
+
bx: number;
|
|
10
|
+
by: number;
|
|
11
|
+
radius: number;
|
|
12
|
+
wakeStrength: number;
|
|
13
|
+
troughStrength: number;
|
|
14
|
+
ridgeStrength: number;
|
|
15
|
+
ridgeOffset: number;
|
|
16
|
+
wakeLength: number;
|
|
17
|
+
velocity: number;
|
|
18
|
+
}
|
|
19
|
+
export interface PointerDisturbanceOptions {
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
interactionRadius: number;
|
|
23
|
+
wakeStrength: number;
|
|
24
|
+
troughStrength: number;
|
|
25
|
+
ridgeStrength: number;
|
|
26
|
+
ridgeOffset: number;
|
|
27
|
+
wakeLength: number;
|
|
28
|
+
velocityScale: number;
|
|
29
|
+
velocityClamp: number;
|
|
30
|
+
cursorSmoothing: number;
|
|
31
|
+
segmentSpacing: number;
|
|
32
|
+
}
|
|
33
|
+
export interface PointerEventLike {
|
|
34
|
+
clientX: number;
|
|
35
|
+
clientY: number;
|
|
36
|
+
timeStamp: number;
|
|
37
|
+
getCoalescedEvents?: () => PointerEventLike[];
|
|
38
|
+
}
|
|
39
|
+
export interface BoundsLike {
|
|
40
|
+
left: number;
|
|
41
|
+
top: number;
|
|
42
|
+
}
|
|
43
|
+
export declare function getPointerSamples(event: PointerEventLike, bounds: BoundsLike, now?: number): PointerSample[];
|
|
44
|
+
export declare class PointerDisturbanceTracker {
|
|
45
|
+
private options;
|
|
46
|
+
private previous;
|
|
47
|
+
private smoothedVelocity;
|
|
48
|
+
private readonly disturbances;
|
|
49
|
+
constructor(options?: Partial<PointerDisturbanceOptions>);
|
|
50
|
+
configure(options: Partial<PointerDisturbanceOptions>): void;
|
|
51
|
+
reset(): void;
|
|
52
|
+
addSample(sample: PointerSample): readonly WaterDisturbance[];
|
|
53
|
+
private clampSample;
|
|
54
|
+
private smoothSample;
|
|
55
|
+
}
|
|
56
|
+
export declare function createDisturbance(from: PointerSample, to: PointerSample, velocityPxMs: number, options: Partial<PointerDisturbanceOptions>): WaterDisturbance;
|
|
57
|
+
export declare function estimateSettleDuration(damping: number): number;
|
|
58
|
+
//# sourceMappingURL=waterInteraction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"waterInteraction.d.ts","sourceRoot":"","sources":["../../src/core/waterInteraction.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CA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YAAY;CASrB;AAED,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,aAAa,EACnB,EAAE,EAAE,aAAa,EACjB,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,OAAO,CAAC,yBAAyB,CAAC,GAC1C,gBAAgB,CAwBlB;AAcD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAK9D"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { WaterDisturbance } from "./waterInteraction";
|
|
2
|
+
export type WaterRenderMode = "dom" | "texture" | "canvas";
|
|
3
|
+
export type WaterTextureSource = TexImageSource | string;
|
|
4
|
+
export interface WaterRendererSettings {
|
|
5
|
+
mode: WaterRenderMode;
|
|
6
|
+
damping: number;
|
|
7
|
+
waveSpeed: number;
|
|
8
|
+
normalScale: number;
|
|
9
|
+
refractionStrength: number;
|
|
10
|
+
specularIntensity: number;
|
|
11
|
+
crestIntensity: number;
|
|
12
|
+
causticIntensity: number;
|
|
13
|
+
simulationResolution: number;
|
|
14
|
+
texture?: WaterTextureSource;
|
|
15
|
+
}
|
|
16
|
+
export interface WaterActivityThresholds {
|
|
17
|
+
gradient: number;
|
|
18
|
+
curvature: number;
|
|
19
|
+
trough: number;
|
|
20
|
+
velocity: number;
|
|
21
|
+
}
|
|
22
|
+
export declare class HeightfieldWaterRenderer {
|
|
23
|
+
private readonly canvas;
|
|
24
|
+
private readonly gl;
|
|
25
|
+
private readonly isWebGL2;
|
|
26
|
+
private readonly canLinearFloat;
|
|
27
|
+
private readonly quadBuffer;
|
|
28
|
+
private readonly simulationProgram;
|
|
29
|
+
private readonly materialProgram;
|
|
30
|
+
private readonly backgroundTexture;
|
|
31
|
+
private readonly causticTexture;
|
|
32
|
+
private stateTextures;
|
|
33
|
+
private framebuffers;
|
|
34
|
+
private readIndex;
|
|
35
|
+
private simWidth;
|
|
36
|
+
private simHeight;
|
|
37
|
+
private cssWidth;
|
|
38
|
+
private cssHeight;
|
|
39
|
+
private textureSource;
|
|
40
|
+
private textureImage;
|
|
41
|
+
private textureReady;
|
|
42
|
+
private textureNeedsUpload;
|
|
43
|
+
private activityPixels;
|
|
44
|
+
private readonly wakeAUniforms;
|
|
45
|
+
private readonly wakeBUniforms;
|
|
46
|
+
private readonly wakeShapeUniforms;
|
|
47
|
+
constructor(canvas: HTMLCanvasElement);
|
|
48
|
+
resize(cssWidth: number, cssHeight: number, pixelRatio: number, simulationResolution: number): void;
|
|
49
|
+
setTextureSource(source: WaterTextureSource | undefined): void;
|
|
50
|
+
step(disturbances: readonly WaterDisturbance[], settings: WaterRendererSettings, delta: number): void;
|
|
51
|
+
render(settings: WaterRendererSettings, timeSeconds?: number): void;
|
|
52
|
+
hasVisibleActivity(): boolean;
|
|
53
|
+
clear(): void;
|
|
54
|
+
dispose(): void;
|
|
55
|
+
private recreateState;
|
|
56
|
+
private createStateTexture;
|
|
57
|
+
private createFramebuffer;
|
|
58
|
+
private initializeBackgroundTexture;
|
|
59
|
+
private initializeCausticTexture;
|
|
60
|
+
private uploadTextureIfNeeded;
|
|
61
|
+
private prepareQuad;
|
|
62
|
+
private setSimulationUniforms;
|
|
63
|
+
private setMaterialUniforms;
|
|
64
|
+
}
|
|
65
|
+
export declare function hasVisibleWaterActivity(state: ArrayLike<number>, width: number, height: number, thresholds?: WaterActivityThresholds): boolean;
|
|
66
|
+
//# sourceMappingURL=waterRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"waterRenderer.d.ts","sourceRoot":"","sources":["../../src/core/waterRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC3D,MAAM,MAAM,kBAAkB,GAAG,cAAc,GAAG,MAAM,CAAC;AAEzD,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,eAAe,CAAC;IACtB,OA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AA2B;IACjD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA2C;IACzE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA2C;IACzE,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA2C;gBAEhD,MAAM,EAAE,iBAAiB;IA0BtD,MAAM,CACJ,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,oBAAoB,EAAE,MAAM,GAC3B,IAAI;IA4BP,gBAAgB,CAAC,MAAM,EAAE,kBAAkB,GAAG,SAAS,GAAG,IAAI;IAuC9D,IAAI,CACF,YAAY,EAAE,SAAS,gBAAgB,EAAE,EACzC,QAAQ,EAAE,qBAAqB,EAC/B,KAAK,EAAE,MAAM,GACZ,IAAI;IAoBP,MAAM,CAAC,QAAQ,EAAE,qBAAqB,EAAE,WAAW,SAAI,GAAG,IAAI;IA+B9D,kBAAkB,IAAI,OAAO;IAoC7B,KAAK,IAAI,IAAI;IAmBb,OAAO,IAAI,IAAI;IAYf,OAAO,CAAC,aAAa;IAiBrB,OAAO,CAAC,kBAAkB;IAiD1B,OAAO,CAAC,iBAAiB;IAsBzB,OAAO,CAAC,2BAA2B;IAqBnC,OAAO,CAAC,wBAAwB;IAsBhC,OAAO,CAAC,qBAAqB;IA+B7B,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,qBAAqB;IA8C7B,OAAO,CAAC,mBAAmB;CAwB5B;AA4OD,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,EACxB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,UAAU,GAAE,uBAAqD,GAChE,OAAO,CAyCT"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { WaterDistortion, WaterLayer } from "./WaterDistortion";
|
|
2
|
+
export type { ReducedMotionBehavior, WaterDistortionHandle, WaterDistortionProps, WaterInteractionMode, WaterRenderMode, WaterRipplePosition, WaterTextureSource } from "./WaterDistortion";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAChE,YAAY,EACV,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,mBAAmB,CAAC"}
|