Fix closed curves having extra loops #7495
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #7494
Changes:
Tries a different library for snapshot tests since old closed curve tests weren't failing, but they should have beenEdit: never mind, it's complicated. I made a new issue for this: [p5.js 2.0 Beta Bug Report]: Update image diff algorithm in snapshot tests to be less tolerant #7496Screenshots of the change:
Before:
![image](https://private-user-images.githubusercontent.com/5315059/406569729-5709837e-2da6-4b97-9abe-d1bafe6e7a40.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NjgwMjMsIm5iZiI6MTczODk2NzcyMywicGF0aCI6Ii81MzE1MDU5LzQwNjU2OTcyOS01NzA5ODM3ZS0yZGE2LTRiOTctOWFiZS1kMWJhZmU2ZTdhNDAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMjIzNTIzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZjA1MWM1ZjU4MzcwM2UzNDBjZjZiOWMyMTI4YjRiNThiNGI2MDQwMzRkNzZhYTBhOWU2NDhlZjEzNWNlZjM0MyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.-qbiggJfuM4vQfBlab4VawMaje5LNYOGW6_i5FVnVHo)
After:
![image](https://private-user-images.githubusercontent.com/5315059/406569751-53aa5508-5cc0-44c1-8ff4-99da87e3b098.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NjgwMjMsIm5iZiI6MTczODk2NzcyMywicGF0aCI6Ii81MzE1MDU5LzQwNjU2OTc1MS01M2FhNTUwOC01Y2MwLTQ0YzEtOGZmNC05OWRhODdlM2IwOTgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMjIzNTIzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MjYwYTc0ZjAyNDBhNGZiZmJmOTA1ODk4OTYyMzg3ZjNlMjUxYTlmOWE4NjQwZjkwNGY2MzdhMzg5OWEwZWFmNSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.EogoErZyIw_xI8JFNW4Dj8ia8IzRvmgjph7MVBNoIu4)
PR Checklist
npm run lint
passes