@woosh/meep-engine 2.117.14 → 2.117.16

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/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "description": "Fully featured ECS game engine written in JavaScript",
6
6
  "type": "module",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.117.14",
8
+ "version": "2.117.16",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -3,6 +3,17 @@
3
3
  * @see https://github.com/skaarj1989/FrameGraph
4
4
  */
5
5
  export class RenderGraph {
6
+ /**
7
+ *
8
+ * @param {string} name
9
+ */
10
+ constructor(name?: string);
11
+ /**
12
+ * Human-readable name, used for debugging and UI primarily.
13
+ * There is no uniqueness guarantee
14
+ * @type {string}
15
+ */
16
+ name: string;
6
17
  /**
7
18
  *
8
19
  * @type {RenderPass[]}
@@ -1 +1 @@
1
- {"version":3,"file":"RenderGraph.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/frame_graph/RenderGraph.js"],"names":[],"mappings":"AAQA;;;GAGG;AACH;IACI;;;;OAIG;IACH,iBAAc;IAEd;;;;OAIG;IACH,qBAAkB;IAElB;;;;OAIG;IACH,yBAAsB;IAEtB;;;;OAIG;IACH,4BAAyB;IAEzB;;;;OAIG;IACH,qBAHW,MAAM,sBAahB;IAED;;;;OAIG;IACH,oBAHW,MAAM,qBAmBhB;IAED;;;;OAIG;IACH,qBAHW,MAAM,KAKhB;IAED;;;;OAIG;IACH,2BAHW,MAAM,2BAOhB;IAED;;;;;OAKG;IACH,6BAUC;IAED;;;;;;OAMG;IACH,4BAcC;IAED;;;;OAIG;IACH,oBAHW,MAAM,GACJ,MAAM,CAkBlB;IAED;;;;;;OAMG;IACH,2BALW,MAAM,wDAGJ,MAAM,CAUlB;IAED;;;OAGG;IACH,4BAHa,OAAO,CAQnB;IAED;;;;OAIG;IACH,qCA0BC;IAED;;;;;;OAMG;IACH,iEAFa,OAAO,CAOnB;IAED,gBA6FC;IAED;;;OAGG;IACH,uCA2CC;IAED;;;OAGG;IACH,eAFY,MAAM,CAiEjB;CACJ;8BA/b6B,oBAAoB;6BACrB,mBAAmB"}
1
+ {"version":3,"file":"RenderGraph.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/frame_graph/RenderGraph.js"],"names":[],"mappings":"AAQA;;;GAGG;AACH;IAoCI;;;OAGG;IACH,mBAFW,MAAM,EAOhB;IA5CD;;;;OAIG;IACH,MAFU,MAAM,CAEN;IAEV;;;;OAIG;IACH,iBAAc;IAEd;;;;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;;;;OAIG;IACH,2BAHW,MAAM,2BAWhB;IAED;;;;;OAKG;IACH,6BAYC;IAED;;;;;;OAMG;IACH,4BAeC;IAED;;;;OAIG;IACH,oBAHW,MAAM,GACJ,MAAM,CAkBlB;IAED;;;;;;OAMG;IACH,2BALW,MAAM,wDAGJ,MAAM,CAUlB;IAED;;;OAGG;IACH,4BAHa,OAAO,CAQnB;IAED;;;;OAIG;IACH,qCA0BC;IAED;;;;;;OAMG;IACH,iEAFa,OAAO,CAOnB;IAED,gBA6FC;IAED;;;OAGG;IACH,uCA2CC;IAED;;;OAGG;IACH,eAFY,MAAM,CAiEjB;CACJ;8BAxd6B,oBAAoB;6BACrB,mBAAmB"}
@@ -11,6 +11,13 @@ import { ResourceNode } from "./ResourceNode.js";
11
11
  * @see https://github.com/skaarj1989/FrameGraph
12
12
  */
13
13
  export class RenderGraph {
14
+ /**
15
+ * Human-readable name, used for debugging and UI primarily.
16
+ * There is no uniqueness guarantee
17
+ * @type {string}
18
+ */
19
+ name = "";
20
+
14
21
  /**
15
22
  *
16
23
  * @type {RenderPass[]}
@@ -39,6 +46,17 @@ export class RenderGraph {
39
46
  */
40
47
  __resource_registry = [];
41
48
 
49
+ /**
50
+ *
51
+ * @param {string} name
52
+ */
53
+ constructor(name = "") {
54
+ assert.isString(name, 'name');
55
+
56
+
57
+ this.name = name;
58
+ }
59
+
42
60
  /**
43
61
  *
44
62
  * @param {number} id Resource Node ID
@@ -94,6 +112,10 @@ export class RenderGraph {
94
112
  * @param {T} descriptor
95
113
  */
96
114
  create_resource(name, descriptor) {
115
+ assert.isString(name, 'name');
116
+ assert.defined(descriptor, 'descriptor');
117
+ assert.notNull(descriptor, 'descriptor');
118
+
97
119
  const resource = this._createResourceEntry(descriptor);
98
120
 
99
121
  return this._createResourceNode(name, resource.resource_id).id;
@@ -106,6 +128,8 @@ export class RenderGraph {
106
128
  * @private
107
129
  */
108
130
  _createResourceEntry(descriptor) {
131
+ assert.defined(descriptor, 'descriptor');
132
+ assert.notNull(descriptor, 'descriptor');
109
133
 
110
134
  const entry = new ResourceEntry();
111
135
 
@@ -125,6 +149,7 @@ export class RenderGraph {
125
149
  * @private
126
150
  */
127
151
  _createResourceNode(name, resource_id) {
152
+ assert.isString(name, 'name');
128
153
  assert.isNonNegativeInteger(resource_id, 'resource_id');
129
154
 
130
155
  const n = new ResourceNode();
@@ -310,7 +335,7 @@ export class RenderGraph {
310
335
  }
311
336
 
312
337
  // calculate lifetimes
313
- for (let i = 0; i < pass_node_count; i++){
338
+ for (let i = 0; i < pass_node_count; i++) {
314
339
  const pass = pass_nodes[i];
315
340
  if (pass.ref_count === 0) {
316
341
  // unused pass
@@ -369,7 +394,7 @@ export class RenderGraph {
369
394
  const resource_entries = this.__resource_registry;
370
395
  const resource_entry_count = resource_entries.length;
371
396
 
372
- for (let entry_index = 0; entry_index < resource_entry_count; entry_index++){
397
+ for (let entry_index = 0; entry_index < resource_entry_count; entry_index++) {
373
398
  const entry = resource_entries[entry_index];
374
399
 
375
400
  if (entry.last === node && entry.isTransient()) {