0.2.0 • Published 4 months ago

@novely/rive v0.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
4 months ago

@novely/rive

Once you have a .riv file place it in your project and import according to your bundler.

// Vite

import boyRiv from './assets/boy.riv?url'; // import as string url
import { show as startRive, remove as removeRive, animate as animateRive, hide as hideRive } from '@novely/rive';

engine.withStory({
	start: [
		/**
		 * On the story path start you need to hide all the used animations even before they were created
		 */
		hideRive('boy'),
		// ...
		startRive('boy', ({ init }) =>
			init({
				src: boyRiv, // pass src
			}),
		),
		animateRive('boy', 'AnimationName'),
		// ...
		removeRive('boy'),
	],
});
0.2.0

4 months ago

0.1.0

4 months ago

0.0.1

6 months ago