Skip to main content
Language:

Configuring the Scene

In this example, we will show you how to configure the initial scene of the CreativeEditor SDK.

Explore a full code sample of the integration on CodeSandbox or view the code on GitHub.

Scene Configuration#

The CE.SDK comes with a set of scene-specific configuration parameters that let you influence the initial scenes dimensions and resolution. These are always overriden, if an initialSceneString was specified.


  • dpi: number defines the "dots per inch" ratio, the CE.SDK will use when exporting and when converting between pixels and inches or millimeter units. (In the CE.SDK, this value is synonymous with PPI).
  • pixelScaleFactor: number is a scale factor that is applied to the final export resolution.
File:
import 'https://cdn.img.ly/packages/imgly/cesdk-js/1.9.0/cesdk.umd.js';
let config = {
baseURL: 'https://cdn.img.ly/packages/imgly/cesdk-js/1.9.0/assets',
scene: {
dpi: 300,
pixelScaleFactor: 1.0
}
};
CreativeEditorSDK.init('#cesdk_container', config).then((instance) => {
/** do something with the instance of CreativeEditor SDK **/
});