Hi all,
Over the past few days, I've added a few new test pages to the Underreact project. The newer ones use <canvas> and glorious Pong-style graphics. Today I wrote an animated state primitive and hooked it up to the position of a dot on the canvas. It's nice to finally get some visual feedback for these concepts. :)
Right now, the animated dot's state transitions are as follows:
If the state is 0, change the state to 1 and rest for 300ms.
If the state is 1, change the state to 2 and rest for 300ms.
If the state is 2, change the state to 0 and rest for 300ms.
All rules must be of the form "If the state is ___, change the state to ___ and rest for ___ms," represented as a JavaScript Array containing three numbers.
This isn't quite the same as
what David described, because these rules put the system into a debt that must be recovered, rather than consuming an ever-growing resource. I don't consider this a positive innovation, necessarily. I was just implementing this from memory, and I was ready to settle for anything that worked well enough to animate a dot. :-p
-Ross
(P.S.: I'm still working on a reply to the "Staging for PL/UI Synthesis" thread, but it might take a while. My own opinions are in flux right now, and my attention's drifted over to things like this.)