-
Notifications
You must be signed in to change notification settings - Fork 166
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
nCoV animation should be smooth #918
Comments
I'd love this fixed. Take a look at how smooth this is: https://nextstrain.org/zika?animate=2005-12-15,2019-07-06,1,0,30000&p=grid and compare to this https://nextstrain.org/ncov?animate=2019-12-12,2020-03-06,0,0,30000&p=grid. |
I'm not able to test with ncov dataset to see the behavior. I looked at this animation code. I think the choppy behavior is caused by remove/add of the temporal windows. When the code removes/adds svg rect, we see the choppy animation. I suggest instead of using remove/add, you use d3.transition. That can help smooth out the animation. I can play around with it when I have some time. |
+1 to @dnprock 's observation that modifying the The issue seemed to me that the jumps between adjacent "rectangle" positions are fundamentally much larger when the auspice/src/actions/recomputeReduxState.js Lines 88 to 95 in eaa847f
After figuring this out, I took a pass at the d3.transition based approach. It's working with a local copy of the ncov dataset using the following commands, but I'm not sure how to test a "right hand tree", so some tweaks may be needed to support that usecase. Here's a video clip (and the steps to reproduce this setup locally once you've cloned my branch): https://a.cl.ly/jkuKeJn7 mkdir data
curl http://data.nextstrain.org/ncov.json --compressed -o data/ncov.json
node auspice view --datasetDir data |
This is due to us hardcoding some minimum amount of time to be shifted each tick. The tree is small enough that it should be animating super smoothly.
The text was updated successfully, but these errors were encountered: