chanind / hanzi-writer-miniprogram

Wechat Miniprogram plugin for Hanzi Writer (微信小程序组件)
https://chanind.github.io/hanzi-writer
MIT License
86 stars 25 forks source link

Unable to initiate Path2D of strokes during preview on a real phone #46

Closed b2nil closed 1 year ago

b2nil commented 3 years ago

I am porting this component to a Taro component. It runs pretty well in Wechat's dev tool, but I met this error during preview on an android phone.

MiniProgramError: "illegal param to init BindingPath2D" String

It looks like that HanziWriter's StrokeRenderer is using Path2D by default, which Wechat does not support very well on real phone, thus during preview on real phone, no stroke has been rendered to the canvas.

A bypass is to change the constructor of StrokeRenderer not to use Path2D, but I really would like to know, you how you guys solve this issue, if it ever happened to you?