Skip to content
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

Animating WebGL Series #1768

Open
e-katzenstein opened this issue Oct 28, 2022 · 1 comment
Open

Animating WebGL Series #1768

e-katzenstein opened this issue Oct 28, 2022 · 1 comment

Comments

@e-katzenstein
Copy link

Not clear if this is a question or a bug: how does one animate a D3FC WebGL shader when underlying data is updated? The typical D3 transitions will update the data, but it will not transition those updates for WebGL series.

More specifics: how does one update a point location in the decorator for the series, and animate that update? The fill color can be updated like so (copied from the epic "Rendering One Million Datapoints with D3 and WebGL"):

const fillColor = fc
  .webglFillColor()
  .value(d => webglColor(yearColorScale(d.year)))
  .data(data);

pointSeries.decorate(program => fillColor(program));

It is not clear to me how to update the point location this way, and if this can be transitioned on screen.

@e-katzenstein
Copy link
Author

For more clarity, this library offers a "transition" argument for webgl points: https://github.com/flekschas/regl-scatterplot#scatterplot.draw

I'm curious if this available in d3fc. And if it is, it may be broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants