@cesdk/cesdk-js 1.9.0-preview.3 → 1.9.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/assets/core/{cesdk-v1.9.0-preview.3.data → cesdk-v1.9.1.data} +0 -0
- package/assets/core/{cesdk-v1.9.0-preview.3.wasm → cesdk-v1.9.1.wasm} +0 -0
- package/assets/i18n/de.json +18 -4
- package/assets/i18n/en.json +27 -6
- package/assets/ui/blur/linear.jpeg +0 -0
- package/assets/ui/blur/mirrored.jpeg +0 -0
- package/assets/ui/blur/radial.jpeg +0 -0
- package/assets/ui/blur/uniform.jpeg +0 -0
- package/assets/ui/stylesheets/cesdk.css +17 -17
- package/cesdk.umd.js +1 -1
- package/index.d.ts +209 -9
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export declare interface Asset {
|
|
|
40
40
|
uri?: string;
|
|
41
41
|
filename?: string;
|
|
42
42
|
vectorPath?: string;
|
|
43
|
+
duration?: string;
|
|
43
44
|
} & Record<string, unknown>;
|
|
44
45
|
}
|
|
45
46
|
|
|
@@ -98,6 +99,8 @@ export declare class AssetAPI {
|
|
|
98
99
|
canManageAssets(sourceId: string): boolean;
|
|
99
100
|
|
|
100
101
|
|
|
102
|
+
|
|
103
|
+
|
|
101
104
|
/**
|
|
102
105
|
* Apply an asset result to the active scene.
|
|
103
106
|
* The default behavior will instantiate a block and configure it according to the asset's properties.
|
|
@@ -106,12 +109,25 @@ export declare class AssetAPI {
|
|
|
106
109
|
* @param assetResult - A single assetResult of a `findAssets` query.
|
|
107
110
|
*/
|
|
108
111
|
apply(sourceId: string, assetResult: AssetResult): Promise<void>;
|
|
112
|
+
/**
|
|
113
|
+
* Apply an asset result to the given block.
|
|
114
|
+
* @param sourceId - The ID of the asset source.
|
|
115
|
+
* @param assetResult - A single assetResult of a `findAssets` query.
|
|
116
|
+
* @param block - The block the asset should be applied to.
|
|
117
|
+
*/
|
|
118
|
+
applyToBlock(sourceId: string, assetResult: AssetResult, block: DesignBlockId): Promise<void>;
|
|
109
119
|
/**
|
|
110
120
|
* The default implementation for applying an asset to the scene.
|
|
111
121
|
* This implementation is used when no `applyAsset` function is provided to `addSource`.
|
|
112
122
|
* @param assetResult - A single assetResult of a `findAssets` query.
|
|
113
123
|
*/
|
|
114
124
|
defaultApplyAsset(assetResult: AssetResult): Promise<void>;
|
|
125
|
+
/**
|
|
126
|
+
* The default implementation for applying an asset to an existing block.
|
|
127
|
+
* @param assetResult - A single assetResult of a `findAssets` query.
|
|
128
|
+
* @param block - The block to apply the asset result to.
|
|
129
|
+
*/
|
|
130
|
+
defaultApplyAssetToBlock(assetResult: AssetResult, block: DesignBlockId): Promise<void>;
|
|
115
131
|
|
|
116
132
|
}
|
|
117
133
|
|
|
@@ -143,7 +159,13 @@ export declare interface _AssetElement {
|
|
|
143
159
|
}
|
|
144
160
|
|
|
145
161
|
/** @public */
|
|
146
|
-
declare type AssetLibraryEntries = AssetLibraryEntry[] | ((currentAssetLibraryEntries: AssetLibraryEntry[]
|
|
162
|
+
declare type AssetLibraryEntries = AssetLibraryEntry[] | ((currentAssetLibraryEntries: AssetLibraryEntry[], context: {
|
|
163
|
+
selectedBlocks: {
|
|
164
|
+
id: DesignBlockId;
|
|
165
|
+
blockType: DesignBlockType;
|
|
166
|
+
fillType?: DesignBlockType;
|
|
167
|
+
}[];
|
|
168
|
+
}) => AssetLibraryEntry[]);
|
|
147
169
|
|
|
148
170
|
/** @public */
|
|
149
171
|
declare interface AssetLibraryEntry extends AssetLibraryEntryData, AssetLibraryEntryView {
|
|
@@ -286,6 +308,7 @@ declare interface AssetResult_2 {
|
|
|
286
308
|
meta?: {
|
|
287
309
|
uri?: string;
|
|
288
310
|
filename?: string;
|
|
311
|
+
duration?: string;
|
|
289
312
|
} & Record<string, unknown>;
|
|
290
313
|
/** The locale of the label and tags */
|
|
291
314
|
locale?: string;
|
|
@@ -358,6 +381,11 @@ export declare interface AssetSource {
|
|
|
358
381
|
* You can override this with custom behavior.
|
|
359
382
|
*/
|
|
360
383
|
applyAsset?: (asset: AssetResult) => Promise<void>;
|
|
384
|
+
/**
|
|
385
|
+
* Apply the given asset result to the given block.
|
|
386
|
+
* You can override this with custom behavior.
|
|
387
|
+
*/
|
|
388
|
+
applyAssetToBlock?: (asset: AssetResult, block: DesignBlockId) => Promise<void>;
|
|
361
389
|
/**
|
|
362
390
|
* Adds the given asset to this source. Throws an error if `canManageAssets`
|
|
363
391
|
* is `false`.
|
|
@@ -378,6 +406,12 @@ export declare interface AssetSource {
|
|
|
378
406
|
* @returns true if asset was found and removed, and false otherwise
|
|
379
407
|
*/
|
|
380
408
|
removeAsset?(assetId: string): Promise<boolean>;
|
|
409
|
+
/**
|
|
410
|
+
* Generates a list of supported mime types for this source.
|
|
411
|
+
*
|
|
412
|
+
* @returns a list of the mime types should be supported by this source
|
|
413
|
+
*/
|
|
414
|
+
getSupportedMimeTypes?(): string[] | undefined;
|
|
381
415
|
}
|
|
382
416
|
|
|
383
417
|
/**
|
|
@@ -392,6 +426,12 @@ declare interface AssetSource_2 {
|
|
|
392
426
|
* You can override this with custom behavior.
|
|
393
427
|
*/
|
|
394
428
|
applyAsset?: (asset: AssetResult_2) => Promise<void>;
|
|
429
|
+
/**
|
|
430
|
+
* Apply the given asset result to the given block.
|
|
431
|
+
* You can override this with custom behavior.
|
|
432
|
+
*/
|
|
433
|
+
applyAssetToBlock?: (asset: AssetResult_2, block: number) => Promise<void>;
|
|
434
|
+
|
|
395
435
|
/** Return every available group */
|
|
396
436
|
getGroups?: () => Promise<string[]>;
|
|
397
437
|
/**
|
|
@@ -412,6 +452,13 @@ declare interface AssetSource_2 {
|
|
|
412
452
|
name: string;
|
|
413
453
|
url?: string;
|
|
414
454
|
};
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Generates a list of supported mime types for this source.
|
|
458
|
+
*
|
|
459
|
+
* @returns a list of the mime types should be supported by this source
|
|
460
|
+
*/
|
|
461
|
+
getSupportedMimeTypes?(): string[] | undefined;
|
|
415
462
|
}
|
|
416
463
|
|
|
417
464
|
/** @public */
|
|
@@ -497,7 +544,20 @@ export declare class BlockAPI {
|
|
|
497
544
|
* @returns A promise that resolves with an array of the exported image and mask or is rejected with an error.
|
|
498
545
|
*/
|
|
499
546
|
exportWithColorMask(handle: DesignBlockId, mimeType: MimeType_2 | undefined, maskColorR: number, maskColorG: number, maskColorB: number, options?: EngineExportOptions): Promise<Blob[]>;
|
|
500
|
-
|
|
547
|
+
/**
|
|
548
|
+
* Exports a design block as a video file of the given mime type.
|
|
549
|
+
* Note: The export will run across multiple iterations of the update loop. In each iteration a frame is scheduled for encoding.
|
|
550
|
+
* @param block - The design block to export.
|
|
551
|
+
* @param timeOffset - The time offset in seconds of the scene's timeline from which the video will start.
|
|
552
|
+
* @param duration - The duration in seconds of the final video.
|
|
553
|
+
* @param mimeType - The mime type of the output video file.
|
|
554
|
+
* @param resolutionWidth - The target video width in pixel.
|
|
555
|
+
* @param resolutionHeight - The target video height in pixel.
|
|
556
|
+
* @param framerate - The target framerate in Hz.
|
|
557
|
+
* @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.
|
|
558
|
+
* @returns A promise that resolves with video blob or is rejected with an error.
|
|
559
|
+
*/
|
|
560
|
+
exportVideo(handle: DesignBlockId, timeOffset: number, duration: number, mimeType: MimeType_2 | undefined, resolutionWidth: number, resolutionHeight: number, framerate: number, progressCallback: (numberOfRenderedFrames: number, numberOfEncodedFrames: number, totalNumberOfFrames: number) => void): Promise<Blob>;
|
|
501
561
|
/**
|
|
502
562
|
* Loads existing blocks from the given string.
|
|
503
563
|
* The blocks are not attached by default and won't be visible until attached to a page or the scene.
|
|
@@ -549,6 +609,12 @@ export declare class BlockAPI {
|
|
|
549
609
|
* @returns An array of block ids.
|
|
550
610
|
*/
|
|
551
611
|
findAllSelected(): DesignBlockId[];
|
|
612
|
+
/**
|
|
613
|
+
* Subscribe to changes in the current set of selected blocks.
|
|
614
|
+
* @param callback - This function is called at the end of the engine update if the selection has changed.
|
|
615
|
+
* @returns A method to unsubscribe.
|
|
616
|
+
*/
|
|
617
|
+
onSelectionChanged(callback: () => void): () => void;
|
|
552
618
|
/**
|
|
553
619
|
* Confirms that a given set of blocks can be grouped together.
|
|
554
620
|
* @param ids - A non-empty array of block ids.
|
|
@@ -1012,6 +1078,29 @@ export declare class BlockAPI {
|
|
|
1012
1078
|
* @returns A tuple of channels red, green, blue and alpha in the range of 0 to 1.
|
|
1013
1079
|
*/
|
|
1014
1080
|
getColorRGBA(id: DesignBlockId, property: string): RGBA;
|
|
1081
|
+
/**
|
|
1082
|
+
* Set a color property of the given design block to the given value.
|
|
1083
|
+
* @param id - The block whose property should be set.
|
|
1084
|
+
* @param property - The name of the property to set.
|
|
1085
|
+
* @param name - The name of the spot color.
|
|
1086
|
+
* @param tint - The tint factor in the range of 0 to 1.
|
|
1087
|
+
* @returns An empty result on success, an error otherwise.
|
|
1088
|
+
*/
|
|
1089
|
+
setColorSpot(id: DesignBlockId, property: string, name: string, tint?: number): void;
|
|
1090
|
+
/**
|
|
1091
|
+
* Get the spot color name of a color property of the given design block.
|
|
1092
|
+
* @param id - The block whose property should be queried.
|
|
1093
|
+
* @param property - The name of the property to query.
|
|
1094
|
+
* @returns A result holding the name of the spot color or an error.
|
|
1095
|
+
*/
|
|
1096
|
+
getColorSpotName(id: DesignBlockId, property: string): string;
|
|
1097
|
+
/**
|
|
1098
|
+
* Get the spot color tint factor of a color property of the given design block.
|
|
1099
|
+
* @param id - The block whose property should be queried.
|
|
1100
|
+
* @param property - The name of the property to query.
|
|
1101
|
+
* @returns A result holding the tint factor of the spot color or an error.
|
|
1102
|
+
*/
|
|
1103
|
+
getColorSpotTint(id: DesignBlockId, property: string): number;
|
|
1015
1104
|
/**
|
|
1016
1105
|
* Set an enum property of the given design block to the given value.
|
|
1017
1106
|
* @param id - The block whose property should be set.
|
|
@@ -1916,17 +2005,28 @@ export declare class BlockAPI {
|
|
|
1916
2005
|
/**
|
|
1917
2006
|
* Generate a thumbnail for the given video fill.
|
|
1918
2007
|
* @param id - The video fill.
|
|
1919
|
-
* @
|
|
2008
|
+
* @param thumbnailHeight - The height of a thumbnail. The width will be calculated from the video aspect ratio.
|
|
2009
|
+
* @returns A thumbnail encoded as JPEG.
|
|
1920
2010
|
*/
|
|
1921
|
-
getVideoFillThumbnail(id: DesignBlockId): Promise<Blob>;
|
|
2011
|
+
getVideoFillThumbnail(id: DesignBlockId, thumbnailHeight: number): Promise<Blob>;
|
|
1922
2012
|
/**
|
|
1923
2013
|
* Generate a thumbnail atlas for the given video fill.
|
|
1924
2014
|
* @param id - The video fill.
|
|
1925
2015
|
* @param numberOfColumns - The number of columns to generate.
|
|
1926
2016
|
* @param numberOfRows - The number of rows to generate.
|
|
2017
|
+
* @param thumbnailHeight - The height of a thumbnail. The width will be calculated from the video aspect ratio.
|
|
1927
2018
|
* @returns A thumbnail atlas of the video as JPEG.
|
|
1928
2019
|
*/
|
|
1929
|
-
getVideoFillThumbnailAtlas(id: DesignBlockId, numberOfColumns: number, numberOfRows: number): Promise<Blob>;
|
|
2020
|
+
getVideoFillThumbnailAtlas(id: DesignBlockId, numberOfColumns: number, numberOfRows: number, thumbnailHeight: number): Promise<Blob>;
|
|
2021
|
+
/**
|
|
2022
|
+
* Generate a thumbnail atlas for the given page.
|
|
2023
|
+
* @param id - The page.
|
|
2024
|
+
* @param numberOfColumns - The number of columns to generate.
|
|
2025
|
+
* @param numberOfRows - The number of rows to generate.
|
|
2026
|
+
* @param thumbnailHeight - The height of a thumbnail. The width will be calculated from the page aspect ratio.
|
|
2027
|
+
* @returns A thumbnail atlas of the composition as JPEG.
|
|
2028
|
+
*/
|
|
2029
|
+
getPageThumbnailAtlas(id: DesignBlockId, numberOfColumns: number, numberOfRows: number, thumbnailHeight: number): Promise<Blob>;
|
|
1930
2030
|
}
|
|
1931
2031
|
|
|
1932
2032
|
/** @public */
|
|
@@ -1989,6 +2089,8 @@ declare namespace ConfigTypes {
|
|
|
1989
2089
|
Theme,
|
|
1990
2090
|
Scale,
|
|
1991
2091
|
PartialImageElement,
|
|
2092
|
+
PartialVideoElement,
|
|
2093
|
+
PartialAudioElement,
|
|
1992
2094
|
I18n,
|
|
1993
2095
|
A11y,
|
|
1994
2096
|
OnUploadCallback,
|
|
@@ -2161,6 +2263,7 @@ export declare enum DesignBlockType {
|
|
|
2161
2263
|
Page = "//ly.img.ubq/page",
|
|
2162
2264
|
Image = "//ly.img.ubq/image",
|
|
2163
2265
|
Video = "//ly.img.ubq/video",
|
|
2266
|
+
VideoFill = "//ly.img.ubq/fill/video",
|
|
2164
2267
|
Audio = "//ly.img.ubq/audio",
|
|
2165
2268
|
Text = "//ly.img.ubq/text",
|
|
2166
2269
|
Sticker = "//ly.img.ubq/sticker",
|
|
@@ -2228,6 +2331,28 @@ export declare class EditorAPI {
|
|
|
2228
2331
|
* @returns The text cursor's y position in screen space.
|
|
2229
2332
|
*/
|
|
2230
2333
|
getTextCursorPositionInScreenSpaceY(): number;
|
|
2334
|
+
/**
|
|
2335
|
+
* Create a history which consists of an undo/redo stack for editing operations.
|
|
2336
|
+
* There can be multiple. But only one can be active at a time.
|
|
2337
|
+
* @returns The handle of the created history.
|
|
2338
|
+
*/
|
|
2339
|
+
createHistory(): HistoryId;
|
|
2340
|
+
/**
|
|
2341
|
+
* Destroy the given history, throws an error if the handle doesn't refer to a history.
|
|
2342
|
+
* @param history - The history to destroy.
|
|
2343
|
+
*/
|
|
2344
|
+
destroyHistory(history: HistoryId): void;
|
|
2345
|
+
/**
|
|
2346
|
+
* Mark the given history as active, throws an error if the handle doesn't refer to a history.
|
|
2347
|
+
* All other histories get cleared from the active state. Undo/redo operations only apply to the active history.
|
|
2348
|
+
* @param history - The history to make active.
|
|
2349
|
+
*/
|
|
2350
|
+
setActiveHistory(history: HistoryId): void;
|
|
2351
|
+
/**
|
|
2352
|
+
* Get the handle to the currently active history. If there's none it will be created.
|
|
2353
|
+
* @returns History - The handle of the active history.
|
|
2354
|
+
*/
|
|
2355
|
+
getActiveHistory(): HistoryId;
|
|
2231
2356
|
/**
|
|
2232
2357
|
* Adds a new history state to the stack, if undoable changes were made.
|
|
2233
2358
|
*/
|
|
@@ -2252,6 +2377,13 @@ export declare class EditorAPI {
|
|
|
2252
2377
|
* @returns True if a redo step is available.
|
|
2253
2378
|
*/
|
|
2254
2379
|
canRedo(): boolean;
|
|
2380
|
+
/**
|
|
2381
|
+
* Subscribe to changes to the undo/redo history.
|
|
2382
|
+
*
|
|
2383
|
+
* @param callback - This function is called at the end of the engine update, if the undo/redo history has been changed.
|
|
2384
|
+
* @returns A method to unsubscribe
|
|
2385
|
+
*/
|
|
2386
|
+
onHistoryUpdated(callback: () => void): () => void;
|
|
2255
2387
|
/**
|
|
2256
2388
|
* Subscribe to changes to the editor settings.
|
|
2257
2389
|
* @param callback - This function is called at the end of the engine update, if the editor settings have changed.
|
|
@@ -2373,6 +2505,34 @@ export declare class EditorAPI {
|
|
|
2373
2505
|
* @returns `Allow` if the scope is allowed, `Deny` if it is disallowed, and `Defer` if it is deferred to the block-level.
|
|
2374
2506
|
*/
|
|
2375
2507
|
getGlobalScope(key: string): 'Allow' | 'Deny' | 'Defer';
|
|
2508
|
+
/**
|
|
2509
|
+
* Queries the names of currently set spot colors previously set with `setSpotColorRGB`.
|
|
2510
|
+
* @returns The names of set spot colors.
|
|
2511
|
+
*/
|
|
2512
|
+
findAllSpotColors(): string[];
|
|
2513
|
+
/**
|
|
2514
|
+
* Queries the RGB representation set for a spot color.
|
|
2515
|
+
* If the value of the queried spot color has not been set yet, returns the default RGB representation (of magenta).
|
|
2516
|
+
* The alpha value is always 1.0.
|
|
2517
|
+
* @param name - The name of a spot color.
|
|
2518
|
+
* @returns A result holding a float array of the four color components.
|
|
2519
|
+
*/
|
|
2520
|
+
getSpotColorRGBA(name: string): RGBA;
|
|
2521
|
+
/**
|
|
2522
|
+
* Sets the RGB representation of a spot color.
|
|
2523
|
+
* Use this function to both create a new spot color or update an existing spot color.
|
|
2524
|
+
* @param name - The name of a spot color.
|
|
2525
|
+
* @param r - The red color component in the range of 0 to 1.
|
|
2526
|
+
* @param g - The green color component in the range of 0 to 1.
|
|
2527
|
+
* @param b - The blue color component in the range of 0 to 1.
|
|
2528
|
+
*/
|
|
2529
|
+
setSpotColorRGB(name: string, r: number, g: number, b: number): void;
|
|
2530
|
+
/**
|
|
2531
|
+
* Removes a spot color from the list of set spot colors.
|
|
2532
|
+
* @param name - The name of a spot color.
|
|
2533
|
+
* @returns An empty result on success, an error otherwise.
|
|
2534
|
+
*/
|
|
2535
|
+
removeSpotColor(name: string): void;
|
|
2376
2536
|
}
|
|
2377
2537
|
|
|
2378
2538
|
declare namespace _EngineConfigTypes {
|
|
@@ -2433,6 +2593,13 @@ export declare interface _EngineConfiguration {
|
|
|
2433
2593
|
* and always create a webgl1 context.
|
|
2434
2594
|
*/
|
|
2435
2595
|
forceWebGL1?: boolean;
|
|
2596
|
+
/**
|
|
2597
|
+
* Whether the engine should automatically choose an audio output device or
|
|
2598
|
+
* should not output audio at all.
|
|
2599
|
+
*
|
|
2600
|
+
* If not configured the fallback value is 'auto'.
|
|
2601
|
+
*/
|
|
2602
|
+
audioOutput?: 'auto' | 'none';
|
|
2436
2603
|
}
|
|
2437
2604
|
|
|
2438
2605
|
/**
|
|
@@ -2532,7 +2699,7 @@ declare type Extensions = {
|
|
|
2532
2699
|
/**
|
|
2533
2700
|
* @public
|
|
2534
2701
|
*/
|
|
2535
|
-
export declare type FillType = 'Solid' | 'Gradient';
|
|
2702
|
+
export declare type FillType = 'Solid' | 'Gradient' | 'Video';
|
|
2536
2703
|
|
|
2537
2704
|
/** @public */
|
|
2538
2705
|
declare interface FindAssetsQuery {
|
|
@@ -2605,6 +2772,12 @@ declare type Groups = string[];
|
|
|
2605
2772
|
*/
|
|
2606
2773
|
declare type HexColorString = string;
|
|
2607
2774
|
|
|
2775
|
+
/**
|
|
2776
|
+
* A numerical identifier for a history stack
|
|
2777
|
+
* @public
|
|
2778
|
+
*/
|
|
2779
|
+
export declare type HistoryId = number;
|
|
2780
|
+
|
|
2608
2781
|
/**
|
|
2609
2782
|
* I18n Settings
|
|
2610
2783
|
* Note: this will append keys and not override keys
|
|
@@ -2667,11 +2840,11 @@ declare enum NavigationPosition {
|
|
|
2667
2840
|
}
|
|
2668
2841
|
|
|
2669
2842
|
/** @public */
|
|
2670
|
-
declare type OnUploadCallback = (file: File, onProgress: (progress: number) => void) => Promise<PartialImageElement>;
|
|
2843
|
+
declare type OnUploadCallback = (file: File, onProgress: (progress: number) => void) => Promise<PartialImageElement | PartialVideoElement | PartialAudioElement>;
|
|
2671
2844
|
|
|
2672
2845
|
/** @public */
|
|
2673
2846
|
declare type OnUploadOptions = {
|
|
2674
|
-
supportedMimeTypes
|
|
2847
|
+
supportedMimeTypes?: string[];
|
|
2675
2848
|
};
|
|
2676
2849
|
|
|
2677
2850
|
/**
|
|
@@ -2715,9 +2888,15 @@ declare enum PanelPosition {
|
|
|
2715
2888
|
Right = "right"
|
|
2716
2889
|
}
|
|
2717
2890
|
|
|
2891
|
+
/** @public */
|
|
2892
|
+
declare type PartialAudioElement = Optional<AudioElement, 'duration'>;
|
|
2893
|
+
|
|
2718
2894
|
/** @public */
|
|
2719
2895
|
declare type PartialImageElement = Optional<_ImageElement, 'size'>;
|
|
2720
2896
|
|
|
2897
|
+
/** @public */
|
|
2898
|
+
declare type PartialVideoElement = Optional<VideoElement, 'size' | 'duration'>;
|
|
2899
|
+
|
|
2721
2900
|
/**
|
|
2722
2901
|
* - Absolute: Position in absolute design units.
|
|
2723
2902
|
* - Percent: Position in relation to the block's parent's size in percent, where 1.0 means 100%.
|
|
@@ -2778,6 +2957,7 @@ declare interface QueryData {
|
|
|
2778
2957
|
|
|
2779
2958
|
/** @public */
|
|
2780
2959
|
export declare interface _RequiredConfiguration extends _EngineConfiguration {
|
|
2960
|
+
initialSceneMode?: SceneMode;
|
|
2781
2961
|
initialSceneString?: string;
|
|
2782
2962
|
initialSceneURL?: string;
|
|
2783
2963
|
initialImageURL?: string;
|
|
@@ -2921,6 +3101,11 @@ export declare class SceneAPI {
|
|
|
2921
3101
|
* @returns A Promise that resolves once the template was applied or rejects if there was an error.
|
|
2922
3102
|
*/
|
|
2923
3103
|
applyTemplateFromURL(url: string): Promise<void>;
|
|
3104
|
+
/**
|
|
3105
|
+
* Get the current scene mode.
|
|
3106
|
+
* @returns The current mode of the scene.
|
|
3107
|
+
*/
|
|
3108
|
+
getMode(): SceneMode;
|
|
2924
3109
|
/**
|
|
2925
3110
|
* Sets the zoom level of the active scene.
|
|
2926
3111
|
* Only has an effect if the zoom level is not handled by the UI.
|
|
@@ -2953,6 +3138,12 @@ export declare class SceneAPI {
|
|
|
2953
3138
|
* @privateRemarks This will currently fire on _all_ changes to camera properties
|
|
2954
3139
|
*/
|
|
2955
3140
|
onZoomLevelChanged(callback: () => void): () => void;
|
|
3141
|
+
/**
|
|
3142
|
+
* Subscribe to changes to the active scene rendered by the engine.
|
|
3143
|
+
* @param callback - This function is called at the end of the engine update, if the active scene has changed.
|
|
3144
|
+
* @returns A method to unsubscribe.
|
|
3145
|
+
*/
|
|
3146
|
+
onActiveChanged(callback: () => void): () => void;
|
|
2956
3147
|
/**
|
|
2957
3148
|
* Converts all values of the current scene into the given design unit.
|
|
2958
3149
|
* @param designUnit - The new design unit of the scene
|
|
@@ -2965,9 +3156,18 @@ export declare class SceneAPI {
|
|
|
2965
3156
|
unstable_getDesignUnit(): DesignUnit;
|
|
2966
3157
|
}
|
|
2967
3158
|
|
|
2968
|
-
/**
|
|
3159
|
+
/**
|
|
3160
|
+
* The scene layout determines how the layout stack should layout its pages.
|
|
3161
|
+
* @public
|
|
3162
|
+
*/
|
|
2969
3163
|
export declare type SceneLayout = 'Free' | 'VerticalStack' | 'HorizontalStack' | 'DepthStack';
|
|
2970
3164
|
|
|
3165
|
+
/**
|
|
3166
|
+
* The mode of the scene defines how the editor and playback should behave.
|
|
3167
|
+
* @public
|
|
3168
|
+
*/
|
|
3169
|
+
export declare type SceneMode = 'Design' | 'Video';
|
|
3170
|
+
|
|
2971
3171
|
/**
|
|
2972
3172
|
* - Absolute: Size in absolute design units.
|
|
2973
3173
|
* - Percent: Size in relation to the block's parent's size in percent, where 1.0 means 100%.
|