2d-inc / Flare-JS

Flare Javascript ES6 runtime with Canvas rendering.

Home Page:https://flare.rive.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERROR TypeError: image.makeShader is not a function

pradipkachhadiya opened this issue · comments

image

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

@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:

  1. clone this repo
  2. npm install canvaskit-wasm
  3. go to /node_modules/canvaskit-wasm/bin/
  4. copy the canvaskit.js and canvaskit.wasm
  5. go to /canvaskit folder in the flare project and paste the new canvaskit files
  6. npm install
  7. npm start -- --watch

The newly built files should work properly for you