shaders-cursor-ripples
यह क्या करती है
यह स्किल एक फ़ोटो या हीरो इमेज पर माउस के साथ चलने वाला WebGPU लहर विकृति प्रभाव जोड़ती है। यह फ्रंट एंड डेवलपर्स के लिए है जिन्हें पेज दोबारा डिज़ाइन किए बिना एक तरल इंटरैक्टिव इमेज चाहिए।
कब इस्तेमाल करें
- ✓जब हीरो या गैलरी इमेज पर माउस के साथ चलने वाला पानी की लहर प्रभाव चाहिए।
- ✓जब इमेज पर पुराने स्पॉटलाइट या फ़्लैशलाइट प्रभाव की जगह नया प्रभाव चाहिए।
- ✓जब किसी संदर्भ से सिर्फ़ शेडर इंटरैक्शन चाहिए, उसका डिज़ाइन कॉपी किए बिना।
Skill का लिंक
https://github.com/MengTo/Skills/blob/main/agent-skills/web-design/shaders-cursor-ripples/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे हीरो की इमेज पर माउस के साथ चलने वाली पानी की लहर दिखाइए, और पेज के बाकी हिस्से में कोई बदलाव न करें।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट मौजूदा इमेज और कंटेंट रखता है, इमेज के ऊपर शेडर कैनवास लगाता है, और उसके ऊपर लहर की परत जोड़ता है। पुराना कस्टम पॉइंटर कोड हटा दिया जाता है, और रिड्यूस्ड मोशन या WebGPU न होने पर सादी इमेज दिखती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
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 shaders
Import 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.
Before a commercial release, verify the current Shaders license terms.
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 i
अक्सर पूछे जाने वाले सवाल
अगर विज़िटर के ब्राउज़र में WebGPU समर्थन न हो तो?
स्किल कैनवास के नीचे एक असली इमेज फ़ॉलबैक के रूप में रखने को कहती है, ताकि पेज फिर भी सही दिखे।
क्या यह पेज का वज़न बढ़ाता है?
स्किल शेडर कोड को लेज़ी-लोड करने को कहती है, ताकि पहला पेज लोड धीमा न हो।
क्या यह मेरा ब्रांड या कॉपी बदलता है?
नहीं। यह आपके पेज, कंटेंट और सिमेंटिक इमेज को बनाए रखता है।
जानकारी
लेखक का मूल विवरण
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.
repo: MengTo/Skills
लोकप्रियता
- GitHub स्टार
- 7.2k
- रैंकिंग में स्थान
- #13466
- लाइसेंस
- MIT
- अपडेट की गई
- 1/11/2026
कमेंट
- …
इस repository की और skills
3d-cloth-material
7.2kआपके एजेंट को Three.js में असली बुने हुए कपड़े जैसा दिखने वाला मटीरियल बनाने में मदद करती है, जिसमें धागों की बुनाई, हल्की चमक, प्राकृतिक सिलवटें, किनारे और सीवन हों।
3d-falling-leaves
7.2kआपके एजेंट को 3D दृश्य में असली लगने वाली गिरती पत्तियाँ जोड़ने देती है, जो लुढ़कती हैं, हवा के साथ बहती हैं और कैमरा हिलने पर दोबारा इस्तेमाल होती हैं।
3d-four-seasons
7.2kआपके एजेंट को 3D दृश्य में वसंत, गर्मी, शरद और सर्दी के रूप जोड़ने देती है, जिसमें हरियाली, रोशनी, आसमान और बर्फ़ बिना दृश्य दोबारा बनाए बदलते हैं।
3d-high-poly-models
7.2kआपके एजेंट को चिकने आकार और विश्वसनीय किनारों वाले विस्तृत 3D मॉडल बनाने देती है, और फिर वेब पर अच्छे चलने वाले हल्के संस्करण तैयार करती है।
मिलती-जुलती skills
angular-developer
280kआपके एजेंट को Angular code बनाने और प्रोजेक्ट स्ट्रक्चर पर सलाह देने में मदद करता है। नए प्रोजेक्ट शुरू करने, code के हिस्से बनाने, या performance और accessibility सुधारने में उपयोगी है।
frontend-a11y
280kआपके एजेंट को web interfaces को सबके लिए accessible बनाने में मदद करता है। यह सुनिश्चित करता है कि websites और apps screen readers और keyboard navigation के साथ अच्छे से काम करें।
frontend-patterns
280kआपके एजेंट को React और Next.js में frontend development के modern patterns लागू करने में मदद करता है। यह performance optimize करता है, state manage करता है और best practices फॉलो करवाता है।