shaders-cursor-ripples
Skill0 starsChanged 5 months agoApache-2.0View on GitHub
Add cursor-following fluid WebGPU distortion over an existing image with the Shaders library's ImageTexture and CursorRipples components. Use when a hero, gallery, or media panel needs a water-ripple mouse effect; when replacing a drifting CSS spotlight or flashlight reveal; or when a prompt says to borrow only the shader interaction from a Shaders.com reference while preserving the current brand, image, copy, and layout.
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- boraoztunc/skillsword for word, first seen Jun 11, 2026
Other versions1 project uses a version of this.
Word for word · 1
- boraoztunc/skills★ 454100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository63 other files it gives its agents.
- vercel-react-best-practices/AGENTS.mdAGENTS.md
- adversarial-reviewSkill
- analytics-trackingSkill
- animejsSkill
- apple-designSkill
- app-store-screenshotsSkill
- beam-glow-statesSkill
- beautiful-shadowsSkill
- competitor-alternativesSkill
- conductor-rewrite-performanceSkill
- container-linesSkill
- content-strategySkill
- contribute-catalogSkill
- copy-editingSkill
- copywritingSkill
- corner-diagonalsSkill
- css-animationsSkill
- css-border-gradientSkill
- documentary-brutalist-agencySkill
- editorial-portfolio-chaptersSkill
- emil-design-engSkill
- framed-grid-layoutSkill
- frontend-designSkill
- glass-dark-uiSkill
- gsapSkill
- hyperframes-cliSkill
- hyperframes-mediaSkill
- hyperframes-registrySkill
- hyperframesSkill
- impeccableSkill
- landing-pageSkill
- linear-local-first-architectureSkill
- liquid-metal-borderSkill
- lottieSkill
- make-interfaces-feel-betterSkill
- mesh-gradient-dark-blue-cleanSkill
- minimal-zine-posterSkill
- ogilvy-copywritingSkill
- operational-enterprise-aiSkill
- page-croSkill
- pricing-pageSkill
- product-proof-saasSkill
- programmatic-seoSkill
- progressive-blurSkill
- remotion-to-hyperframesSkill
- reveal-hover-effectSkill
- schema-markupSkill
- seo-auditSkill
- service-booking-flowSkill
- skeuomorphic-uiSkill
- staggered-word-revealSkill
- stop-slopSkill
- tailwindSkill
- tailwind-v4Skill
- thinking-orbsSkill
- threeSkill
- typegpuSkill
- vercel-react-best-practicesSkill
- visual-style-presetsSkill
- waapiSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
24 rules. About 0 are common, 13 are distinctive, and 11 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Place CursorRipples after ImageTexture so it post-processes that image.
- Very specific: line 14
Keep toneMapping="aces" on the root.
- Distinctive: line 16
Keep one real image beneath the canvas as the accessible loading and WebGPU fallback.
- Very specific: line 20
When the user asks for only the shader effect, do not copy a reference's ribbon, blob, glow, typography, layout, copy, colors, or identity.
- Very specific: line 26
Search for old reveal code such as data-reveal-hover, mask-image: radial-gradient, duplicated images, requestAnimationFrame, and manual …
- Very specific: line 28
Check the installed shaders version and current framework API when the package may have changed.
- Very specific: line 36
Import from shaders/react, shaders/vue, shaders/svelte, or shaders/solid.
- Distinctive: line 47
Keep the component order and values below:
- Very specific: line 56
Use this as the baseline before tuning intensity, chromaticSplit, or edges.
- Distinctive: line 85
Keep the semantic image in the wrapper, then overlay the lazy shader:
- Very specific: line 114
Keep the fallback at z-index 0 and the canvas at z-index 1.
- Distinctive: line 118
Place copy, links, and controls above the canvas so the effect never intercepts interaction.
- Distinctive: line 123
Delete the old implementation rather than leaving it hidden:
- Distinctive: line 137
Keep exactly one shader canvas for the media panel.
- Very specific: line 138
Use the library's onReady callback for a short opacity handoff.
- Very specific: line 139
Use disableTelemetry when telemetry is not required.
- Distinctive: line 140
Do not animate the canvas size.
- Distinctive: line 142
Keep touch layouts usable with the static image.
- Distinctive: line 146
Run the project's lint, production build, rendered tests, and git diff --check.
- Distinctive: line 155
Check mobile and desktop crops after the canvas initializes.
- Distinctive: line 159
Canvas exists but is blank: verify the wrapper has non-zero dimensions and the image URL is same-origin or CORS-readable.
- Very specific: line 160
Image renders but does not ripple: keep CursorRipples after ImageTexture.
- Distinctive: line 161
Ripple is offset: remove manual pointer transforms and check whether a transformed ancestor changes the canvas bounds.
- Distinctive: line 165
Effect blocks buttons: keep the canvas pointer-transparent and controls in a higher stacking layer.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Shaders Cursor Ripples
Core Contract
- Preserve the existing page, content, and semantic image.
- Install
shadersand import from the active framework subpath. - Render the source image through one
Shadercanvas. - Place
CursorRipplesafterImageTextureso it post-processes that image. - Keep
toneMapping="aces"on the root. - Let Shaders track the cursor. Remove custom spotlight coordinates, radial masks, duplicated reveal images, and pointer animation loops.
- Keep one real image beneath the canvas as the accessible loading and WebGPU fallback.
- Disable the shader for reduced motion and unsupported WebGPU.
- Lazy-load the shader code so the library does not inflate the initial page bundle.
When the user asks for only the shader effect, do not copy a reference's ribbon, blob, glow, typography, layout, copy, colors, or identity. Do not substitute the Shaders Water component: CursorRipples is the interactive image-displacement effect.
Inspect Before Editing
- Find the real media wrapper, image URL, crop, overlays, z-index, and existing motion.
- Confirm the wrapper has a non-zero rendered width and height.
- Search for old reveal code such as
data-reveal-hover,mask-image: radial-gradient, duplicated images,requestAnimationFrame, and manual pointer listeners. - Preserve unrelated parallax or entrance motion unless it conflicts with the shader canvas.
- Check the installed
shadersversion and current framework API when the package may have changed.
Install
npm install shadersImport from shaders/react, shaders/vue, shaders/svelte, or shaders/solid. For Vite projects, never add shaders to optimizeDeps.exclude; its CommonJS dependencies need Vite pre-bundling. No optimizeDeps entry is normally required.
This is a paid, non-OSS dependency. The shaders package ships a proprietary
"Shader Effects License Agreement" and npm reports license: None — rights are
granted only subject to payment. It is not MIT/Apache and cannot be treated as a
free transitive dependency. Clear licensing before any commercial release, and
prefer webgl-laser or a hand-rolled shader when the project cannot take a paid
dependency.
Required Composition
Keep the component order and values below:
<Shader toneMapping="aces">
<ImageTexture url={imageUrl} objectFit="cover" />
<CursorRipples decay={7.3} radius={0.6} />
</Shader>Use this as the baseline before tuning intensity, chromaticSplit, or edges. Do not add SolidColor, Blob, Form3D, GaborNoise, Glow, or another generator unless the user explicitly requests the reference's generated artwork.
For React, copy and adapt assets/react/cursor-ripple-shader.tsx and assets/react/cursor-ripple-media.css.
Client and Fallback Pattern
Mount the shader only after the browser confirms WebGPU and motion is allowed:
const CursorRippleShader = lazy(() => import("./cursor-ripple-shader"));
const [shaderEnabled, setShaderEnabled] = useState(false);
const [shaderReady, setShaderReady] = useState(false);
useEffect(() => {
const reduceMotion = window.matchMedia("(prefers-reduced-motion: reduce)");
const sync = () => {
const enabled = "gpu" in navigator && !reduceMotion.matches;
setShaderEnabled(enabled);
if (!enabled) setShaderReady(false);
};
sync();
reduceMotion.addEventListener("change", sync);
return () => reduceMotion.removeEventListener("change", sync);
}, []);Keep the semantic image in the wrapper, then overlay the lazy shader:
<figure className="cursor-ripple-media">
<img
className="cursor-ripple-media__fallback"
src={imageUrl}
alt={meaningfulAlt}
width={width}
height={height}
/>
{shaderEnabled ? (
<Suspense fallback={null}>
<CursorRippleShader
imageUrl={imageUrl}
ready={shaderReady}
onReady={() => setShaderReady(true)}
/>
</Suspense>
) : null}
</figure>For Next.js, an ssr: false dynamic import is also valid. Do not hide the fallback until the shader calls onReady; a failed WebGPU initialization must leave the page legible and complete.
Layering Rules
- Give the media wrapper
position: relative, a definite size,overflow: hidden, andisolation: isolate. - Keep the fallback at z-index
0and the canvas at z-index1. - Fill the wrapper with
position: absolute; inset: 0; width: 100%; height: 100%. - Set the shader layer to
pointer-events: none; Shaders listens globally and converts pointer coordinates using the canvas bounds. - Mark the shader wrapper
aria-hidden="true"; the fallback image owns the accessible name. - Place copy, links, and controls above the canvas so the effect never intercepts interaction.
- Preserve the same crop between the fallback and
ImageTexture. UseobjectFit="cover"for full-bleed media.
Remove the Failed Spotlight Pattern
Delete the old implementation rather than leaving it hidden:
- second reveal image;
- radial
mask-imageand custom reveal variables; - smoke or blur overlays tied to pointer position;
- component-local
requestAnimationFramepointer easing; pointerenter,pointermove,pointerleave, and resize bookkeeping created only for the flashlight;- coarse-pointer rules that reference the retired reveal layers.
Keeping both systems causes coordinate drift, extra GPU work, and confusing fallbacks.
Performance and Motion
- Lazy-load the shader module behind the WebGPU check.
- Keep exactly one shader canvas for the media panel.
- Use the library's
onReadycallback for a short opacity handoff. - Use
disableTelemetrywhen telemetry is not required. - Do not animate the canvas size; animate a stable parent if parallax is needed.
- Disable or unmount the shader under
prefers-reduced-motion: reduce. - Keep touch layouts usable with the static image; never put essential information inside the effect.
Verification
Run the project's lint, production build, rendered tests, and git diff --check. Then verify in a real browser:
- Confirm exactly one
canvas[data-renderer="shaders"]exists. - Confirm the shader reaches its ready class and the fallback image remains present.
- Sweep the pointer across several points in the media. The distortion must follow that path without a detached circle.
- Confirm links and controls remain clickable.
- Confirm no console errors or warnings occur.
- Confirm the static image remains when WebGPU is unavailable or reduced motion is enabled.
- Confirm the old
data-reveal-hoveror radial-mask layer is absent. - Check mobile and desktop crops after the canvas initializes.
Failure Diagnosis
- Canvas exists but is blank: verify the wrapper has non-zero dimensions and the image URL is same-origin or CORS-readable.
- Image renders but does not ripple: keep
CursorRipplesafterImageTexture; it requires a child/input surface. - Ripple is offset: remove manual pointer transforms and check whether a transformed ancestor changes the canvas bounds.
- Page crashes during SSR: move the shader into a client-only, lazy-loaded component.
- Image flashes on load: retain the fallback and fade the shader in only from
onReady. - Initial bundle becomes large: confirm the Shaders import lives only inside the lazy module.
- Effect blocks buttons: keep the canvas pointer-transparent and controls in a higher stacking layer.
Handoff
Report the affected media, Shaders package version, fallback behavior, reduced-motion behavior, build/test results, and live interaction verification. Distinguish a locally ready effect from a published deployment.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

