2d-inc / Flare-JS

Flare Javascript ES6 runtime with Canvas rendering.
https://flare.rive.app
MIT License
265 stars 59 forks source link

Easily working example for newcomers #17

Closed 0x4007 closed 3 years ago

0x4007 commented 5 years ago

I spent some time digging through to get this to work. I ended up combining a couple of solutions and the example works now for me. My README is geared towards those who want to get up and running right away.

luigi-rosso commented 5 years ago

Thanks for submitting this! This is a good temporary patch, however the ultimate solution is to integrate some of the changes we've made in the Flare-React repository. We have an improved workflow there which webpacks all the dependencies. Take a look here for more details: https://github.com/2d-inc/Flare-React

0x4007 commented 5 years ago

What about for non-React folks? I prefer Vanilla when possible!

luigi-rosso commented 5 years ago

Absolutely! I meant to integrate the webpack and general structural changes to the source that were made in that repository into this repository.

I need to take a little time to do that, but basically it allows for the option of webpacking the web assembly dependencies or loading them externally, which is nice to have depending on your environment. The various classes that depend on them have been updated to abstract those dependencies.

Another nice thing we did there was make it npm friendly, which I think we should do here too as it provides a much faster starting experience.

In the meantime, this is welcomed documentation, thank you for providing it!