@cesdk/engine 1.9.0-preview.0 → 1.9.0-preview.2
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/README.md
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|

|
|
2
2
|
|
|
3
|
-
# Creative Engine
|
|
3
|
+
# IMGLY Creative Engine
|
|
4
4
|
|
|
5
|
-
The CreativeEditor SDK (**CE.SDK**) for Web is a fully customizable,
|
|
6
|
-
simple-to-use design editor.
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
constraints and text placeholders for database automations.
|
|
6
|
+
This package contains the IMG.LY *Creative Engine*, the core of CE.SDK.
|
|
7
|
+
The Creative Engine enables you to build any design editing UI, automation and creative workflow on the web.
|
|
8
|
+
It offers performant and robust graphics processing capabilities combining the best of layout, typography and image processing with advanced workflows centered around templating and adaptation.
|
|
12
9
|
|
|
13
|
-
|
|
14
|
-
the rendering engine and a Javascript API for building headless applications or
|
|
15
|
-
custom UIs.
|
|
10
|
+
The Creative Engine seamlessly integrates into any web app whether you are building a photo editor, template-based design tool or scalable automation of content creation for your application.
|
|
16
11
|
|
|
17
|
-
Visit our [
|
|
18
|
-
customize the engine for your specific use
|
|
12
|
+
Visit our [documentation](https://img.ly/docs/cesdk) for more tutorials on how to integrate and
|
|
13
|
+
customize the engine for your specific use case.
|
|
14
|
+
|
|
15
|
+
## License
|
|
16
|
+
The CreativeEditor SDK is a commercial product. To use it as such and get access to its white-label version - without the watermark in the export - you need to unlock the SDK with a license file. You can purchase a license at https://img.ly/pricing.
|
|
19
17
|
|
|
20
18
|
## Usage
|
|
21
19
|
|
|
Binary file
|
|
Binary file
|
package/index.d.ts
CHANGED
|
@@ -366,6 +366,7 @@ export declare type BlendMode = 'PassThrough' | 'Normal' | 'Darken' | 'Multiply'
|
|
|
366
366
|
* @public
|
|
367
367
|
*/
|
|
368
368
|
export declare class Block extends Entity {
|
|
369
|
+
#private;
|
|
369
370
|
effects: ReadWriteChannelSync<number[]>;
|
|
370
371
|
soloPlaybackEnabled: ReadWriteChannelSync<boolean>;
|
|
371
372
|
trimOffset: ReadWriteChannelSync<number>;
|
|
@@ -374,6 +375,12 @@ export declare class Block extends Entity {
|
|
|
374
375
|
playbackTime: ReadWriteChannelSync<number>;
|
|
375
376
|
selection: ReadWriteChannelSync<boolean>;
|
|
376
377
|
videoMode: ReadWriteChannelSync<boolean>;
|
|
378
|
+
duration: ReadWriteChannelSync<number>;
|
|
379
|
+
name: ReadWriteChannelSync<string>;
|
|
380
|
+
muted: ReadWriteChannelSync<boolean>;
|
|
381
|
+
avResourceTotalDuration: ReadWriteChannelSync<number>;
|
|
382
|
+
timeOffset: ReadWriteChannelSync<number>;
|
|
383
|
+
|
|
377
384
|
|
|
378
385
|
}
|
|
379
386
|
|
|
@@ -808,6 +815,18 @@ export declare class BlockAPI {
|
|
|
808
815
|
* @returns A list of the property names.
|
|
809
816
|
*/
|
|
810
817
|
findAllProperties(id: DesignBlockId): string[];
|
|
818
|
+
/**
|
|
819
|
+
* Check if a property with a given name is readable
|
|
820
|
+
* @param property - The name of the property whose type should be queried.
|
|
821
|
+
* @returns Whether the property is readable or not. Will return false for unknown properties
|
|
822
|
+
*/
|
|
823
|
+
isPropertyReadable(property: string): boolean;
|
|
824
|
+
/**
|
|
825
|
+
* Check if a property with a given name is writable
|
|
826
|
+
* @param property - The name of the property whose type should be queried.
|
|
827
|
+
* @returns Whether the property is writable or not. Will return false for unknown properties
|
|
828
|
+
*/
|
|
829
|
+
isPropertyWritable(property: string): boolean;
|
|
811
830
|
/**
|
|
812
831
|
* Get the type of a property given its name.
|
|
813
832
|
* @param property - The name of the property whose type should be queried.
|
|
@@ -1811,15 +1830,17 @@ export declare class BlockAPI {
|
|
|
1811
1830
|
/**
|
|
1812
1831
|
* Generate a thumbnail for the given video fill.
|
|
1813
1832
|
* @param id - The video fill.
|
|
1814
|
-
* @returns A thumbnail encoded as
|
|
1833
|
+
* @returns A thumbnail encoded as JPEG with a height of 128px.
|
|
1815
1834
|
*/
|
|
1816
1835
|
getVideoFillThumbnail(id: DesignBlockId): Promise<Blob>;
|
|
1817
1836
|
/**
|
|
1818
|
-
* Generate
|
|
1837
|
+
* Generate a thumbnail atlas for the given video fill.
|
|
1819
1838
|
* @param id - The video fill.
|
|
1820
|
-
* @
|
|
1839
|
+
* @param numberOfColumns - The number of columns to generate.
|
|
1840
|
+
* @param numberOfRows - The number of rows to generate.
|
|
1841
|
+
* @returns A thumbnail atlas of the video as JPEG.
|
|
1821
1842
|
*/
|
|
1822
|
-
getVideoFillThumbnailAtlas(id: DesignBlockId): Promise<Blob>;
|
|
1843
|
+
getVideoFillThumbnailAtlas(id: DesignBlockId, numberOfColumns: number, numberOfRows: number): Promise<Blob>;
|
|
1823
1844
|
}
|
|
1824
1845
|
|
|
1825
1846
|
/**
|
|
@@ -2041,6 +2062,7 @@ export declare enum DesignBlockType {
|
|
|
2041
2062
|
Page = "//ly.img.ubq/page",
|
|
2042
2063
|
Image = "//ly.img.ubq/image",
|
|
2043
2064
|
Video = "//ly.img.ubq/video",
|
|
2065
|
+
Audio = "//ly.img.ubq/audio",
|
|
2044
2066
|
Text = "//ly.img.ubq/text",
|
|
2045
2067
|
Sticker = "//ly.img.ubq/sticker",
|
|
2046
2068
|
VectorPath = "//ly.img.ubq/vector_path",
|
|
@@ -2132,14 +2154,14 @@ export declare class EditorAPI {
|
|
|
2132
2154
|
onSettingsChanged(callback: () => void): () => void;
|
|
2133
2155
|
/**
|
|
2134
2156
|
* Set a boolean setting.
|
|
2135
|
-
* @param keypath - The settings keypath, e.g. `
|
|
2157
|
+
* @param keypath - The settings keypath, e.g. `doubleClickToCropEnabled`
|
|
2136
2158
|
* @param value - The value to set.
|
|
2137
2159
|
* @throws An error, if the keypath is invalid.
|
|
2138
2160
|
*/
|
|
2139
2161
|
setSettingBool(keypath: string, value: boolean): void;
|
|
2140
2162
|
/**
|
|
2141
2163
|
* Get a boolean setting.
|
|
2142
|
-
* @param keypath - The settings keypath, e.g. `
|
|
2164
|
+
* @param keypath - The settings keypath, e.g. `doubleClickToCropEnabled`
|
|
2143
2165
|
* @throws An error, if the keypath is invalid.
|
|
2144
2166
|
*/
|
|
2145
2167
|
getSettingBool(keypath: string): boolean;
|
|
@@ -2158,33 +2180,33 @@ export declare class EditorAPI {
|
|
|
2158
2180
|
getSettingInt(keypath: string): number;
|
|
2159
2181
|
/**
|
|
2160
2182
|
* Set a float setting.
|
|
2161
|
-
* @param keypath - The settings keypath, e.g. `
|
|
2183
|
+
* @param keypath - The settings keypath, e.g. `positionSnappingThreshold`
|
|
2162
2184
|
* @param value - The value to set.
|
|
2163
2185
|
* @throws An error, if the keypath is invalid.
|
|
2164
2186
|
*/
|
|
2165
2187
|
setSettingFloat(keypath: string, value: number): void;
|
|
2166
2188
|
/**
|
|
2167
2189
|
* Get a float setting.
|
|
2168
|
-
* @param keypath - The settings keypath, e.g. `
|
|
2190
|
+
* @param keypath - The settings keypath, e.g. `positionSnappingThreshold`
|
|
2169
2191
|
* @throws An error, if the keypath is invalid.
|
|
2170
2192
|
*/
|
|
2171
2193
|
getSettingFloat(keypath: string): number;
|
|
2172
2194
|
/**
|
|
2173
2195
|
* Set a string setting.
|
|
2174
|
-
* @param keypath - The settings keypath, e.g. `
|
|
2196
|
+
* @param keypath - The settings keypath, e.g. `license`
|
|
2175
2197
|
* @param value - The value to set.
|
|
2176
2198
|
* @throws An error, if the keypath is invalid.
|
|
2177
2199
|
*/
|
|
2178
2200
|
setSettingString(keypath: string, value: string): void;
|
|
2179
2201
|
/**
|
|
2180
2202
|
* Get a string setting.
|
|
2181
|
-
* @param keypath - The settings keypath, e.g. `
|
|
2203
|
+
* @param keypath - The settings keypath, e.g. `license`
|
|
2182
2204
|
* @throws An error, if the keypath is invalid.
|
|
2183
2205
|
*/
|
|
2184
2206
|
getSettingString(keypath: string): string;
|
|
2185
2207
|
/**
|
|
2186
2208
|
* Set a color setting.
|
|
2187
|
-
* @param keypath - The settings keypath, e.g. `
|
|
2209
|
+
* @param keypath - The settings keypath, e.g. `highlightColor`.
|
|
2188
2210
|
* @param r - The red color component in the range of 0 to 1.
|
|
2189
2211
|
* @param g - The green color component in the range of 0 to 1.
|
|
2190
2212
|
* @param b - The blue color component in the range of 0 to 1.
|
|
@@ -2193,19 +2215,19 @@ export declare class EditorAPI {
|
|
|
2193
2215
|
setSettingColorRGBA(keypath: string, r: number, g: number, b: number, a?: number): void;
|
|
2194
2216
|
/**
|
|
2195
2217
|
* Get a color setting.
|
|
2196
|
-
* @param keypath - The settings keypath, e.g. `
|
|
2218
|
+
* @param keypath - The settings keypath, e.g. `highlightColor`.
|
|
2197
2219
|
* @returns A tuple of channels red, green, blue and alpha in the range of 0 to 1.
|
|
2198
2220
|
*/
|
|
2199
2221
|
getSettingColorRGBA(keypath: string): RGBA;
|
|
2200
2222
|
/**
|
|
2201
2223
|
* Set an enum setting.
|
|
2202
|
-
* @param keypath - The settings keypath, e.g. `
|
|
2224
|
+
* @param keypath - The settings keypath, e.g. `role`.
|
|
2203
2225
|
* @param value - The enum value as string.
|
|
2204
2226
|
*/
|
|
2205
2227
|
setSettingEnum(keypath: string, value: string): void;
|
|
2206
2228
|
/**
|
|
2207
2229
|
* Get an enum setting.
|
|
2208
|
-
* @param keypath - The settings keypath, e.g. `
|
|
2230
|
+
* @param keypath - The settings keypath, e.g. `role`.
|
|
2209
2231
|
* @returns The value as string.
|
|
2210
2232
|
*/
|
|
2211
2233
|
getSettingEnum(keypath: string): string;
|
|
@@ -2219,7 +2241,7 @@ export declare class EditorAPI {
|
|
|
2219
2241
|
setURIResolver(resolver: (URI: string) => string): void;
|
|
2220
2242
|
/**
|
|
2221
2243
|
* This is the default implementation for the URI resolver.
|
|
2222
|
-
* It resolves the given path relative to the `
|
|
2244
|
+
* It resolves the given path relative to the `basePath` setting.
|
|
2223
2245
|
* @param relativePath - The relative path that should be resolved.
|
|
2224
2246
|
* @returns The resolved absolute URI.
|
|
2225
2247
|
*/
|
|
@@ -2227,7 +2249,7 @@ export declare class EditorAPI {
|
|
|
2227
2249
|
/**
|
|
2228
2250
|
* Resolves the given path.
|
|
2229
2251
|
* If a custom resolver has been set with `setURIResolver`, it invokes it with the given path.
|
|
2230
|
-
* Else, it resolves it as relative to the `
|
|
2252
|
+
* Else, it resolves it as relative to the `basePath` setting.
|
|
2231
2253
|
* This performs NO validation of whether a file exists at the specified location.
|
|
2232
2254
|
* @param relativePath - A relative path string
|
|
2233
2255
|
* @returns The resolved absolute uri or an error if an invalid path was given.
|
|
@@ -2771,6 +2793,13 @@ export declare class SceneAPI {
|
|
|
2771
2793
|
* @returns A promise that resolves once the zoom was set or rejects with an error otherwise.
|
|
2772
2794
|
*/
|
|
2773
2795
|
zoomToBlock(id: DesignBlockId, paddingLeft?: number, paddingTop?: number, paddingRight?: number, paddingBottom?: number): Promise<void>;
|
|
2796
|
+
/**
|
|
2797
|
+
* Subscribe to changes to the zoom level.
|
|
2798
|
+
* @param callback - This function is called at the end of the engine update, if the zoom level has changed.
|
|
2799
|
+
* @returns A method to unsubscribe.
|
|
2800
|
+
* @privateRemarks This will currently fire on _all_ changes to camera properties
|
|
2801
|
+
*/
|
|
2802
|
+
onZoomLevelChanged(callback: (zoomLevel: number) => void): () => void;
|
|
2774
2803
|
/**
|
|
2775
2804
|
* Converts all values of the current scene into the given design unit.
|
|
2776
2805
|
* @param designUnit - The new design unit of the scene
|