Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR TypeError: image.makeShader is not a function #24

Open
pradipkachhadiya opened this issue Jun 11, 2019 · 1 comment
Open

ERROR TypeError: image.makeShader is not a function #24

pradipkachhadiya opened this issue Jun 11, 2019 · 1 comment

Comments

@pradipkachhadiya
Copy link

pradipkachhadiya commented Jun 11, 2019

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

@Colpan
Copy link

Colpan commented Jun 12, 2019

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants