Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. A comparison between rendering circles in SVG and canvas. The functions are purposely written separately but similarly to show some key differences. Notably, SVG's structure allows us to take advantage of D3's wonderful data binding capabilities, which makes diffing new data against present data expressive and easy. Canvas will perform better when animating many nodes (not shown here) and makes styling more succinct, but try zooming in a couple of steps (Cmd-plus in OSX, Ctrl-plus in Windows) to see the difference between rendering pixels and vectors.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement