Skip to content

mandrasch/rive-vite-demo

Repository files navigation

rive-vite-demo

Simple demo repository for usage of Rive in Vite projects. Have fun!

Local setup

npm i
npm run dev

You can also open the repository in StackBlitz:

Open in StackBlitz

(If you experience errors, disable Ad or Tracking blockers)

TODOs / goals

How was this created?

# 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).

Credits

  • vehicles.riv - example file provided by Rive