MCPcopy Index your code
hub / github.com/simstudioai/sim / step

Function step

apps/sim/hooks/use-smooth-text.ts:20–25  ·  view source on GitHub ↗

* Characters to advance per tick as a function of how far the reveal is behind. * Small backlogs trickle (2–8 chars); large backlogs accelerate but stay capped * so a burst is spread over several ticks rather than dumped at once.

(remaining: number)

Source from the content-addressed store, hash-verified

18 * so a burst is spread over several ticks rather than dumped at once.
19 */
20function step(remaining: number): number {
21 if (remaining <= 12) return 2
22 if (remaining <= 48) return 4
23 if (remaining <= 96) return 8
24 return Math.min(24, Math.ceil(remaining / 8))
25}
26
27/**
28 * Advance from `start` by `step(...)`, then extend up to 8 more characters to

Callers 1

nextIndexFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected