Description
Hello,
Firstly I'd like to thank you for the work you've done on this project! I found it the most suitable for what I wanted to accomplish, which was to create stroke order exercises for the Genki textbooks and it has worked incredibly well thus far! You can view it online here. (this is also a debug link, so you can view output in the web console when clicking "next") I've also mentioned the project in the readme as thanks.
Anyway, onto my question! I was wondering how to add new refPatterns or what method you used to add them? I was wanting to add the following kanji as they were the only patterns I'm missing.
小, 自, 々, 彼, 供, 服, 夕
I tired using the copyStuff()
function after drawing the kanji, however, the patterns returned seem to be inaccurate and pollute the candidates list. For example, this was the output for 小:
["小", 3, [[101.5,72.125,101.5,72.125,101.5,73.125,101.5,73.125,101.5,74.125,101.5,74.125,101.5,75.125,101.5,75.125,101.5,76.125,101.5,76.125,101.5,77.125,101.5,77.125,101.5,78.125,101.5,78.125,101.5,79.125,101.5,79.125,101.5,80.125,101.5,80.125,101.5,81.125,101.5,81.125,101.5,82.125,101.5,82.125,101.5,83.125,101.5,83.125,101.5,84.125,101.5,84.125,101.5,85.125,101.5,85.125,101.5,86.125,101.5,86.125,101.5,87.125,101.5,87.125,101.5,88.125,101.5,88.125,101.5,89.125,101.5,89.125,101.5,90.125,101.5,90.125,101.5,91.125,101.5,91.125,101.5,92.125,101.5,92.125,101.5,93.125,101.5,93.125,101.5,94.125,101.5,94.125,101.5,95.125,101.5,95.125,101.5,96.125,101.5,96.125,101.5,97.125,101.5,97.125,101.5,98.125,101.5,98.125,101.5,99.125,101.5,99.125,101.5,100.125,101.5,100.125,101.5,101.125,101.5,101.125,101.5,102.125,101.5,102.125,100.5,102.125,100.5,102.125,100.5,103.125,100.5,103.125,100.5,104.125,100.5,104.125,100.5,105.125,100.5,105.125,100.5,106.125,100.5,106.125,100.5,107.125,100.5,107.125,100.5,108.125,100.5,108.125,100.5,109.125,100.5,109.125,99.5,109.125,99.5,109.125,99.5,110.125,99.5,110.125,98.5,110.125,98.5,110.125,98.5,111.125,98.5,111.125,97.5,111.125,97.5,111.125,97.5,112.125,97.5,112.125,96.5,112.125,96.5,112.125,96.5,113.125,96.5,113.125,95.5,114.125,95.5,114.125,94.5,115.125,94.5,115.125,93.5,115.125,93.5,115.125,93.5,116.125,93.5,116.125,92.5,116.125,92.5,116.125,91.5,116.125,91.5,116.125,91.5,117.125,91.5,117.125,91.5,118.125,91.5,118.125,90.5,118.125],[87.5,81.125,87.5,81.125,87.5,82.125,87.5,82.125,87.5,83.125,87.5,83.125,87.5,84.125,87.5,84.125,87.5,85.125,87.5,85.125,87.5,86.125,87.5,86.125,87.5,87.125,87.5,87.125,87.5,88.125,87.5,88.125,86.5,88.125,86.5,88.125,86.5,89.125,86.5,89.125,86.5,90.125,86.5,90.125,86.5,91.125,86.5,91.125,85.5,91.125,85.5,91.125,85.5,92.125,85.5,92.125,84.5,92.125,84.5,92.125,84.5,93.125,84.5,93.125,84.5,94.125,84.5,94.125,83.5,94.125,83.5,94.125,83.5,95.125,83.5,95.125,83.5,96.125,83.5,96.125,82.5,96.125,82.5,96.125,81.5,96.125,81.5,96.125,81.5,97.125,81.5,97.125,80.5,97.125,80.5,97.125,80.5,98.125,80.5,98.125,79.5,98.125,79.5,98.125,79.5,99.125,79.5,99.125,78.5,99.125,78.5,99.125,77.5,99.125,77.5,99.125,77.5,100.125,77.5,100.125,76.5,100.125,76.5,100.125,75.5,100.125,75.5,100.125,75.5,101.125,75.5,101.125,75.5,102.125],[111.5,81.125,111.5,81.125,112.5,81.125,112.5,81.125,112.5,82.125,112.5,82.125,112.5,83.125,112.5,83.125,113.5,83.125,113.5,83.125,113.5,84.125,113.5,84.125,114.5,85.125,114.5,85.125,114.5,86.125,114.5,86.125,114.5,87.125,114.5,87.125,115.5,87.125,115.5,87.125,115.5,88.125,115.5,88.125,116.5,89.125,116.5,89.125,116.5,90.125,116.5,90.125,117.5,90.125,117.5,90.125,117.5,91.125,117.5,91.125,118.5,91.125,118.5,91.125,119.5,92.125,119.5,92.125,119.5,93.125,119.5,93.125,120.5,93.125,120.5,93.125,120.5,94.125,120.5,94.125,121.5,94.125,121.5,94.125,121.5,95.125,121.5,95.125,121.5,96.125,121.5,96.125,122.5,96.125,122.5,96.125,123.5,96.125,123.5,96.125,124.5,96.125,124.5,96.125,124.5,97.125,124.5,97.125,124.5,98.125,124.5,98.125,125.5,98.125,125.5,98.125,126.5,98.125]]]
With this in the refPatterns, drawing 一, 二, 三, or random lines 1-4 for example, always has 小 as the first candidate which feels off.
I'm thinking perhaps I may have did something wrong, so I figured I'd ask to learn what method you went about for adding the current refPatterns.