hanzi-writer

Chinese character stroke order animations and practice quizzes

MIT License

Downloads
3.9K
Stars
3.5K
Committers
9

Bot releases are hidden (Show)

hanzi-writer - v2.0.3

Published by chanind about 5 years ago

2.0.3 (2019-07-31)

Bug Fixes

  • bump to push release 2.0.3 (943c617)
hanzi-writer - v2.0.2

Published by chanind over 5 years ago

2.0.2 (2019-06-11)

Bug Fixes

hanzi-writer - v2.0.1

Published by chanind over 5 years ago

2.0.1 (2019-06-11)

Bug Fixes

  • fixing bug in getting SVG mouse/touch points (677fea4)
hanzi-writer - v2.0.0

Published by chanind over 5 years ago

2.0.0 (2019-06-10)

Features

BREAKING CHANGES

  • noConflict has been removed
hanzi-writer - v1.4.2

Published by chanind over 5 years ago

  • Refactored rendering to make it easier to build a Wechat miniprogram package for HanziWriter #114
hanzi-writer - v1.4.1

Published by chanind over 5 years ago

  • Updating .npmignore to remove unnecessary stuff from the bundle
hanzi-writer - v1.4.0

Published by chanind over 5 years ago

  • experimental canvas rendering by passing renderer: 'canvas' as an option to HanziWriter. #112
hanzi-writer - v1.3.1

Published by chanind over 5 years ago

  • removed unused param in function call #106 (thanks @jamsch)
  • fixed a bug where some versions of safari don't work with relative paths in SVG #109 (thanks @mbostock). More info in #104
hanzi-writer - v1.3.0

Published by chanind almost 6 years ago

  • fixes a bug where calling setCharacter() would reset character opacity and outline opacity to their original values when the writer instance was created. Thanks @lolaswift for pointing this out. More info in #101.
hanzi-writer - v1.2.1

Published by chanind almost 6 years ago

Improving stroke shape detection in stroke matching. Thanks @peterolson! More info in #94 #95

hanzi-writer - v1.2.0

Published by chanind almost 6 years ago

  • improves stroke matching leniency when there are small strokes close to each other #92 (#90)
  • adds a writer.animateStroke(strokeNum, options = {}) method for animating individual strokes #93 (#91)

Thanks @lengyuan and @peterolson!

hanzi-writer - v1.1.0

Published by chanind about 6 years ago

Adding a writer.updateColor(colorName, colorVal, options) method which can be used to change any color options on a writer instance. Ex: writer.updateColor('strokeColor', '#123', { duration: 300 }).

hanzi-writer - v1.0.0

Published by chanind about 6 years ago

Implementing a new way of setting up a HanziWriter instance to avoid having the constructor doing too much work, as described in #55. The previous method of new HanziWriter(elm, char, options) will still work but with a deprecation warning. Instead, the following methods are encouraged:

  • var writer = HanziWriter.create(elm, char, options) This works identically to the way the old constructor used to work and is a drop-in replacement.
  • var writer = new HanziWriter(elm, options); writer.setCharacter(char) This can be used to set the character later after the writer instance has been created.

Thanks to @vaab and @Mikurox for the input on this.

hanzi-writer - v0.12.0

Published by chanind about 6 years ago

This release includes #85 by @kkroid which explicitly sets SVG height and width instead of using height="100%" and width="100%".

hanzi-writer - v0.11.1

Published by chanind about 6 years ago

This release uses SVG matrixTransform as described in #84 and #83 for getting mouse and touch positions during quizzing. This should make quizzing more reliable in some environments, such as in Anki.

hanzi-writer - v0.11.0

Published by chanind over 6 years ago

Adding 2 static helper methods to make it easier to load and work with raw character data.

  • HanziWriter.loadCharacterData(character, options = {})
  • HanziWriter.getScalingTransform(width, height, padding = 0)
hanzi-writer - v0.10.1

Published by chanind over 6 years ago

Fixing a bug where setting duration: 0 in show/hide methods was being ignored #75

hanzi-writer - v0.10.0

Published by chanind over 6 years ago

Adding a highlightCompleteColor option, which can be used to control the color that the quiz flashes after it has been successfully completed if desired. If not set, the quiz will continue to use the highlightColor instead.

hanzi-writer - v0.9.2

Published by chanind over 6 years ago

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
hanzi-writer - v0.9.1

Published by chanind over 6 years ago

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