ERROR TypeError: image.makeShader is not a function
pradipkachhadiya opened this issue · comments
pradipkachhadiya commented
below line giving error from flare.min.js
makeImageShader(image) {
return image.makeShader(CanvasKit.TileMode.Clamp, CanvasKit.TileMode.Clamp);
}
I had implemented code as like given in doc but Problem is that, jacko.flr which was given in demo and my own .flr file not working
Provide me solution or suggestion ASAP
Colpan commented
@pradipkachhadiya I was having this same issue. It seems like it is due to the canvaskit version located in the canvaskit folder here not being the proper version (that has .makeShader).
My solution was as follows:
- clone this repo
- npm install canvaskit-wasm
- go to /node_modules/canvaskit-wasm/bin/
- copy the canvaskit.js and canvaskit.wasm
- go to /canvaskit folder in the flare project and paste the new canvaskit files
- npm install
- npm start -- --watch
The newly built files should work properly for you