Skip to main content
100%

My second animation

✓ Published1🌍 Public
RRussell Watson
Last edited Feb 6, 2020
Created on Feb 6, 2020

Words fly in from the center, enlarge, then snap into a grid ordered by their size while transitioning colors across a rainbow scale. The animation repeatedly adds random words from a duplicated dataset and occasionally removes one, demonstrating D3's `.enter()` and `.transition()` chaining with SVG `text` elements. The `refresh` function handles the branching method calls needed because transitions do not return the original selection, using the Cairo-inspired word cloud layout with columns and row offsets.

AI-generated description

TODO

Add removal of elements...

...which I THINK is

  • tricky
    • because the method chaining, together with transitioning (I THINK) means
      • we can't chain it all in one list
      • because transition does not return the original selection
      • we thus need to BRANCH in the method chaining
      • which is what the .call(…) is maybe for?
      • which is what the .join(enterFunc,updateFunc,exitFunc) avoids?
MIT Licensed

Similar vizzes