Commit 6cc42c7
Cell: lock flare motion to alpha (drop integration lag)
Previously the path-lit contribution went into dd (angular accel),
so the cell's velocity had to integrate up over multiple frames —
visually the flare appeared bright a beat before the orbital point
caught up and started moving. Now the lit contribution is added
directly into the theta integration step:
c.theta += (c.thetaDot + Math.sign(c.omegaBase) * curLit * PATH_LIT_VEL) * stepDt;
Effective rotation rate is exactly thetaDot + curLit·PATH_LIT_VEL,
so the visible motion locks in step with alpha (and inherits the
same smoothstep rise / sustain-then-snap fall as the alpha envelope).
The contribution doesn't accumulate on c.thetaDot, so when the flare
passes the cell snaps back to its natural pendulum motion without
needing a separate relaxation phase.
PATH_LIT_KICK (2.0 rad/s² accel) → PATH_LIT_VEL (1.0 rad/s velocity).
Lower numerical value, gentler effect — was visibly too fast before.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 08916d0 commit 6cc42c7
1 file changed
Lines changed: 10 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| |||
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
559 | 551 | | |
560 | | - | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
561 | 561 | | |
562 | 562 | | |
563 | 563 | | |
| |||
0 commit comments