Skip to content

surge-studio/elements-ai-demo

Repository files navigation

Elements AI Demo

Next.js application demonstrating implementation of an Elements AI visual using Rive.

AI visual

The component /components/ai-visual.tsx renders the visual element with useRive from @rive-app/react-webgl2 (alternatively use @rive-app/react-canvas-lite).

The AI visual 'Command' is included in this repo at /public/command-2.0.riv.

Elements AI visuals are all setup in a similar way with matching state machines.

Command as an example supports 4 different states: listening, thinking, speaking, asleep. By default it can also be configured into 10 different colors. See the enum in ai-visual.tsx or visit the website for details.

Development

Rename .env.example and populate environment variables.

Install with pnpm i and run development environment with pnpm dev

Open http://localhost:3000 with your browser.

We do not recommend using this repo as a starting template. Please see Next.js AI Chatbot and Next Forge for more complete and fully featured application examples.

Learn more

Learn more about the different parts of this application:

Releases

No releases published

Packages

 
 
 

Contributors