project-scan-ui
| description | Animate a laser-like optical scan from a Three.js subject into a glass UI, with a shared reveal edge, directional motion blur, timed words and rules, and a usable held state. |
|---|---|
| import_scope | signals-cleared-supporting-files |
| license | MIT |
| license_url | https://github.com/MengTo/Skills/blob/2f8cb46167bec49ee3c4a6ca37972fc065b6b47e/LICENSE |
| name | project-scan-ui |
| publisher | MengTo |
| repository_url | https://github.com/MengTo/Skills |
| source_url | https://github.com/MengTo/Skills/blob/2f8cb46167bec49ee3c4a6ca37972fc065b6b47e/agent-skills/web-design/project-scan-ui/SKILL.md |
| upstream_copyright | Copyright (c) 2026 Meng To |
| upstream_revision | 2f8cb46167bec49ee3c4a6ca37972fc065b6b47e |
Project Scan UI

Use one clock for the subject's gaze, the light, the panel mask and its lettering. A second CSS timer can leave a bright line floating beyond a finished panel.
Choreograph the reveal
- Start with scan.mjs. Call scanCycle once and tick with elapsed seconds, blocked, reducedMotion and held. A null pose means hidden. Block during competing interactions. For a menu click use pickerPose with elapsed time from that click. Hold the open state on hover, focus or captured drag. Release on cancel as well as pointerup.
- Project the moving emitter after updating world matrices. Convert NDC to bottom-left CSS pixels. Reject offscreen or behind-camera positions. Measure the real target every time layout changes. scanBounds expects a bottom-left button origin and full size. Its output is panel center and full size.
- Start the glance first. In the longer cycle the light brightens at 0.54 s, width opens around 0.92 s and reveal travels from 1.26 to 2.54 s. Let the light reach zero on the exact frame reveal reaches one. Keep the top edge fixed. For downward growth the beam ends at
top - height * reveal. Derive the visible rectangle, edge and endpoints from that same scalar. - Use projection.glsl for the scan pass. Bind scanEyes as two projected XY points, scanShape as beam, width, reveal and alpha, scanBox as center and full size, and scanDetail as the lettering progress. Supply transparent scanInk and scanModel textures for the two layers. Call
projectStudy(pixelXY, rgb)in CSS pixels. Leave pickerRect zero for the automatic study. For a picker use center and half size, with pickerReveal following pose.reveal. The model texture stores line intensity in red, motion encoded around 128/255 in green and blue, and coverage in alpha. Use transparent black for empty pixels. - Compute scanExposure from consecutive normalized width and height deltas. Reset it after a cut, pause or hidden frame. Its 38 ms shutter is capped at 9.6% of the span. Sample along the signed travel only. Keep the emitter and settled labels sharp.
- Reveal words at 70–105 ms intervals on measured baselines. Grow a rule beneath the first phrase, then draw tick marks from the middle outward. Keep actual controls accessible. For reduced motion open a settled panel on request without sweeping.
Check
Step across the final two frames at 30, 60 and 120 fps. Beam intensity and static blur must both settle at zero. Resize during a sweep, hold the panel during its exit, drag outside and release, then cancel into a menu. Only one panel should own pointer input.
Copyright (c) 2026 Meng To
The license files are attached. MIT
The attached ZIP contains the pinned supporting files cleared for import. Applicable license notices are attached or included when cleared.
Like how this is organised?
Build your own Memory tree on knowen.md: notes, decisions and tasks in one connected markdown graph, shared with your team and your AI agents.