@cesdk/node 1.20.0 → 1.21.0-rc.1

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.
@@ -2804,7 +2817,7 @@ export declare type DesignBlockTypeLonghand = `//ly.img.ubq/${DesignBlockTypeSho
2804
2817
  * using `cesdk.engine.editor.cerate(id)`.
2805
2818
  * @public
2806
2819
  */
2807
- export declare type DesignBlockTypeShorthand = 'scene' | 'stack' | 'camera' | 'page' | 'graphic' | 'audio' | 'text' | 'group' | 'cutout';
2820
+ export declare type DesignBlockTypeShorthand = 'scene' | 'stack' | 'camera' | 'page' | 'graphic' | 'audio' | 'text' | 'group' | 'cutout' | 'track';
2808
2821
 
2809
2822
  /**
2810
2823
  * The unit type in which the page values (size, distances, etc.) are defined.
@@ -2830,15 +2843,15 @@ export declare class EditorAPI {
2830
2843
  * Set the edit mode of the editor.
2831
2844
  * An edit mode defines what type of content can currently be edited by the user.
2832
2845
  * Hint: the initial edit mode is "Transform".
2833
- * @param mode - "Transform", "Crop", "Text", or a custom value.
2846
+ * @param mode - "Transform", "Crop", "Text", "Playback", or a custom value.
2834
2847
  */
2835
- setEditMode(mode: 'Transform' | 'Crop' | 'Text' | string): void;
2848
+ setEditMode(mode: 'Transform' | 'Crop' | 'Text' | 'Playback' | string): void;
2836
2849
  /**
2837
2850
  * Get the current edit mode of the editor.
2838
2851
  * An edit mode defines what type of content can currently be edited by the user.
2839
- * @returns "Transform", "Crop", "Text", or a custom value.
2852
+ * @returns "Transform", "Crop", "Text", "Playback", or a custom value.
2840
2853
  */
2841
- getEditMode(): 'Transform' | 'Crop' | 'Text' | string;
2854
+ getEditMode(): 'Transform' | 'Crop' | 'Text' | 'Playback' | string;
2842
2855
  /**
2843
2856
  * Get the type of cursor that should be displayed by the application.
2844
2857
  * @returns The cursor type.
@@ -3064,6 +3077,15 @@ export declare class EditorAPI {
3064
3077
  * @returns The current memory usage in bytes.
3065
3078
  */
3066
3079
  getUsedMemory(): number;
3080
+ /**
3081
+ * Get the export size limit in pixels on the current device. An export is
3082
+ * only possible when both the width and height of the output are below or
3083
+ * equal this limit. However, this is only an upper limit as the export might
3084
+ * also not be possible due to other reasons, e.g., memory constraints.
3085
+ * @returns The upper export size limit in pixels or an unlimited size, i.e,
3086
+ * the maximum signed 32-bit integer value, if the limit is unknown.
3087
+ */
3088
+ getMaxExportSize(): number;
3067
3089
  /**
3068
3090
  * Sets a custom URI resolver.
3069
3091
  * This function can be called more than once. Subsequent calls will overwrite previous calls.
@@ -3251,6 +3273,20 @@ export declare type ExportOptions = {
3251
3273
  * setting instead of embedding them directly.
3252
3274
  */
3253
3275
  exportPdfWithHighCompatibility?: boolean;
3276
+ /**
3277
+ * Export the PDF document with an underlayer.
3278
+ * An underlayer is generated by adding a graphics block behind the existing elements of the shape of the elements on
3279
+ * the page.
3280
+ */
3281
+ exportPdfWithUnderlayer?: boolean;
3282
+ /**
3283
+ * The name of the spot color to be used for the underlayer's fill.
3284
+ */
3285
+ underlayerSpotColorName?: string;
3286
+ /**
3287
+ * The adjustment in size of the shape of the underlayer.
3288
+ */
3289
+ underlayerOffset?: number;
3254
3290
  };
3255
3291
 
3256
3292
  /** @public */
@@ -3262,6 +3298,9 @@ declare interface ExportOptions_2 {
3262
3298
  targetWidth: number;
3263
3299
  targetHeight: number;
3264
3300
  exportPdfWithHighCompatibility: boolean;
3301
+ exportPdfWithUnderlayer: boolean;
3302
+ underlayerSpotColorName: string;
3303
+ underlayerOffset: number;
3265
3304
  }
3266
3305
 
3267
3306
  /** @public */
@@ -3536,7 +3575,7 @@ export declare class SceneAPI {
3536
3575
  */
3537
3576
  create(sceneLayout?: SceneLayout): DesignBlockId;
3538
3577
  /**
3539
- * Create a new scene in video mode, along with its own camera and page stack.
3578
+ * Create a new scene in video mode, along with its own camera.
3540
3579
  * @returns The scene's handle.
3541
3580
  */
3542
3581
  createVideo(): DesignBlockId;
@@ -3785,6 +3824,7 @@ export declare type SettingsEnum = {
3785
3824
  doubleClickSelectionMode: 'Direct' | 'Hierarchical';
3786
3825
  'touch/pinchAction': 'None' | 'Zoom' | 'Scale';
3787
3826
  'touch/rotateAction': 'None' | 'Rotate';
3827
+ 'camera/clamping/overshootMode': 'Center' | 'Reverse';
3788
3828
  };
3789
3829
 
3790
3830
  /** @public */