jeffp123 / spray

An open-source speed-reading application written in Javascript
66 stars 18 forks source link

Why is max word length 22 characters? #3

Open GEMI opened 10 years ago

GEMI commented 10 years ago

Max word length is 22 chars, this seems slightly low because there are plenty of longer words.

If you get a longer word app crashes. Uncaught RangeError: Invalid array length

the-happy-hippo commented 10 years ago

On their blog Spritz claim average human is only capable of perceiving about 13 letters at a time. I guess they assume longer words should be split... alternatively one might try to prolong time duration for such instances.

igloro commented 10 years ago

Word should be splitted, but it crashes.

the-happy-hippo commented 10 years ago

I agree, the crash should be fixed.

igloro commented 10 years ago

My fix - http://pastebin.com/Xqy9CqXA, but it doesn't solves problem fully. The fix check if word Index exists in array and is not undefined. If does, it skips. This way code doesn't crashes at "long word".