babylonjs-editor-cli 5.0.2 → 5.3.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/build/index.node.js +62 -47
- package/build/package.json +1 -1
- package/build/src/export.mjs +1 -0
- package/build/src/export.mjs.map +1 -1
- package/build/src/pack/assets/assets.mjs +11 -2
- package/build/src/pack/assets/assets.mjs.map +1 -1
- package/build/src/pack/assets/ktx.mjs +4 -30
- package/build/src/pack/assets/ktx.mjs.map +1 -1
- package/build/src/pack/assets/particle-system.mjs +2 -2
- package/build/src/pack/assets/particle-system.mjs.map +1 -1
- package/build/src/pack/assets/process.mjs +11 -4
- package/build/src/pack/assets/process.mjs.map +1 -1
- package/build/src/pack/assets/texture.mjs +3 -5
- package/build/src/pack/assets/texture.mjs.map +1 -1
- package/build/src/pack/pack.mjs +39 -14
- package/build/src/pack/pack.mjs.map +1 -1
- package/build/src/pack/scene.mjs +196 -61
- package/build/src/pack/scene.mjs.map +1 -1
- package/build/src/pack/scripts.mjs +115 -0
- package/build/src/pack/scripts.mjs.map +1 -0
- package/build/src/s3/s3.mjs +10 -1
- package/build/src/s3/s3.mjs.map +1 -1
- package/build/src/tools/cancel.mjs +10 -0
- package/build/src/tools/cancel.mjs.map +1 -0
- package/build/src/tools/fs.mjs +12 -0
- package/build/src/tools/fs.mjs.map +1 -1
- package/declaration/src/export.d.mts +1 -0
- package/declaration/src/pack/assets/assets.d.mts +2 -3
- package/declaration/src/pack/assets/ktx.d.mts +1 -10
- package/declaration/src/pack/pack.d.mts +4 -1
- package/declaration/src/pack/scripts.d.mts +1 -0
- package/declaration/src/tools/cancel.d.mts +5 -0
- package/declaration/src/tools/fs.d.mts +6 -0
- package/package.json +1 -1
- package/.env +0 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface ICreateAssetsOptions {
|
|
1
|
+
import { IPackOptions } from "../pack.mjs";
|
|
2
|
+
export interface ICreateAssetsOptions extends IPackOptions {
|
|
3
3
|
projectDir: string;
|
|
4
4
|
publicDir: string;
|
|
5
5
|
baseAssetsDir: string;
|
|
@@ -8,6 +8,5 @@ export interface ICreateAssetsOptions {
|
|
|
8
8
|
exportedAssets: string[];
|
|
9
9
|
cache: Record<string, string>;
|
|
10
10
|
compressedTexturesEnabled: boolean;
|
|
11
|
-
onStepChanged?: (step: PackStepType, detail?: IPackStepDetails) => void;
|
|
12
11
|
}
|
|
13
12
|
export declare function createAssets(options: ICreateAssetsOptions): Promise<void>;
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
export type KTXToolsType = "-astc.ktx" | "-dxt.ktx" | "-pvrtc.ktx" | "-etc1.ktx" | "-etc2.ktx";
|
|
2
2
|
export declare const allKtxFormats: KTXToolsType[];
|
|
3
3
|
export declare const ktxSupportedextensions: string[];
|
|
4
|
-
/**
|
|
5
|
-
* Returns the absolute path to the compressed textures CLI path (PVRTexTool).
|
|
6
|
-
* The value is retrieved from the local storage so it's per computer and not per project.
|
|
7
|
-
*/
|
|
8
|
-
export declare function getCompressedTexturesCliPath(): string | null;
|
|
9
|
-
/**
|
|
10
|
-
* Sets the absolute path to the compressed textures CLI path (PVRTexTool).
|
|
11
|
-
* The value is stored in the local storage so it's per computer and not per project.
|
|
12
|
-
*/
|
|
13
|
-
export declare function setCompressedTexturesCliPath(absolutePath: string): void;
|
|
14
4
|
/**
|
|
15
5
|
* Returns the filename of the compressed texture according to the given path and the destination format.
|
|
16
6
|
* @param path defines the path of the texture to get its final name.
|
|
@@ -20,6 +10,7 @@ export declare function setCompressedTexturesCliPath(absolutePath: string): void
|
|
|
20
10
|
export declare function getCompressedTextureFilename(path: string, format: KTXToolsType): string;
|
|
21
11
|
export type CompressFileToKtxOptions = {
|
|
22
12
|
format: KTXToolsType;
|
|
13
|
+
compressedTexturesEnabled: boolean;
|
|
23
14
|
force?: boolean;
|
|
24
15
|
exportedAssets?: string[];
|
|
25
16
|
destinationFolder?: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { CancellationToken } from "../tools/cancel.mjs";
|
|
2
|
+
export type PackStepType = "assets" | "scenes" | "scripts" | "upload";
|
|
2
3
|
export interface IPackStepDetails {
|
|
3
4
|
message?: string;
|
|
4
5
|
success?: boolean;
|
|
@@ -6,6 +7,8 @@ export interface IPackStepDetails {
|
|
|
6
7
|
export interface IPackOptions {
|
|
7
8
|
optimize: boolean;
|
|
8
9
|
pvrTexToolAbsolutePath?: string;
|
|
10
|
+
cancellationToken?: CancellationToken;
|
|
11
|
+
onProgress?: (progress: number) => void;
|
|
9
12
|
onStepChanged?: (step: PackStepType, detail?: IPackStepDetails) => void;
|
|
10
13
|
}
|
|
11
14
|
export declare function pack(projectDir: string, options: IPackOptions): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createScriptsFile(projectDir: string): Promise<void>;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import { glob } from "glob";
|
|
2
2
|
export declare function normalizedGlob(...args: Parameters<typeof glob>): Promise<string[]>;
|
|
3
3
|
export declare function getProjectDir(projectDir: string): string;
|
|
4
|
+
/**
|
|
5
|
+
* Tries to read a directory and returns its content if the directory exists.
|
|
6
|
+
* If not, returns an empty array.
|
|
7
|
+
* @param path defines the absolute path to read directory.
|
|
8
|
+
*/
|
|
9
|
+
export declare function tryReadDir(path: string): Promise<string[]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babylonjs-editor-cli",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.1",
|
|
4
4
|
"description": "Babylon.js Editor CLI is a command line interface to help you package your scenes made using the Babylon.js Editor",
|
|
5
5
|
"productName": "Babylon.js Editor CLI",
|
|
6
6
|
"scripts": {
|