@cesdk/node 1.11.0-preview.1 → 1.11.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.
|
Binary file
|
|
Binary file
|
package/example.js
CHANGED
|
@@ -5,7 +5,8 @@ const CreativeEngine = require('./index.js');
|
|
|
5
5
|
|
|
6
6
|
const { DesignBlockType, MimeType } = CreativeEngine;
|
|
7
7
|
|
|
8
|
-
CreativeEngine.init().then((engine) => {
|
|
8
|
+
CreativeEngine.init().then(async (engine) => {
|
|
9
|
+
await engine.addDefaultAssetSources();
|
|
9
10
|
console.log('Loading scene');
|
|
10
11
|
engine.scene
|
|
11
12
|
.loadFromURL(`file://${__dirname}/demo.scene`)
|
package/index.d.ts
CHANGED
|
@@ -2306,9 +2306,60 @@ declare class CreativeEngine {
|
|
|
2306
2306
|
* @returns An engine instance.
|
|
2307
2307
|
*/
|
|
2308
2308
|
static init(config?: Partial<Configuration> & OldConfiguration): Promise<CreativeEngine>;
|
|
2309
|
+
/**
|
|
2310
|
+
* Convenience function that registers a set of asset sources containing our
|
|
2311
|
+
* default assets. These are
|
|
2312
|
+
*
|
|
2313
|
+
* - `'ly.img.sticker'` - Various stickers
|
|
2314
|
+
* - `'ly.img.vectorpath'` - Shapes and arrows
|
|
2315
|
+
* - `'ly.img.filter.lut'` - LUT effects of various kinds.
|
|
2316
|
+
* - `'ly.img.filter.duotone'` - LUT effects of various kinds.
|
|
2317
|
+
*
|
|
2318
|
+
* These assets are parsed from the IMG.LY CDN at \{\{base_url\}\}/<id>/content.json, where
|
|
2319
|
+
* `base_url` defaults to 'https://cdn.img.ly/assets/v1'.
|
|
2320
|
+
* Each source is created via `addLocalSource` and populated with the parsed assets. To modify the available
|
|
2321
|
+
* assets, you may either exclude certain IDs via `excludeAssetSourceIds` or alter the sources after creation.
|
|
2322
|
+
*/
|
|
2323
|
+
addDefaultAssetSources({ baseURL, excludeAssetSourceIds }?: {
|
|
2324
|
+
/** The source of the asset definitions, must be absolute. Defaults to `'https://cdn.img.ly/assets/v1'`. */
|
|
2325
|
+
baseURL?: string;
|
|
2326
|
+
/** A list of IDs, that will be ignored during load. */
|
|
2327
|
+
excludeAssetSourceIds?: DefaultAssetSourceId[];
|
|
2328
|
+
}): Promise<void>;
|
|
2329
|
+
/**
|
|
2330
|
+
* Convenience function that registers a set of demo asset sources containing our
|
|
2331
|
+
* example assets. These are not to meant to be used in your production code.
|
|
2332
|
+
*
|
|
2333
|
+
* These are
|
|
2334
|
+
*
|
|
2335
|
+
* - `'ly.img.image'` - Sample images
|
|
2336
|
+
* - `'ly.img.image.upload'` - Demo source to upload image assets
|
|
2337
|
+
* - `'ly.img.audio'` - Sample audios
|
|
2338
|
+
* - `'ly.img.audio.upload'` - Demo source to upload audio assets
|
|
2339
|
+
* - `'ly.img.video'` - Sample videos
|
|
2340
|
+
* - `'ly.img.video.upload'` - Demo source to upload video assets
|
|
2341
|
+
*/
|
|
2342
|
+
addDemoAssetSources({ excludeAssetSourceIds, sceneMode, withUploadAssetSources }?: {
|
|
2343
|
+
/** A list of IDs, that will be ignored during load */
|
|
2344
|
+
excludeAssetSourceIds?: DemoAssetSourceId[];
|
|
2345
|
+
/** If 'Video' video specific demo asset sources will be loaded as well (default 'Design') */
|
|
2346
|
+
sceneMode?: SceneMode;
|
|
2347
|
+
/** If 'true' asset sources for uploads are added (default false) */
|
|
2348
|
+
withUploadAssetSources?: boolean;
|
|
2349
|
+
}): Promise<void>;
|
|
2309
2350
|
}
|
|
2310
2351
|
export default CreativeEngine;
|
|
2311
2352
|
|
|
2353
|
+
/**
|
|
2354
|
+
* @public
|
|
2355
|
+
*/
|
|
2356
|
+
export declare type DefaultAssetSourceId = 'ly.img.sticker' | 'ly.img.vectorpath' | 'ly.img.filter.lut' | 'ly.img.filter.duotone';
|
|
2357
|
+
|
|
2358
|
+
/**
|
|
2359
|
+
* @public
|
|
2360
|
+
*/
|
|
2361
|
+
export declare type DemoAssetSourceId = 'ly.img.image.upload' | 'ly.img.video.upload' | 'ly.img.audio.upload' | 'ly.img.image' | 'ly.img.video' | 'ly.img.audio';
|
|
2362
|
+
|
|
2312
2363
|
/**
|
|
2313
2364
|
* A numerical identifier for a design block
|
|
2314
2365
|
* @public
|
|
@@ -2790,6 +2841,7 @@ declare enum MimeType_2 {
|
|
|
2790
2841
|
Jpeg = "image/jpeg",
|
|
2791
2842
|
Tga = "image/x-tga",
|
|
2792
2843
|
Mp4 = "video/mp4",
|
|
2844
|
+
QuickTime = "video/quicktime",
|
|
2793
2845
|
Binary = "application/octet-stream",
|
|
2794
2846
|
Pdf = "application/pdf",
|
|
2795
2847
|
Zip = "application/zip"
|