webgl-laser
यह क्या करती है
यह स्किल AI को वेब पेज के पीछे एक पतली ऊर्ध्वाधर लेज़र किरण बनाना सिखाती है, जिसमें नरम चमक और धुआँ हो। यह उन डिज़ाइनरों के लिए है जिन्हें नाटकीय, सिनेमाई पृष्ठभूमि चाहिए जो फिर भी पढ़ने योग्य रहे।
कब इस्तेमाल करें
- ✓जब पेज को टेक्स्ट के पीछे नाटकीय रोशनी की किरण चाहिए।
- ✓जब चमक आपके ब्रांड रंग से मेल खानी चाहिए।
- ✓जब आपको पूरे पेज का लेआउट या असंबंधित पार्टिकल प्रभाव चाहिए, तब अलग तरीका चाहिए।
Skill का लिंक
https://github.com/MengTo/Skills/blob/main/agent-skills/web-design/webgl-laser/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे होमपेज के टेक्स्ट के पीछे मेरे ब्रांड रंग में पतली नीली लेज़र किरण और धुआँ जोड़िए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह पेज कंटेंट के पीछे फ़ुल-स्क्रीन कैनवास रखती है और किरण को चमकीले केंद्र, रंगीन प्रभामंडल और धुएँदार कोहरे के साथ बनाती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
WebGL Laser
Scope
- Apply only to the laser background effect.
- Use a fixed full-screen canvas behind the DOM.
- Set
pointer-events: noneon the canvas. - Keep page content in a higher stacking context.
- Match the halo and smoke to the page's primary or strongest accent color.
Visual Target
- Thin vertical beam: crisp white-hot inner core, narrow colored halo.
- Atmospheric smoke: soft cloudy breakup concentrated around the beam.
- Dark cinematic field: restrained, brand-colored, and readable behind content.
- Slow pulse: glow breathes gently; no aggressive flicker or color cycling.
- Light blade feel: narrow and precise, never a thick neon pillar.
Layering
<canvas class="laser-canvas" data-webgl-laser></canvas>
<main class="page-content">
...
</main>
.laser-canvas {
position: fixed;
inset: 0;
z-index: 0;
width: 100vw;
height: 100vh;
pointer-events: none;
}
.page-content {
position: relative;
z-index: 1;
}
Brand Color
Use the product accent as the source color. The shader keeps the core near white and derives the halo/smoke from this color.
function hexToRgb01(hex) {
const clean = hex.replace("#", "").trim();
const value = clean.length === 3
? clean.split("").map((char) => char + char).join("")
: clean;
return [
parseInt(value.slice(0, 2), 16) / 255,
parseInt(value.slice(2, 4), 16) / 255,
parseInt(value.slice(4, 6), 16) / 255,
];
}
const accent = getComputedStyle(document.documentElement)
.getPropertyValue("--brand-accent")
.trim() || "#ff4d8d";
Raw WebGL Setup
Prefer raw WebGL with a full-screen quad unless the active file already uses another renderer.
const laserVertexShader = `
attribute vec2 a_position;
varying vec2 v_uv;
void main() {
v_uv = a_position * 0.5 + 0.5;
gl_Position = vec4(a_position, 0.0, 1.0);
}
`;
const laserFragmentShader = `
precision highp float;
uniform vec2 u_resolution;
uniform float u_time;
uniform vec3 u_color;
uniform float u_xOffset;
uniform float u_coreWidth;
uniform float u_glowWidth;
uniform float u_smokeDensity;
varying vec2 v_uv;
float hash(vec2 p) {
p = fract(p * vec2(123.34, 456.21));
p += dot(p, p + 45.32);
return fract(p.x * p.y);
}
float noise(vec2 p) {
vec2 i = floor(p);
vec2 f = fract(p);
vec2 u = f * f * (3.0 - 2.0 * f);
float a = hash(i);
float b = hash(i + vec2(1.0, 0.0));
float c = hash(i + vec2(0.0, 1.0));
float d = hash(i + vec2(1.0, 1.0));
return mix(mix(a, b, u.x), mix(c, d, u.x), u.y);
}
float fbm(vec2 p) {
float value = 0.0;
float amplitude = 0.5;
for (int i = 0; i < 5; i++) {
value += amplitude * noise(p);
p *= 2.02;
amplitude *= 0.5;
}
return value;
}
void main() {
vec2 aspect = vec2(u_resolution.x / u_resolution.y, 1.0);
vec2 p = (v_uv - 0.5) * aspect;
float x = p.x - u_xOffset;
float distanceToBeam = abs(x);
float core = exp(-pow(distanceToBeam / u_coreWidth, 2.0));
float glow = exp(-pow(distanceToBeam / u_glowWidth, 1.45));
float scatter = exp(-pow(distanceToBeam / (u_glowWidth * 5.5), 1.25));
float pulse = 0.9 + 0.1 * sin(u_time * 1.15);
vec2 fogUv = p * 3.1 + vec2(0.0, -u_time * 0.035);
fogUv.x += sin(p.y * 3.5 + u_time * 0.11) * 0.14;
float fogBase = fbm(fogUv);
float fogFine = fbm(p * 8.0 + vec2(sin(u_time * 0.07) * 0.35, u_time * 0.05));
float fog = smoothstep(0.30, 0.86, fogBase * 0.72 + fogFine * 0.28);
float smoke = fog * scatter * u_smokeDensity;
vec3 brand = clamp(u_color, 0.0, 1.0);
vec3 haloColor = mix(brand, vec3(1.0), 0.16);
vec3 smokeColor = mix(brand, vec3(0.55), 0.28) * 0.55;
vec3 hotCore = vec3(1.0, 0.96, 0.90);
vec3 color = vec3(0.006, 0.007, 0.010);
color += smokeColor * smoke;
color += haloColor * glow * 0.46 * pulse;
color += hotCore * core * 1.35;
float vignette = smoothstep(1.25, 0.18, length(p));
color *= vignette;
float alpha = clamp(smoke * 0.72 + glow * 0.68 + core, 0.0, 1.0);
gl_FragColor = vec4(color, alpha);
}
`;
Initializer
Keep u_resolution synced on resize and animate through u_time.
function createShader(gl, type, source) {
const shader = gl.createShader(type);
gl.shaderSource(shader, source);
gl.compileShader(shader);
if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
throw new Error(gl.getShaderInfoLog(shader) || "Shader compile failed");
}
return shader;
}
function createProgram(gl, vertexSource, fragmentSource) {
const program = gl.createProg
अक्सर पूछे जाने वाले सवाल
क्या यह प्रभाव मेरे बटनों पर क्लिक रोकेगा?
नहीं। स्किल प्रभाव की परत ऐसे सेट करती है कि माउस क्लिक पेज तक पहुँच जाएँ।
क्या मैं अपना ब्रांड रंग इस्तेमाल कर सकता हूँ?
हाँ। चमक और धुआँ आपके चुने हुए एक्सेंट रंग पर आधारित होते हैं।
क्या रोशनी टिमटिमाती है?
नहीं। स्किल तेज़ चमक की बजाय धीमी, नरम पल्स माँगती है।
जानकारी
लेखक का मूल विवरण
Create a fixed full-screen WebGL laser background effect with a thin white-hot vertical core, restrained brand-colored halo, and soft smoky fog around the beam. Use only for laser background effects, not full page layout, copy, generic hero scenes, particles, or unrelated motion systems.
repo: MengTo/Skills
लोकप्रियता
- GitHub स्टार
- 7.2k
- रैंकिंग में स्थान
- #13483
- लाइसेंस
- 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 फॉलो करवाता है।