Skip to content

Commit

Permalink
Frame graph (BabylonJS#15735)
Browse files Browse the repository at this point in the history
  • Loading branch information
Popov72 authored Nov 4, 2024
1 parent eff57de commit 317ce31
Show file tree
Hide file tree
Showing 248 changed files with 18,637 additions and 1,402 deletions.
36 changes: 32 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,16 +206,30 @@
"type": "msedge",
"request": "launch",
"name": "Node Geometry Editor development (Edge)",
"url": "http://localhost:1340",
"url": "http://localhost:1343",
"preLaunchTask": "Node Geometry Editor Serve (Dev)"
},
{
"type": "chrome",
"request": "launch",
"name": "Node Geometry Editor development (Chrome)",
"url": "http://localhost:1340",
"url": "http://localhost:1343",
"preLaunchTask": "Node Geometry Editor Serve (Dev)"
},
{
"type": "msedge",
"request": "launch",
"name": "Node Render Graph Editor development (Edge)",
"url": "http://localhost:1344",
"preLaunchTask": "Node Render Graph Editor Serve (Dev)"
},
{
"type": "chrome",
"request": "launch",
"name": "Node Render Graph Editor development (Chrome)",
"url": "http://localhost:1344",
"preLaunchTask": "Node Render Graph Editor Serve (Dev)"
},
{
/*
Launch the playground to be use to test changes in dev packages
Expand Down Expand Up @@ -243,7 +257,7 @@
"type": "msedge",
"request": "launch",
"name": "Launch Node Geometry Editor (Edge)",
"url": "http://localhost:1340",
"url": "http://localhost:1343",
"preLaunchTask": "Node Geometry Editor Serve for core (Dev)"
},
{
Expand All @@ -253,9 +267,23 @@
"type": "chrome",
"request": "launch",
"name": "Launch Node Geometry Editor (Chrome)",
"url": "http://localhost:1340",
"url": "http://localhost:1343",
"preLaunchTask": "Node Geometry Editor Serve for core (Dev)"
},
{
"type": "msedge",
"request": "launch",
"name": "Launch Node Render Graph Editor (Edge)",
"url": "http://localhost:1344",
"preLaunchTask": "Node Render Graph Editor Serve for core (Dev)"
},
{
"type": "chrome",
"request": "launch",
"name": "Launch Node Render Graph Editor (Chrome)",
"url": "http://localhost:1344",
"preLaunchTask": "Node Render Graph Editor Serve for core (Dev)"
},
{
"type": "msedge",
"request": "launch",
Expand Down
36 changes: 36 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,42 @@
},
"problemMatcher": ["$ts-webpack-watch", "$tslint-webpack-watch"]
},
{
"label": "Node Render Graph Editor Serve for core (Dev)",
"type": "shell",
"command": "npm",
"dependsOn": "CDN Serve and watch (Dev)",
"runOptions": {
"instanceLimit": 1
},
"options": {
"cwd": "${workspaceFolder}"
},
"args": ["run", "serve", "-w", "@tools/node-render-graph-editor"],
"isBackground": true,
"presentation": {
"group": "serve"
},
"problemMatcher": ["$ts-webpack-watch", "$tslint-webpack-watch"]
},
{
"label": "Node Render Graph Editor Serve (Dev)",
"type": "shell",
"command": "npm",
"dependsOn": "CDN Serve and watch (Dev)",
"runOptions": {
"instanceLimit": 1
},
"options": {
"cwd": "${workspaceFolder}"
},
"args": ["run", "serve", "-w", "@tools/node-render-graph-editor"],
"isBackground": true,
"presentation": {
"group": "serve"
},
"problemMatcher": ["$ts-webpack-watch", "$tslint-webpack-watch"]
},
{
"label": "VSM Serve for core (Dev)",
"type": "shell",
Expand Down
82 changes: 82 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@
"build:lts": "npm run build:assets && npm run build:source:lts",
"build:source": "tsc -b ./tsconfig.devpackages.json",
"build:source:lts": "npx nx run-many --target=compile --projects=@lts/core,@lts/gui,@lts/loaders,@lts/materials,@lts/post-processes,@lts/procedural-textures,@lts/serializers --parallel=1",
"build:umd": "nx run-many --target=build --parallel --maxParallel=6 --projects=babylonjs,babylonjs-gui,babylonjs-inspector,babylonjs-loaders,babylonjs-materials,babylonjs-serializers,babylonjs-post-process,babylonjs-procedural-textures,babylonjs-node-editor,babylonjs-node-geometry-editor,babylonjs-gui-editor,babylonjs-ktx2decoder,babylonjs-viewer-assets,babylonjs-viewer,babylonjs-accessibility",
"build:es6": "nx run-many --target=build --parallel --maxParallel=6 --projects=@babylonjs/core,@babylonjs/gui,@babylonjs/loaders,@babylonjs/materials,@babylonjs/serializers,@babylonjs/post-processes,@babylonjs/procedural-textures,@babylonjs/node-editor,@babylonjs/node-geometry-editor,@babylonjs/inspector,@babylonjs/gui-editor,@babylonjs/viewer,@babylonjs/viewer-alpha,@babylonjs/shared-ui-components,@babylonjs/accessibility,@babylonjs/ktx2decoder",
"build:umd": "nx run-many --target=build --parallel --maxParallel=6 --projects=babylonjs,babylonjs-gui,babylonjs-inspector,babylonjs-loaders,babylonjs-materials,babylonjs-serializers,babylonjs-post-process,babylonjs-procedural-textures,babylonjs-node-editor,babylonjs-node-geometry-editor,babylonjs-node-render-graph-editor,babylonjs-gui-editor,babylonjs-ktx2decoder,babylonjs-viewer-assets,babylonjs-viewer,babylonjs-accessibility",
"build:es6": "nx run-many --target=build --parallel --maxParallel=6 --projects=@babylonjs/core,@babylonjs/gui,@babylonjs/loaders,@babylonjs/materials,@babylonjs/serializers,@babylonjs/post-processes,@babylonjs/procedural-textures,@babylonjs/node-editor,@babylonjs/node-geometry-editor,@babylonjs/node-render-graph-editor,@babylonjs/inspector,@babylonjs/gui-editor,@babylonjs/viewer,@babylonjs/viewer-alpha,@babylonjs/shared-ui-components,@babylonjs/accessibility,@babylonjs/ktx2decoder",
"watch:shaders": "build-tools -c build-shaders --global --watch",
"watch:assets": "build-tools -c pa --global --watch",
"watch:source:dev": "tsc -b ./tsconfig.devpackages.json -w",
Expand Down
28 changes: 28 additions & 0 deletions packages/dev/buildTools/src/packageMapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export type DevPackageName =
| "procedural-textures"
| "node-editor"
| "node-geometry-editor"
| "node-render-graph-editor"
| "gui-editor"
| "accessibility"
| "viewer"
Expand All @@ -31,6 +32,7 @@ export type UMDPackageName =
| "babylonjs-inspector"
| "babylonjs-node-editor"
| "babylonjs-node-geometry-editor"
| "babylonjs-node-render-graph-editor"
| "babylonjs-gui-editor"
| "babylonjs-accessibility"
| "babylonjs-viewer"
Expand All @@ -48,6 +50,7 @@ export type NamespacePackageName =
| "BABYLON.Debug"
| "BABYLON.NodeEditor"
| "BABYLON.NodeGeometryEditor"
| "BABYLON.NodeRenderGraphEditor"
| "BABYLON.GuiEditor"
| "BABYLON.Accessibility"
| "INSPECTOR"
Expand All @@ -57,6 +60,7 @@ export type NamespacePackageName =
| "BABYLON.SharedUIComponents"
| "BABYLON.NodeEditor.SharedUIComponents"
| "BABYLON.NodeGeometryEditor.SharedUIComponents"
| "BABYLON.NodeRenderGraphEditor.SharedUIComponents"
| "BABYLON.GuiEditor.SharedUIComponents";
export type ES6PackageName =
| "@babylonjs/core"
Expand All @@ -68,6 +72,7 @@ export type ES6PackageName =
| "@babylonjs/inspector"
| "@babylonjs/node-editor"
| "@babylonjs/node-geometry-editor"
| "@babylonjs/node-render-graph-editor"
| "@babylonjs/gui-editor"
| "@babylonjs/accessibility"
| "@babylonjs/post-processes"
Expand Down Expand Up @@ -114,6 +119,10 @@ export const umdPackageMapping: { [key in UMDPackageName]: { baseDir: string; ba
baseDir: "nodeGeometryEditor",
baseFilename: "babylon.nodeGeometryEditor",
},
"babylonjs-node-render-graph-editor": {
baseDir: "nodeRenderGraphEditor",
baseFilename: "babylon.nodeRenderGraphEditor",
},
"babylonjs-gui-editor": {
baseDir: "guiEditor",
baseFilename: "babylon.guiEditor",
Expand Down Expand Up @@ -175,6 +184,12 @@ const packageMapping: {
// }
return "babylonjs-node-geometry-editor";
},
"node-render-graph-editor": (_filePath?: string) => {
// if (filePath && filePath.indexOf("sharedUiComponents") !== -1) {
// return "babylonjs-shared-ui-components";
// }
return "babylonjs-node-render-graph-editor";
},
"gui-editor": (_filePath?: string) => {
// if (filePath && filePath.indexOf("sharedUiComponents") !== -1) {
// return "babylonjs-shared-ui-components";
Expand All @@ -198,6 +213,7 @@ const packageMapping: {
inspector: "@babylonjs/inspector",
"node-editor": "@babylonjs/node-editor",
"node-geometry-editor": "@babylonjs/node-geometry-editor",
"node-render-graph-editor": "@babylonjs/node-render-graph-editor",
"gui-editor": "@babylonjs/gui-editor",
accessibility: "@babylonjs/accessibility",
"post-processes": "@babylonjs/post-processes",
Expand All @@ -216,6 +232,7 @@ const packageMapping: {
inspector: "@babylonjs/esm",
"node-editor": "@babylonjs/esm",
"node-geometry-editor": "@babylonjs/esm",
"node-render-graph-editor": "@babylonjs/esm",
"gui-editor": "@babylonjs/esm",
accessibility: "@babylonjs/accessibility",
"post-processes": "@babylonjs/esm",
Expand Down Expand Up @@ -296,6 +313,17 @@ const packageMapping: {
}
return "BABYLON.NodeGeometryEditor";
},
"node-render-graph-editor": (filePath?: string) => {
if (filePath) {
if (filePath.includes("shared-ui-components/") || filePath.includes("/sharedUiComponents/")) {
// was .endsWith
return "BABYLON.NodeRenderGraphEditor.SharedUIComponents";
} else if (filePath.includes("babylonjs-gltf2interface")) {
return "BABYLON.GLTF2";
}
}
return "BABYLON.NodeRenderGraphEditor";
},
"gui-editor": (filePath?: string) => {
if (filePath) {
if (filePath.includes("shared-ui-components/") || filePath.includes("/sharedUiComponents/")) {
Expand Down
6 changes: 4 additions & 2 deletions packages/dev/core/src/Cameras/camera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,8 @@ export class Camera extends Node {
public _computedViewMatrix = Matrix.Identity();
private _doNotComputeProjectionMatrix = false;
private _transformMatrix = Matrix.Zero();
private _frustumPlanes: Plane[];
/** @internal */
public _frustumPlanes: Plane[];
private _refreshFrustumPlanes = true;
private _storedFov: number;
private _stateStored: boolean;
Expand Down Expand Up @@ -1061,7 +1062,8 @@ export class Camera extends Node {
return (arcRotateCamera.radius || (targetCamera.target ? Vector3.Distance(this.position, targetCamera.target) : this.position.length())) + offset;
}

private _updateFrustumPlanes(): void {
/** @internal */
public _updateFrustumPlanes(): void {
if (!this._refreshFrustumPlanes) {
return;
}
Expand Down
8 changes: 8 additions & 0 deletions packages/dev/core/src/Decorators/nodeDecorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ export const enum PropertyTypeForEdition {
Vector2,
/** property is a list of values */
List,
/** property is a Color4 */
Color4,
/** property (int) should be edited as a combo box with a list of sampling modes */
SamplingMode,
/** property (int) should be edited as a combo box with a list of texture formats */
TextureFormat,
/** property (int) should be edited as a combo box with a list of texture types */
TextureType,
}

/**
Expand Down
Loading

0 comments on commit 317ce31

Please sign in to comment.