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

Another way to initialize Graphics object #14

Open
chatpongs opened this issue Mar 5, 2019 · 1 comment
Open

Another way to initialize Graphics object #14

chatpongs opened this issue Mar 5, 2019 · 1 comment

Comments

@chatpongs
Copy link

I am working on a project created with create-react-app and would like to embed Flare animation. I am stuck because looking at the example, to initialize Graphics object, I have to supply a build folder

this._Graphics.initialize("../build/", handler);

I don't think webpack will understand this. Is there another way to initialize or an example to use JS framework like React, Angular with Flare?

@luigi-rosso
Copy link
Contributor

Hi @chatpongs this is currently due to the wasm file for Skia being deployed manually instead of webpacked as a resource. While the code is webpacked, we don't have all the dependencies webpacked with it. You could look into implementing something like this: https://github.com/ballercat/wasm-loader

In the meantime, we'll add to our roadmap a plan for a webpacked npm package that should be turn key.

Feel free to make contributions to improve this, we're a tiny team and contributions are extremely welcomed.

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