Skip to content

build-interactive-particle-trail

Build a cursor or touch particle interaction that emits by distance along the traveled segment into a recycled GPU point pool, with optional keyboard-triggered

— (0 ratings) 2K downloads mengto
$ npx skills add https://github.com/mengto/skills --skill build-interactive-particle-trail

Skills can run code on your computer. Review the source before installing. This listing is community-made and isn't affiliated with Anthropic.

About this skill

Build an Interactive Particle Trail

Emit discrete motes per unit of pointer travel, spread them across the entire segment, and recycle a fixed GPU pool. Reach for ambient-section-particles when particles are primarily autonomous atmosphere; reach for add-shader-cursor-trail when the output should be a continuous fluid or shader ribbon. Use this Skill when individual grains must react to the gesture.

Extracted from inner-green-3d.html, where a pointer had to lift pollen off a procedural moss root without a fast sweep leaving gaps or a resting cursor pumping a bright clump.

Resolve the interaction plane

Convert the pointer into normalized device coordinates, raycast from the camera, and intersect one stable plane near the visual surface. Reuse that hit for all interaction systems.

Reset the previous hit when the pointer leaves or the ray misses. Otherwise re-entry draws a long diagonal from the stale exit point.

For a curved visible surface, either intersect the real collider or place the response plane just in front of it. Do not raycast every decorative blade or particle.

Emit by distance

Spacing, not time, is the mechanism:


Installs: 2.0K | GitHub stars: 8.5K | First seen: Aug 18, 2026

Related skills

New

Video

style-sampling

Make a new episode in a proven video style - Collage Explainer, Finance Explainer, Animated Science Explainer, 3D Brand Explainer, 3D True Crime - on the

New • 267.1K
New

Coding & dev tools

higgsfield-websites

Build, edit, and deploy full-stack websites, apps and games via the Higgsfield CLI (`higgsfield website …`). Each is a React 19 + TanStack Start SSR app in one

New • 187.8K
New

Motion graphics & animation

three

Deterministic Three.js scene rendering synchronized to HyperFrames timeline events.

New • 69.3K