---
name: pollen-pointer-trail
description: "Emit a sparse, distance-spaced trail of airborne pollen from the pointer over a woodland scene, with depth drift, short lives and bounded particles."
---

# Pollen Pointer Trail

Separate the ambient motes from the pointer response. The ambient field can drift through the entire grove. The pointer emits a brief local disturbance. Convert client coordinates to the canvas rectangle, then either use CSS-pixel coordinates or unproject onto a shallow plane in front of the foliage.

Sample distance along each pointer segment. Carry the unused spacing into the next event so slow and fast devices leave similar densities. Start around one grain per 12–18 CSS pixels. Cap spawns per frame. Reset the previous point on pointerleave, re-entry, resize or a long gap so crossing the page never draws a bridge. Spread new grains a small amount around the path, with a little upward lift and weaker lateral drift.

Use a fixed pool with position, velocity, birth time, lifetime and size. Batch the marks in one points draw or transparent 2D canvas. Start at low opacity and fade to zero in about 0.5–1.2 seconds. Avoid allocating per pointer event. Pause the loop when the pool is empty and keep the overlay pointer-transparent.

Check rapid zigzags, a stationary pointer and leaving across a button. Disable decorative emission under reduced motion and allow touch to scroll the page normally.

Open [the interactive study](demo/index.html) to inspect the technique.


<!-- Edition source: https://github.com/MengTo/Skills/blob/3ec2dc0857d36e45d032d10063f62f2c773329a3/agent-skills/web-design/pollen-pointer-trail/SKILL.md
Author: Meng To
MIT License

Copyright (c) 2026 Meng To

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->
