@cesdk/engine 1.9.0-preview.2 → 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.
|
File without changes
|
|
Binary file
|
package/index.d.ts
CHANGED
|
@@ -1982,6 +1982,13 @@ export declare interface Configuration {
|
|
|
1982
1982
|
* If not configured the fallback font is used.
|
|
1983
1983
|
*/
|
|
1984
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;
|
|
1985
1992
|
}
|
|
1986
1993
|
|
|
1987
1994
|
/**
|
|
@@ -2729,7 +2736,7 @@ export declare class SceneAPI {
|
|
|
2729
2736
|
* Create a new design scene, along with its own camera.
|
|
2730
2737
|
* @returns The scene's handle.
|
|
2731
2738
|
*/
|
|
2732
|
-
create(): DesignBlockId;
|
|
2739
|
+
create(sceneLayout?: SceneLayout): DesignBlockId;
|
|
2733
2740
|
/**
|
|
2734
2741
|
* Create a new scene in video mode, along with its own camera and page stack.
|
|
2735
2742
|
* @returns The scene's handle.
|
|
@@ -2744,7 +2751,7 @@ export declare class SceneAPI {
|
|
|
2744
2751
|
* @param pixelScaleFactor - The displays pixel scale factor.
|
|
2745
2752
|
* @returns A promise that resolves with the scene ID on success or rejected with an error otherwise.
|
|
2746
2753
|
*/
|
|
2747
|
-
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>;
|
|
2748
2755
|
/**
|
|
2749
2756
|
* Return the currently active scene.
|
|
2750
2757
|
* @returns The scene or null, if none was created yet.
|
|
@@ -2799,7 +2806,7 @@ export declare class SceneAPI {
|
|
|
2799
2806
|
* @returns A method to unsubscribe.
|
|
2800
2807
|
* @privateRemarks This will currently fire on _all_ changes to camera properties
|
|
2801
2808
|
*/
|
|
2802
|
-
onZoomLevelChanged(callback: (
|
|
2809
|
+
onZoomLevelChanged(callback: () => void): () => void;
|
|
2803
2810
|
/**
|
|
2804
2811
|
* Converts all values of the current scene into the given design unit.
|
|
2805
2812
|
* @param designUnit - The new design unit of the scene
|
|
@@ -2812,6 +2819,9 @@ export declare class SceneAPI {
|
|
|
2812
2819
|
unstable_getDesignUnit(): DesignUnit;
|
|
2813
2820
|
}
|
|
2814
2821
|
|
|
2822
|
+
/** @public */
|
|
2823
|
+
export declare type SceneLayout = 'Free' | 'VerticalStack' | 'HorizontalStack' | 'DepthStack';
|
|
2824
|
+
|
|
2815
2825
|
/** @public */
|
|
2816
2826
|
export declare interface Size2 {
|
|
2817
2827
|
width: number;
|
|
@@ -2953,4 +2963,16 @@ export declare interface Vec4 {
|
|
|
2953
2963
|
w: number;
|
|
2954
2964
|
}
|
|
2955
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
|
+
|
|
2956
2978
|
export { }
|