chanind / hanzi-writer

Chinese character stroke order animations and practice quizzes
https://hanziwriter.org
MIT License
3.57k stars 557 forks source link

Add averageDistanceThreshold Option for Stroke Matching Leniency #307

Closed wststone closed 1 year ago

wststone commented 1 year ago

This pull request introduces an averageDistanceThreshold option to the strokeMatches function, allowing users to configure the leniency of stroke matching based on distance. This change provides more flexibility for users who want to adjust the leniency of stroke matching, especially in scenarios where the direction of the stroke is more important than its exact position.

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (319ea83) 96.40% compared to head (b9799b7) 96.41%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #307 +/- ## ======================================= Coverage 96.40% 96.41% ======================================= Files 32 32 Lines 1141 1144 +3 Branches 209 212 +3 ======================================= + Hits 1100 1103 +3 Misses 37 37 Partials 4 4 ``` | [Files Changed](https://app.codecov.io/gh/chanind/hanzi-writer/pull/307?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Chanin) | Coverage Δ | | |---|---|---| | [src/defaultOptions.ts](https://app.codecov.io/gh/chanind/hanzi-writer/pull/307?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Chanin#diff-c3JjL2RlZmF1bHRPcHRpb25zLnRz) | `100.00% <ø> (ø)` | | | [src/Quiz.ts](https://app.codecov.io/gh/chanind/hanzi-writer/pull/307?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Chanin#diff-c3JjL1F1aXoudHM=) | `96.00% <100.00%> (ø)` | | | [src/strokeMatches.ts](https://app.codecov.io/gh/chanind/hanzi-writer/pull/307?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=David+Chanin#diff-c3JjL3N0cm9rZU1hdGNoZXMudHM=) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

chanind commented 1 year ago

Looks good!

chanind commented 1 year ago

:tada: This PR is included in version 3.6.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: