@open-motion/core
v0.1.6
Published
Core React primitives, hooks, and player for **OpenMotion** — the open-source programmatic video engine.
Readme
@open-motion/core
Core React primitives, hooks, and player for OpenMotion — the open-source programmatic video engine.
✨ Features
- ⚛️ React Components: Use
Composition,Sequence,Video, and more to build your video. - 🎣 Powerful Hooks: Access
useCurrentFrame,useVideoConfig, andgetInputPropsanywhere. - ⏱️ Animation Utilities: High-performance
springanimations and multi-segmentinterpolatefunctions. - 🎞️ Interactive Player: Real-time preview and scrubbing during development.
🚀 Installation
pnpm add @open-motion/core
# or
npm install @open-motion/core📖 Usage
import { Composition, Sequence, spring, useCurrentFrame, useVideoConfig } from "@open-motion/core";
const MyVideo = () => {
const frame = useCurrentFrame();
const { fps } = useVideoConfig();
const scale = spring({ frame, fps });
return (
<div style={{ flex: 1, backgroundColor: "white", display: "flex", justifyContent: "center", alignItems: "center" }}>
<h1 style={{ transform: `scale(${scale})` }}>Hello OpenMotion</h1>
</div>
);
};Learn more at the main OpenMotion repository.
