@cesdk/node 1.28.0 → 1.29.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.
|
Binary file
|
package/index.d.ts
CHANGED
|
@@ -441,13 +441,30 @@ export declare class BlockAPI {
|
|
|
441
441
|
* @returns A promise that resolves with a list of handles representing the found blocks or an error.
|
|
442
442
|
*/
|
|
443
443
|
loadFromString(content: string): Promise<DesignBlockId[]>;
|
|
444
|
+
/**
|
|
445
|
+
* Loads existing blocks from the given URL.
|
|
446
|
+
* The blocks are not attached by default and won't be visible until attached to a page or the scene.
|
|
447
|
+
* The UUID of the loaded blocks is replaced with a new one.
|
|
448
|
+
* @param url - The URL to load the blocks from.
|
|
449
|
+
* @returns A promise that resolves with a list of handles representing the found blocks or an error.
|
|
450
|
+
*/
|
|
451
|
+
loadFromArchiveURL(url: string): Promise<DesignBlockId[]>;
|
|
444
452
|
/**
|
|
445
453
|
* Saves the given blocks into a string. If given the root of a block hierarchy, e.g. a
|
|
446
454
|
* page with multiple children, the entire hierarchy is saved.
|
|
447
455
|
* @param blocks - The blocks to save
|
|
448
456
|
* @returns A promise that resolves to a string representing the blocks or an error.
|
|
449
457
|
*/
|
|
450
|
-
saveToString(blocks: DesignBlockId[]): Promise<string>;
|
|
458
|
+
saveToString(blocks: DesignBlockId[], allowedResourceSchemes?: string[]): Promise<string>;
|
|
459
|
+
/**
|
|
460
|
+
* Saves the given blocks and all of their referenced assets into an archive.
|
|
461
|
+
* The archive contains all assets that were accessible when this function was called.
|
|
462
|
+
* Blocks in the archived scene reference assets relative from to the location of the scene
|
|
463
|
+
* file. These references are resolved when loading such a scene via `loadSceneFromURL`.
|
|
464
|
+
* @param blocks - The blocks to save
|
|
465
|
+
* @returns A promise that resolves with a Blob on success or an error on failure.
|
|
466
|
+
*/
|
|
467
|
+
saveToArchive(blocks: DesignBlockId[]): Promise<Blob>;
|
|
451
468
|
/**
|
|
452
469
|
* Create a new block, fails if type is unknown.
|
|
453
470
|
* @param type - The type of the block that shall be created.
|
|
@@ -2541,6 +2558,13 @@ export declare type BlurTypeShorthand = 'uniform' | 'linear' | 'mirrored' | 'rad
|
|
|
2541
2558
|
*/
|
|
2542
2559
|
export declare type BooleanOperation = 'Difference' | 'Intersection' | 'Union' | 'XOR';
|
|
2543
2560
|
|
|
2561
|
+
/** @public */
|
|
2562
|
+
declare interface Buffer_2 {
|
|
2563
|
+
handle: string;
|
|
2564
|
+
buffer: Uint8Array;
|
|
2565
|
+
}
|
|
2566
|
+
export { Buffer_2 as Buffer }
|
|
2567
|
+
|
|
2544
2568
|
/**
|
|
2545
2569
|
* @public
|
|
2546
2570
|
*/
|
|
@@ -3449,6 +3473,8 @@ export declare class EditorAPI {
|
|
|
3449
3473
|
* @returns The length of the buffer in bytes.
|
|
3450
3474
|
*/
|
|
3451
3475
|
getBufferLength(uri: string): number;
|
|
3476
|
+
|
|
3477
|
+
|
|
3452
3478
|
}
|
|
3453
3479
|
|
|
3454
3480
|
/**
|
|
@@ -3823,11 +3849,19 @@ export declare class SceneAPI {
|
|
|
3823
3849
|
* @returns scene A promise that resolves once the scene was loaded or rejects with an error otherwise.
|
|
3824
3850
|
*/
|
|
3825
3851
|
loadFromURL(url: string): Promise<DesignBlockId>;
|
|
3852
|
+
/**
|
|
3853
|
+
* Load a previously archived scene from the URL to the scene file.
|
|
3854
|
+
* The scene file will be fetched asynchronously by the engine. This requires continuous `render`
|
|
3855
|
+
* calls on this engines instance.
|
|
3856
|
+
* @param url - The URL of the scene file.
|
|
3857
|
+
* @returns scene A promise that resolves once the scene was loaded or rejects with an error otherwise.
|
|
3858
|
+
*/
|
|
3859
|
+
loadFromArchiveURL(url: string): Promise<DesignBlockId>;
|
|
3826
3860
|
/**
|
|
3827
3861
|
* Serializes the current scene into a string. Selection is discarded.
|
|
3828
3862
|
* @returns A promise that resolves with a string on success or an error on failure.
|
|
3829
3863
|
*/
|
|
3830
|
-
saveToString(): Promise<string>;
|
|
3864
|
+
saveToString(allowedResourceSchemes?: string[]): Promise<string>;
|
|
3831
3865
|
/**
|
|
3832
3866
|
* Saves the current scene and all of its referenced assets into an archive.
|
|
3833
3867
|
* The archive contains all assets, that were accessible when this function was called.
|