@babylonjs/inspector 6.21.4 → 6.22.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.
@@ -4451,18 +4451,46 @@ export var lodCubePixelShader: {
|
|
4451
4451
|
|
4452
4452
|
}
|
4453
4453
|
declare module "@babylonjs/inspector/textureHelper" {
|
4454
|
-
import { GlobalState } from "@babylonjs/inspector/components/globalState";
|
4455
4454
|
import { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture";
|
4455
|
+
import { GlobalState } from "@babylonjs/inspector/components/globalState";
|
4456
4456
|
import "@babylonjs/inspector/lod";
|
4457
4457
|
import "@babylonjs/inspector/lodCube";
|
4458
|
+
/**
|
4459
|
+
* Defines which channels of the texture to retrieve with {@link TextureHelper.GetTextureDataAsync}.
|
4460
|
+
*/
|
4458
4461
|
export interface TextureChannelsToDisplay {
|
4462
|
+
/**
|
4463
|
+
* True if the red channel should be included.
|
4464
|
+
*/
|
4459
4465
|
R: boolean;
|
4466
|
+
/**
|
4467
|
+
* True if the green channel should be included.
|
4468
|
+
*/
|
4460
4469
|
G: boolean;
|
4470
|
+
/**
|
4471
|
+
* True if the blue channel should be included.
|
4472
|
+
*/
|
4461
4473
|
B: boolean;
|
4474
|
+
/**
|
4475
|
+
* True if the alpha channel should be included.
|
4476
|
+
*/
|
4462
4477
|
A: boolean;
|
4463
4478
|
}
|
4479
|
+
/**
|
4480
|
+
* Helper class for retrieving texture data.
|
4481
|
+
*/
|
4464
4482
|
export class TextureHelper {
|
4465
|
-
|
4483
|
+
/**
|
4484
|
+
* Gets the data of the specified texture by rendering it to an intermediate RGBA texture and retrieving the bytes from it.
|
4485
|
+
* This is convienent to get 8-bit RGBA values for a texture in a GPU compressed format.
|
4486
|
+
* @param texture the source texture
|
4487
|
+
* @param width the width of the result, which does not have to match the source texture width
|
4488
|
+
* @param height the height of the result, which does not have to match the source texture height
|
4489
|
+
* @param face if the texture has multiple faces, the face index to use for the source
|
4490
|
+
* @param channels a filter for which of the RGBA channels to return in the result
|
4491
|
+
* @param lod if the texture has multiple LODs, the lod index to use for the source
|
4492
|
+
* @returns the 8-bit texture data
|
4493
|
+
*/
|
4466
4494
|
static GetTextureDataAsync(texture: BaseTexture, width: number, height: number, face: number, channels: TextureChannelsToDisplay, globalState?: GlobalState, lod?: number): Promise<Uint8Array>;
|
4467
4495
|
}
|
4468
4496
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@babylonjs/inspector",
|
3
|
-
"version": "6.
|
3
|
+
"version": "6.22.1",
|
4
4
|
"module": "dist/babylon.inspector.bundle.max.js",
|
5
5
|
"main": "dist/babylon.inspector.bundle.max.js",
|
6
6
|
"typings": "dist/babylon.inspector.module.d.ts",
|
@@ -32,12 +32,12 @@
|
|
32
32
|
"@types/react-dom": ">=16.0.9"
|
33
33
|
},
|
34
34
|
"devDependencies": {
|
35
|
-
"@babylonjs/core": "^6.
|
36
|
-
"@babylonjs/gui": "^6.
|
37
|
-
"@babylonjs/gui-editor": "^6.
|
38
|
-
"@babylonjs/loaders": "^6.
|
39
|
-
"@babylonjs/materials": "^6.
|
40
|
-
"@babylonjs/serializers": "^6.
|
35
|
+
"@babylonjs/core": "^6.22.1",
|
36
|
+
"@babylonjs/gui": "^6.22.1",
|
37
|
+
"@babylonjs/gui-editor": "^6.22.1",
|
38
|
+
"@babylonjs/loaders": "^6.22.1",
|
39
|
+
"@babylonjs/materials": "^6.22.1",
|
40
|
+
"@babylonjs/serializers": "^6.22.1",
|
41
41
|
"@lts/gui": "1.0.0",
|
42
42
|
"react": "^17.0.2",
|
43
43
|
"react-dom": "^17.0.2"
|