babylonjs-editor 5.5.0 → 5.5.1-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/layout/inspector/light/components/volumetric.d.ts +11 -0
- package/declaration/src/editor/layout/inspector/scene/scene.d.ts +3 -0
- package/declaration/src/editor/layout/inspector/script/tools.d.ts +1 -0
- package/declaration/src/editor/layout/preview/import/import.d.ts +0 -1
- package/declaration/src/editor/layout/preview.d.ts +2 -0
- package/declaration/src/editor/layout/ragdoll/inspector.d.ts +1 -0
- package/declaration/src/editor/layout/ragdoll/preview.d.ts +2 -1
- package/declaration/src/editor/rendering/volumetric-lighting.d.ts +22 -0
- package/declaration/src/export.d.ts +1 -0
- package/declaration/src/tools/light/volumetric.d.ts +47 -0
- package/declaration/src/tools/node/metadata.d.ts +5 -0
- package/declaration/src/tools/scene/gltf.d.ts +14 -0
- package/package.json +2 -2
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Light } from "babylonjs";
|
|
2
|
+
import { Editor } from "../../../../main";
|
|
3
|
+
export interface IEditorLightVolumetricInspectorProps {
|
|
4
|
+
light: Light;
|
|
5
|
+
editor: Editor;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Draws the "Volumetric Lighting" section of the inspector of a light. Each light of the scene, including
|
|
9
|
+
* the ones that live inside a clustered light container, is configured individually here.
|
|
10
|
+
*/
|
|
11
|
+
export declare function EditorLightVolumetricInspector(props: IEditorLightVolumetricInspectorProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -18,11 +18,14 @@ export declare class EditorSceneInspector extends Component<IEditorInspectorImpl
|
|
|
18
18
|
get scene(): Scene;
|
|
19
19
|
get isPlaying(): boolean;
|
|
20
20
|
private _getPhysicsComponent;
|
|
21
|
+
private _getVolumetricLightingComponent;
|
|
21
22
|
private _getDefaultRenderingPipelineComponent;
|
|
22
23
|
private _getTAARenderingPipelineComponent;
|
|
23
24
|
private _getSSAO2RenderingPipelineComponent;
|
|
24
25
|
private _getMotionBlurPostProcessComponent;
|
|
25
26
|
private _getSSRPipelineComponent;
|
|
27
|
+
private _volumetricAmbientColor;
|
|
28
|
+
private _getVolumetricAmbientColorObject;
|
|
26
29
|
private _getVLSComponent;
|
|
27
30
|
private _handleDragOverVlsMesh;
|
|
28
31
|
private _handleDropVlsMesh;
|
|
@@ -8,4 +8,3 @@ export declare function configureImportedTexture<T extends Texture | CubeTexture
|
|
|
8
8
|
export declare function configureEmbeddedTexture(texture: Texture, absolutePath: string): Promise<void | boolean>;
|
|
9
9
|
export declare function cleanTexture(texture: Texture, filename: string): void;
|
|
10
10
|
export declare function loadImportedMaterial(scene: Scene, absolutePath: string): Promise<Material | null>;
|
|
11
|
-
export declare function cleanImportedGltf(result: ISceneLoaderAsyncResult): void;
|
|
@@ -132,6 +132,8 @@ export declare class EditorPreview extends Component<IEditorPreviewProps, IEdito
|
|
|
132
132
|
setCameraPreviewActive(camera: Camera | null): void;
|
|
133
133
|
private _onGotIconsRef;
|
|
134
134
|
private _onGotCanvasRef;
|
|
135
|
+
private _twgsl;
|
|
136
|
+
private _glslang;
|
|
135
137
|
private _createWebgpuEngine;
|
|
136
138
|
/** @internal */
|
|
137
139
|
_handleMouseLeave(): void;
|
|
@@ -19,6 +19,7 @@ export declare class RagdollEditorInspector extends Component<IRagdollEditorInsp
|
|
|
19
19
|
constructor(props: IRagdollEditorInspectorProps);
|
|
20
20
|
render(): ReactNode;
|
|
21
21
|
private _getRagdollInspector;
|
|
22
|
+
private _handleApplyMixamoTemplate;
|
|
22
23
|
private _handleApplyOrStopRagdollPreview;
|
|
23
24
|
private _getConfigurationListInspector;
|
|
24
25
|
private _handleAddConfiguration;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component, ReactNode } from "react";
|
|
2
|
-
import { Engine, Scene, ArcRotateCamera, Ragdoll, GroundMesh, TransformNode } from "babylonjs";
|
|
2
|
+
import { Engine, Scene, ArcRotateCamera, Ragdoll, GroundMesh, TransformNode, AssetContainer } from "babylonjs";
|
|
3
3
|
import { Editor } from "../../main";
|
|
4
4
|
import { RagdollEditor } from "./editor";
|
|
5
5
|
export interface IRagdollEditorPreviewProps {
|
|
@@ -15,6 +15,7 @@ export declare class RagdollEditorPreview extends Component<IRagdollEditorPrevie
|
|
|
15
15
|
camera: ArcRotateCamera;
|
|
16
16
|
ground: GroundMesh;
|
|
17
17
|
scalingNode: TransformNode;
|
|
18
|
+
container: AssetContainer | null;
|
|
18
19
|
ragdoll: Ragdoll | null;
|
|
19
20
|
private _light;
|
|
20
21
|
private _viewer;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Camera } from "babylonjs";
|
|
2
|
+
import { Editor } from "../main";
|
|
3
|
+
import { VolumetricLightingRenderingPipeline } from "babylonjs-editor-tools";
|
|
4
|
+
/**
|
|
5
|
+
* Defines the configuration of the volumetric lighting rendering pipeline per camera.
|
|
6
|
+
*/
|
|
7
|
+
export declare const volumetricLightingRenderingPipelineCameraConfigurations: Map<Camera, any>;
|
|
8
|
+
export declare function getVolumetricLightingRenderingPipeline(): VolumetricLightingRenderingPipeline | null;
|
|
9
|
+
/**
|
|
10
|
+
* Returns wether or not the volumetric lighting rendering pipeline is supported by the engine used by the editor.
|
|
11
|
+
* @param editor defines the reference to the editor.
|
|
12
|
+
*/
|
|
13
|
+
export declare function isVolumetricLightingSupported(editor: Editor): boolean;
|
|
14
|
+
export declare function disposeVolumetricLightingRenderingPipeline(): void;
|
|
15
|
+
export declare function createVolumetricLightingRenderingPipeline(editor: Editor): VolumetricLightingRenderingPipeline;
|
|
16
|
+
export declare function serializeVolumetricLightingRenderingPipeline(): any;
|
|
17
|
+
export declare function parseVolumetricLightingRenderingPipeline(editor: Editor, data: any): VolumetricLightingRenderingPipeline;
|
|
18
|
+
/**
|
|
19
|
+
* Marks the list of lights contributing to the volumetric lighting as dirty. Called when the volumetric
|
|
20
|
+
* configuration of a light is edited so the effect updates without waiting for the next selection pass.
|
|
21
|
+
*/
|
|
22
|
+
export declare function markVolumetricLightsDirty(): void;
|
|
@@ -50,6 +50,7 @@ export * from "./editor/rendering/vls";
|
|
|
50
50
|
export * from "./editor/rendering/ssao";
|
|
51
51
|
export * from "./editor/rendering/motion-blur";
|
|
52
52
|
export * from "./editor/rendering/default-pipeline";
|
|
53
|
+
export * from "./editor/rendering/volumetric-lighting";
|
|
53
54
|
export * from "./ui/spinner";
|
|
54
55
|
export * from "./ui/color-picker";
|
|
55
56
|
export * from "./ui/dialog";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Color3, Light } from "babylonjs";
|
|
2
|
+
import { IVolumetricLightConfiguration } from "babylonjs-editor-tools";
|
|
3
|
+
import { Editor } from "../../editor/main";
|
|
4
|
+
/**
|
|
5
|
+
* Returns wether or not the given light can take part in the volumetric lighting.
|
|
6
|
+
* @param light defines the reference to the light to check.
|
|
7
|
+
*/
|
|
8
|
+
export declare function isVolumetricLightingAvailable(light: Light): boolean;
|
|
9
|
+
export declare function getVolumetricLightConfigurationProxy(light: Light): IVolumetricLightConfiguration;
|
|
10
|
+
/**
|
|
11
|
+
* Creates a Color3 whose three channels are accessors over the given array instead of plain values.
|
|
12
|
+
*
|
|
13
|
+
* The color field of the inspector mutates a Color3 in place, and its per-channel number fields register
|
|
14
|
+
* their own undo/redo that writes straight into that Color3, bypassing every callback. Binding the channels
|
|
15
|
+
* to the array makes all of those paths, including undo and redo, update the configuration itself.
|
|
16
|
+
* @param read defines the function returning the array backing the color.
|
|
17
|
+
* @param write defines the function storing the new array.
|
|
18
|
+
*/
|
|
19
|
+
export declare function createArrayBoundColor3(read: () => number[], write: (value: number[]) => void): Color3;
|
|
20
|
+
/**
|
|
21
|
+
* Returns a stable object holding the custom volumetric color of the given light as a Color3 bound to the
|
|
22
|
+
* array stored in its configuration, so the inspector can edit it like any other color.
|
|
23
|
+
* @param light defines the reference to the light to get its custom volumetric color.
|
|
24
|
+
*/
|
|
25
|
+
export declare function getVolumetricLightColorObject(light: Light): {
|
|
26
|
+
color: Color3;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Returns how the light shafts of the given light are occluded by the geometry of the scene, and explains it.
|
|
30
|
+
*
|
|
31
|
+
* A light that renders a shadow map is occluded by it, which is exact. Any other light, including every light
|
|
32
|
+
* of a clustered light container, falls back on the depth buffer of the scene, which is an approximation but
|
|
33
|
+
* is what stops its shafts from showing through the walls that stand between it and the camera.
|
|
34
|
+
* @param light defines the reference to the light to check.
|
|
35
|
+
* @param editor defines the reference to the editor.
|
|
36
|
+
*/
|
|
37
|
+
export declare function getVolumetricLightOcclusionMode(light: Light, editor: Editor): {
|
|
38
|
+
usesShadowMap: boolean;
|
|
39
|
+
reason: string;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Returns a human readable description of what the given light currently does in the volumetric lighting
|
|
43
|
+
* rendering pipeline, drawn under the fields of the inspector.
|
|
44
|
+
* @param light defines the reference to the light to describe.
|
|
45
|
+
* @param editor defines the reference to the editor.
|
|
46
|
+
*/
|
|
47
|
+
export declare function getVolumetricLightStatusLabel(light: Light, editor: Editor): string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Node } from "babylonjs";
|
|
2
|
+
import { IVolumetricLightConfiguration } from "babylonjs-editor-tools";
|
|
2
3
|
export interface INodeMetadata {
|
|
3
4
|
/**
|
|
4
5
|
* Defines wether or not the object is locked.
|
|
@@ -12,6 +13,10 @@ export interface INodeMetadata {
|
|
|
12
13
|
* Defines wether or not the object is visible in the graph panel in the editor.
|
|
13
14
|
*/
|
|
14
15
|
notVisibleInGraph?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Defines the configuration of the volumetric lighting for the light. @see IVolumetricLightConfiguration
|
|
18
|
+
*/
|
|
19
|
+
volumetricLighting?: IVolumetricLightConfiguration;
|
|
15
20
|
}
|
|
16
21
|
/**
|
|
17
22
|
* Ensures that metadata exists for the given node.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ISceneLoaderAsyncResult, AssetContainer } from "babylonjs";
|
|
2
|
+
/**
|
|
3
|
+
* Converts everything the glTF loader created under its "__root__" node to the left handed system Babylon.js uses.
|
|
4
|
+
*
|
|
5
|
+
* In a left handed scene, the glTF loader keeps all the data as authored (right handed) and compensates using a
|
|
6
|
+
* negative scaling (and a rotation) on the "__root__" node. This works for rendering, but every tool relying on the
|
|
7
|
+
* world matrices having a positive determinant (ragdolls, physics, etc.) breaks.
|
|
8
|
+
*
|
|
9
|
+
* The mirror of the root is baked into the data instead: the geometries are mirrored and every transform, skeleton
|
|
10
|
+
* and animation is conjugated by the mirror. The world transforms and the rendering of the loaded hierarchy are
|
|
11
|
+
* exactly preserved, but the root doesn't have a negative scaling anymore.
|
|
12
|
+
* @param result defines the result of the scene loader containing the loaded glTF.
|
|
13
|
+
*/
|
|
14
|
+
export declare function convertGltfToLeftHanded(result: ISceneLoaderAsyncResult | AssetContainer): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babylonjs-editor",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.1-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",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"postcss-import": "16.1.0",
|
|
38
38
|
"tailwindcss": "3.4.4",
|
|
39
39
|
"typescript": "7.0.2",
|
|
40
|
-
"vitest": "4.1.
|
|
40
|
+
"vitest": "4.1.11"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@adobe/spz": "0.2.2",
|