@cesdk/node 1.70.0-nightly.20260219 → 1.70.0-nightly.20260220
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.70.0-nightly.20260219-H6QDP5AO.wasm → cesdk-v1.70.0-nightly.20260220-7F3ZQCZI.wasm} +0 -0
- package/index.d.ts +73 -2
- package/index.js +1 -1
- package/package.json +1 -1
- /package/assets/core/{cesdk-v1.70.0-nightly.20260219-MLEZSZ4D.data → cesdk-v1.70.0-nightly.20260220-MLEZSZ4D.data} +0 -0
|
Binary file
|
package/index.d.ts
CHANGED
|
@@ -5737,6 +5737,25 @@ export declare interface CompleteAssetResult extends AssetResult {
|
|
|
5737
5737
|
active: boolean;
|
|
5738
5738
|
}
|
|
5739
5739
|
|
|
5740
|
+
/**
|
|
5741
|
+
* Compression format for scene serialization.
|
|
5742
|
+
* @public
|
|
5743
|
+
*/
|
|
5744
|
+
export declare enum CompressionFormat {
|
|
5745
|
+
None = 0,
|
|
5746
|
+
Zstd = 1
|
|
5747
|
+
}
|
|
5748
|
+
|
|
5749
|
+
/**
|
|
5750
|
+
* Compression level for scene serialization.
|
|
5751
|
+
* @public
|
|
5752
|
+
*/
|
|
5753
|
+
export declare enum CompressionLevel {
|
|
5754
|
+
Fastest = 0,
|
|
5755
|
+
Default = 1,
|
|
5756
|
+
Best = 2
|
|
5757
|
+
}
|
|
5758
|
+
|
|
5740
5759
|
/**
|
|
5741
5760
|
* Specifies the configuration for the Creative Editor SDK.
|
|
5742
5761
|
*
|
|
@@ -7636,6 +7655,34 @@ export declare interface RGBColor {
|
|
|
7636
7655
|
*/
|
|
7637
7656
|
export declare type RoleString = 'Creator' | 'Adopter' | 'Viewer' | 'Presenter';
|
|
7638
7657
|
|
|
7658
|
+
/**
|
|
7659
|
+
* Options for saveSceneToString operation.
|
|
7660
|
+
* @public
|
|
7661
|
+
*/
|
|
7662
|
+
declare interface SaveToStringOptions {
|
|
7663
|
+
/**
|
|
7664
|
+
* List of resource URL schemes that are allowed in the serialized scene.
|
|
7665
|
+
* Resources with other schemes will trigger the persistence callback.
|
|
7666
|
+
*/
|
|
7667
|
+
resourceSchemesAllowed?: string[];
|
|
7668
|
+
/**
|
|
7669
|
+
* Optional callback for persisting resources with disallowed schemes.
|
|
7670
|
+
*/
|
|
7671
|
+
persistenceCallback?: (url: string, dataHash: string, persistedCallback?: {
|
|
7672
|
+
invoke(url: string, persistedUrl: string): void;
|
|
7673
|
+
}) => void;
|
|
7674
|
+
/**
|
|
7675
|
+
* Compression options for the serialized scene.
|
|
7676
|
+
* When compression is enabled, base64 encoding is skipped and raw binary data is returned.
|
|
7677
|
+
*/
|
|
7678
|
+
compression?: {
|
|
7679
|
+
/** Compression format (None = no compression, Zstd = zstd compression) */
|
|
7680
|
+
format?: CompressionFormat;
|
|
7681
|
+
/** Compression level (Fastest, Default, Best) */
|
|
7682
|
+
level?: CompressionLevel;
|
|
7683
|
+
};
|
|
7684
|
+
}
|
|
7685
|
+
|
|
7639
7686
|
/**
|
|
7640
7687
|
* @public Create, load, save, and manipulate scenes.
|
|
7641
7688
|
*
|
|
@@ -7724,14 +7771,38 @@ export declare class SceneAPI {
|
|
|
7724
7771
|
* Serializes the current scene into a string. Selection is discarded.
|
|
7725
7772
|
*
|
|
7726
7773
|
* @category Scene Saving
|
|
7727
|
-
* @param allowedResourceSchemes - The resource schemes to allow in the saved string.
|
|
7774
|
+
* @param allowedResourceSchemes - The resource schemes to allow in the saved string.
|
|
7728
7775
|
* @param onDisallowedResourceScheme - An optional callback that is called for each resource URL that has a scheme absent from
|
|
7729
7776
|
* `resourceSchemesAllowed`. The `url` parameter is the resource URL and the `dataHash` parameter is the hash of the
|
|
7730
7777
|
* resource's data. The callback should return a new URL for the resource, which will be used in the serialized
|
|
7731
7778
|
* scene. The callback is expected to return the original URL if no persistence is needed.
|
|
7732
7779
|
* @returns A promise that resolves with a string on success or an error on failure.
|
|
7780
|
+
* @deprecated Use saveToString(options) instead for better extensibility and to access compression features.
|
|
7733
7781
|
*/
|
|
7734
|
-
saveToString(allowedResourceSchemes
|
|
7782
|
+
saveToString(allowedResourceSchemes: string[], onDisallowedResourceScheme?: (url: string, dataHash: string) => Promise<string>): Promise<string>;
|
|
7783
|
+
/**
|
|
7784
|
+
* Serializes the current scene into a string. Selection is discarded.
|
|
7785
|
+
*
|
|
7786
|
+
* @category Scene Saving
|
|
7787
|
+
* @param options - Save options containing:
|
|
7788
|
+
* - allowedResourceSchemes: The resource schemes to allow in the saved string. Defaults to ['blob', 'bundle', 'file', 'http', 'https', 'opfs'].
|
|
7789
|
+
* - onDisallowedResourceScheme: An optional callback that is called for each resource URL that has a scheme absent from
|
|
7790
|
+
* `resourceSchemesAllowed`. The `url` parameter is the resource URL and the `dataHash` parameter is the hash of the
|
|
7791
|
+
* resource's data. The callback should return a new URL for the resource, which will be used in the serialized
|
|
7792
|
+
* scene. The callback is expected to return the original URL if no persistence is needed.
|
|
7793
|
+
* - compression: Optional compression settings containing:
|
|
7794
|
+
* - format: Compression format (None or Zstd). Defaults to None.
|
|
7795
|
+
* - level: Compression level (Fastest, Default, or Best). Defaults to Default.
|
|
7796
|
+
* @returns A promise that resolves with a string on success or an error on failure.
|
|
7797
|
+
*/
|
|
7798
|
+
saveToString(options?: {
|
|
7799
|
+
allowedResourceSchemes?: string[];
|
|
7800
|
+
onDisallowedResourceScheme?: (url: string, dataHash: string) => Promise<string>;
|
|
7801
|
+
compression?: {
|
|
7802
|
+
format?: CompressionFormat;
|
|
7803
|
+
level?: CompressionLevel;
|
|
7804
|
+
};
|
|
7805
|
+
}): Promise<string>;
|
|
7735
7806
|
/**
|
|
7736
7807
|
* Saves the current scene and all of its referenced assets into an archive.
|
|
7737
7808
|
*
|