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.We’ll build a simple canvas animation that you can preview in your browser and render to MP4. This example uses vanilla JavaScript, but Helios works with React, Vue, Svelte, and other frameworks.
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
1
Create a new project directory
2
Install dependencies
@helios-project/core- The animation engine@helios-project/player- Preview playervite- Development server and bundler
3
Create project files
Create the following file structure:
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:1
Initialize Helios
2
Bind to document timeline
3
Subscribe to frame updates
4
Calculate progress
5
Expose to window
window.helios to control your composition.Preview your composition
1
Add dev script to package.json
2
Start the dev server
http://localhost:5173. You should see your animation!3
Test the preview controls
Open your browser console and try:
Add the player component
For a better preview experience with UI controls, use the Helios Player:1
Create a player HTML file
Create preview.html:
2
Preview with player controls
Navigate to
http://localhost:5173/preview.htmlYou now have:- Play/pause button
- Seek bar
- Frame counter
- Export options
The player loads your composition in a sandboxed iframe, providing isolation and standard HTMLMediaElement controls.
Render to video
Now let’s render your composition to an MP4 file.1
Install the renderer
2
Create a render script
Create render.ts:
3
Update package.json scripts
4
Install tsx for running TypeScript
5
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
Check out 80+ examples in the GitHub repository covering:
- GSAP animations
- Three.js 3D scenes
- Chart.js visualizations
- Lottie animations
- Framer Motion
- And more
Learn the API
Dive deeper into Helios capabilities:
- Audio tracks and mixing
- Captions and subtitles
- Input props and schemas
- Timeline markers
- Distributed rendering
Framework integration
Use Helios with your preferred framework:
- React with
useVideoFrame()hook - Vue with composables
- Svelte with stores
- Solid.js integration
Production rendering
Deploy Helios for scale:
- 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
1
Start simple
Begin with basic shapes and movements. Add complexity gradually.
2
Use progress values
Convert frames to 0-1 progress for easier math:
3
Preview often
The dev server provides instant feedback. Use it liberally.
4
Expose to window
Always export
window.helios so the player and renderer can control your composition.5
Test different frame rates
30fps is standard, but try 60fps for smoother motion or 24fps for a cinematic feel.
Congratulations! You’ve created your first Helios video. The same patterns you learned here scale to complex, production-ready compositions.