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 bursts.
Install / Use
npx skills add MengTo/Skills --skill build-interactive-particle-trailInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Tags
Our assessment of build-interactive-particle-trail
build-interactive-particle-trail scores 93/100 on our quality scale, 612th of 4,698 Development & Engineering skills we index (top 14%).
Its SKILL.md is 5.9 KB long, well organised into 8 sections with 3 code examples: a thorough specification that gives an agent plenty to work with.
With 6,252 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 2 months ago, so build-interactive-particle-trail is actively maintained.
- Our last check on 2026-10-26 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-10-02. Automated pattern scan on 2026-10-02. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
build-interactive-particle-trail compared with similar skills
All 4 of these similar skills score higher than build-interactive-particle-trail; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| build-interactive-particle-trail (this skill)by MengTo | 93 | 6.3k | 54d ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 116.8k | 8d ago | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 72.1k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 47.3k | 2d ago | CLAUDE.md |
| lobehubby lobehub | 100 | 85.6k | today | MCP Server |
Frequently asked questions
- How do I install build-interactive-particle-trail?
- Run
npx skills add MengTo/Skills --skill build-interactive-particle-trail. The install tabs above show the steps for each supported agent. - Which AI agents does build-interactive-particle-trail work with?
- It is written for Cursor, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is build-interactive-particle-trail safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is build-interactive-particle-trail still maintained?
- The repository was last updated about 2 months ago, so build-interactive-particle-trail is actively maintained.
Skill content
View source on GitHubname: build-interactive-particle-trail description: 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 bursts. Use for interactive particle trails, pollen lifted from a surface, dust disturbed by a pointer, hover particle bursts, and discrete motes whose spacing must stay consistent at different gesture speeds.
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:
const distance = current.distanceTo(previous);
const count = Math.min(14, Math.floor(distance / 7));
for (let i = 1; i <= count; i++) {
point.lerpVectors(previous, current, i / count);
spawn(point);
}
if (count) {
previous.copy(current);
idle = 0;
} else if ((idle += dt) > 0.055) {
spawn(current); // a resting hand trickles; it does not pump
idle = 0;
}
A timer emitter leaves dots behind a fast flick and piles them under a resting hand. Segment interpolation fixes both. Cap each frame at 14 emissions so a tab resume or teleport cannot exhaust the pool in one burst.
Use these landed defaults:
| parameter | default | failure prevented | | --- | ---: | --- | | path spacing | 7 px/world units | wider gaps read as samples, tighter gaps become a ribbon | | per-frame cap | 14 motes | teleports overwrite the whole pool | | idle interval | 55 ms | no idle emission feels dead; faster becomes a hotspot | | pool size | 620 | enough overlap for a 1.6 s trail without unbounded allocation | | lifetime | 1.6 s | shorter trails break; longer trails cloud the content | | random size | 0.50–1.15 | identical points read as a stippled brush | | DPR cap | 2 | fill cost spikes on dense displays |
Recycle a GPU pool
Allocate typed arrays once for origin, velocity, birth time, and random seed. Advance a ring head on spawn:
const index = head;
head = (head + 1) % POOL_SIZE;
origins.set([x, y, z], index * 3);
velocities.set([vx, vy, vz], index * 3);
birth[index] = elapsed;
random.set([size, phase], index * 2);
dirty = true;
Mark dynamic attributes for upload only after respawns. Animate flight in the vertex shader from age = uTime - aBirth; do not integrate 620 particles on the CPU:
float age = uTime - aBirth;
float u = age / uLife;
vec3 p = position + aVelocity * age * (1.0 - 0.34 * u)
+ vec3(sin(aRandom.y * 6.283 + age * 2.6) * 22.0 * u,
46.0 * age,
0.0);
vAlpha = smoothstep(0.0, 0.09, u)
* (1.0 - smoothstep(0.40, 1.0, u));
Cull dead points in the vertex shader by setting size to zero and moving them outside clip space. Render the pool as one THREE.Points draw call with a prebuilt soft radial texture, additive blending, and depthWrite: false.
Reuse the pool for bursts
Map a button or focused control to the same interaction plane and call spawn 40–60 times with a 2.5× spread. One pool keeps visual language, budget, and cleanup shared.
Expose a real Release pollen button with visible focus and an aria-live confirmation. Do not make pointer movement the only way to see or trigger the effect.
Respect motion and lifecycle
- Under
prefers-reduced-motion: reduce, do not advance particle age. Seed a designed curved trail and let the burst button replace it with a denser still composition. - Clamp
dtto 1/30 s and reset time after resume. - Pause on
document.hiddenand while the section is offscreen. - Size from
ResizeObserver, guard zero viewports, and cap DPR at 2. - Use Pointer Events so pen and touch can participate when the surface supports it; avoid hover-only instructions.
- On teardown, cancel the frame, disconnect observers, remove listeners, and dispose point geometry, material, sprite texture, and renderer.
State the cost honestly
The per-particle flight math is not the main cost; additive point overdraw and attribute uploads are. Keep sprites small, keep the pool fixed, upload only when the ring changes, and reduce lifetime before raising the pool. Measure GPU frame time and upload cost on a dense display before claiming the shader path is faster.
Verify
- Compare a slow crawl and fast flick over the same path; spacing remains approximately equal.
- Stop moving; confirm a trickle rather than a growing opaque clump.
- Leave and re-enter; confirm no diagonal bridge from the stale point.
- Trigger the keyboard burst and confirm it reuses the same pool.
- Test repeated bursts; pool length stays 620 and memory stays flat.
- Test 390×844, 1440×900, touch/pen, and fast resize.
- Test
?reduced=1: composed still, no aging, live burst button. - Hide/show and leave/re-enter the viewport; confirm no time jump.
- Tab through controls, confirm visible focus and live announcements.
- Confirm a clean console at both sizes.
Use demo/index.html as the working proof and demo/PROMPT.md to recreate or remix it.
Related Skills
taste-skill
116.8kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
ai-job-search
72.1kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
47.3kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
lobehub
85.6k🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
