@cesdk/engine 1.20.0 → 1.21.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
@@ -425,7 +425,7 @@ export declare class BlockAPI {
425
425
  /**
426
426
  * Exports a design block as a video file of the given mime type.
427
427
  * Note: The export will run across multiple iterations of the update loop. In each iteration a frame is scheduled for encoding.
428
- * @param handle - The design block element to export. Currently, only the scene block is supported.
428
+ * @param handle - The design block element to export. Currently, only page blocks are supported.
429
429
  * @param mimeType - The mime type of the output video file.
430
430
  * @param progressCallback - A callback which reports on the progress of the export. It informs the receiver of the current frame index, which currently gets exported and the total frame count.
431
431
  * @param options - The options for exporting the video
@@ -2088,7 +2088,7 @@ export declare class BlockAPI {
2088
2088
  hasTimeOffset(id: DesignBlockId): boolean;
2089
2089
  /**
2090
2090
  * Set the time offset of the given block relative to its parent.
2091
- * The time offset controls when the block is first active in the scene.
2091
+ * The time offset controls when the block is first active in the timeline.
2092
2092
  * The time offset is not supported by the page block.
2093
2093
  * @param id - The block whose time offset should be changed.
2094
2094
  * @param offset - The new time offset in seconds.
@@ -2141,6 +2141,7 @@ export declare class BlockAPI {
2141
2141
  * The duration is defined by all blocks in the scene.
2142
2142
  * @param scene - The scene whose duration is being queried.
2143
2143
  * @returns the total scene duration.
2144
+ * @deprecated Use `getDuration` and pass a page block.
2144
2145
  */
2145
2146
  getTotalSceneDuration(scene: DesignBlockId): number;
2146
2147
  /**
@@ -2173,6 +2174,12 @@ export declare class BlockAPI {
2173
2174
  * @returns the playback time of the block in seconds.
2174
2175
  */
2175
2176
  getPlaybackTime(id: DesignBlockId): number;
2177
+ /**
2178
+ * Returns whether the block should be visible on the canvas at the current playback time.
2179
+ * @param id - The block to query.
2180
+ * @returns Whether the block should be visible on the canvas at the current playback time.
2181
+ */
2182
+ isVisibleAtCurrentPlaybackTime(id: DesignBlockId): boolean;
2176
2183
  /**
2177
2184
  * Set whether the given block or fill should play
2178
2185
  * its contents while the rest of the scene remains paused.
@@ -2237,10 +2244,16 @@ export declare class BlockAPI {
2237
2244
  * @returns A Promise that resolves once the resource has finished loading.
2238
2245
  */
2239
2246
  forceLoadAVResource(id: DesignBlockId): Promise<void>;
2247
+ /**
2248
+ * Returns whether the audio and video resource for the given video fill or audio block is loaded.
2249
+ * @param id - The video fill or audio block.
2250
+ * @returns The loading state of the resource.
2251
+ */
2252
+ unstable_isAVResourceLoaded(id: DesignBlockId): boolean;
2240
2253
  /**
2241
2254
  * Get the duration in seconds of the video or audio resource that is attached to the given block.
2242
2255
  * @param id - The video fill or audio block.
2243
- * @returns The video or audio file duration
2256
+ * @returns The video or audio file duration.
2244
2257
  */
2245
2258
  getAVResourceTotalDuration(id: DesignBlockId): number;
2246
2259
  /**
@@ -2256,12 +2269,12 @@ export declare class BlockAPI {
2256
2269
  */
2257
2270
  getVideoHeight(id: DesignBlockId): number;
2258
2271
  /**
2259
- * Generate a sequence of thumbnails for the given video fill or page.
2272
+ * Generate a sequence of thumbnails for the given video fill or design block.
2260
2273
  * Note: there can only be one thumbnail generation request in progress for a given block.
2261
- * @param id - The video fill or page.
2274
+ * @param id - The video fill or design block.
2262
2275
  * @param thumbnailHeight - The height of a thumbnail. The width will be calculated from the video aspect ratio.
2263
- * @param timeBegin - The time in seconds at which the thumbnail sequence should start.
2264
- * @param timeEnd - The time in seconds at which the thumbnail sequence should end.
2276
+ * @param timeBegin - The time in seconds relative to the time offset of the design block at which the thumbnail sequence should start.
2277
+ * @param timeEnd - The time in seconds relative to the time offset of the design block at which the thumbnail sequence should end.
2265
2278
  * @param numberOfFrames - The number of frames to generate.
2266
2279
  * @param onFrame - Gets passed the frame index and RGBA image data.
2267
2280
  * @returns A method that will cancel any thumbnail generation request in progress for this block.
@@ -2919,7 +2932,7 @@ export declare type DesignBlockTypeLonghand = `//ly.img.ubq/${DesignBlockTypeSho
2919
2932
  * using `cesdk.engine.editor.cerate(id)`.
2920
2933
  * @public
2921
2934
  */
2922
- export declare type DesignBlockTypeShorthand = 'scene' | 'stack' | 'camera' | 'page' | 'graphic' | 'audio' | 'text' | 'group' | 'cutout';
2935
+ export declare type DesignBlockTypeShorthand = 'scene' | 'stack' | 'camera' | 'page' | 'graphic' | 'audio' | 'text' | 'group' | 'cutout' | 'track';
2923
2936
 
2924
2937
  /**
2925
2938
  * The unit type in which the page values (size, distances, etc.) are defined.
@@ -2945,15 +2958,15 @@ export declare class EditorAPI {
2945
2958
  * Set the edit mode of the editor.
2946
2959
  * An edit mode defines what type of content can currently be edited by the user.
2947
2960
  * Hint: the initial edit mode is "Transform".
2948
- * @param mode - "Transform", "Crop", "Text", or a custom value.
2961
+ * @param mode - "Transform", "Crop", "Text", "Playback", or a custom value.
2949
2962
  */
2950
- setEditMode(mode: 'Transform' | 'Crop' | 'Text' | string): void;
2963
+ setEditMode(mode: 'Transform' | 'Crop' | 'Text' | 'Playback' | string): void;
2951
2964
  /**
2952
2965
  * Get the current edit mode of the editor.
2953
2966
  * An edit mode defines what type of content can currently be edited by the user.
2954
- * @returns "Transform", "Crop", "Text", or a custom value.
2967
+ * @returns "Transform", "Crop", "Text", "Playback", or a custom value.
2955
2968
  */
2956
- getEditMode(): 'Transform' | 'Crop' | 'Text' | string;
2969
+ getEditMode(): 'Transform' | 'Crop' | 'Text' | 'Playback' | string;
2957
2970
  /**
2958
2971
  * Get the type of cursor that should be displayed by the application.
2959
2972
  * @returns The cursor type.
@@ -3179,6 +3192,15 @@ export declare class EditorAPI {
3179
3192
  * @returns The current memory usage in bytes.
3180
3193
  */
3181
3194
  getUsedMemory(): number;
3195
+ /**
3196
+ * Get the export size limit in pixels on the current device. An export is
3197
+ * only possible when both the width and height of the output are below or
3198
+ * equal this limit. However, this is only an upper limit as the export might
3199
+ * also not be possible due to other reasons, e.g., memory constraints.
3200
+ * @returns The upper export size limit in pixels or an unlimited size, i.e,
3201
+ * the maximum signed 32-bit integer value, if the limit is unknown.
3202
+ */
3203
+ getMaxExportSize(): number;
3182
3204
  /**
3183
3205
  * Sets a custom URI resolver.
3184
3206
  * This function can be called more than once. Subsequent calls will overwrite previous calls.
@@ -3372,6 +3394,20 @@ export declare type ExportOptions = {
3372
3394
  * setting instead of embedding them directly.
3373
3395
  */
3374
3396
  exportPdfWithHighCompatibility?: boolean;
3397
+ /**
3398
+ * Export the PDF document with an underlayer.
3399
+ * An underlayer is generated by adding a graphics block behind the existing elements of the shape of the elements on
3400
+ * the page.
3401
+ */
3402
+ exportPdfWithUnderlayer?: boolean;
3403
+ /**
3404
+ * The name of the spot color to be used for the underlayer's fill.
3405
+ */
3406
+ underlayerSpotColorName?: string;
3407
+ /**
3408
+ * The adjustment in size of the shape of the underlayer.
3409
+ */
3410
+ underlayerOffset?: number;
3375
3411
  };
