LearnNewsExamplesServices
Frontmatter
id8789
titleFix TicketCanvas Animation Glitches and Performance
stateClosed
labels
bugenhancementai
assigneestobiu
createdAtJan 19, 2026, 12:54 AM
updatedAtJan 19, 2026, 12:56 AM
githubUrlhttps://github.com/neomjs/neo/issues/8789
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 19, 2026, 12:56 AM

Fix TicketCanvas Animation Glitches and Performance

Closed v11.23.0 bugenhancementai
tobiu
tobiu commented on Jan 19, 2026, 12:54 AM

This ticket addresses multiple issues identified in the TicketCanvas.mjs rendering logic:

  1. Duplicate Render Loops: Fixed a bug where navigating between tickets would spawn parallel render loops, causing performance degradation and erratic animation behavior. The fix involves correctly tracking and nullifying animationId.
  2. Visual Glitch on First Item: Resolved a "vanishing" glitch on the first timeline item caused by negative head velocity ("retraction") during extreme deceleration.
    • Solution: Implemented "Dual-Point Physics", simulating the pulse Head and Tail as independent particles. This creates organic, physically correct "Squash and Stretch" behavior without artifacts.
  3. Enveloping Geometry: Improved the visual quality of the enveloping arcs by replacing linear interpolation with trigonometric (Math.asin) calculations, ensuring perfect alignment with the pulse line.
  4. Documentation: Enhanced JSDoc comments to be intent-driven, explaining the new physics model and reset logic.
tobiu added the bug label on Jan 19, 2026, 12:54 AM
tobiu added the enhancement label on Jan 19, 2026, 12:54 AM
tobiu added the ai label on Jan 19, 2026, 12:54 AM
tobiu referenced in commit b2b72d0 - "fix(TicketCanvas): Implement Dual-Point Physics and fix render loop (#8789)" on Jan 19, 2026, 12:55 AM
tobiu assigned to @tobiu on Jan 19, 2026, 12:56 AM
tobiu
tobiu Jan 19, 2026, 12:56 AM

Input from Gemini 3 Pro:

✦ I have successfully implemented Dual-Point Physics in TicketCanvas.mjs, resolving the render loop issues and visual glitches.

Changes:

  1. Dual-Point Physics: The Pulse Head (pulseBottom) and Tail (pulseY) are now simulated as independent particles. This naturally creates organic "Squash and Stretch" behavior based on the local speed field, eliminating the "retraction" (vanishing) glitch on the first item and the "stalling" artifacts of previous clamp attempts.
  2. Geometry Polish: Replaced linear interpolation with Math.asin for the enveloping arcs, ensuring they align perfectly with the pulse body for a seamless visual connection.
  3. Render Loop Fix: Corrected animationId tracking to preventing duplicate render loops from spawning during navigation.
  4. Documentation: Updated JSDoc to reflect the new architecture and physics model.

The animation is now stable, performant, and visually polished at 60fps.

tobiu closed this issue on Jan 19, 2026, 12:56 AM