Skip to content

Releases: chanind/hanzi-writer

v0.9.2

08 Mar 14:24
Compare
Choose a tag to compare

Slight improvements to stroke matching:

  • a minimum length metric was added
  • the full character is taken into account during matching, so it's better at judging if a user was trying to draw a nearby stroke in the wrong order

v0.9.1

06 Mar 02:40
Compare
Choose a tag to compare

Fixing a regression on #43, where strokes become partially visible if the user draws strokes very quickly during quizzing.

v0.9.0

05 Mar 15:33
Compare
Choose a tag to compare

This release improves stroke matching, and adds a leniency param which can be set to increase or decrease the leniency of the stroke matcher in quizzes.

v0.8.2

27 Feb 02:31
Compare
Choose a tag to compare

Rounding points returned in drawnPath to be max 1 decimal point of precision.

v0.8.1

25 Feb 13:11
Compare
Choose a tag to compare

Fixing a bug where if a user finishes a quiz successfully, then restarts, then when a stroke is highlighted the entire character highlight becomes visible.

v0.8.0

23 Feb 14:53
Compare
Choose a tag to compare
  • Added info about the stroke drawn by the user to onCorrectStroke and onMistake callbacks during quizzes
  • Fixed a bug in the default data loader where onError is called twice in the event of a network failure
  • Removed auto-retry behavior when an animation method is called after character data failed to load
  • Removed some dead code and reduced minified file size to 24KB

v0.7.0

22 Feb 02:45
Compare
Choose a tag to compare
  • Uses stroke-capped SVG data, so strokes no longer end in hard edges when they intersect other strokes.
  • Performance improvements (use clip-path instead of mask everywhere, smaller file-size)
  • character opacity is controlled at the character level, so stroke overlap points no longer appear when hiding/showing characters (#48)

v0.6.0

08 Feb 02:15
Compare
Choose a tag to compare

This release fixes a bug where if a character animation is looping, and a new character is loaded, the new character would either start looping as well or throw an error. Pointed out by @vaab

This release adds more robust error handling for loading character data, and adds onLoadCharDataSuccess and onLoadCharDataError callbacks that will be called in the event of char data loading successfully or error. More discussion at #42. Thanks again to @vaab!

v0.5.1

05 Feb 17:15
Compare
Choose a tag to compare
  • Fixes a bug in setCharacter() #40 thanks @vaab!
  • Fixes a bug where strokes can have partial opacity when drawing really quickly in quizzes
  • Fixes a bug where subsequent calls to animatable methods would chain them one after another instead of each canceling the previous call

Thanks again to @vaab for pointing out all these issues and contributing fixes!

v0.5.0

04 Feb 07:13
Compare
Choose a tag to compare

This release contains several feature enhancements and changes:

  • The character radical can be drawn in a different color by passing a radicalColor option, for characters where radical data is available in Make me a Hanzi.
  • strokeAnimationDuration and strokeHighlightDuration options have been removed and replaced with strokeAnimationSpeed and strokeHighlightSpeed, respectively. This was changed because if all strokes take the same duration to draw, then short strokes appear to be drawn very slowly and long strokes appear to be drawn very quickly, which looks strange. Now, strokes appear to be drawn at a similar speed which looks a lot more natural. strokeAnimationDuration and strokeHighlightDuration will continue to work for backwards compatibility.
  • character data has been removed from this repo and moved into a new repo, https://github.com/chanind/hanzi-writer-data. This data is also on published on NPM under the name hanzi-writer-data. You can now load this in NPM by directly requiring character data via, for example: var wo = require('hanzi-writer-data/我');
  • Hanzi Writer will now by default load character data from https://www.jsdelivr.com/package/npm/hanzi-writer-data. This should have better performance than the github pages CDN which was used previously, especially in China. Plus using github pages as a CDN was kind of sketchy.