-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Before I begin, I should note that the code quality of this module is high
and I really like the attention to detail that is apparent in the test coverage.
So I should say I am talking about bug .. which has slipped through high quality testing.
I found this as I am porting this module to rust.. my port has alsmost the same coverage as the original but a whole set of new bugs
So I am developing new test patterns to identify problems with my rust - and I have found a pattern which breaks the javascript version.
I have provded two branches which hightlight the problem.
The branches modify the benchmarks
The problem can be exposed from the branches by opening in a browser the file ./benchmark/sphereCanvas.html
[from the project root directory]
[The benchmarks normal function is rendering a rotating sphere with a number of random point under the control of the user ... ]
Senario A
A have created a new branch showing the bug.
https://github.com/martinfrances107/d3-geo-voronoi/tree/broken_4_segment_beech_ball
A rotating sphere with 4 sites to display a 4 - segment beach ball. With sites at
[ [-20, -20], [20, -20], [20, 20], [-20,20]] ( degrees )
as can be seen in this branch .. the rotation is all flickerey it appears, at times, that not all of the of the 4 items are returned by the call to poloygon().
Senario B
https://github.com/martinfrances107/d3-geo-voronoi/tree/offset_4_segment_beach_ball
The position of the sites is offset just slightly .. the flicker is disappears and the slightly wonky beach ball is rendered consitently.
[ [-15, -20], [20, -20], [20, 20], [-20,20]] ( degrees )