Simple demo repository for usage of Rive in Vite projects. Have fun!
npm i
npm run dev
You can also open the repository in StackBlitz:
(If you experience errors, disable Ad or Tracking blockers)
- Integrate simple example for State Machines (https://marmelab.com/blog/2023/01/30/rive-animation-state-machine.html)
# https://vitejs.dev/guide/
npm create vite@latest . -- --template vanilla-ts
# https://help.rive.app/runtimes/overview/web-js
npm install @rive-app/canvas
Modified the loading with help of @Aratmany in this thread. Thanks very much!
Added src/vite-env-override.d.ts
for .riv files, included this in src/vite-env.d.ts
(Vite Client Types).
- vehicles.riv - example file provided by Rive