GP
requestAnimationFrame триггеритьSize: a a a
GP
requestAnimationFrame триггеритьGP
void $ T.setInterval 16 do заюзалAK
AK
foldp, а fold, перепуталAK
requestAnimationFrame триггеритьAK
GP
AK
GP
GP
GP
GP
AK
canvas <- getElementById ...
let frames = Event.withTime rafEvent
let states = Event.fold nextStep ( initialState, 0 ) frames
_ <- Event.subscribe (draw canvas) states
where
nextStep :: { r | time :: Instant } -> Step /\ Instant -> Step /\ Instant
nextStep { time } ( prevStep /\ prevTime ) =
if (prevTime - time > 1000) then
let advancedStep = -- advance here
in advancedStep /\ time
else
prevStep /\ time
draw canvas (Step /\ Instant) =
...
GP
AK
* Build successful.
* Bundling JavaScript...
* Failed to rebuild; try to fix the compile errors
AK
VY
--verbose нет?AK
"use strict";
exports.myFunc = function() {};