Skip to main content
Language

Initialization

In this example, we will show you how to instantiate and initialize the CreativeEditor SDK.

Configuration#

When making a call to CreativeEditorSDK.create, there are a few configuration options you can pass as the second parameter. These options are described in detail in our Configuration guide.

Initialization#

After creating an instance of the CreativeEditor SDK, you can start using the API to perfom additional setup steps, such as

While you do this, the CE.SDK will show a loading indicator until a scene has been loaded or created.

Disable the "No scene" console warning#

Should you forget to load or create a scene, after a short while the CE.SDK will display a warning on the console. This warning is not visible to users, but will help your developers recognize this situation and avoid wondering why the loading spinner is still shown.

If you are intentially taking longer to load a scene, you can disable this warning.

Loading/Creating a scene#

You can load existing scenes in different ways, directly on the CE.SDK instance or via the SceneAPI:

  • cesdk.loadFromString(sceneContent)
  • cesdk.loadFromURL(sceneURL)
  • cesdk.engine.scene.loadFromString(sceneContent)
  • cesdk.engine.scene.loadFromURL(sceneUrl)

Alternatively, you can create a new scene using the methods on the CE.SDK instance:

  • cesdk.createDesignScene()
  • cesdk.createVideoScene()

For more specific use cases, you can also use the SceneAPI methods for creating scenes directly. Keep in mind that while the load methods on the CE.SDK instance and the SceneAPI are doing the same, this is not true for the create methods. It might require additional work to configure and set up scenes created via the SceneAPI compared to the methods on the CE.SDK instance