shade-glass-button-press

Installation
SKILL.md

Shade a glass button press

Treat contact, activation and release as separate events. The native button owns activation and keyboard semantics. The shader receives a contact position and a clock for each control.

Hold

  • On pointer down, store the contact in local coordinates relative to the undeformed button. Capture the pointer. Start a quick spring toward the held pose. Indent the face near the contact with a Gaussian falloff and reduce the optical thickness there.
  • Keep the contact fixed for the release wave. A draggable slider inside a tile may update its own value while held. Resolve the drag threshold before interpreting the gesture as a tap.
  • Preserve a visible keyboard focus ring. For Space and Enter, use the button center as the contact and rely on one activation path. On cancel, blur or lost capture, release the visual state and discard the pending activation.

Release

Compute all distances in one physical space. Multiplying normalized UVs by button dimensions before measuring a radius gives a consistent wave on wide and square controls.

Installs
271
Repository
mengto/skills
GitHub Stars
8.5K
First Seen
6 days ago