@cesdk/engine 1.8.0-alpha.4 → 1.8.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
|
@@ -93,6 +93,7 @@ export declare class AssetAPI {
|
|
|
93
93
|
* @param assetResult - A single assetResult of a `findAssets` query.
|
|
94
94
|
*/
|
|
95
95
|
defaultApplyAsset(assetResult: AssetResult): Promise<void>;
|
|
96
|
+
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
/**
|
|
@@ -366,6 +367,12 @@ export declare type BlendMode = 'PassThrough' | 'Normal' | 'Darken' | 'Multiply'
|
|
|
366
367
|
*/
|
|
367
368
|
export declare class Block extends Entity {
|
|
368
369
|
effects: ReadWriteChannelSync<number[]>;
|
|
370
|
+
soloPlaybackEnabled: ReadWriteChannelSync<boolean>;
|
|
371
|
+
trimOffset: ReadWriteChannelSync<number>;
|
|
372
|
+
trimLength: ReadWriteChannelSync<number>;
|
|
373
|
+
playing: ReadWriteChannelSync<boolean>;
|
|
374
|
+
playbackTime: ReadWriteChannelSync<number>;
|
|
375
|
+
selection: ReadWriteChannelSync<boolean>;
|
|
369
376
|
|
|
370
377
|
}
|
|
371
378
|
|
|
@@ -1003,6 +1010,16 @@ export declare class BlockAPI {
|
|
|
1003
1010
|
* @param minScaleRatio - The minimal crop scale ratio to go down to.
|
|
1004
1011
|
*/
|
|
1005
1012
|
adjustCropToFillFrame(id: DesignBlockId, minScaleRatio: number): number;
|
|
1013
|
+
/**
|
|
1014
|
+
* Adjusts the crop in order to flip the content along its own horizontal axis.
|
|
1015
|
+
* @param block - The block whose crop should be updated.
|
|
1016
|
+
*/
|
|
1017
|
+
flipCropHorizontal(id: DesignBlockId): void;
|
|
1018
|
+
/**
|
|
1019
|
+
* Adjusts the crop in order to flip the content along its own vertical axis.
|
|
1020
|
+
* @param block - The block whose crop should be updated.
|
|
1021
|
+
*/
|
|
1022
|
+
flipCropVertical(id: DesignBlockId): void;
|
|
1006
1023
|
/**
|
|
1007
1024
|
* Query if the given block has an opacity.
|
|
1008
1025
|
* @param id - The block to query.
|
|
@@ -1614,6 +1631,13 @@ export declare class BlockAPI {
|
|
|
1614
1631
|
* @returns whether the key exists.
|
|
1615
1632
|
*/
|
|
1616
1633
|
hasMetadata(id: DesignBlockId, key: string): boolean;
|
|
1634
|
+
/**
|
|
1635
|
+
* Query all metadata keys that exist on this block.
|
|
1636
|
+
* @param id - The block whose metadata will be accessed.
|
|
1637
|
+
* @returns A list of all metadata keys on this block or an error,
|
|
1638
|
+
* if the block is invalid.
|
|
1639
|
+
*/
|
|
1640
|
+
findAllMetadata(id: DesignBlockId): string[];
|
|
1617
1641
|
/**
|
|
1618
1642
|
* Remove metadata associated with the key from the given block.
|
|
1619
1643
|
* If the key does not exist, this method will fail.
|
|
@@ -1690,23 +1714,26 @@ export declare class BlockAPI {
|
|
|
1690
1714
|
hasTrim(id: DesignBlockId): boolean;
|
|
1691
1715
|
/**
|
|
1692
1716
|
* Set the trim offset of the given block or fill.
|
|
1693
|
-
* Sets the
|
|
1694
|
-
* This
|
|
1717
|
+
* Sets the time in seconds within the fill at which playback of the audio or video clip should begin.
|
|
1718
|
+
* This requires the video or audio clip to be loaded.
|
|
1695
1719
|
* @param id - The block whose trim should be updated.
|
|
1696
1720
|
* @param offset - The new trim offset.
|
|
1697
1721
|
*/
|
|
1698
1722
|
setTrimOffset(id: DesignBlockId, offset: number): void;
|
|
1699
1723
|
/**
|
|
1700
1724
|
* Get the trim offset of this block.
|
|
1725
|
+
* * This requires the video or audio clip to be loaded.
|
|
1701
1726
|
* @param id - The block whose trim offset should be queried.
|
|
1702
|
-
* @returns the trim offset.
|
|
1727
|
+
* @returns the trim offset in seconds.
|
|
1703
1728
|
*/
|
|
1704
1729
|
getTrimOffset(id: DesignBlockId): number;
|
|
1705
1730
|
/**
|
|
1706
1731
|
* Set the trim length of the given block or fill.
|
|
1707
|
-
* The trim length is the
|
|
1732
|
+
* The trim length is the duration of the audio or video clip that should be used for playback.
|
|
1733
|
+
* After reaching this value during playback, the trim region will loop.
|
|
1734
|
+
* This requires the video or audio clip to be loaded.
|
|
1708
1735
|
* @param id - The object whose trim length should be updated.
|
|
1709
|
-
* @param length - The new trim length
|
|
1736
|
+
* @param length - The new trim length in seconds.
|
|
1710
1737
|
*/
|
|
1711
1738
|
setTrimLength(id: DesignBlockId, length: number): void;
|
|
1712
1739
|
/**
|
|
@@ -1768,6 +1795,24 @@ export declare class BlockAPI {
|
|
|
1768
1795
|
* @returns Whether solo playback is enabled for this block.
|
|
1769
1796
|
*/
|
|
1770
1797
|
isSoloPlaybackEnabled(id: DesignBlockId): boolean;
|
|
1798
|
+
/**
|
|
1799
|
+
* Begins loading the required audio and video resource for the given video fill or audio block.
|
|
1800
|
+
* @param id - The video fill or audio block whose resource should be loaded.
|
|
1801
|
+
* @returns A Promise that resolves once the resource has finished loading.
|
|
1802
|
+
*/
|
|
1803
|
+
forceLoadAVResource(id: DesignBlockId): Promise<void>;
|
|
1804
|
+
/**
|
|
1805
|
+
* Get the duration in seconds of the video or audio resource that is attached to the given block.
|
|
1806
|
+
* @param id - The video fill or audio block.
|
|
1807
|
+
* @returns The video or audio file duration
|
|
1808
|
+
*/
|
|
1809
|
+
getAVResourceTotalDuration(id: DesignBlockId): number;
|
|
1810
|
+
/**
|
|
1811
|
+
* Generate a thumbnail for the given video fill.
|
|
1812
|
+
* @param id - The video fill.
|
|
1813
|
+
* @returns A thumbnail encoded as PNG with a height of 128px.
|
|
1814
|
+
*/
|
|
1815
|
+
getVideoFillThumbnail(id: DesignBlockId): Promise<Blob>;
|
|
1771
1816
|
}
|
|
1772
1817
|
|
|
1773
1818
|
/**
|
|
@@ -2402,11 +2447,8 @@ declare type HexColorString = string;
|
|
|
2402
2447
|
*
|
|
2403
2448
|
* @public
|
|
2404
2449
|
*/
|
|
2405
|
-
export declare
|
|
2406
|
-
|
|
2407
|
-
constructor();
|
|
2408
|
-
connectedCallback(): void;
|
|
2409
|
-
disconnectedCallback(): void;
|
|
2450
|
+
export declare interface HTMLCreativeEngineCanvasElement extends HTMLElement {
|
|
2451
|
+
|
|
2410
2452
|
|
|
2411
2453
|
}
|
|
2412
2454
|
|
|
@@ -2774,6 +2816,18 @@ export declare type StrokeStyle = 'Dashed' | 'DashedRound' | 'Dotted' | 'LongDas
|
|
|
2774
2816
|
/** @public */
|
|
2775
2817
|
declare type Subscription = number;
|
|
2776
2818
|
|
|
2819
|
+
/**
|
|
2820
|
+
* Checks if the current browser supports video editing
|
|
2821
|
+
* @public
|
|
2822
|
+
*/
|
|
2823
|
+
export declare function supportsVideo(): boolean;
|
|
2824
|
+
|
|
2825
|
+
/**
|
|
2826
|
+
* Checks if the current browser supports web assembly
|
|
2827
|
+
* @public
|
|
2828
|
+
*/
|
|
2829
|
+
export declare function supportsWasm(): boolean;
|
|
2830
|
+
|
|
2777
2831
|
/** @public */
|
|
2778
2832
|
declare type TemplateDefinition = Preset & {
|
|
2779
2833
|
label: string;
|