fix: high-WPM chunk modes were clamped by 1500ms minimum-display floor (v1.1.2)

After v1.1.1 raised the WPM cap to 3000 for Sentence and Paragraph modes,
David noticed pushing the slider from 1500 to 3000 didn't actually speed
up reading. The chunks still sat on screen for the same amount of time.

Root cause: the v1.1.0 minimum-display floor was 1500ms per chunk. At
3000 WPM, any sentence under ~60 words mathematically wants to display
for under 1500ms — but the floor clamped them all to 1500ms, so the
calculated speed-up never reached the user.

Lowered floors:
- Sentence mode: 1500ms → 400ms
- Paragraph mode: 1500ms → 800ms

Max cap stays at 12s for very long paragraphs at very low WPM.

At 3000 WPM with the new floors, a 20-word sentence now displays for
500ms (was 1500ms, 3x faster) and the slider behaves the way users
expect — higher WPM = faster reading, all the way to 3000.

The reader does NOT iterate word-by-word inside a chunk; the whole
sentence/paragraph is rendered in one DOM update. Word count is used
only to estimate the auto-advance interval, not as a per-word loop.
This commit is contained in:
2026-05-27 02:43:36 +01:00
parent 669aabf5f2
commit a5819f0c72
2 changed files with 39 additions and 5 deletions
+15 -5
View File
@@ -250,7 +250,7 @@ textarea:focus {
</div>
<span class="meta" id="meta">Paste text below, drag a .txt file in, then press Play</span>
<span class="version">v1.1.1</span>
<span class="version">v1.1.2</span>
</div>
<div class="stage mode-word" id="stage">
@@ -448,12 +448,22 @@ textarea:focus {
const base = 60000 / wpm;
return base * pauseMult(chunk);
}
// Sentence / paragraph: time = words / WPM, with a comprehension multiplier
// Sentence / paragraph: in these modes the whole chunk is displayed
// in one DOM update — no per-word iteration. We only need to decide
// how long to leave the chunk visible before advancing.
//
// Time = (words in chunk) / WPM × 60 s × comprehension multiplier.
// At low WPM the formula dominates. At high WPM the floor kicks in.
// v1.1.2: lowered floors significantly — the previous 1.5 s sentence
// floor was clamping any value above ~1500 WPM, making 3000 WPM
// feel identical to 1500 WPM. Lower floors let high-WPM skim mode
// actually skim. The maximum cap stays at 12 s for very long
// paragraphs at very low WPM.
const wordCount = splitWords(chunk).length;
const baseMs = (wordCount / wpm) * 60000;
const multiplier = mode === 'sentence' ? 1.25 : 1.40; // brain needs more time on chunks
// Sensible bounds: 1.5s min, 12s max
return Math.max(1500, Math.min(12000, baseMs * multiplier));
const multiplier = mode === 'sentence' ? 1.25 : 1.40;
const floor = mode === 'sentence' ? 400 : 800;
return Math.max(floor, Math.min(12000, baseMs * multiplier));
}
function tick() {