-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port xstream#tween to @cycle/time #13
Comments
I don't want to include This could look like: import {makeTimeDriver, mockTimeSource} from '@cycle/time';
import tween from '@cycle/time/extra/tween';
const drivers = {
Time: makeTimeDriver({extra: {tween}})
}
const mockTime = mockTimeSource({extra: {tween}}); This will also open the way up to custom operators from users. |
Also, I'm not sure tween() is the best way for doing animations. I used it in http://matrixmultiplication.xyz and in Firefox I still get some glitches, and I have no idea yet why how the glitch happens. |
Actually @Widdershin the glitches in matrixmultiplication might be due to the lack of rAF usage. I think tween doesn't need to be implemented in Cycle Time as long as we have something like In other words, the tween logic can be pure math living under a specific library which is agnostic to Cycle.js. And Cycle Time just needs to provide a burst of numbers between 0 and 1. The duration 1500ms can be measured by calling Date.now() (or some equivalent way of getting timestamps), this way we can decouple rAF framerate from animation duration. |
PS: Ben Lesh's recent talk on animations in RxJS using rAF might be relevant as an inspiration or reference. https://www.youtube.com/watch?v=X_RnO7KSR-4 You might know most of this so it's okay to watch it in 2x. |
Tween is the only time based operator in xstream that
@cycle/time
does not implement.The text was updated successfully, but these errors were encountered: