@cesdk/engine 1.9.0-preview.1 → 1.9.0-preview.3
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/index.d.ts
CHANGED
|
@@ -366,6 +366,7 @@ export declare type BlendMode = 'PassThrough' | 'Normal' | 'Darken' | 'Multiply'
|
|
|
366
366
|
* @public
|
|
367
367
|
*/
|
|
368
368
|
export declare class Block extends Entity {
|
|
369
|
+
#private;
|
|
369
370
|
effects: ReadWriteChannelSync<number[]>;
|
|
370
371
|
soloPlaybackEnabled: ReadWriteChannelSync<boolean>;
|
|
371
372
|
trimOffset: ReadWriteChannelSync<number>;
|
|
@@ -375,8 +376,11 @@ export declare class Block extends Entity {
|
|
|
375
376
|
selection: ReadWriteChannelSync<boolean>;
|
|
376
377
|
videoMode: ReadWriteChannelSync<boolean>;
|
|
377
378
|
duration: ReadWriteChannelSync<number>;
|
|
379
|
+
name: ReadWriteChannelSync<string>;
|
|
378
380
|
muted: ReadWriteChannelSync<boolean>;
|
|
379
381
|
avResourceTotalDuration: ReadWriteChannelSync<number>;
|
|
382
|
+
timeOffset: ReadWriteChannelSync<number>;
|
|
383
|
+
|
|
380
384
|
|
|
381
385
|
}
|
|
382
386
|
|
|
@@ -811,6 +815,18 @@ export declare class BlockAPI {
|
|
|
811
815
|
* @returns A list of the property names.
|
|
812
816
|
*/
|
|
813
817
|
findAllProperties(id: DesignBlockId): string[];
|
|
818
|
+
/**
|
|
819
|
+
* Check if a property with a given name is readable
|
|
820
|
+
* @param property - The name of the property whose type should be queried.
|
|
821
|
+
* @returns Whether the property is readable or not. Will return false for unknown properties
|
|
822
|
+
*/
|
|
823
|
+
isPropertyReadable(property: string): boolean;
|
|
824
|
+
/**
|
|
825
|
+
* Check if a property with a given name is writable
|
|
826
|
+
* @param property - The name of the property whose type should be queried.
|
|
827
|
+
* @returns Whether the property is writable or not. Will return false for unknown properties
|
|
828
|
+
*/
|
|
829
|
+
isPropertyWritable(property: string): boolean;
|
|
814
830
|
/**
|
|
815
831
|
* Get the type of a property given its name.
|
|
816
832
|
* @param property - The name of the property whose type should be queried.
|
|
@@ -1966,6 +1982,13 @@ export declare interface Configuration {
|
|
|
1966
1982
|
* If not configured the fallback font is used.
|
|
1967
1983
|
*/
|
|
1968
1984
|
defaultFont?: string;
|
|
1985
|
+
/**
|
|
1986
|
+
* By default the engine tries to create a webgl2 context. If this fails it
|
|
1987
|
+
* falls back to trying to create a webgl1 context. If this configuration
|
|
1988
|
+
* option is set to true, it will no longer try to create a webgl2 context
|
|
1989
|
+
* and always create a webgl1 context.
|
|
1990
|
+
*/
|
|
1991
|
+
forceWebGL1?: boolean;
|
|
1969
1992
|
}
|
|
1970
1993
|
|
|
1971
1994
|
/**
|
|
@@ -2713,7 +2736,7 @@ export declare class SceneAPI {
|
|
|
2713
2736
|
* Create a new design scene, along with its own camera.
|
|
2714
2737
|
* @returns The scene's handle.
|
|
2715
2738
|
*/
|
|
2716
|
-
create(): DesignBlockId;
|
|
2739
|
+
create(sceneLayout?: SceneLayout): DesignBlockId;
|
|
2717
2740
|
/**
|
|
2718
2741
|
* Create a new scene in video mode, along with its own camera and page stack.
|
|
2719
2742
|
* @returns The scene's handle.
|
|
@@ -2728,7 +2751,7 @@ export declare class SceneAPI {
|
|
|
2728
2751
|
* @param pixelScaleFactor - The displays pixel scale factor.
|
|
2729
2752
|
* @returns A promise that resolves with the scene ID on success or rejected with an error otherwise.
|
|
2730
2753
|
*/
|
|
2731
|
-
createFromImage(url: string, dpi?: number, pixelScaleFactor?: number): Promise<DesignBlockId>;
|
|
2754
|
+
createFromImage(url: string, dpi?: number, pixelScaleFactor?: number, sceneLayout?: SceneLayout, spacing?: number, spacingInScreenSpace?: boolean): Promise<DesignBlockId>;
|
|
2732
2755
|
/**
|
|
2733
2756
|
* Return the currently active scene.
|
|
2734
2757
|
* @returns The scene or null, if none was created yet.
|
|
@@ -2777,6 +2800,13 @@ export declare class SceneAPI {
|
|
|
2777
2800
|
* @returns A promise that resolves once the zoom was set or rejects with an error otherwise.
|
|
2778
2801
|
*/
|
|
2779
2802
|
zoomToBlock(id: DesignBlockId, paddingLeft?: number, paddingTop?: number, paddingRight?: number, paddingBottom?: number): Promise<void>;
|
|
2803
|
+
/**
|
|
2804
|
+
* Subscribe to changes to the zoom level.
|
|
2805
|
+
* @param callback - This function is called at the end of the engine update, if the zoom level has changed.
|
|
2806
|
+
* @returns A method to unsubscribe.
|
|
2807
|
+
* @privateRemarks This will currently fire on _all_ changes to camera properties
|
|
2808
|
+
*/
|
|
2809
|
+
onZoomLevelChanged(callback: () => void): () => void;
|
|
2780
2810
|
/**
|
|
2781
2811
|
* Converts all values of the current scene into the given design unit.
|
|
2782
2812
|
* @param designUnit - The new design unit of the scene
|
|
@@ -2789,6 +2819,9 @@ export declare class SceneAPI {
|
|
|
2789
2819
|
unstable_getDesignUnit(): DesignUnit;
|
|
2790
2820
|
}
|
|
2791
2821
|
|
|
2822
|
+
/** @public */
|
|
2823
|
+
export declare type SceneLayout = 'Free' | 'VerticalStack' | 'HorizontalStack' | 'DepthStack';
|
|
2824
|
+
|
|
2792
2825
|
/** @public */
|
|
2793
2826
|
export declare interface Size2 {
|
|
2794
2827
|
width: number;
|
|
@@ -2930,4 +2963,16 @@ export declare interface Vec4 {
|
|
|
2930
2963
|
w: number;
|
|
2931
2964
|
}
|
|
2932
2965
|
|
|
2966
|
+
/**
|
|
2967
|
+
* This channel allows to subscribe/update the current zoom level of the camera.
|
|
2968
|
+
* @public
|
|
2969
|
+
*/
|
|
2970
|
+
export declare class ZoomLevelChannel implements ReadWriteChannelSync<number> {
|
|
2971
|
+
#private;
|
|
2972
|
+
subscribe: Source<number>;
|
|
2973
|
+
|
|
2974
|
+
update: (zoomLevel: number) => void;
|
|
2975
|
+
value: () => number;
|
|
2976
|
+
}
|
|
2977
|
+
|
|
2933
2978
|
export { }
|