webgl-laser
하는 일
이 스킬은 웹 페이지 뒤에 놓이는 가늘고 세로로 긴 레이저 빔을 부드러운 빛과 연기와 함께 만드는 방법을 AI에게 가르칩니다. 글이 잘 읽히면서도 극적인 배경을 원하는 디자이너를 위한 것입니다.
사용하는 경우
- ✓텍스트 뒤에 극적인 빛줄기 배경이 필요한 페이지일 때.
- ✓빛의 색을 브랜드 색과 맞추고 싶을 때.
- ✓전체 페이지 레이아웃이나 관련 없는 입자 효과가 필요한 경우.
스킬 링크
https://github.com/MengTo/Skills/blob/main/agent-skills/web-design/webgl-laser/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“홈페이지 텍스트 뒤에 얇은 파란 레이저 빔과 연기를 추가해 주세요. 제 브랜드 색을 써 주시고요.”
매주 새 스킬 5개. 읽는 데 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
- 업데이트
- 2026. 11. 1.
댓글
- …
이 저장소의 다른 스킬
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 모델을 만들고, 웹에서 잘 돌아가는 가벼운 버전을 준비하도록 돕습니다.
비슷한 스킬
angular-developer
280k에이전트가 Angular 코드를 만들고 프로젝트 구조를 조언하도록 돕습니다. 새 프로젝트 시작, 코드 부분 생성, 성능과 접근성 개선에 유용합니다.
frontend-a11y
280k모든 사람이 웹 인터페이스를 쓸 수 있도록 에이전트를 돕습니다. 웹사이트와 앱이 화면 읽기 프로그램과 키보드 탐색에서 잘 작동하도록 합니다.
frontend-patterns
280k프론트엔드 개발의 현대적인 패턴을 적용하도록 에이전트를 돕습니다. React와 Next.js에서 성능을 최적화하고, 상태를 관리하며, 모범 사례를 따릅니다.