RoadTripMoustache / kana_to_kanji

Simple application to learn Japanese kana (hiragana, katakana) and kanji
6 stars 1 forks source link

feat: Drawing order animation #103

Open apomalyn opened 11 months ago

apomalyn commented 11 months ago

As a user, I want to see how to draw a kanji, kana or vocabulary step by step.

Requirements

What needs to be done

Dependencies

apomalyn commented 9 months ago

Here is my proposition for the data format. Let's assume a drawing canvas of 100x100

Each pencil movement will be an array of positions looking like this:

[
  [10, 10] // Starting point
  [12, 15] // Another point somewhere like a curve
  ... // Any other point
  [20, 20] // Ending point
]

We just need to repeat these for each strike and we would have something like this:

[
  [[0, 0], [5, 5], [10, 10]] // First strike
  [[3, 3], [4, 4]] // Second strike
  ...
]

This info would be only available for the kana and kanji, we will skip the vocabulary as it's supposed to be only composed of kana and kanji.

Also, it will be given when you get the full details of the kanji or it could be a completely different endpoints 🤔