-
Notifications
You must be signed in to change notification settings - Fork 57
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
Use delaunator v5; adopt type=module #120
Conversation
…te triangles created by points of the hull that are almost exactly aligned. The "circumcenter" of such a triangle is a point at the infinite, in the direction orthogonal to the hull. It must also be "away from the center". But we can't rely on the sign of *ab*, since it's itself a difference of two products and can be of the wrong sign, leading to a ray that sometimes goes in the opposite direction. To overcome this problem, we use the first point of the first triangle as a guide to tell us which way is "away from the center".
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.
The last image speaks for itself — amazing!
We should probably coordinate with @mbostock on the "type": "module"
change because it's technically a breaking change and a part of D3.
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.
We should remove the esm dependency if we are adopting type: module, and we should add an engines: {"node": ">=12"} restriction. I’m also inclined to switch to mocha for testing, since mocha’s test runner already supports ES modules. And I’d also upgrade our other major dependencies at the same time (eslint and rollup have new major versions).
In short, let’s decide on a consistent strategy for the D3 modules and adopt it universally. Related d3/d3-format#112
Edit: so, mostly what’s in #115, but with mocha instead of tape + tape-await + esm.
follow changes in d3-format: * type=module * add exports * remove zip * update dependencies
@mbostock this PR is ready; I don't think I have the rights to switch the default branch to |
I’ve renamed to main. |
Co-authored-by: Mike Bostock <mbostock@gmail.com>
Co-authored-by: Mike Bostock <mbostock@gmail.com>
closes #130
Co-authored-by: Mike Bostock <mbostock@gmail.com>
TODO:
This is a story in 4 images
https://next.observablehq.com/d/62b5c48194cba6b2
delaunator v5 ➘
delaunator v5 + ignore ab ➘
delaunator v5 + direction ➘
see 3d26401 for the detailed explanation.
Fixes #119.