@woosh/meep-engine 2.132.3 → 2.133.0

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.
Files changed (43) hide show
  1. package/package.json +1 -1
  2. package/src/engine/graphics/render/frame_graph/{RenderGraph.d.ts → FrameGraph.d.ts} +21 -12
  3. package/src/engine/graphics/render/frame_graph/FrameGraph.d.ts.map +1 -0
  4. package/src/engine/graphics/render/frame_graph/{RenderGraph.js → FrameGraph.js} +25 -14
  5. package/src/engine/graphics/render/frame_graph/{GraphNode.d.ts → FrameGraphNode.d.ts} +2 -2
  6. package/src/engine/graphics/render/frame_graph/FrameGraphNode.d.ts.map +1 -0
  7. package/src/engine/graphics/render/frame_graph/{GraphNode.js → FrameGraphNode.js} +1 -1
  8. package/src/engine/graphics/render/frame_graph/{RenderPassBuilder.d.ts → FramePassBuilder.d.ts} +5 -5
  9. package/src/engine/graphics/render/frame_graph/FramePassBuilder.d.ts.map +1 -0
  10. package/src/engine/graphics/render/frame_graph/{RenderPassBuilder.js → FramePassBuilder.js} +5 -5
  11. package/src/engine/graphics/render/frame_graph/FramePassFlags.d.ts +4 -0
  12. package/src/engine/graphics/render/frame_graph/FramePassFlags.d.ts.map +1 -0
  13. package/src/engine/graphics/render/frame_graph/{RenderPassFlags.js → FramePassFlags.js} +1 -1
  14. package/src/engine/graphics/render/frame_graph/{RenderPassNode.d.ts → FramePassNode.d.ts} +6 -12
  15. package/src/engine/graphics/render/frame_graph/FramePassNode.d.ts.map +1 -0
  16. package/src/engine/graphics/render/frame_graph/{RenderPassNode.js → FramePassNode.js} +4 -14
  17. package/src/engine/graphics/render/frame_graph/{RenderPassResources.d.ts → FramePassResources.d.ts} +7 -7
  18. package/src/engine/graphics/render/frame_graph/FramePassResources.d.ts.map +1 -0
  19. package/src/engine/graphics/render/frame_graph/{RenderPassResources.js → FramePassResources.js} +5 -5
  20. package/src/engine/graphics/render/frame_graph/{IRenderContext.d.ts → IFrameGraphContext.d.ts} +2 -2
  21. package/src/engine/graphics/render/frame_graph/IFrameGraphContext.d.ts.map +1 -0
  22. package/src/engine/graphics/render/frame_graph/{IRenderContext.js → IFrameGraphContext.js} +1 -1
  23. package/src/engine/graphics/render/frame_graph/ResourceEntry.d.ts +4 -4
  24. package/src/engine/graphics/render/frame_graph/ResourceEntry.d.ts.map +1 -1
  25. package/src/engine/graphics/render/frame_graph/ResourceEntry.js +2 -2
  26. package/src/engine/graphics/render/frame_graph/ResourceNode.d.ts +4 -4
  27. package/src/engine/graphics/render/frame_graph/ResourceNode.d.ts.map +1 -1
  28. package/src/engine/graphics/render/frame_graph/ResourceNode.js +3 -3
  29. package/src/engine/graphics/render/frame_graph/backend/void/VoidRenderContext.d.ts +2 -2
  30. package/src/engine/graphics/render/frame_graph/backend/void/VoidRenderContext.d.ts.map +1 -1
  31. package/src/engine/graphics/render/frame_graph/backend/void/VoidRenderContext.js +2 -2
  32. package/src/engine/graphics/render/frame_graph/resource/RenderResourceManager.js +1 -1
  33. package/src/engine/graphics/render/frame_graph/webgl/WebGLRenderContext.d.ts +2 -2
  34. package/src/engine/graphics/render/frame_graph/webgl/WebGLRenderContext.d.ts.map +1 -1
  35. package/src/engine/graphics/render/frame_graph/webgl/WebGLRenderContext.js +2 -2
  36. package/src/engine/graphics/render/frame_graph/GraphNode.d.ts.map +0 -1
  37. package/src/engine/graphics/render/frame_graph/IRenderContext.d.ts.map +0 -1
  38. package/src/engine/graphics/render/frame_graph/RenderGraph.d.ts.map +0 -1
  39. package/src/engine/graphics/render/frame_graph/RenderPassBuilder.d.ts.map +0 -1
  40. package/src/engine/graphics/render/frame_graph/RenderPassFlags.d.ts +0 -4
  41. package/src/engine/graphics/render/frame_graph/RenderPassFlags.d.ts.map +0 -1
  42. package/src/engine/graphics/render/frame_graph/RenderPassNode.d.ts.map +0 -1
  43. package/src/engine/graphics/render/frame_graph/RenderPassResources.d.ts.map +0 -1
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "description": "Pure JavaScript game engine. Fully featured and production ready.",
6
6
  "type": "module",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.132.3",
