prototype
MAmattpocock/skills337k近 7 天新增 4,978 个 star
Builds a three.js scene in which a small flat-shaded crystal cluster with a constant-width gold screen-space outline floats in a rising gold beam of light, drawn in one fragment shader as soft gaussian columns with flicker, rising bands and a glow pool, over a soft glow, bobbing and leaning toward the pointer. Use when someone asks for a loot beam, a rarity glow, a legendary item reveal, a game item showcase, an outline shader in three.js, or a glowing light pillar effect.
A gold-outlined crystal cluster floating in a flickering gold beam of light. See it live at https://design.how/vault/crystal-cluster.
In the middle of a dark warm room, a small cluster of teal crystals hangs in the air, one tall one and two smaller ones leaning off it, every facet flat-shaded so each catches the key light differently. A thin light-gold line traces the whole silhouette at the same width from every angle. Behind it a gold beam rises to the top of the card, five soft columns of light that sway, flicker and carry two bright bands drifting upward, with a pool of glow at the base. The cluster bobs a little, leans toward the pointer, and the beam brightens while the pointer is over the card.
The outline is a hull, not a post effect. Each crystal gets a child mesh with the same geometry, drawn back faces only and before the crystal, whose vertices are pushed out along their normals in clip space by a fixed number of pixels over the drawing-buffer size. Because the offset is in screen space, the line stays 4 pixels wide whatever the angle or distance, and only the part outside the silhouette shows.
The beam is one tall additive plane behind the cluster with all the work in its fragment shader. Its brightness is a sum of five gaussians across x with weights 0.3, 0.75, 1, 0.3 and 0.3, widening with height, inside an envelope that rises fast from the base and fades out above the middle. Value noise scrolling upward and a slow pulse make it flicker, and two sine bands looping up it read as energy rising. Depth testing lets the crystals hide the beam where they overlap it. A canvas radial gradient on an additive plane is the soft glow behind them.
assets/template/ into the project, for example to components/crystal-cluster/. It is React and TypeScript: engine.ts, card.tsx, plus runtime/, the small helpers they import.references/perf.md before changing the engine or mounting several visuals on one page.node scripts/check.mjs components/crystal-cluster on the copied folder, fix every line it prints, and rerun until it prints ok.| Name | Default | What it changes |
|---|---|---|
CRYSTAL_COLOR | #2fb6a8 | The crystals' colour. |
OUTLINE_COLOR, OUTLINE_PX | #ffef7a, 4 | The outline's colour and width in pixels. |
BEAM_CORE, BEAM_GOLD | #ffe63a, #ffd21e | The beam's core and edge colours. |
PULL | 0.4 | The most the cluster leans toward the pointer, in radians. |
BACKDROP | a dark warm radial gradient | The room behind the canvas. |
MAmattpocock/skills337k近 7 天新增 4,978 个 star
AFaffaan-m/ECC315k近 7 天新增 4,381 个 star
FIfirecrawl/firecrawl215k近 7 天新增 5,595 个 star
ANanthropics/skills203k近 7 天新增 3,265 个 star
用 React、Tailwind 和 shadcn/ui 构建多组件页面。
ANanthropics/skills203k近 7 天新增 3,265 个 star