Closed Gozala closed 8 years ago
@tschneidereit r?
Looks good with feedback addressed. I'm not too happy with a new requestAnimationFrame
function that works differently from the builtin version, but I'm also not sure what would be a better name. Perhaps something like queueAnimationFrameCallback
and removeAnimationFrameCallback
or something along those lines.
Looks good with feedback addressed. I'm not too happy with a new requestAnimationFrame function that works differently from the builtin version, but I'm also not sure what would be a better name. Perhaps something like queueAnimationFrameCallback and removeAnimationFrameCallback or something along those lines.
@tschneidereit Is that in reference to exports of preemptive-animation-frame
module ?
@tschneidereit Is that in reference to exports of preemptive-animation-frame module ?
It is, yes.
@tschneidereit Is that in reference to exports of preemptive-animation-frame module ?
It is, yes.
I'm afraid I can't think of better name maybe requestPreemptiveAnimationFrame
/ cancelPreemptiveAnimationFrame
? But then module name kind of already implies that no ? Only difference between native and this implementation is that this one is preemptive, meaning it ensures you don't miss a frame regardless when you requested it.
Given that it's just an internal module (that I actually want to factor out into separate package) I'll leave it as is for 0.4 as I would not like to block a release for this. My interpretation of your comment on this was that it was "nice to have" vs "must have".
Given that it's just an internal module (that I actually want to factor out into separate package) I'll leave it as is for 0.4 as I would not like to block a release for this. My interpretation of your comment on this was that it was "nice to have" vs "must have".
That makes sense.
Overview of the changes
requestAnimationFrame
scheduler fromEffects
library and expose it via tasks instead. Having it part ofEffects
did not really made much sense.Effects.task(task)
toEffects.perform(task)
as former was pretty confusing.requestAnimationFrame
task that are used a lot during animations.Task.prototype.recover
API so that task failures can more efficiently & intuitively be translated to error actions.