Get started in minutes with our high-performance cinematic rendering library
Install cinematicRenderer2D using your preferred package manager:
npm install cinematic-renderer2d
yarn add cinematic-renderer2d
pnpm add cinematic-renderer2d
import { CinematicRenderer2D } from 'cinematic-renderer2d';
const renderer = new CinematicRenderer2D({
container: document.getElementById('container'),
spec: {
schemaVersion: '1.0.0',
engine: { targetFps: 60, quality: 'auto' },
events: [{
id: 'intro',
name: 'Introduction',
scenes: ['welcome']
}],
scenes: [{
id: 'welcome',
name: 'Welcome Scene',
duration: 3000,
layers: [{
id: 'background',
type: 'gradient',
zIndex: 1,
config: {
colors: ['#667eea', '#764ba2'],
direction: 'diagonal'
}
}]
}]
}
});
// Mount and play
await renderer.mount();
renderer.play();
import { CinematicPlayer } from 'cinematic-renderer2d/react';
function App() {
return (
<CinematicPlayer
spec={yourSpec}
autoplay={true}
onPlay={() => console.log('Playing')}
onEnd={() => console.log('Finished')}
/>
);
}
import { CinematicPlayerComponent } from 'cinematic-renderer2d/angular';
@Component({
selector: 'app-root',
template: `
<cinematic-player
[spec]="spec"
[autoplay]="true"
(play)="onPlay()"
(end)="onEnd()">
</cinematic-player>
`
})
export class AppComponent {
spec = { /* your spec */ };
}
60-120fps with optimized rendering backends
Radial, spot, and ambient lights with blend modes
6 transition types: crossfade, slide, zoom, wipe, dissolve, blur
Keyframes, loops, yoyo, stagger effects
Works with React, Angular, Vue, or vanilla JS
DOM and Canvas2D rendering support
Automatic performance optimization
Multi-track audio with crossfade and volume control
Starfield, particles, dust, nebula effects
Fog, vignette, glow, and noise overlays
Pre-built templates for common cinematic scenes
Full type safety and auto-completion
The playground includes several example specifications you can use as starting points:
Load these examples in the playground to see how they work, then customize them for your needs!