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

Failed to load resource when trying the provided example. #2

Open
JamalBelilet opened this issue Dec 9, 2018 · 6 comments
Open

Failed to load resource when trying the provided example. #2

JamalBelilet opened this issue Dec 9, 2018 · 6 comments

Comments

@JamalBelilet
Copy link

gl-matrix.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
example.js:7 Uncaught ReferenceError: vec2 is not defined
at example.js:7
at example.js:179
example.html:24 Uncaught ReferenceError: FlareExample is not defined
at onLoad (example.html:24)
at onload (example.html:60)

@sanbornhilland
Copy link
Contributor

gl-matrix is a quick npm installation, but I'm curious where canvaskit.js is supposed to be coming from.

@krispypen
Copy link

krispypen commented Jan 2, 2019

Looks like canvaskit-wasm is made available some days ago via npm...

So to get the example running I had to:

npm install gl-matrix canvaskit-wasm
npm start --
cp node_modules/canvaskit-wasm/bin/canvaskit.* build/
cp node_modules/gl-matrix/dist/gl-matrix.js build/
wget "https://github.com/2d-inc/Flare-Flutter/raw/master/example/simple/assets/Filip.flr" -O example/Filip.flr
sed -i '' 's/ball\.flj/Filip\.flr/g' example/example.html
http-server ##npm install -g http-server to install it
open "http://localhost:8080/example/example.html"

Or when you start from the canvaskit branch:

npm install canvaskit-wasm
npm start --
cp node_modules/canvaskit-wasm/bin/canvaskit.* build/
cp node_modules/gl-matrix/dist/gl-matrix.js build/
http-server ##npm install -g http-server to install it
open "http://localhost:8080/example/example.html"

@luigi-rosso
Copy link
Contributor

Sorry for the oversight here, we were compiling it manually from the Skia repository, but like you saw it's now generally available. We've updated the instructions in the readme to help get people started. We recognize we still have a lot of documenting to do.

@jjjjim
Copy link

jjjjim commented Feb 18, 2019

I just tried to load the provided example under the guidance of @krispypen , but I faied, the error message was '_RenderPath.rewind is not a function', can you load the example?thank you

@DamianEl
Copy link

@jjjjim They are using own custom canvaskit.js file, so simply pull latest commit and don't overwrite build/canvaskit.js from node_modules.

@mhamri
Copy link

mhamri commented Mar 18, 2019

i had some issue to run the example, i fixed it as #16

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

7 participants