3376
3412
 
3377
3413
  /** @public */
@@ -3383,6 +3419,9 @@ declare interface ExportOptions_2 {
3383
3419
  targetWidth: number;
3384
3420
  targetHeight: number;
3385
3421
  exportPdfWithHighCompatibility: boolean;
3422
+ exportPdfWithUnderlayer: boolean;
3423
+ underlayerSpotColorName: string;
3424
+ underlayerOffset: number;
3386
3425
  }
3387
3426
 
3388
3427
  /** @public */
@@ -3766,7 +3805,7 @@ export declare class SceneAPI {
3766
3805
  */
3767
3806
  create(sceneLayout?: SceneLayout): DesignBlockId;
3768
3807
  /**
3769
- * Create a new scene in video mode, along with its own camera and page stack.
3808
+ * Create a new scene in video mode, along with its own camera.
3770
3809
  * @returns The scene's handle.
3771
3810
  */
3772
3811
  createVideo(): DesignBlockId;
@@ -4015,6 +4054,7 @@ export declare type SettingsEnum = {
4015
4054
  doubleClickSelectionMode: 'Direct' | 'Hierarchical';
4016
4055
  'touch/pinchAction': 'None' | 'Zoom' | 'Scale';
4017
4056
  'touch/rotateAction': 'None' | 'Rotate';
4057
+ 'camera/clamping/overshootMode': 'Center' | 'Reverse';
4018
4058
  };
4019
4059
 
4020
4060
  /** @public */