8
+ "version": "2.133.0",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -1,7 +1,15 @@
1
1
  /**
2
- * Based on the Frostbite's GDC paper "FrameGraph: Extensible Rendering Architecture in Frostbite" by Yuriy O'Donnell
2
+ * A high-level rendering architecture system that manages render passes and their resource dependencies.
3
+ * This class schedules frame execution by building a directed graph of resources (textures, buffers) and the passes that read or write to them.
4
+ *
5
+ * By deferring execution until after the graph is compiled, it automatically handles complex tasks such as:
6
+ * - Culling unreferenced resources and passes (dead code elimination for rendering).
7
+ * - Automatic resource lifetime management (allocating transient resources just-in-time and destroying them immediately after their last use).
8
+ * - Visualizing the rendering pipeline via GraphViz DOT exports.
9
+ *
10
+ * @source Based on the Frostbite's GDC paper "FrameGraph: Extensible Rendering Architecture in Frostbite" by Yuriy O'Donnell
3
11
  * @example
4
- * const graph = new RenderGraph("My Graph");
12
+ * const graph = new FrameGraph("My Graph");
5
13
  *
6
14
  * const pass_data = {};
7
15
  * const pass = graph.add("GBuffer Pass", pass_data, (data, resources, context) => {
@@ -30,7 +38,7 @@
30
38
  * graph.execute(context);
31
39
  *
32
40
  */
