Chinese character stroke order animations and practice quizzes
MIT License
Bot releases are hidden (Show)
Published by chanind over 5 years ago
Published by chanind over 5 years ago
Published by chanind over 5 years ago
renderer: 'canvas'
as an option to HanziWriter
. #112Published by chanind over 5 years ago
Published by chanind almost 6 years ago
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.Published by chanind almost 6 years ago
Improving stroke shape detection in stroke matching. Thanks @peterolson! More info in #94 #95
Published by chanind almost 6 years ago
writer.animateStroke(strokeNum, options = {})
method for animating individual strokes #93 (#91)Thanks @lengyuan and @peterolson!
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 })
.
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.
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%"
.
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.
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)
Published by chanind over 6 years ago
Fixing a bug where setting duration: 0
in show/hide methods was being ignored #75
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.
Published by chanind over 6 years ago
Slight improvements to stroke matching:
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.