refract-liquid-glass
БесплатноБез исполняемых скриптовНе проверенBuild sharp, draggable liquid-glass panels that bend a live backdrop through a rounded glass lip. Use for scene-aware refraction, responsive rim reflections…
от MengTo★ 8 824 звезды на GitHubОб этом скилле
Refract liquid glass
Start with a visual test target. Place the panel across a thin diagonal, a bright window frame, and a dark surface. The line should stay recognizable through the face, curve inside the shoulder, and meet the undisturbed scene outside the rim.
Render the lens
Render the backdrop once to a texture before drawing glass. A Three.js scene can share its linear-color render target with the glass pass. For a DOM-only surface, use an accessible backdrop treatment unless the application controls a texture that represents the backdrop. Align the texture to the actual viewport and scroll offset.
Measure the DOM rect in CSS pixels. Convert fragment coordinates once to the same space, including the vertical axis. Evaluate a rounded-box signed distance and use its screen derivative for coverage. Reserve the high-curvature profile for the shoulder. A flat face preserves the detail inside a large tile.
Build a unit entrance normal from the rounded-box gradient and a smoothly varying tilt. Trace toward a backing plane with a modest glass index. These expressions assume an eye-facing normal, an incident ray along negative Z, and a thickness expressed in CSS pixels.
vec3 ray = refract(vec3(0., 0., -1.), normal, 1. / 1.46); vec2 offsetPx = thicknessPx * ray.xy / max(-ray.z, 0.15); vec2 sampleUV = (fragmentPx + offsetPx) / viewportPx;Use the displaced UV for transmission. Sample the surroundings farther along the rim normal for reflected color and increase its contribution toward grazing angles. Let hover shift the reflection and the apparent thickness locally. Inspect a dark and a bright background before tuning the rim intensity.
Render typography and focus indicators at display density. Size the drawing buffer to the CSS rectangle times the chosen device scale. Use linear filtering, derivative-based edge coverage and a filtered source for minified samples. If the room is expensive, reduce the atmospheric pass first. Increasing the final framebuffer cannot restore detail lost in the input texture.
Drag and settle
Give a title or grip pointer capture. Translate the panel with the pointer, then drive a separate damped spring with movement impulses. Anchor shear near the grip so the far edge lags on reversal. Apply the same displayed transform to the glass, icons, text and hit coordinates. In a worker renderer, present the DOM transform when its matching rendered frame is acknowledged. Release capture on cancel. Offer a keyboard move or reset and suppress oscillation under reduced motion.
Open the live loupe. Drag it across the shoreline, reverse direction, and release. Check the text, rim, backdrop alignment and stationary end state at 1× and 2×.
Установить refract-liquid-glass в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл refract-liquid-glass?
Build sharp, draggable liquid-glass panels that bend a live backdrop through a rounded glass lip. Use for scene-aware refraction, responsive rim reflections, and elastic panel motion.
Как установить скилл refract-liquid-glass?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл refract-liquid-glass запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic