~/talk

What Tamagotchis Can Teach You About ES6 Generators

Talkat EmpireJS 2018 · on Thursday, 2018-09-20· [javascript]
slides:none on file

A web Tamagotchi is built in canvas with sprite sheets and setTimeout-driven frames, then rewritten from promise chains to ES6 generators so animations can be paused, resumed and cancelled. The concrete claims: promises can't be cancelled, generators can via return and yield delegation, and a small co-routine handling async* glue awaits yielded promises. The demo shows an event queue, a generator game loop, and the final game working live — useful if the goal is practical generator control flow.

AI-written summary · about

  1. 0:00Start
  2. 1:22Draw on the Canvas
  3. 3:03Delay the Animations
  4. 4:41Bounce of Animations
  5. 10:45Pass Values into a Generator Index Function
  6. 11:46Create a Generator That Runs for Forever
  7. 19:29Idle Animations
  8. 20:28Dislike Animation
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.