@cesdk/node 1.10.1 → 1.11.0-preview.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.
|
Binary file
|
package/index.d.ts
CHANGED
|
@@ -436,17 +436,13 @@ export declare class BlockAPI {
|
|
|
436
436
|
/**
|
|
437
437
|
* Exports a design block as a video file of the given mime type.
|
|
438
438
|
* Note: The export will run across multiple iterations of the update loop. In each iteration a frame is scheduled for encoding.
|
|
439
|
-
* @param
|
|
440
|
-
* @param timeOffset - The time offset in seconds of the scene's timeline from which the video will start.
|
|
441
|
-
* @param duration - The duration in seconds of the final video.
|
|
439
|
+
* @param handle - The design block element to export. Currently, only the scene block is supported.
|
|
442
440
|
* @param mimeType - The mime type of the output video file.
|
|
443
|
-
* @param resolutionWidth - The target video width in pixel.
|
|
444
|
-
* @param resolutionHeight - The target video height in pixel.
|
|
445
|
-
* @param framerate - The target framerate in Hz.
|
|
446
441
|
* @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.
|
|
442
|
+
* @param options - The options for exporting the video
|
|
447
443
|
* @returns A promise that resolves with video blob or is rejected with an error.
|
|
448
444
|
*/
|
|
449
|
-
exportVideo(handle: DesignBlockId,
|
|
445
|
+
exportVideo(handle: DesignBlockId, mimeType: MimeType_2 | undefined, progressCallback: (numberOfRenderedFrames: number, numberOfEncodedFrames: number, totalNumberOfFrames: number) => void, options: VideoExportOptions): Promise<Blob>;
|
|
450
446
|
/**
|
|
451
447
|
* Loads existing blocks from the given string.
|
|
452
448
|
* The blocks are not attached by default and won't be visible until attached to a page or the scene.
|
|
@@ -766,7 +762,7 @@ export declare class BlockAPI {
|
|
|
766
762
|
/**
|
|
767
763
|
* Set a block's mode for its width.
|
|
768
764
|
* @param id - The block to update.
|
|
769
|
-
* @param mode - The width mode:
|
|
765
|
+
* @param mode - The width mode: Absolute, Percent or Auto.
|
|
770
766
|
*/
|
|
771
767
|
setWidthMode(id: DesignBlockId, mode: SizeMode): void;
|
|
772
768
|
/**
|
|
@@ -778,7 +774,7 @@ export declare class BlockAPI {
|
|
|
778
774
|
/**
|
|
779
775
|
* Set a block's mode for its height.
|
|
780
776
|
* @param id - The block to update.
|
|
781
|
-
* @param mode - The height mode:
|
|
777
|
+
* @param mode - The height mode: Absolute, Percent or Auto.
|
|
782
778
|
*/
|
|
783
779
|
setHeightMode(id: DesignBlockId, mode: SizeMode): void;
|
|
784
780
|
/**
|
|
@@ -905,6 +901,24 @@ export declare class BlockAPI {
|
|
|
905
901
|
* @returns The position and size of the bounding box.
|
|
906
902
|
*/
|
|
907
903
|
getScreenSpaceBoundingBoxXYWH(ids: DesignBlockId[]): XYWH;
|
|
904
|
+
/**
|
|
905
|
+
* Align multiple blocks horizontally within their bounding box (or group) or a single block to its parent.
|
|
906
|
+
* @param ids - A non-empty array of block ids.
|
|
907
|
+
* @param alignment - How they should be aligned: left, right, or center
|
|
908
|
+
*/
|
|
909
|
+
alignHorizontally(ids: DesignBlockId[], horizontalBlockAlignment: HorizontalBlockAlignment): void;
|
|
910
|
+
/**
|
|
911
|
+
* Align multiple blocks vertically within their bounding box (or group) or a single block to its parent.
|
|
912
|
+
* @param ids - A non-empty array of block ids.
|
|
913
|
+
* @param alignment - How they should be aligned: top, bottom, or center
|
|
914
|
+
*/
|
|
915
|
+
alignVertically(ids: DesignBlockId[], verticalBlockAlignment: VerticalBlockAlignment): void;
|
|
916
|
+
/**
|
|
917
|
+
* Confirms that a given set of blocks can be aligned.
|
|
918
|
+
* @param ids - A non-empty array of block ids.
|
|
919
|
+
* @returns Whether the blocks can be aligned.
|
|
920
|
+
*/
|
|
921
|
+
isAlignable(ids: DesignBlockId[]): boolean;
|
|
908
922
|
/**
|
|
909
923
|
* Scales the block and all of its children proportionally around the specified
|
|
910
924
|
* relative anchor point.
|
|
@@ -1066,14 +1080,14 @@ export declare class BlockAPI {
|
|
|
1066
1080
|
* @param property - The name of the property to set.
|
|
1067
1081
|
* @param value - The enum value as string.
|
|
1068
1082
|
*/
|
|
1069
|
-
setEnum(id: DesignBlockId, property: string, value:
|
|
1083
|
+
setEnum<T extends string = string>(id: DesignBlockId, property: string, value: T): void;
|
|
1070
1084
|
/**
|
|
1071
1085
|
* Get the value of an enum property of the given design block.
|
|
1072
1086
|
* @param id - The block whose property should be queried.
|
|
1073
1087
|
* @param property - The name of the property to query.
|
|
1074
1088
|
* @returns The value as string.
|
|
1075
1089
|
*/
|
|
1076
|
-
getEnum(id: DesignBlockId, property: string):
|
|
1090
|
+
getEnum<T extends string = string>(id: DesignBlockId, property: string): T;
|
|
1077
1091
|
/**
|
|
1078
1092
|
* Query if the given block has crop properties.
|
|
1079
1093
|
* @param id - The block to query.
|
|
@@ -1605,6 +1619,69 @@ export declare class BlockAPI {
|
|
|
1605
1619
|
* @returns The drop shadow's clipping.
|
|
1606
1620
|
*/
|
|
1607
1621
|
getDropShadowClip(id: DesignBlockId): boolean;
|
|
1622
|
+
/**
|
|
1623
|
+
* Inserts the given text into the selected range of the text block.
|
|
1624
|
+
* @param block - The text block into which to insert the given text.
|
|
1625
|
+
* @param text - The text which should replace the selected range in the block.
|
|
1626
|
+
* @param from - The start index of the UTF-16 range that should be replaced.
|
|
1627
|
+
* If the value is negative, this will fall back to the start of the entire text range.
|
|
1628
|
+
* @param to - The UTF-16 index after the last grapheme that should be replaced by the inserted text.
|
|
1629
|
+
* If `from` and `to` are negative, a this will fall back to the end of the entire text range, so the entire text will be replaced.
|
|
1630
|
+
* If `to` is negative but `from` is greater than or equal to 0, the text will be inserted at the index defined by `from`.
|
|
1631
|
+
*/
|
|
1632
|
+
replaceText(id: DesignBlockId, text: string, from?: number, to?: number): void;
|
|
1633
|
+
/**
|
|
1634
|
+
* Removes selected range of text of the given text block.
|
|
1635
|
+
* @param block - The text block from which the selected text should be removed.
|
|
1636
|
+
* @param from - The start index of the UTF-16 range that should be removed.
|
|
1637
|
+
* If the value is negative, this will fall back to the start of the entire text range.
|
|
1638
|
+
* @param to - The UTF-16 index after the last grapheme that should be removed.
|
|
1639
|
+
* If the value is negative, this will fall back to the end of the entire text range.
|
|
1640
|
+
*/
|
|
1641
|
+
removeText(id: DesignBlockId, from?: number, to?: number): void;
|
|
1642
|
+
/**
|
|
1643
|
+
* Changes the color of the text in the selected range to the given color.
|
|
1644
|
+
* @param block - The text block whose color should be changed.
|
|
1645
|
+
* @param color - The new color of the selected text range.
|
|
1646
|
+
* @param from - The start index of the UTF-16 range whose color should be changed.
|
|
1647
|
+
* If the value is negative and the block is currently being edited, this will fall back to the start of the current cursor index / selected grapheme range.
|
|
1648
|
+
* If the value is negative and the block is not being edited, this will fall back to the start of the entire text range.
|
|
1649
|
+
* @param to - The UTF-16 index after the last grapheme whose color should be changed.
|
|
1650
|
+
* If the value is negative and the block is currently being edited, this will fall back to the end of the current cursor index / selected grapheme range.
|
|
1651
|
+
* If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
|
|
1652
|
+
*/
|
|
1653
|
+
setTextColor(id: DesignBlockId, color: RGBAColor | SpotColor, from?: number, to?: number): void;
|
|
1654
|
+
/**
|
|
1655
|
+
* Returns the ordered unique list of colors of the text in the selected range.
|
|
1656
|
+
* @param block - The text block whose colors should be returned.
|
|
1657
|
+
* @param from - The start index of the UTF-16 range whose colors should be returned.
|
|
1658
|
+
* If the value is negative, this will fall back to the start of the entire text range.
|
|
1659
|
+
* @param to - The UTF-16 index after the last grapheme whose colors should be returned.
|
|
1660
|
+
* If the value is negative, this will fall back to the end of the entire text range.
|
|
1661
|
+
*/
|
|
1662
|
+
getTextColors(id: DesignBlockId, from?: number, to?: number): Array<RGBAColor | SpotColor>;
|
|
1663
|
+
/**
|
|
1664
|
+
* Returns the ordered unique list of font weights of the text in the selected range.
|
|
1665
|
+
* @param block - The text block whose font weights should be returned.
|
|
1666
|
+
* @param from - The start index of the UTF-16 range whose font weights should be returned.
|
|
1667
|
+
* If the value is negative and the block is currently being edited, this will fall back to the start of the current cursor index / selected grapheme range.
|
|
1668
|
+
* If the value is negative and the block is not being edited, this will fall back to the start of the entire text range.
|
|
1669
|
+
* @param to - The UTF-16 index after the last grapheme whose font weights should be returned.
|
|
1670
|
+
* If the value is negative and the block is currently being edited, this will fall back to the end of the current cursor index / selected grapheme range.
|
|
1671
|
+
* If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
|
|
1672
|
+
*/
|
|
1673
|
+
getTextFontWeights(id: DesignBlockId, from?: number, to?: number): FontWeight[];
|
|
1674
|
+
/**
|
|
1675
|
+
* Returns the ordered unique list of font styles of the text in the selected range.
|
|
1676
|
+
* @param block - The text block whose font styles should be returned.
|
|
1677
|
+
* @param from - The start index of the UTF-16 range whose font weights should be returned.
|
|
1678
|
+
* If the value is negative and the block is currently being edited, this will fall back to the start of the current cursor index / selected grapheme range.
|
|
1679
|
+
* If the value is negative and the block is not being edited, this will fall back to the start of the entire text range.
|
|
1680
|
+
* @param to - The UTF-16 index after the last grapheme whose font styles should be returned.
|
|
1681
|
+
* If the value is negative and the block is currently being edited, this will fall back to the end of the current cursor index / selected grapheme range.
|
|
1682
|
+
* If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.
|
|
1683
|
+
*/
|
|
1684
|
+
getTextFontStyles(id: DesignBlockId, from?: number, to?: number): FontStyle[];
|
|
1608
1685
|
/**
|
|
1609
1686
|
* Query if the given block has fill color properties.
|
|
1610
1687
|
* @param id - The block to query.
|
|
@@ -2149,15 +2226,14 @@ export { ConfigTypes }
|
|
|
2149
2226
|
export declare interface Configuration {
|
|
2150
2227
|
baseURL: string;
|
|
2151
2228
|
license?: string;
|
|
2152
|
-
|
|
2153
|
-
|
|
2229
|
+
featureFlags?: {
|
|
2230
|
+
[flag: string]: boolean | string;
|
|
2231
|
+
};
|
|
2154
2232
|
/**
|
|
2155
2233
|
* @deprecated Extensions have been superseded by AssetSources and should no longer be used.
|
|
2156
2234
|
*/
|
|
2157
2235
|
extensions: ConfigTypes.Extensions;
|
|
2158
2236
|
core: ConfigTypes.Core;
|
|
2159
|
-
scene: ConfigTypes.Scene;
|
|
2160
|
-
page: ConfigTypes.Page;
|
|
2161
2237
|
assetSources: ConfigTypes.AssetSources;
|
|
2162
2238
|
presets: ConfigTypes.Presets;
|
|
2163
2239
|
variables: ConfigTypes.Variables;
|
|
@@ -2229,7 +2305,7 @@ declare class CreativeEngine {
|
|
|
2229
2305
|
* @param config - An optional configuration object.
|
|
2230
2306
|
* @returns An engine instance.
|
|
2231
2307
|
*/
|
|
2232
|
-
static init(config?: Partial<Configuration>): Promise<CreativeEngine>;
|
|
2308
|
+
static init(config?: Partial<Configuration> & OldConfiguration): Promise<CreativeEngine>;
|
|
2233
2309
|
}
|
|
2234
2310
|
export default CreativeEngine;
|
|
2235
2311
|
|
|
@@ -2262,8 +2338,11 @@ export declare enum DesignBlockType {
|
|
|
2262
2338
|
Group = "//ly.img.ubq/group"
|
|
2263
2339
|
}
|
|
2264
2340
|
|
|
2265
|
-
/**
|
|
2266
|
-
|
|
2341
|
+
/**
|
|
2342
|
+
* The scene layout determines how the layout stack should layout its pages.
|
|
2343
|
+
* @public
|
|
2344
|
+
*/
|
|
2345
|
+
export declare type DesignUnit = 'Pixel' | 'Millimeter' | 'Inch';
|
|
2267
2346
|
|
|
2268
2347
|
/**
|
|
2269
2348
|
* @public
|
|
@@ -2276,7 +2355,7 @@ export declare class EditorAPI {
|
|
|
2276
2355
|
* @param callback - This function is called at the end of the engine update, if the editor state has changed.
|
|
2277
2356
|
* @returns A method to unsubscribe.
|
|
2278
2357
|
*/
|
|
2279
|
-
onStateChanged(callback: () => void)
|
|
2358
|
+
onStateChanged: (callback: () => void) => (() => void);
|
|
2280
2359
|
/**
|
|
2281
2360
|
* Set the edit mode of the editor.
|
|
2282
2361
|
* An edit mode defines what type of content can currently be edited by the user.
|
|
@@ -2362,13 +2441,13 @@ export declare class EditorAPI {
|
|
|
2362
2441
|
* @param callback - This function is called at the end of the engine update, if the undo/redo history has been changed.
|
|
2363
2442
|
* @returns A method to unsubscribe
|
|
2364
2443
|
*/
|
|
2365
|
-
onHistoryUpdated(callback: () => void)
|
|
2444
|
+
onHistoryUpdated: (callback: () => void) => (() => void);
|
|
2366
2445
|
/**
|
|
2367
2446
|
* Subscribe to changes to the editor settings.
|
|
2368
2447
|
* @param callback - This function is called at the end of the engine update, if the editor settings have changed.
|
|
2369
2448
|
* @returns A method to unsubscribe.
|
|
2370
2449
|
*/
|
|
2371
|
-
onSettingsChanged(callback: () => void)
|
|
2450
|
+
onSettingsChanged: (callback: () => void) => (() => void);
|
|
2372
2451
|
/**
|
|
2373
2452
|
* Set a boolean setting.
|
|
2374
2453
|
* @param keypath - The settings keypath, e.g. `doubleClickToCropEnabled`
|
|
@@ -2536,7 +2615,7 @@ export declare class EventAPI {
|
|
|
2536
2615
|
* @param callback - The event callback. Events are bundled and sent at the end of each engine update.
|
|
2537
2616
|
* @returns A method to unsubscribe.
|
|
2538
2617
|
*/
|
|
2539
|
-
subscribe(blocks: DesignBlockId[], callback: (events: BlockEvent[]) => void)
|
|
2618
|
+
subscribe: (blocks: DesignBlockId[], callback: (events: BlockEvent[]) => void) => (() => void);
|
|
2540
2619
|
}
|
|
2541
2620
|
|
|
2542
2621
|
/**
|
|
@@ -2610,7 +2689,7 @@ declare type Extensions = {
|
|
|
2610
2689
|
/**
|
|
2611
2690
|
* @public
|
|
2612
2691
|
*/
|
|
2613
|
-
export declare type FillType = 'Solid' | 'Gradient' | 'Video';
|
|
2692
|
+
export declare type FillType = 'Solid' | 'Gradient' | 'Video' | 'Image';
|
|
2614
2693
|
|
|
2615
2694
|
/** @public */
|
|
2616
2695
|
declare interface FindAssetsQuery {
|
|
@@ -2680,6 +2759,15 @@ declare type HexColorString = string;
|
|
|
2680
2759
|
*/
|
|
2681
2760
|
export declare type HistoryId = number;
|
|
2682
2761
|
|
|
2762
|
+
/**
|
|
2763
|
+
* - Left: The blocks get left aligned.
|
|
2764
|
+
* - Right: The blocks get right aligned.
|
|
2765
|
+
* - Center: The blocks get center aligned.
|
|
2766
|
+
*
|
|
2767
|
+
* @public
|
|
2768
|
+
*/
|
|
2769
|
+
export declare type HorizontalBlockAlignment = 'Left' | 'Right' | 'Center';
|
|
2770
|
+
|
|
2683
2771
|
/**
|
|
2684
2772
|
* e.g. `en`, `de`, etc.
|
|
2685
2773
|
* @public
|
|
@@ -2708,7 +2796,45 @@ declare enum MimeType_2 {
|
|
|
2708
2796
|
}
|
|
2709
2797
|
export { MimeType_2 as MimeType }
|
|
2710
2798
|
|
|
2711
|
-
/**
|
|
2799
|
+
/**
|
|
2800
|
+
* Contains configuration keys that have been removed from the actual
|
|
2801
|
+
* configuration, but are still supported publicly
|
|
2802
|
+
* @public
|
|
2803
|
+
*/
|
|
2804
|
+
export declare interface OldConfiguration {
|
|
2805
|
+
/**
|
|
2806
|
+
* @deprecated This config key has been removed.
|
|
2807
|
+
* You can configure a role via `setSettingEnum('role', role)` in the
|
|
2808
|
+
* EditorAPI.
|
|
2809
|
+
*/
|
|
2810
|
+
role?: RoleString;
|
|
2811
|
+
/**
|
|
2812
|
+
* @deprecated This config key has been removed completely.
|
|
2813
|
+
* The settings that were configured here can be set via the
|
|
2814
|
+
* following EditorAPI settings:
|
|
2815
|
+
* - `setSettingBool('page/title/show', show)`
|
|
2816
|
+
* - `setSettingString('page/title/fontFileUri', uri)`
|
|
2817
|
+
* - `setSettingBool('page/title/dimOutOfPageAreas', dim)`
|
|
2818
|
+
*/
|
|
2819
|
+
page?: Page;
|
|
2820
|
+
/**
|
|
2821
|
+
* @deprecated This type definition has been removed
|
|
2822
|
+
* The settings that were configured here can be set via the
|
|
2823
|
+
* BlockApi on the scene block
|
|
2824
|
+
* @public
|
|
2825
|
+
*/
|
|
2826
|
+
scene?: Scene;
|
|
2827
|
+
}
|
|
2828
|
+
|
|
2829
|
+
/**
|
|
2830
|
+
* @deprecated This type definition has been removed
|
|
2831
|
+
* The settings that were configured here can be set via the
|
|
2832
|
+
* following EditorAPI settings:
|
|
2833
|
+
* - `setSettingBool('page/title/show', show)`
|
|
2834
|
+
* - `setSettingString('page/title/fontFileUri', uri)`
|
|
2835
|
+
* - `setSettingBool('page/title/dimOutOfPageAreas', dim)`
|
|
2836
|
+
* @public
|
|
2837
|
+
*/
|
|
2712
2838
|
declare type Page = {
|
|
2713
2839
|
title: {
|
|
2714
2840
|
/**
|
|
@@ -2739,7 +2865,7 @@ export declare interface PageDuration {
|
|
|
2739
2865
|
declare type PageFormatDefinition = Preset & {
|
|
2740
2866
|
width: number;
|
|
2741
2867
|
height: number;
|
|
2742
|
-
unit:
|
|
2868
|
+
unit: 'px' | 'mm' | 'in';
|
|
2743
2869
|
fixedOrientation?: boolean;
|
|
2744
2870
|
};
|
|
2745
2871
|
|
|
@@ -2828,23 +2954,26 @@ export declare interface RGBColor {
|
|
|
2828
2954
|
export declare type RoleString = 'Creator' | 'Adopter' | 'Viewer' | 'Presenter';
|
|
2829
2955
|
|
|
2830
2956
|
/**
|
|
2831
|
-
*
|
|
2957
|
+
* @deprecated This type definition is not used anymore and will be removed
|
|
2958
|
+
* in the future. The settings that were configured here can be set via the
|
|
2959
|
+
* BlockApi on the scene block:
|
|
2960
|
+
*
|
|
2961
|
+
* ```ts
|
|
2962
|
+
* engine.block.setInt(sceneId, 'scene/dpi', dpi);
|
|
2963
|
+
* engine.block.setInt(sceneId, 'scene/pixelScaleFactor', factor);
|
|
2964
|
+
* ```
|
|
2965
|
+
*
|
|
2832
2966
|
* @public
|
|
2833
2967
|
*/
|
|
2834
2968
|
declare type Scene = {
|
|
2835
2969
|
/**
|
|
2836
|
-
*
|
|
2837
|
-
*
|
|
2838
|
-
*
|
|
2839
|
-
* This is only relevant for new scenes that are created in the editor. Loaded scenes will use the
|
|
2840
|
-
* value stored in their serialization file.
|
|
2970
|
+
* @deprecated Setting this value has no effect. You can change the dpi of the
|
|
2971
|
+
* current scene via `engine.block.setInt(sceneId, 'scene/dpi', dpi)`
|
|
2841
2972
|
*/
|
|
2842
2973
|
dpi: number;
|
|
2843
2974
|
/**
|
|
2844
|
-
*
|
|
2845
|
-
*
|
|
2846
|
-
* This is only relevant for new scenes that are created in the editor. Loaded scenes will use the
|
|
2847
|
-
* value stored in their serialization file.
|
|
2975
|
+
* @deprecated Setting this value has no effect. You can change the dpi of the
|
|
2976
|
+
* current scene via `engine.block.setInt(sceneId, 'scene/pixelScaleFactor', * factor)`
|
|
2848
2977
|
*/
|
|
2849
2978
|
pixelScaleFactor: number;
|
|
2850
2979
|
};
|
|
@@ -2898,11 +3027,19 @@ export declare class SceneAPI {
|
|
|
2898
3027
|
* Fetching the image may take an arbitrary amount of time, so the scene isn't immediately
|
|
2899
3028
|
* available.
|
|
2900
3029
|
* @param url - The image URL.
|
|
2901
|
-
* @param dpi - The
|
|
2902
|
-
* @param pixelScaleFactor - The
|
|
3030
|
+
* @param dpi - The scene's DPI.
|
|
3031
|
+
* @param pixelScaleFactor - The display's pixel scale factor.
|
|
2903
3032
|
* @returns A promise that resolves with the scene ID on success or rejected with an error otherwise.
|
|
2904
3033
|
*/
|
|
2905
3034
|
createFromImage(url: string, dpi?: number, pixelScaleFactor?: number, sceneLayout?: SceneLayout, spacing?: number, spacingInScreenSpace?: boolean): Promise<DesignBlockId>;
|
|
3035
|
+
/**
|
|
3036
|
+
* Loads the given video and creates a scene with a single page showing the video.
|
|
3037
|
+
* Fetching the video may take an arbitrary amount of time, so the scene isn't immediately
|
|
3038
|
+
* available.
|
|
3039
|
+
* @param url - The video URL.
|
|
3040
|
+
* @returns A promise that resolves with the scene ID on success or rejected with an error otherwise.
|
|
3041
|
+
*/
|
|
3042
|
+
createFromVideo(url: string): Promise<DesignBlockId>;
|
|
2906
3043
|
/**
|
|
2907
3044
|
* Return the currently active scene.
|
|
2908
3045
|
* @returns The scene or null, if none was created yet.
|
|
@@ -2931,6 +3068,16 @@ export declare class SceneAPI {
|
|
|
2931
3068
|
* @returns The current mode of the scene.
|
|
2932
3069
|
*/
|
|
2933
3070
|
getMode(): SceneMode;
|
|
3071
|
+
/**
|
|
3072
|
+
* Converts all values of the current scene into the given design unit.
|
|
3073
|
+
* @param designUnit - The new design unit of the scene
|
|
3074
|
+
*/
|
|
3075
|
+
setDesignUnit(designUnit: DesignUnit): void;
|
|
3076
|
+
/**
|
|
3077
|
+
* Returns the design unit of the current scene.
|
|
3078
|
+
* @returns The current design unit.
|
|
3079
|
+
*/
|
|
3080
|
+
getDesignUnit(): DesignUnit;
|
|
2934
3081
|
/**
|
|
2935
3082
|
* Get the sorted list of pages in the scene.
|
|
2936
3083
|
* @returns The sorted list of pages in the scene.
|
|
@@ -3008,23 +3155,13 @@ export declare class SceneAPI {
|
|
|
3008
3155
|
* @returns A method to unsubscribe.
|
|
3009
3156
|
* @privateRemarks This will currently fire on _all_ changes to camera properties
|
|
3010
3157
|
*/
|
|
3011
|
-
onZoomLevelChanged(callback: () => void)
|
|
3158
|
+
onZoomLevelChanged: (callback: () => void) => (() => void);
|
|
3012
3159
|
/**
|
|
3013
3160
|
* Subscribe to changes to the active scene rendered by the engine.
|
|
3014
3161
|
* @param callback - This function is called at the end of the engine update, if the active scene has changed.
|
|
3015
3162
|
* @returns A method to unsubscribe.
|
|
3016
3163
|
*/
|
|
3017
|
-
onActiveChanged(callback: () => void)
|
|
3018
|
-
/**
|
|
3019
|
-
* Converts all values of the current scene into the given design unit.
|
|
3020
|
-
* @param designUnit - The new design unit of the scene
|
|
3021
|
-
*/
|
|
3022
|
-
unstable_setDesignUnit(designUnit: DesignUnit): void;
|
|
3023
|
-
/**
|
|
3024
|
-
* Returns the design unit of the current scene.
|
|
3025
|
-
* @returns The current design unit.
|
|
3026
|
-
*/
|
|
3027
|
-
unstable_getDesignUnit(): DesignUnit;
|
|
3164
|
+
onActiveChanged: (callback: () => void) => (() => void);
|
|
3028
3165
|
}
|
|
3029
3166
|
|
|
3030
3167
|
/**
|
|
@@ -3076,8 +3213,6 @@ export declare type SizeMode = 'Absolute' | 'Percent' | 'Auto';
|
|
|
3076
3213
|
/** @public */
|
|
3077
3214
|
export declare interface SpotColor {
|
|
3078
3215
|
name: string;
|
|
3079
|
-
rgbApproximation: RGBAColor;
|
|
3080
|
-
cmykApproximation: CMYKColor;
|
|
3081
3216
|
}
|
|
3082
3217
|
|
|
3083
3218
|
declare interface SpotColorLookup {
|
|
@@ -3174,6 +3309,65 @@ export declare interface Vec4 {
|
|
|
3174
3309
|
w: number;
|
|
3175
3310
|
}
|
|
3176
3311
|
|
|
3312
|
+
/**
|
|
3313
|
+
* - Top: The blocks get top aligned.
|
|
3314
|
+
* - Bottom: The blocks get bottom aligned.
|
|
3315
|
+
* - Center: The blocks get center aligned.
|
|
3316
|
+
*
|
|
3317
|
+
* @public
|
|
3318
|
+
*/
|
|
3319
|
+
export declare type VerticalBlockAlignment = 'Top' | 'Bottom' | 'Center';
|
|
3320
|
+
|
|
3321
|
+
/**
|
|
3322
|
+
* @public
|
|
3323
|
+
*/
|
|
3324
|
+
export declare type VideoExportOptions = {
|
|
3325
|
+
/**
|
|
3326
|
+
* Determines the encoder feature set and in turn the quality, size and speed of the encoding process.
|
|
3327
|
+
*
|
|
3328
|
+
* @defaultValue 77 (Main)
|
|
3329
|
+
*/
|
|
3330
|
+
h264Profile?: number;
|
|
3331
|
+
/**
|
|
3332
|
+
* Controls the H.264 encoding level. This relates to parameters used by the encoder such as bit rate,
|
|
3333
|
+
* timings and motion vectors. Defined by the spec are levels 1.0 up to 6.2. To arrive at an integer value,
|
|
3334
|
+
* the level is multiplied by ten. E.g. to get level 5.2, pass a value of 52.
|
|
3335
|
+
*
|
|
3336
|
+
* @defaultValue 52
|
|
3337
|
+
*/
|
|
3338
|
+
h264Level?: number;
|
|
3339
|
+
/**
|
|
3340
|
+
* The time offset in seconds of the scene's timeline from which the video will start.
|
|
3341
|
+
*
|
|
3342
|
+
* @defaultValue 0
|
|
3343
|
+
*/
|
|
3344
|
+
timeOffset?: number;
|
|
3345
|
+
/**
|
|
3346
|
+
* The duration in seconds of the final video.
|
|
3347
|
+
*
|
|
3348
|
+
* @defaultValue The duration of the scene.
|
|
3349
|
+
*/
|
|
3350
|
+
duration?: number;
|
|
3351
|
+
/**
|
|
3352
|
+
* The target framerate of the exported video in Hz.
|
|
3353
|
+
*
|
|
3354
|
+
* @defaultValue 30
|
|
3355
|
+
*/
|
|
3356
|
+
framerate?: number;
|
|
3357
|
+
/**
|
|
3358
|
+
* An optional target width used in conjunction with target height.
|
|
3359
|
+
* If used, the block will be rendered large enough, that it fills the target
|
|
3360
|
+
* size entirely while maintaining its aspect ratio.
|
|
3361
|
+
*/
|
|
3362
|
+
targetWidth?: number;
|
|
3363
|
+
/**
|
|
3364
|
+
* An optional target height used in conjunction with target width.
|
|
3365
|
+
* If used, the block will be rendered large enough, that it fills the target
|
|
3366
|
+
* size entirely while maintaining its aspect ratio.
|
|
3367
|
+
*/
|
|
3368
|
+
targetHeight?: number;
|
|
3369
|
+
};
|
|
3370
|
+
|
|
3177
3371
|
/**
|
|
3178
3372
|
* Describes a rectangle on the screen
|
|
3179
3373
|
* - `x` and `y` indicate the position
|