babylonjs-editor 5.4.2-alpha.0 → 5.4.2-alpha.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.
@@ -5,5 +5,4 @@ export interface IEditorEditProjectTextureComponentProps {
5
5
  }
6
6
  export declare class EditorEditProjectTextureComponent extends Component<IEditorEditProjectTextureComponentProps> {
7
7
  render(): ReactNode;
8
- private _handleBrowsePVRTexToolCliPath;
9
8
  }
@@ -0,0 +1,6 @@
1
+ import { Editor } from "../../../main";
2
+ export interface IEditorProjectTexturePVRTexToolProps {
3
+ editor: Editor;
4
+ onUpdate: () => void;
5
+ }
6
+ export declare function EditorProjectTexturePVRTexTool(props: IEditorProjectTexturePVRTexToolProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { Editor } from "../../../main";
2
+ export interface IEditorProjectTextureKTXSoftwareProps {
3
+ editor: Editor;
4
+ }
5
+ export declare function EditorProjectTextureKTXSoftware(props: IEditorProjectTextureKTXSoftwareProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { Component, ReactNode } from "react";
2
- import { EditorProjectCompressedTextureQuality, EditorProjectPackageManager } from "../project/typings";
2
+ import { EditorProjectCompressedTextureQuality, EditorProjectCompressedTextureSoftware, EditorProjectPackageManager } from "../project/typings";
3
3
  import { CommandPalette } from "./dialogs/command-palette/command-palette";
4
4
  import { EditorLayout } from "./layout";
5
5
  import "./nodes/camera";
@@ -32,6 +32,10 @@ export interface IEditorState {
32
32
  * Defines the current package manager being used by the editor.
33
33
  */
34
34
  packageManager?: EditorProjectPackageManager;
35
+ /**
36
+ * Defines the software used for compressing textures.
37
+ */
38
+ compressedTextureSoftware?: EditorProjectCompressedTextureSoftware;
35
39
  /**
36
40
  * Defines wether or not compressed textures are enabled.
37
41
  */
@@ -18,7 +18,7 @@ export declare function setCompressedTexturesCliPath(absolutePath: string): void
18
18
  * @param format defines the destination format of the texture.
19
19
  * @example image.png -> image-asct.ktx
20
20
  */
21
- export declare function getCompressedTextureFilename(path: string, format: KTXToolsType): string;
21
+ export declare function getKtxCompressedTextureFilename(path: string, format: KTXToolsType): string;
22
22
  export type CompressFileToKtxOptions = {
23
23
  format: KTXToolsType;
24
24
  force?: boolean;
@@ -0,0 +1,14 @@
1
+ import { Editor } from "../../editor/main";
2
+ /**
3
+ * Returns the filename of the compressed texture according to the given path and the destination format.
4
+ * @param path defines the path of the texture to get its final name.
5
+ * @param format defines the destination format of the texture.
6
+ * @example image.png -> image-asct.ktx
7
+ */
8
+ export declare function getKtx2CompressedTextureFilename(path: string): string;
9
+ export type CompressFileToKtx2Options = {
10
+ force?: boolean;
11
+ exportedAssets?: string[];
12
+ destinationFolder?: string;
13
+ };
14
+ export declare function compressFileToKtx2(editor: Editor, absolutePath: string, options: Partial<CompressFileToKtx2Options>): Promise<string | null>;
@@ -12,6 +12,10 @@ export interface IEditorProject {
12
12
  * The plugins of the project.
13
13
  */
14
14
  plugins: IEditorProjectPlugin[];
15
+ /**
16
+ * Defines the software used for compressing textures.
17
+ */
18
+ compressedTextureSoftware?: EditorProjectCompressedTextureSoftware;
15
19
  /**
16
20
  * If the compressed textures are enabled using PVRTexTool.
17
21
  */
@@ -47,6 +51,7 @@ export interface IEditorProjectPlugin {
47
51
  */
48
52
  nameOrPath: string;
49
53
  }
54
+ export type EditorProjectCompressedTextureSoftware = "PVRTexTool" | "Khronos KTX-Software";
50
55
  export type EditorProjectCompressedTextureQuality = "very-fast" | "fast" | "normal" | "high";
51
56
  export type EditorProjectPackageManager = "npm" | "yarn" | "pnpm" | "bun";
52
57
  export type EditorProjectTemplate = "nextjs" | "nuxtjs" | "solidjs" | "vanillajs" | "electron";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babylonjs-editor",
3
- "version": "5.4.2-alpha.0",
3
+ "version": "5.4.2-alpha.1",
4
4
  "description": "Babylon.js Editor is a Web Application helping artists to work with Babylon.js",
5
5
  "productName": "Babylon.js Editor",
6
6
  "main": "build/src/index.js",
@@ -43,6 +43,7 @@
43
43
  "@babylonjs/addons": "9.9.1",
44
44
  "@babylonjs/core": "9.9.1",
45
45
  "@babylonjs/havok": "1.3.12",
46
+ "@babylonjs/ktx2decoder": "9.9.1",
46
47
  "@blueprintjs/core": "^5.10.0",
47
48
  "@blueprintjs/select": "^5.1.2",
48
49
  "@emotion/react": "^11.13.3",
@@ -81,6 +82,7 @@
81
82
  "babylonjs-editor-tools": "latest",
82
83
  "babylonjs-gui": "9.9.1",
83
84
  "babylonjs-gui-editor": "9.9.1",
85
+ "babylonjs-ktx2decoder": "9.9.1",
84
86
  "babylonjs-loaders": "9.9.1",
85
87
  "babylonjs-materials": "9.9.1",
86
88
  "babylonjs-node-editor": "9.9.1",