No.503 · Type & Names
Constellation Name
A name drawn as stars: its letter pixels are sampled into a field of twinkling points joined by hairlines, and the pointer pulls them like gravity.
The prompt
Written for the variant you picked above: Ice
Draw the name in offscreen 2D canvas (italic Instrument Serif, fitted to 86% of the width), read back its alpha, and sample a grid of opaque pixels; shuffle and keep ~260 points as stars, each with a home position, a random start offset, a phase and a radius. Each frame every star is spring-pulled home (k=0.03, damping 0.86) and attracted to the pointer within 120px; draw hairline links between stars closer than w/16 with alpha falling off with distance, then draw stars twinkling on sin(t/700+phase). Cap DPR at 2, rebuild on resize, pause when offscreen. Reduced motion draws the settled constellation once. Selected variant — Ice (ice): color="#cfe0ff" (ice-blue stars and links) on #05070d; text "Hamza". This selection takes precedence over references to other themes or options in the general brief. Implement this selected appearance; do not add a variant picker or alternative appearances unless requested. Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. Interaction: Move the pointer or drag a finger across the name: nearby stars are pulled toward it, then spring back. Motion: rAF loop with spring physics and per-star twinkle; paused offscreen. Accessibility: The canvas region has role=img with the name as its label; reduced motion renders one static frame. Responsive behavior: Rebuilds on container resize; star density adapts to the area. Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.
Notes
- Interaction
- Move the pointer or drag a finger across the name: nearby stars are pulled toward it, then spring back.
- Motion
- rAF loop with spring physics and per-star twinkle; paused offscreen.
- Accessibility
- The canvas region has role=img with the name as its label; reduced motion renders one static frame.
- Responsive
- Rebuilds on container resize; star density adapts to the area.