@cesdk/engine 1.52.0-nightly.20250509 → 1.52.0-nightly.20250510
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.52.0-nightly.20250509-3RH6D6C5.wasm → cesdk-v1.52.0-nightly.20250510-OZ55E74U.wasm} +0 -0
- package/assets/core/{worker-host-v1.52.0-nightly.20250509.js → worker-host-v1.52.0-nightly.20250510.js} +1 -1
- package/index.d.ts +15 -1
- package/index.js +1 -1
- package/package.json +1 -1
- /package/assets/core/{cesdk-v1.52.0-nightly.20250509-44YCFRT6.data → cesdk-v1.52.0-nightly.20250510-44YCFRT6.data} +0 -0
package/index.d.ts
CHANGED
|
@@ -167,7 +167,15 @@ export declare class AssetAPI {
|
|
|
167
167
|
* @param block - The block the asset should be applied to.
|
|
168
168
|
*/
|
|
169
169
|
applyToBlock(sourceId: string, assetResult: AssetResult, block: DesignBlockId): Promise<void>;
|
|
170
|
-
|
|
170
|
+
/**
|
|
171
|
+
* Apply a property of an asset result to the active scene.
|
|
172
|
+
* The default behavior will apply the property to the currently selected element.
|
|
173
|
+
* Note that this can be overridden by providing an `applyProperty` function when adding the asset source.
|
|
174
|
+
* @param sourceId - The ID of the asset source.
|
|
175
|
+
* @param assetResult - A single assetResult of a `findAssets` query.
|
|
176
|
+
* @param property - An asset property.
|
|
177
|
+
*/
|
|
178
|
+
applyProperty(sourceId: string, assetResult: AssetResult, property: AssetProperty): Promise<void>;
|
|
171
179
|
/**
|
|
172
180
|
* The default implementation for applying an asset to the scene.
|
|
173
181
|
* This implementation is used when no `applyAsset` function is provided to `addSource`.
|
|
@@ -482,6 +490,11 @@ export declare interface AssetSource {
|
|
|
482
490
|
* You can override this with custom behavior.
|
|
483
491
|
*/
|
|
484
492
|
applyAssetToBlock?: (asset: CompleteAssetResult, block: DesignBlockId) => Promise<void>;
|
|
493
|
+
/**
|
|
494
|
+
* Apply a property of the given asset result to the active scene.
|
|
495
|
+
* You can override this with custom behavior.
|
|
496
|
+
*/
|
|
497
|
+
applyAssetProperty?: (asset: CompleteAssetResult, property: AssetProperty) => Promise<void>;
|
|
485
498
|
/**
|
|
486
499
|
* Adds the given asset to this source. Throws an error if the asset source
|
|
487
500
|
* does not support adding assets.
|
|
@@ -2203,6 +2216,7 @@ export declare class BlockAPI {
|
|
|
2203
2216
|
removeText(id: DesignBlockId, from?: number, to?: number): void;
|
|
2204
2217
|
/**
|
|
2205
2218
|
* Changes the color of the text in the selected range to the given color.
|
|
2219
|
+
* If the entire text range is selected, this will also update the fill color of the text block.
|
|
2206
2220
|
* Required scope: 'text/edit'
|
|
2207
2221
|
* @param block - The text block whose color should be changed.
|
|
2208
2222
|
* @param color - The new color of the selected text range.
|