@cesdk/engine 1.11.0-preview.0 → 1.11.0-preview.1

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/index.d.ts CHANGED
@@ -903,6 +903,24 @@ export declare class BlockAPI {
903
903
  * @returns The position and size of the bounding box.
904
904
  */
905
905
  getScreenSpaceBoundingBoxXYWH(ids: DesignBlockId[]): XYWH;
906
+ /**
907
+ * Align multiple blocks horizontally within their bounding box (or group) or a single block to its parent.
908
+ * @param ids - A non-empty array of block ids.
909
+ * @param alignment - How they should be aligned: left, right, or center
910
+ */
911
+ alignHorizontally(ids: DesignBlockId[], horizontalBlockAlignment: HorizontalBlockAlignment): void;
912
+ /**
913
+ * Align multiple blocks vertically within their bounding box (or group) or a single block to its parent.
914
+ * @param ids - A non-empty array of block ids.
915
+ * @param alignment - How they should be aligned: top, bottom, or center
916
+ */
917
+ alignVertically(ids: DesignBlockId[], verticalBlockAlignment: VerticalBlockAlignment): void;
918
+ /**
919
+ * Confirms that a given set of blocks can be aligned.
920
+ * @param ids - A non-empty array of block ids.
921
+ * @returns Whether the blocks can be aligned.
922
+ */
923
+ isAlignable(ids: DesignBlockId[]): boolean;
906
924
  /**
907
925
  * Scales the block and all of its children proportionally around the specified
908
926
  * relative anchor point.
@@ -2266,7 +2284,6 @@ export declare interface Configuration {
2266
2284
  */
2267
2285
  extensions: ConfigTypes.Extensions;
2268
2286
  core: ConfigTypes.Core;
2269
- scene: ConfigTypes.Scene;
2270
2287
  assetSources: ConfigTypes.AssetSources;
2271
2288
  presets: ConfigTypes.Presets;
2272
2289
  variables: ConfigTypes.Variables;
@@ -2793,7 +2810,7 @@ declare type Extensions = {
2793
2810
  /**
2794
2811
  * @public
2795
2812
  */
2796
- export declare type FillType = 'Solid' | 'Gradient' | 'Video';
2813
+ export declare type FillType = 'Solid' | 'Gradient' | 'Video' | 'Image';
2797
2814
 
2798
2815
  /** @public */
2799
2816
  declare interface FindAssetsQuery {
@@ -2869,6 +2886,15 @@ declare type HexColorString = string;
2869
2886
  */
2870
2887
  export declare type HistoryId = number;
2871
2888
 
2889
+ /**
2890
+ * - Left: The blocks get left aligned.
2891
+ * - Right: The blocks get right aligned.
2892
+ * - Center: The blocks get center aligned.
2893
+ *
2894
+ * @public
2895
+ */
2896
+ export declare type HorizontalBlockAlignment = 'Left' | 'Right' | 'Center';
2897
+
2872
2898
  /** @public */
2873
2899
  export declare type HorizontalTextAlignment = 'Left' | 'Right' | 'Center';
2874
2900
 
@@ -2948,6 +2974,13 @@ export declare interface OldConfiguration {
2948
2974
  * - `setSettingBool('page/title/dimOutOfPageAreas', dim)`
2949
2975
  */
2950
2976
  page?: Page;
2977
+ /**
2978
+ * @deprecated This type definition has been removed
2979
+ * The settings that were configured here can be set via the
2980
+ * BlockApi on the scene block
2981
+ * @public
2982
+ */
2983
+ scene?: Scene;
2951
2984
  }
2952
2985
 
2953
2986
  /**
@@ -3129,23 +3162,26 @@ export declare interface RGBColor {
3129
3162
  export declare type RoleString = 'Creator' | 'Adopter' | 'Viewer' | 'Presenter';
3130
3163
 
3131
3164
  /**
3132
- * Export Settings
3165
+ * @deprecated This type definition is not used anymore and will be removed
3166
+ * in the future. The settings that were configured here can be set via the
3167
+ * BlockApi on the scene block:
3168
+ *
3169
+ * ```ts
3170
+ * engine.block.setInt(sceneId, 'scene/dpi', dpi);
3171
+ * engine.block.setInt(sceneId, 'scene/pixelScaleFactor', factor);
3172
+ * ```
3173
+ *
3133
3174
  * @public
3134
3175
  */
3135
3176
  declare type Scene = {
3136
3177
  /**
3137
- * The DPI value to use when exporting and when converting between pixels and inches or millimeter units.
3138
- * (In the CESDK, this value is synonymous with PPI).
3139
- *
3140
- * This is only relevant for new scenes that are created in the editor. Loaded scenes will use the
3141
- * value stored in their serialization file.
3178
+ * @deprecated Setting this value has no effect. You can change the dpi of the
3179
+ * current scene via `engine.block.setInt(sceneId, 'scene/dpi', dpi)`
3142
3180
  */
3143
3181
  dpi: number;
3144
3182
  /**
3145
- * A scale factor that is applied to the final export resolution.
3146
- *
3147
- * This is only relevant for new scenes that are created in the editor. Loaded scenes will use the
3148
- * value stored in their serialization file.
3183
+ * @deprecated Setting this value has no effect. You can change the dpi of the
3184
+ * current scene via `engine.block.setInt(sceneId, 'scene/pixelScaleFactor', * factor)`
3149
3185
  */
3150
3186
  pixelScaleFactor: number;
3151
3187
  };
@@ -3516,6 +3552,15 @@ export declare interface Vec4 {
3516
3552
  w: number;
3517
3553
  }
3518
3554
 
3555
+ /**
3556
+ * - Top: The blocks get top aligned.
3557
+ * - Bottom: The blocks get bottom aligned.
3558
+ * - Center: The blocks get center aligned.
3559
+ *
3560
+ * @public
3561
+ */
3562
+ export declare type VerticalBlockAlignment = 'Top' | 'Bottom' | 'Center';
3563
+
3519
3564
  /** @public */
3520
3565
  export declare type VerticalTextAlignment = 'Top' | 'Bottom' | 'Center';
3521
3566