@cesdk/engine 1.22.0-rc.2 → 1.23.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -2280,6 +2280,19 @@ export declare class BlockAPI {
2280
2280
  * @returns A method that will cancel any thumbnail generation request in progress for this block.
2281
2281
  */
2282
2282
  generateVideoThumbnailSequence(id: DesignBlockId, thumbnailHeight: number, timeBegin: number, timeEnd: number, numberOfFrames: number, onFrame: (frameIndex: number, result: ImageData | Error) => void): () => void;
2283
+ /**
2284
+ * Generate a thumbnail sequence for the given audio block or video fill.
2285
+ * A thumbnail in this case is a chunk of samples in the range of 0 to 1.
2286
+ * In case stereo data is requested, the samples are interleaved, starting with the left channel.
2287
+ * @param id - The audio block or video fill.
2288
+ * @param samplesPerChunk - The number of samples per chunk. `onChunk` is called when this many samples are ready.
2289
+ * @param timeBegin - The time in seconds at which the thumbnail sequence should start.
2290
+ * @param timeEnd - The time in seconds at which the thumbnail sequence should end.
2291
+ * @param numberOfSamples - The total number of samples to generate.
2292
+ * @param numberOfChannels - The number of channels in the output. 1 for mono, 2 for stereo.
2293
+ * @param onChunk - This gets passed an index and a chunk of samples whenever it's ready, or an error.
2294
+ */
2295
+ generateAudioThumbnailSequence(id: DesignBlockId, samplesPerChunk: number, timeBegin: number, timeEnd: number, numberOfSamples: number, numberOfChannels: number, onChunk: (chunkIndex: number, result: Float32Array | Error) => void): () => void;
2283
2296
  /**
2284
2297
  * Generate a thumbnail for the given video fill.
2285
2298
  * @param id - The video fill.
@@ -2776,8 +2789,8 @@ declare class CreativeEngine {
2776
2789
  * - `initialize` - Called once when the plugin is added to the engine
2777
2790
  * - `update` - Called every frame
2778
2791
  *
2779
- * PLEASE NOTE: Plugins not provded via URL will not be executed in the worker, e.g.
2780
- * during the video export the update method is not called.
2792
+ * PLEASE NOTE: Only Plugins provded via URL will be executed in the worker, e.g.
2793
+ * during the video export the update method will be called.
2781
2794
  *
2782
2795
  * Please be aware that this is experimental right now. This API can change or
2783
2796
  * be replaced or even removed completely in future versions.
@@ -2796,7 +2809,10 @@ declare class CreativeEngine {
2796
2809
  * @param timeout - Timeout in milliseconds (default: 10 seconds)
2797
2810
  */
2798
2811
  unstable_setVideoExportInactivityTimeout(timeout: number): void;
2799
-
2812
+ /**
2813
+ * @returns An `unwrap` function that can be used to remove this wrapper from the list of wrappers
2814
+ */
2815
+ addPostUpdateCallback(callback: () => void): () => void;
2800
2816
  /**
2801
2817
  * Install the mousewheel event handler for the CreativeEngine on a different
2802
2818
  * element than the canvas.
@@ -2948,6 +2964,9 @@ export declare class EditorAPI {
2948
2964
 
2949
2965
 
2950
2966
 
2967
+
2968
+
2969
+
2951
2970
  /**
2952
2971
  * Subscribe to changes to the editor state.
2953
2972
  * @param callback - This function is called at the end of the engine update, if the editor state has changed.
@@ -3325,7 +3344,7 @@ export declare type EffectTypeLonghand = `//ly.img.ubq/effect/${EffectTypeShorth
3325
3344
  * using `cesdk.engine.editor.createEffect(id)`.
3326
3345
  * @public
3327
3346
  */
3328
- export declare type EffectTypeShorthand = 'adjustments' | 'cross_cut' | 'dot_pattern' | 'duotone_filter' | 'extrude_blur' | 'glow' | 'half_tone' | 'linocut' | 'liquid' | 'lut_filter' | 'mirror' | 'outliner' | 'pixelize' | 'posterize' | 'radial_pixel' | 'sharpie' | 'shifter' | 'tilt_shift' | 'tv_glitch' | 'vignette';
3347
+ export declare type EffectTypeShorthand = 'adjustments' | 'cross_cut' | 'dot_pattern' | 'duotone_filter' | 'extrude_blur' | 'glow' | 'green_screen' | 'half_tone' | 'linocut' | 'liquid' | 'lut_filter' | 'mirror' | 'outliner' | 'pixelize' | 'posterize' | 'radial_pixel' | 'recolor' | 'sharpie' | 'shifter' | 'tilt_shift' | 'tv_glitch' | 'vignette';
3329
3348
 
3330
3349
  /** @public */
3331
3350
  export declare interface EnginePlugin {
@@ -4314,6 +4333,11 @@ export declare type VideoExportOptions = {
4314
4333
  abortSignal?: AbortSignal;
4315
4334
  };
4316
4335
 
4336
+ /** Data needed for setting up the engine in the worker that is _not_ covered by the config */
4337
+ declare type WorkerOptions_2 = {
4338
+ trackingMetadata?: TrackingMetadata;
4339
+ };
4340
+
4317
4341
  /**
4318
4342
  * Describes a rectangle on the screen
4319
4343
  * - `x` and `y` indicate the position