babylonjs-editor 5.4.1 → 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.
- package/declaration/src/editor/dialogs/edit-project/textures/component.d.ts +0 -1
- package/declaration/src/editor/dialogs/edit-project/textures/ktx.d.ts +6 -0
- package/declaration/src/editor/dialogs/edit-project/textures/ktx2.d.ts +5 -0
- package/declaration/src/editor/dialogs/generate/generate-project.d.ts +2 -0
- package/declaration/src/editor/main.d.ts +17 -1
- package/declaration/src/project/export/ktx.d.ts +1 -1
- package/declaration/src/project/export/ktx2.d.ts +14 -0
- package/declaration/src/project/typings.d.ts +18 -0
- package/package.json +4 -2
|
@@ -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;
|
|
@@ -13,6 +13,8 @@ export interface IEditorGenerateProjectComponentState {
|
|
|
13
13
|
export interface IEditorGenerateOptions {
|
|
14
14
|
optimize: boolean;
|
|
15
15
|
uploadToS3: boolean;
|
|
16
|
+
mergeDecals: boolean;
|
|
17
|
+
mergeGeometries: boolean;
|
|
16
18
|
}
|
|
17
19
|
export declare class EditorGenerateProjectComponent extends Component<IEditorGenerateProjectComponentProps, IEditorGenerateProjectComponentState> {
|
|
18
20
|
private _options;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component, ReactNode } from "react";
|
|
2
|
-
import { 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
|
*/
|
|
@@ -40,6 +44,18 @@ export interface IEditorState {
|
|
|
40
44
|
* Defines wether or not compressed textures are enabled in the preview.
|
|
41
45
|
*/
|
|
42
46
|
compressedTexturesEnabledInPreview: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Defines wether or not ETC2 compressed textures are enabled.
|
|
49
|
+
*/
|
|
50
|
+
compressedEtc2Enabled: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Defines wether or not PVRTC compressed textures are enabled.
|
|
53
|
+
*/
|
|
54
|
+
compressedPvrtcEnabled: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Defines the quality of the compressed textures.
|
|
57
|
+
*/
|
|
58
|
+
compressedTextureQuality?: EditorProjectCompressedTextureQuality;
|
|
43
59
|
/**
|
|
44
60
|
* Defines wether or not experimental features are enabled.
|
|
45
61
|
*/
|
|
@@ -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
|
|
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
|
*/
|
|
@@ -20,6 +24,18 @@ export interface IEditorProject {
|
|
|
20
24
|
* If the compressed textures are enabled in the preview.
|
|
21
25
|
*/
|
|
22
26
|
compressedTexturesEnabledInPreview: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* If the ETC2 compressed textures are enabled using PVRTexTool.
|
|
29
|
+
*/
|
|
30
|
+
compressedEtc2Enabled?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* If the PVRTC compressed textures are enabled using PVRTexTool.
|
|
33
|
+
*/
|
|
34
|
+
compressedPvrtcEnabled?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* The quality of the compressed textures.
|
|
37
|
+
*/
|
|
38
|
+
compressedTextureQuality?: EditorProjectCompressedTextureQuality;
|
|
23
39
|
/**
|
|
24
40
|
* The package manager being used by the project.
|
|
25
41
|
*/
|
|
@@ -35,5 +51,7 @@ export interface IEditorProjectPlugin {
|
|
|
35
51
|
*/
|
|
36
52
|
nameOrPath: string;
|
|
37
53
|
}
|
|
54
|
+
export type EditorProjectCompressedTextureSoftware = "PVRTexTool" | "Khronos KTX-Software";
|
|
55
|
+
export type EditorProjectCompressedTextureQuality = "very-fast" | "fast" | "normal" | "high";
|
|
38
56
|
export type EditorProjectPackageManager = "npm" | "yarn" | "pnpm" | "bun";
|
|
39
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.1",
|
|
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",
|
|
@@ -74,13 +75,14 @@
|
|
|
74
75
|
"@xterm/addon-fit": "0.11.0",
|
|
75
76
|
"@xterm/xterm": "6.1.0-beta.22",
|
|
76
77
|
"assimpjs": "0.0.10",
|
|
77
|
-
"axios": "1.
|
|
78
|
+
"axios": "1.16.1",
|
|
78
79
|
"babylonjs": "9.9.1",
|
|
79
80
|
"babylonjs-addons": "9.9.1",
|
|
80
81
|
"babylonjs-editor-cli": "latest",
|
|
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",
|