33
- export class RenderGraph {
41
+ export class FrameGraph {
34
42
  /**
35
43
  *
36
44
  * @param {string} name
@@ -44,7 +52,7 @@ export class RenderGraph {
44
52
  name: string;
45
53
  /**
46
54
  *
47
- * @type {RenderPassNode[]}
55
+ * @type {FramePassNode[]}
48
56
  * @private
49
57
  */
50
58
  private __pass_nodes;
@@ -124,10 +132,10 @@ export class RenderGraph {
124
132
  * @template T
125
133
  * @param {string} name
126
134
  * @param {T} data
127
- * @param {function(data:T, resources: RenderPassResources, context:IRenderContext):void} execute
128
- * @returns {RenderPassBuilder}
135
+ * @param {function(data:T, resources: FramePassResources, context:IFrameGraphContext):void} execute
136
+ * @returns {FramePassBuilder}
129
137
  */
130
- add<T_3>(name: string, data: T_3, execute: any): RenderPassBuilder;
138
+ add<T_3>(name: string, data: T_3, execute: any): FramePassBuilder;
131
139
  /**
132
140
  * Perform validation, useful for debugging
133
141
  * Typically done before compilation
@@ -139,9 +147,9 @@ export class RenderGraph {
139
147
  compile(): void;
140
148
  /**
141
149
  *
142
- * @param {IRenderContext} context
150
+ * @param {IFrameGraphContext} context
143
151
  */
144
- execute(context: IRenderContext): void;
152
+ execute(context: IFrameGraphContext): void;
145
153
  /**
146
154
  * Should only call after {@link compile}
147
155
  *
@@ -162,12 +170,13 @@ export class RenderGraph {
162
170
  */
163
171
  exportToDot(): string;
164
172
  /**
173
+ * Type check shortcut.
165
174
  * @readonly
166
175
  * @type {boolean}
167
176
  */
168
- readonly isRenderGraph: boolean;
177
+ readonly isFrameGraph: boolean;
169
178
  }
170
179
  import { ResourceEntry } from "./ResourceEntry.js";
171
180
  import { ResourceNode } from "./ResourceNode.js";
172
- import { RenderPassBuilder } from "./RenderPassBuilder.js";
173
- //# sourceMappingURL=RenderGraph.d.ts.map
181
+ import { FramePassBuilder } from "./FramePassBuilder.js";
182
+ //# sourceMappingURL=FrameGraph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FrameGraph.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/frame_graph/FrameGraph.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH;IA6BI;;;OAGG;IACH,mBAFW,MAAM,EAOhB;IArCD;;;;OAIG;IACH,MAFU,MAAM,CAEN;IAEV;;;;OAIG;IACH,qBAAkB;IAElB;;;;OAIG;IACH,yBAAsB;IAEtB;;;;OAIG;IACH,4BAAyB;IAazB;;;;OAIG;IACH,qBAHW,MAAM,sBAehB;IAED;;;;OAIG;IACH,oBAHW,MAAM,qBAmBhB;IAED;;;;OAIG;IACH,qBAHW,MAAM,KAKhB;IAED;;;;;OAKG;IACH,2BAJW,MAAM,oBAEJ,MAAM,CAWlB;IAED;;;;;OAKG;IACH,6BAYC;IAED;;;;;;OAMG;IACH,4BAeC;IAED;;;;OAIG;IACH,wBAHW,MAAM,GACJ,MAAM,CAkBlB;IAED;;;;;;OAMG;IACH,2BALW,MAAM,wDAGJ,MAAM,CAUlB;IAED;;;OAGG;IACH,4BAHa,OAAO,CAQnB;IAED;;;;;;;OAOG;IACH,eALW,MAAM,4BAGJ,gBAAgB,CA2B5B;IAED;;;;;;OAMG;IACH,iEAFa,OAAO,CAQnB;IAED,gBA6FC;IAED;;;OAGG;IACH,2CAqDC;IAED;;;;;;;OAOG;IACH;gBAFqB,EAAE;mBAAa,EAAE;MA2DrC;IAED;;;;;OAKG;IACH,eAFY,MAAM,CA0GjB;IAGL;;;;OAIG;IACH,uBAFU,OAAO,CAEgB;CAPhC;8BApnB6B,oBAAoB;6BACrB,mBAAmB;iCAJf,uBAAuB"}
@@ -6,16 +6,24 @@ import { okhsv_to_linear_srgb } from "../../../../core/color/oklab/okhsv_to_line
6
6
  import { graphviz_escape_string } from "../../../../core/graph/format/graphviz/graphviz_escape_string.js";
7
7
  import { lerp } from "../../../../core/math/lerp.js";
8
8
  import { computeStringHash } from "../../../../core/primitives/strings/computeStringHash.js";
9
- import { RenderPassBuilder } from "./RenderPassBuilder.js";
10
- import { RenderPassNode } from "./RenderPassNode.js";
11
- import { RenderPassResources } from "./RenderPassResources.js";
9
+ import { FramePassBuilder } from "./FramePassBuilder.js";
10
+ import { FramePassNode } from "./FramePassNode.js";
11
+ import { FramePassResources } from "./FramePassResources.js";
12
12
  import { ResourceEntry } from "./ResourceEntry.js";
13
13
  import { ResourceNode } from "./ResourceNode.js";
14
14
 
15
15
  /**
16
- * Based on the Frostbite's GDC paper "FrameGraph: Extensible Rendering Architecture in Frostbite" by Yuriy O'Donnell
16
+ * A high-level rendering architecture system that manages render passes and their resource dependencies.
17
+ * This class schedules frame execution by building a directed graph of resources (textures, buffers) and the passes that read or write to them.
18
+ *
19
+ * By deferring execution until after the graph is compiled, it automatically handles complex tasks such as:
20
+ * - Culling unreferenced resources and passes (dead code elimination for rendering).
21
+ * - Automatic resource lifetime management (allocating transient resources just-in-time and destroying them immediately after their last use).
22
+ * - Visualizing the rendering pipeline via GraphViz DOT exports.
23
+ *
24
+ * @source Based on the Frostbite's GDC paper "FrameGraph: Extensible Rendering Architecture in Frostbite" by Yuriy O'Donnell
17
25
  * @example
18
- * const graph = new RenderGraph("My Graph");
26
+ * const graph = new FrameGraph("My Graph");
19
27
  *
20
28
  * const pass_data = {};
21
29
  * const pass = graph.add("GBuffer Pass", pass_data, (data, resources, context) => {
@@ -44,7 +52,7 @@ import { ResourceNode } from "./ResourceNode.js";
44
52
  * graph.execute(context);
45
53
  *
46
54
  */
47
- export class RenderGraph {
55
+ export class FrameGraph {
48
56
  /**
49
57
  * Human-readable name, used for debugging and UI primarily.
50
58
  * There is no uniqueness guarantee
@@ -54,7 +62,7 @@ export class RenderGraph {
54
62
 
55
63
  /**
56
64
  *
57
- * @type {RenderPassNode[]}
65
+ * @type {FramePassNode[]}
58
66
  * @private
59
67
  */
60
68
  __pass_nodes = [];
@@ -92,6 +100,8 @@ export class RenderGraph {
92
100
  getResourceEntry(id) {
93
101
  const node = this.getResourceNode(id);
94
102
 
103
+ assert.defined(node, 'node');
104
+
95
105
  const registry = this.__resource_registry;
96
106
 
97
107
  const entry = registry[node.resource_id];
@@ -250,8 +260,8 @@ export class RenderGraph {
250
260
  * @template T
251
261
  * @param {string} name
252
262
  * @param {T} data
253
- * @param {function(data:T, resources: RenderPassResources, context:IRenderContext):void} execute
254
- * @returns {RenderPassBuilder}
263
+ * @param {function(data:T, resources: FramePassResources, context:IFrameGraphContext):void} execute
264
+ * @returns {FramePassBuilder}
255
265
  */
256
266
  add(name, data, execute) {
257
267
  assert.isString(name, 'name');
@@ -264,8 +274,8 @@ export class RenderGraph {
264
274
 
265
275
  const pass_nodes = this.__pass_nodes;
266
276
 
267
- const builder = new RenderPassBuilder();
268
- const node = new RenderPassNode();
277
+ const builder = new FramePassBuilder();
278
+ const node = new FramePassNode();
269
279
 
270
280
  node.id = pass_nodes.length;
271
281
  node.name = name;
@@ -392,7 +402,7 @@ export class RenderGraph {
392
402
 
393
403
  /**
394
404
  *
395
- * @param {IRenderContext} context
405
+ * @param {IFrameGraphContext} context
396
406
  */
397
407
  execute(context) {
398
408
  assert.defined(context, 'context');
@@ -417,7 +427,7 @@ export class RenderGraph {
417
427
  this.getResourceEntry(id).create(context.resource_manager);
418
428
  }
419
429
 
420
- const resources = new RenderPassResources();
430
+ const resources = new FramePassResources();
421
431
  resources.init(this, node);
422
432
 
423
433
  // execute pass
@@ -630,7 +640,8 @@ export class RenderGraph {
630
640
  }
631
641
 
632
642
  /**
643
+ * Type check shortcut.
633
644
  * @readonly
634
645
  * @type {boolean}
635
646
  */
636
- RenderGraph.prototype.isRenderGraph = true;
647
+ FrameGraph.prototype.isFrameGraph = true;
@@ -1,4 +1,4 @@
1
- export class GraphNode {
1
+ export class FrameGraphNode {
2
2
  /**
3
3
  *
4
4
  * @type {string}
@@ -20,4 +20,4 @@ export class GraphNode {
20
20
  */
21
21
  ref_count: number;
22
22
  }
23
- //# sourceMappingURL=GraphNode.d.ts.map
23
+ //# sourceMappingURL=FrameGraphNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FrameGraphNode.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/frame_graph/FrameGraphNode.js"],"names":[],"mappings":"AAAA;IACI;;;OAGG;IACH,MAFU,MAAM,CAEN;IACV;;;OAGG;IACH,IAFU,MAAM,CAET;IACP;;;OAGG;IACH,SAFU,MAAM,CAEJ;IACZ;;;OAGG;IACH,WAFU,MAAM,CAEF;CACjB"}
@@ -1,4 +1,4 @@
1
- export class GraphNode {
1
+ export class FrameGraphNode {
2
2
  /**
3
3
  *
4
4
  * @type {string}
@@ -6,13 +6,13 @@
6
6
  * const pass_builder = graph.add("pass", pass_data, (data, resources, context) => { ... });
7
7
  * pass_data.resource_a = pass_builder.create("A", {});
8
8
  */
9
- export class RenderPassBuilder {
9
+ export class FramePassBuilder {
10
10
  /**
11
11
  *
12
- * @param {RenderGraph} graph
13
- * @param {RenderPassNode} node
12
+ * @param {FrameGraph} graph
13
+ * @param {FramePassNode} node
14
14
  */
15
- init(graph: RenderGraph, node: RenderPassNode): void;
15
+ init(graph: FrameGraph, node: FramePassNode): void;
16
16
  /**
17
17
  * Create a new resource.
18
18
  * Creation implies writing as well.
@@ -41,4 +41,4 @@ export class RenderPassBuilder {
41
41
  make_side_effect(): void;
42
42
  #private;
43
43
  }
44
- //# sourceMappingURL=RenderPassBuilder.d.ts.map
44
+ //# sourceMappingURL=FramePassBuilder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FramePassBuilder.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/frame_graph/FramePassBuilder.js"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH;IAgBI;;;;OAIG;IACH,mDAMC;IAED;;;;;;OAMG;IACH,aAJW,MAAM,mCAEJ,MAAM,CAYlB;IAED;;;;OAIG;IACH,eAHW,MAAM,GACJ,MAAM,CASlB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GACJ,MAAM,CAsBlB;IAED;;;;OAIG;IACH,yBAEC;;CACJ"}
@@ -8,26 +8,26 @@ import { assert } from "../../../../core/assert.js";
8
8
  * const pass_builder = graph.add("pass", pass_data, (data, resources, context) => { ... });
9
9
  * pass_data.resource_a = pass_builder.create("A", {});
10
10
  */
11
- export class RenderPassBuilder {
11
+ export class FramePassBuilder {
12
12
 
13
13
  /**
14
14
  *
15
- * @type {RenderGraph}
15
+ * @type {FrameGraph}
16
16
  * @private
17
17
  */
18
18
  #graph = null;
19
19
 
20
20
  /**
21
21
  *
22
- * @type {RenderPassNode}
22
+ * @type {FramePassNode}
23
23
  * @private
24
24
  */
25
25
  #node = null;
26
26
 
27
27
  /**
28
28
  *
29
- * @param {RenderGraph} graph
30
- * @param {RenderPassNode} node
29
+ * @param {FrameGraph} graph
30
+ * @param {FramePassNode} node
31
31
  */
32
32
  init(graph, node) {
33
33
  assert.defined(graph, 'graph');
@@ -0,0 +1,4 @@
1
+ export namespace FramePassFlags {
2
+ let HasSideEffects: number;
3
+ }
4
+ //# sourceMappingURL=FramePassFlags.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FramePassFlags.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/frame_graph/FramePassFlags.js"],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- export const RenderPassFlags = {
1
+ export const FramePassFlags = {
2
2
  /**
3
3
  * Render pass hidden effects, accessing data from outside
4
4
  */
@@ -1,15 +1,15 @@
1
1
  /**
2
2
  * @template T
3
3
  */
4
- export class RenderPassNode<T> extends GraphNode {
4
+ export class FramePassNode<T> extends FrameGraphNode {
5
5
  constructor();
6
6
  /**
7
7
  *
8
8
  * @param {T} data
9
- * @param {RenderPassResources} resources
10
- * @param {IRenderContext} context
9
+ * @param {FramePassResources} resources
10
+ * @param {IFrameGraphContext} context
11
11
  */
12
- execute(data: T, resources: RenderPassResources, context: IRenderContext): void;
12
+ execute(data: T, resources: FramePassResources, context: IFrameGraphContext): void;
13
13
  /**
14
14
  *
15
15
  * @type {boolean}
@@ -65,17 +65,11 @@ export class RenderPassNode<T> extends GraphNode {
65
65
  * @returns {number} same as the input
66
66
  */
67
67
  read(resource: number): number;
68
- /**
69
- * Shortcut for read + write
70
- * @param {number} resource
71
- * @returns {number} written resource ID
72
- */
73
- read_write(resource: number): number;
74
68
  /**
75
69
  *
76
70
  * @return {boolean}
77
71
  */
78
72
  can_execute(): boolean;
79
73
  }
80
- import { GraphNode } from "./GraphNode.js";
81
- //# sourceMappingURL=RenderPassNode.d.ts.map
74
+ import { FrameGraphNode } from "./FrameGraphNode.js";
75
+ //# sourceMappingURL=FramePassNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FramePassNode.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/frame_graph/FramePassNode.js"],"names":[],"mappings":"AAGA;;GAEG;AACH;;IAEI;;;;;OAKG;IACH,cAJW,CAAC,oEAMX;IAED;;;OAGG;IACH,kBAFU,OAAO,CAEQ;IAEzB;;;OAGG;IACH,UAAU;IAEV;;;OAGG;IACH,kBAFU,MAAM,EAAE,CAEI;IAEtB;;;OAGG;IACH,gBAFU,MAAM,EAAE,CAEE;IAEpB;;;OAGG;IACH,iBAFU,MAAM,EAAE,CAEG;IAErB;;;;OAIG;IACH,YAHW,MAAM,GACL,OAAO,CAMlB;IAED;;;;OAIG;IACH,UAHW,MAAM,GACL,OAAO,CAMlB;IAED;;;;OAIG;IACH,WAHW,MAAM,GACL,OAAO,CAMlB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GACJ,MAAM,CASlB;IAED;;;;OAIG;IACH,eAHW,MAAM,GACJ,MAAM,CAUlB;IAED;;;OAGG;IACH,eAFY,OAAO,CAIlB;CACJ;+BApH8B,qBAAqB"}
@@ -1,16 +1,16 @@
1
1
  import { assert } from "../../../../core/assert.js";
2
- import { GraphNode } from "./GraphNode.js";
2
+ import { FrameGraphNode } from "./FrameGraphNode.js";
3
3
 
4
4
  /**
5
5
  * @template T
6
6
  */
7
- export class RenderPassNode extends GraphNode {
7
+ export class FramePassNode extends FrameGraphNode {
8
8
 
9
9
  /**
10
10
  *
11
11
  * @param {T} data
12
- * @param {RenderPassResources} resources
13
- * @param {IRenderContext} context
12
+ * @param {FramePassResources} resources
13
+ * @param {IFrameGraphContext} context
14
14
  */
15
15
  execute(data, resources, context) {
16
16
  // override
@@ -108,16 +108,6 @@ export class RenderPassNode extends GraphNode {
108
108
  return resource;
109
109
  }
110
110
 
111
- /**
112
- * Shortcut for read + write
113
- * @param {number} resource
114
- * @returns {number} written resource ID
115
- */
116
- read_write(resource) {
117
- this.reads(resource);
118
- return this.write(resource);
119
- }
120
-
121
111
  /**
122
112
  *
123
113
  * @return {boolean}
@@ -1,16 +1,16 @@
1
1
  /**
2
2
  * Built by FrameGraphBuilder, maps abstract resource handles to concrete, allocated GPU resources
3
3
  */
4
- export class RenderPassResources {
4
+ export class FramePassResources {
5
5
  /**
6
6
  *
7
- * @type {RenderGraph|null}
7
+ * @type {FrameGraph|null}
8
8
  * @private
9
9
  */
10
10
  private __graph;
11
11
  /**
12
12
  *
13
- * @type {RenderPassNode|null}
13
+ * @type {FramePassNode|null}
14
14
  * @private
15
15
  */
16
16
  private __pass;
@@ -26,10 +26,10 @@ export class RenderPassResources {
26
26
  get pass_id(): number;
27
27
  /**
28
28
  *
29
- * @param {RenderGraph} graph
30
- * @param {RenderPassNode} node
29
+ * @param {FrameGraph} graph
30
+ * @param {FramePassNode} node
31
31
  */
32
- init(graph: RenderGraph, node: RenderPassNode): void;
32
+ init(graph: FrameGraph, node: FramePassNode): void;
33
33
  /**
34
34
  * @template T
35
35
  * @param {number} id resource id
@@ -43,4 +43,4 @@ export class RenderPassResources {
43
43
  */
44
44
  getDescriptor<T_1>(id: number): T_1;
45
45
  }
46
- //# sourceMappingURL=RenderPassResources.d.ts.map
46
+ //# sourceMappingURL=FramePassResources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FramePassResources.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/frame_graph/FramePassResources.js"],"names":[],"mappings":"AAEA;;GAEG;AACH;IACI;;;;OAIG;IACH,gBAAe;IACf;;;;OAIG;IACH,eAAc;IAEd;;;OAGG;IACH,wBAEC;IAED;;;OAGG;IACH,sBAEC;IAED;;;;OAIG;IACH,mDAMC;IAED;;;;OAIG;IACH,WAHW,MAAM,KAehB;IAED;;;;OAIG;IACH,uBAHW,MAAM,OAehB;CACJ"}
@@ -3,16 +3,16 @@ import { assert } from "../../../../core/assert.js";
3
3
  /**
4
4
  * Built by FrameGraphBuilder, maps abstract resource handles to concrete, allocated GPU resources
5
5
  */
6
- export class RenderPassResources {
6
+ export class FramePassResources {
7
7
  /**
8
8
  *
9
- * @type {RenderGraph|null}
9
+ * @type {FrameGraph|null}
10
10
  * @private
11
11
  */
12
12
  __graph = null;
13
13
  /**
14
14
  *
15
- * @type {RenderPassNode|null}
15
+ * @type {FramePassNode|null}
16
16
  * @private
17
17
  */
18
18
  __pass = null;
@@ -35,8 +35,8 @@ export class RenderPassResources {
35
35
 
36
36
  /**
37
37
  *
38
- * @param {RenderGraph} graph
39
- * @param {RenderPassNode} node
38
+ * @param {FrameGraph} graph
39
+ * @param {FramePassNode} node
40
40
  */
41
41
  init(graph, node) {
42
42
  assert.defined(graph, 'graph');
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Abstracts rendering context, such as "WebGLRenderer" in THREE.js or WebGL/WebGPU
3
3
  */
4
- export class IRenderContext {
4
+ export class IFrameGraphContext {
5
5
  resource_manager: RenderResourceManager;
6
6
  /**
7
7
  * @template T
@@ -19,4 +19,4 @@ export class IRenderContext {
19
19
  destroy(): void;
20
20
  }
21
21
  import { RenderResourceManager } from "./resource/RenderResourceManager.js";
22
- //# sourceMappingURL=IRenderContext.d.ts.map
22
+ //# sourceMappingURL=IFrameGraphContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IFrameGraphContext.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/frame_graph/IFrameGraphContext.js"],"names":[],"mappings":"AAIA;;GAEG;AACH;IAEI,wCAA+C;IAM/C;;;;OAIG;IACH,wDAEC;IAED;;;;;OAKG;IACH,+EAEC;IAED,gBAEC;CACJ;sCAnCqC,qCAAqC"}
@@ -5,7 +5,7 @@ import { RenderResourceManager } from "./resource/RenderResourceManager.js";
5
5
  /**
6
6
  * Abstracts rendering context, such as "WebGLRenderer" in THREE.js or WebGL/WebGPU
7
7
  */
8
- export class IRenderContext {
8
+ export class IFrameGraphContext {
9
9
 
10
10
  resource_manager = new RenderResourceManager();
11
11
 
@@ -30,14 +30,14 @@ export class ResourceEntry<T> {
30
30
  imported: boolean;
31
31
  /**
32
32
  * Node that created this resource
33
- * @type {RenderPassNode|null}
33
+ * @type {FramePassNode|null}
34
34
  */
35
- producer: RenderPassNode | null;
35
+ producer: FramePassNode | null;
36
36
  /**
37
37
  *
38
- * @type {RenderPassNode|null}
38
+ * @type {FramePassNode|null}
39
39
  */
40
- last: RenderPassNode | null;
40
+ last: FramePassNode | null;
41
41
  /**
42
42
  * Creates actual resource
43
43
  * @param {RenderResourceManager} resources
@@ -1 +1 @@
1
- {"version":3,"file":"ResourceEntry.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/frame_graph/ResourceEntry.js"],"names":[],"mappings":"AAIA;;GAEG;AACH;IACI;;;OAGG;IACH,aAFU,MAAM,CAEW;IAE3B;;;OAGG;IACH,qBAFU,wBAAsB,IAAI,CAET;IAE3B;;;OAGG;IACH,kBAFU,MAAM,CAEK;IAErB;;;OAGG;IACH,UAFU,CAAC,GAAC,IAAI,CAEA;IAEhB;;;;OAIG;IACH,UAFU,OAAO,CAEA;IAEjB;;;OAGG;IACH,UAFU,iBAAe,IAAI,CAEb;IAEhB;;;OAGG;IACH,MAFU,iBAAe,IAAI,CAEjB;IAEZ;;;OAGG;IACH,+CAIC;IAED;;;OAGG;IACH,gDAIC;IAED;;;OAGG;IACH,cAFY,OAAO,CAIlB;IAED;;;OAGG;IACH,eAFY,OAAO,CAIlB;IAED,gBAQC;CACJ"}
1
+ {"version":3,"file":"ResourceEntry.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/frame_graph/ResourceEntry.js"],"names":[],"mappings":"AAIA;;GAEG;AACH;IACI;;;OAGG;IACH,aAFU,MAAM,CAEW;IAE3B;;;OAGG;IACH,qBAFU,wBAAsB,IAAI,CAET;IAE3B;;;OAGG;IACH,kBAFU,MAAM,CAEK;IAErB;;;OAGG;IACH,UAFU,CAAC,GAAC,IAAI,CAEA;IAEhB;;;;OAIG;IACH,UAFU,OAAO,CAEA;IAEjB;;;OAGG;IACH,UAFU,gBAAc,IAAI,CAEZ;IAEhB;;;OAGG;IACH,MAFU,gBAAc,IAAI,CAEhB;IAEZ;;;OAGG;IACH,+CAIC;IAED;;;OAGG;IACH,gDAIC;IAED;;;OAGG;IACH,cAFY,OAAO,CAIlB;IAED;;;OAGG;IACH,eAFY,OAAO,CAIlB;IAED,gBAQC;CACJ"}
@@ -39,13 +39,13 @@ export class ResourceEntry {
39
39
 
40
40
  /**
41
41
  * Node that created this resource
42
- * @type {RenderPassNode|null}
42
+ * @type {FramePassNode|null}
43
43
  */
44
44
  producer = null;
45
45
 
46
46
  /**
47
47
  *
48
- * @type {RenderPassNode|null}
48
+ * @type {FramePassNode|null}
49
49
  */
50
50
  last = null;
51
51
 
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @template T
3
3
  */
4
- export class ResourceNode<T> extends GraphNode {
4
+ export class ResourceNode<T> extends FrameGraphNode {
5
5
  constructor();
6
6
  resource_id: number;
7
7
  /**
@@ -11,14 +11,14 @@ export class ResourceNode<T> extends GraphNode {
11
11
  descriptor: ResourceDescriptor<T> | null;
12
12
  /**
13
13
  *
14
- * @type {RenderPassNode|null}
14
+ * @type {FramePassNode|null}
15
15
  */
16
- producer: RenderPassNode | null;
16
+ producer: FramePassNode | null;
17
17
  /**
18
18
  * @readonly
19
19
  * @type {boolean}
20
20
  */
21
21
  readonly isResourceNode: boolean;
22
22
  }
23
- import { GraphNode } from "./GraphNode.js";
23
+ import { FrameGraphNode } from "./FrameGraphNode.js";
24
24
  //# sourceMappingURL=ResourceNode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ResourceNode.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/frame_graph/ResourceNode.js"],"names":[],"mappings":"AAEA;;GAEG;AACH;;IACI,oBAAgB;IAEhB;;;OAGG;IACH,YAFU,wBAAsB,IAAI,CAElB;IAElB;;;OAGG;IACH,UAFU,iBAAe,IAAI,CAEb;IAGpB;;;OAGG;IACH,yBAFU,OAAO,CAEoB;CANpC;0BAnByB,gBAAgB"}
1
+ {"version":3,"file":"ResourceNode.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/frame_graph/ResourceNode.js"],"names":[],"mappings":"AAEA;;GAEG;AACH;;IACI,oBAAgB;IAEhB;;;OAGG;IACH,YAFU,wBAAsB,IAAI,CAElB;IAElB;;;OAGG;IACH,UAFU,gBAAc,IAAI,CAEZ;IAGpB;;;OAGG;IACH,yBAFU,OAAO,CAEoB;CANpC;+BAnB8B,qBAAqB"}
@@ -1,9 +1,9 @@
1
- import { GraphNode } from "./GraphNode.js";
1
+ import { FrameGraphNode } from "./FrameGraphNode.js";
2
2
 
3
3
  /**
4
4
  * @template T
5
5
  */
6
- export class ResourceNode extends GraphNode {
6
+ export class ResourceNode extends FrameGraphNode {
7
7
  resource_id = 0;
8
8
 
9
9
  /**
@@ -14,7 +14,7 @@ export class ResourceNode extends GraphNode {
14
14
 
15
15
  /**
16
16
  *
17
- * @type {RenderPassNode|null}
17
+ * @type {FramePassNode|null}
18
18
  */
19
19
  producer = null;
20
20
  }
@@ -2,10 +2,10 @@
2
2
  * Doesn't actually do anything, but works as a valid rendering context
3
3
  * Mainly useful for testing
4
4
  */
5
- export class VoidRenderContext extends IRenderContext {
5
+ export class VoidRenderContext extends IFrameGraphContext {
6
6
  static INSTANCE: VoidRenderContext;
7
7
  createResource(descriptor: any): any;
8
8
  destroyResource(resource: any, descriptor: any): void;
9
9
  }
10
- import { IRenderContext } from "../../IRenderContext.js";
10
+ import { IFrameGraphContext } from "../../IFrameGraphContext.js";
11
11
  //# sourceMappingURL=VoidRenderContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"VoidRenderContext.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/render/frame_graph/backend/void/VoidRenderContext.js"],"names":[],"mappings":"AAEA;;;GAGG;AACH;IAQI,mCAA0C;IAP1C,qCAEC;IAED,sDACC;CAGJ;+BAf8B,yBAAyB"}
1
+ {"version":3,"file":"VoidRenderContext.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/render/frame_graph/backend/void/VoidRenderContext.js"],"names":[],"mappings":"AAEA;;;GAGG;AACH;IAQI,mCAA0C;IAP1C,qCAEC;IAED,sDACC;CAGJ;mCAfkC,6BAA6B"}
@@ -1,10 +1,10 @@
1
- import { IRenderContext } from "../../IRenderContext.js";
1
+ import { IFrameGraphContext } from "../../IFrameGraphContext.js";
2
2
 
3
3
  /**
4
4
  * Doesn't actually do anything, but works as a valid rendering context
5
5
  * Mainly useful for testing
6
6
  */
7
- export class VoidRenderContext extends IRenderContext {
7
+ export class VoidRenderContext extends IFrameGraphContext {
8
8
  createResource(descriptor) {
9
9
  return null;
10
10
  }
@@ -6,7 +6,7 @@ export class RenderResourceManager {
6
6
 
7
7
  /**
8
8
  *
9
- * @type {IRenderContext|null}
9
+ * @type {IFrameGraphContext|null}
10
10
  */
11
11
  #ctx = null;
12
12
 
@@ -1,4 +1,4 @@
1
- export class WebGLRenderContext extends IRenderContext {
1
+ export class WebGLRenderContext extends IFrameGraphContext {
2
2
  /**
3
3
  *
4
4
  * @param {WebGL2RenderingContext} ctx
@@ -14,6 +14,6 @@ export class WebGLRenderContext extends IRenderContext {
14
14
  destroyRenderTarget(target: any): boolean;
15
15
  #private;
16
16
  }
17
- import { IRenderContext } from "../IRenderContext.js";
17
+ import { IFrameGraphContext } from "../IFrameGraphContext.js";
18
18
  import { RenderTarget } from "../resource/RenderTarget.js";
19
19
  //# sourceMappingURL=WebGLRenderContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"WebGLRenderContext.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/render/frame_graph/webgl/WebGLRenderContext.js"],"names":[],"mappings":"AAGA;IAOI;;;OAGG;IACH,iBAFW,sBAAsB,EAMhC;IAED,8CAQC;IAED,yDAWC;IAED;;;OAGG;IACH,gEASC;IAED,0CAEC;;CACJ;+BA7D8B,sBAAsB;6BACxB,6BAA6B"}
1
+ {"version":3,"file":"WebGLRenderContext.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/render/frame_graph/webgl/WebGLRenderContext.js"],"names":[],"mappings":"AAGA;IAOI;;;OAGG;IACH,iBAFW,sBAAsB,EAMhC;IAED,8CAQC;IAED,yDAWC;IAED;;;OAGG;IACH,gEASC;IAED,0CAEC;;CACJ;mCA7DkC,0BAA0B;6BAChC,6BAA6B"}
@@ -1,7 +1,7 @@
1
- import { IRenderContext } from "../IRenderContext.js";
1
+ import { IFrameGraphContext } from "../IFrameGraphContext.js";
2
2
  import { RenderTarget } from "../resource/RenderTarget.js";
3
3
 
4
- export class WebGLRenderContext extends IRenderContext {
4
+ export class WebGLRenderContext extends IFrameGraphContext {
5
5
  /**
6
6
  *
7
7
  * @type {WebGL2RenderingContext|null}
@@ -1 +0,0 @@
1
- {"version":3,"file":"GraphNode.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/frame_graph/GraphNode.js"],"names":[],"mappings":"AAAA;IACI;;;OAGG;IACH,MAFU,MAAM,CAEN;IACV;;;OAGG;IACH,IAFU,MAAM,CAET;IACP;;;OAGG;IACH,SAFU,MAAM,CAEJ;IACZ;;;OAGG;IACH,WAFU,MAAM,CAEF;CACjB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"IRenderContext.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/frame_graph/IRenderContext.js"],"names":[],"mappings":"AAIA;;GAEG;AACH;IAEI,wCAA+C;IAM/C;;;;OAIG;IACH,wDAEC;IAED;;;;;OAKG;IACH,+EAEC;IAED,gBAEC;CACJ;sCAnCqC,qCAAqC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"RenderGraph.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/frame_graph/RenderGraph.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH;IA6BI;;;OAGG;IACH,mBAFW,MAAM,EAOhB;IArCD;;;;OAIG;IACH,MAFU,MAAM,CAEN;IAEV;;;;OAIG;IACH,qBAAkB;IAElB;;;;OAIG;IACH,yBAAsB;IAEtB;;;;OAIG;IACH,4BAAyB;IAazB;;;;OAIG;IACH,qBAHW,MAAM,sBAahB;IAED;;;;OAIG;IACH,oBAHW,MAAM,qBAmBhB;IAED;;;;OAIG;IACH,qBAHW,MAAM,KAKhB;IAED;;;;;OAKG;IACH,2BAJW,MAAM,oBAEJ,MAAM,CAWlB;IAED;;;;;OAKG;IACH,6BAYC;IAED;;;;;;OAMG;IACH,4BAeC;IAED;;;;OAIG;IACH,wBAHW,MAAM,GACJ,MAAM,CAkBlB;IAED;;;;;;OAMG;IACH,2BALW,MAAM,wDAGJ,MAAM,CAUlB;IAED;;;OAGG;IACH,4BAHa,OAAO,CAQnB;IAED;;;;;;;OAOG;IACH,eALW,MAAM,4BAGJ,iBAAiB,CA2B7B;IAED;;;;;;OAMG;IACH,iEAFa,OAAO,CAQnB;IAED,gBA6FC;IAED;;;OAGG;IACH,uCAqDC;IAED;;;;;;;OAOG;IACH;gBAFqB,EAAE;mBAAa,EAAE;MA2DrC;IAED;;;;;OAKG;IACH,eAFY,MAAM,CA0GjB;IAGL;;;OAGG;IACH,wBAFU,OAAO,CAEkB;CANlC;8BA1mB6B,oBAAoB;6BACrB,mBAAmB;kCAJd,wBAAwB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"RenderPassBuilder.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/frame_graph/RenderPassBuilder.js"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH;IAgBI;;;;OAIG;IACH,qDAMC;IAED;;;;;;OAMG;IACH,aAJW,MAAM,mCAEJ,MAAM,CAYlB;IAED;;;;OAIG;IACH,eAHW,MAAM,GACJ,MAAM,CASlB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GACJ,MAAM,CAsBlB;IAED;;;;OAIG;IACH,yBAEC;;CACJ"}
@@ -1,4 +0,0 @@
1
- export namespace RenderPassFlags {
2
- let HasSideEffects: number;
3
- }
4
- //# sourceMappingURL=RenderPassFlags.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RenderPassFlags.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/frame_graph/RenderPassFlags.js"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"RenderPassNode.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/frame_graph/RenderPassNode.js"],"names":[],"mappings":"AAGA;;GAEG;AACH;;IAEI;;;;;OAKG;IACH,cAJW,CAAC,iEAMX;IAED;;;OAGG;IACH,kBAFU,OAAO,CAEQ;IAEzB;;;OAGG;IACH,UAAU;IAEV;;;OAGG;IACH,kBAFU,MAAM,EAAE,CAEI;IAEtB;;;OAGG;IACH,gBAFU,MAAM,EAAE,CAEE;IAEpB;;;OAGG;IACH,iBAFU,MAAM,EAAE,CAEG;IAErB;;;;OAIG;IACH,YAHW,MAAM,GACL,OAAO,CAMlB;IAED;;;;OAIG;IACH,UAHW,MAAM,GACL,OAAO,CAMlB;IAED;;;;OAIG;IACH,WAHW,MAAM,GACL,OAAO,CAMlB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GACJ,MAAM,CASlB;IAED;;;;OAIG;IACH,eAHW,MAAM,GACJ,MAAM,CAUlB;IAED;;;;OAIG;IACH,qBAHW,MAAM,GACJ,MAAM,CAKlB;IAED;;;OAGG;IACH,eAFY,OAAO,CAIlB;CACJ;0BA9HyB,gBAAgB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"RenderPassResources.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/frame_graph/RenderPassResources.js"],"names":[],"mappings":"AAEA;;GAEG;AACH;IACI;;;;OAIG;IACH,gBAAe;IACf;;;;OAIG;IACH,eAAc;IAEd;;;OAGG;IACH,wBAEC;IAED;;;OAGG;IACH,sBAEC;IAED;;;;OAIG;IACH,qDAMC;IAED;;;;OAIG;IACH,WAHW,MAAM,KAehB;IAED;;;;OAIG;IACH,uBAHW,MAAM,OAehB;CACJ"}