-
Notifications
You must be signed in to change notification settings - Fork 182
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
Voronoi initializer (for pointer interactions) #1623
Conversation
I couldn’t resist trying the Voronoi initializer idea… I dunno if we need to make similar changes to the Delaunay marks? I think maybe it doesn’t make sense there, though, because there’s a not a 1:1 correspondence between the data and the geometry. Screen.Recording.2023-05-23.at.7.01.59.PM.mov |
the voronoi cell now depends on i and fi (with a test showing facet: exclude) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems mostly fine… but there’s something that bothers me. I guess it’s that we need to create nested/faceted channels because we can’t assume that the facets are exclusive. #1648 And our workaround abuses how channels are intended to be represented (parallel to the data). And it’s especially funny that the Voronoi mark handles this but the stack transform doesn’t—the stack transform is far more frequently used!
I would rather fix the non-exclusive facet problem generally rather than apply the workaround in this PR. I think we probably need a redux of the approach in #1069. Ideally, it’s like a transform wrapper that says “this transform/initializer needs exclusive facets”, and it expands the faceted index and channels as needed to meet the constraint that the facets are exclusive, and the downstream code therefore doesn’t need any changing.
4996723
to
3792cc5
Compare
d4192ad
to
4a6ef93
Compare
|
|
|
I've updated the description of this PR. |
0d2d77d
to
f6c344a
Compare
2967384
to
95f9f1c
Compare
new description!
This PR chiefly addresses #1622, making the voronoi mark work with the tip option. A notable performance issue in the modified usStateCapitalsVoronoi test is that the clip path is created anew each time we rerender the mark (this is addressed separately, in #1624).
A secondary issue (#1858, making voronoi work with exclusive facets) was first addressed in an ad hoc fashion (in 71c49a2). After this review comment suggesting that this should be centralized, I reverted the change in 70f2352, then used the new exclusiveFacets transform (introduced in #1648) in 972558c et sq.
Closes #1622
Closes #1858.