Quickstart
This guide will walk you through creating your first Helios composition from scratch. In about 10 minutes, you’ll have a working animated video.What we’re building
A 5-second animation featuring:- A circle moving across the screen
- A rotating square in the center
- Smooth, frame-perfect playback
Setup your project
Create a new project directory
Install dependencies
@helios-project/core- The animation engine@helios-project/player- Preview playervite- Development server and bundler
Create project files
Create your composition
HTML entry point
Create index.html:Composition logic
Create src/main.ts:Understanding the code
Let’s break down what’s happening:Initialize Helios
Bind to document timeline
Subscribe to frame updates
Calculate progress
Expose to window
window.helios to control your composition.Preview your composition
Add dev script to package.json
Start the dev server
http://localhost:5173. You should see your animation!Test the preview controls
Add the player component
For a better preview experience with UI controls, use the Helios Player:Create a player HTML file
Preview with player controls
http://localhost:5173/preview.htmlYou now have:- Play/pause button
- Seek bar
- Frame counter
- Export options
Render to video
Now let’s render your composition to an MP4 file.Install the renderer
Create a render script
Update package.json scripts
Install tsx for running TypeScript
Render your video
- Build your composition with Vite
- Launch headless Chrome
- Capture each frame
- Encode to MP4 with FFmpeg
output.mp4!Using animation helpers
Helios includes powerful animation utilities. Let’s enhance our composition:Available helpers
Next steps
Explore examples
- GSAP animations
- Three.js 3D scenes
- Chart.js visualizations
- Lottie animations
- Framer Motion
- And more
Learn the API
- Audio tracks and mixing
- Captions and subtitles
- Input props and schemas
- Timeline markers
- Distributed rendering
Framework integration
- React with
useVideoFrame()hook - Vue with composables
- Svelte with stores
- Solid.js integration
Production rendering
- Docker containerization
- AWS Lambda distributed rendering
- Google Cloud Run
- Local orchestrator for parallel rendering
Troubleshooting
Canvas is blank
Make sure you:- Resize the canvas to match the window
- Clear the canvas before drawing
- Subscribe to Helios state updates
Animation doesn’t update
Verify that:helios.bindToDocumentTimeline()is calledwindow.heliosis exposed- You’re calling
helios.play()or seeking manually
Render produces black frames
Check that:- Your composition is built (
npm run build) - The composition URL is correct (use
file://protocol) - The canvas has proper dimensions
TypeScript errors
Add type declarations:Tips for success
Start simple
Use progress values
Preview often
Expose to window
window.helios so the player and renderer can control your composition.Test different frame rates