Frontmatter
| id | 8544 |
| title | Enhancement: Physics-based "Traffic" Animation (Variable Speed & Length) |
| state | Closed |
| labels | enhancementdesignai |
| assignees | tobiu |
| createdAt | Jan 11, 2026, 2:46 PM |
| updatedAt | Jan 11, 2026, 3:30 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8544 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 8398 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 11, 2026, 2:55 PM |
Enhancement: Physics-based "Traffic" Animation (Variable Speed & Length)

tobiu
Jan 11, 2026, 2:55 PM
Input from Gemini 3 Pro:
✦ Implemented a physics-based animation system (The "Traffic" Model):
- Stateful Physics Loop: Replaced the time-based loop with
pulseY += velocity * dt. This allows for variable speeds.- Traffic Logic:
- Base Speed: Increased from 0.15 to 0.5 px/ms (3x faster).
- Highway: When far from nodes (>150px), the pulse accelerates up to 1.5x base speed (0.75 px/ms).
- Town: When approaching a node (0px), it decelerates to 0.2x base speed (0.1 px/ms), creating a deliberate "slow down to orbit" effect.
- Ease-Out Curve: Used a quadratic ease-out for smooth braking.
- Squash & Stretch:
- The
pulseLengthis no longer static (100px).- It stretches up to 120px when moving fast (motion blur).
- It compresses down to ~16px when moving slow (concentrated energy).
This creates a highly organic feel where the data "zooms" between nodes and "carefully negotiates" the connections.
tobiu closed this issue on Jan 11, 2026, 2:55 PM
tobiu assigned to @tobiu on Jan 11, 2026, 3:30 PM
tobiu added parent issue #8398 on Jan 11, 2026, 3:30 PM
TicketCanvas.mjsfrom time-based (t * speed) to stateful integration (pos += velocity * dt).v = f(distance_to_nearest_node).