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
Works with React, Angular, Vue, or vanilla JS
DOM and Canvas2D rendering support
Automatic performance optimization
Synchronized audio tracks with fade effects
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!