3 ms·
Cool! What's the deal with the alternator function (in app.js)? Why should keypresses be read only on every other attempt? Also, is there some kind of implici
by ptx 6y ago
Cool!
What's the deal with the alternator function (in app.js)? Why should keypresses be read only on every other attempt?
Also, is there some kind of implicit sleep or requestAnimationFrame somewhere? Or is it busy-looping and polling for key presses as fast as it can?
- moxon6 6y agoThe emscripten JS will keep "prompt"ing for new input until it receives a null (due to the user pressing escape on the dialog) This is just a hack around that to simulate entering a value and then pressing escape on the next prompt request