What is a Composition and how to set it up
mainA Composition object is the central state manager for a video project in Diffusion Studio. It manages tracks, clips, and the overall timeline.
To create a new composition, import Composition from @diffusionstudio/core. You can optionally provide configuration for the canvas size and background color.
Default Configuration:
height:1080width:1920background:'#000000'
Note that width and height define the canvas size for editing/visualization, but the final output resolution is determined by the Encoder during export.
import * as core from '@diffusionstudio/core';
const composition = new core.Composition();