Skip to content

Conversation

@nickleefly
Copy link

@nickleefly nickleefly commented Jan 7, 2026

  • From "Multiple Lines" to "Path Filling"
    The Issue: The original code used a loop for (let yoffset=0; yoffset<=3; yoffset++) to draw three separate parallel lines. If your cursor height (sizeY) was large or the line width was small, visible gaps appeared between these lines, making it look like a "striped" trail rather than a solid block.
    The Fix: The new logic traces a single continuous path. It starts by drawing the top edge of the trail (from the cursor to the end of the tail) and then traces back along the bottom edge. By calling context.fill(), the entire area between those two lines is filled with color, creating a solid, manifold geometric shape.

  • Enhanced Smoothing with lineCap and lineJoin
    The Improvement: I added context.lineCap = "round" and context.lineJoin = "round".
    The Reason: Without these, the "joints" of the trail could appear jagged or sharp when you make sudden, fast movements or sharp turns with your mouse. Setting these to "round" ensures that every segment connection is smooth and pill-shaped, mimicking the fluid, liquid-like motion seen in Neovide.

  • Property Synchronization
    The Fix: I ensured that context.fillStyle is explicitly set to the same color as context.strokeStyle.
    The Reason: The fill() command relies on the fillStyle property. In the previous version, if only the stroke color was set, the block might have appeared invisible or used a default color (like black) when attempting to fill the path.

@nickleefly
Copy link
Author

2026-01-07.18-48-38.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant