krmanik / Anki-xiehanzi

Learn, read, write and practice Mandarin by drawing strokes in Anki Desktop, AnkiDroid and AnkiMobile with audio of HSK 2.0 (HSK1-6) and HSK 3.0 (HSK 1-9) characters.
https://krmanik.github.io/Anki-xiehanzi
Other
157 stars 17 forks source link

Add xiehanzi logo using Hanzi Writer #22

Closed krmanik closed 1 year ago

krmanik commented 1 year ago
function createXieHanziLogo(ref) {
  let xiehanzi = ["写", "汉", "字"];

  for (let hanzi of xiehanzi) {
    const writer = HanziWriter.create(ref.current, hanzi, {
      width: 80,
      height: 80,
      padding: 5,
      strokeColor: hanzi == "写" ? "#4caf50" : "#2196f3"
    })
    writer.loopCharacterAnimation();
  }
}