@woosh/meep-engine 2.117.5 → 2.117.6

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.5",
8
+ "version": "2.117.6",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -32,6 +32,8 @@ export class Color {
32
32
 
33
33
  fromUint(v: number): void
34
34
 
35
+ lerpColors(a: Color, b: Color, f: number): void
36
+
35
37
  equals(other: Color): boolean
36
38
 
37
39
  hash(): number
@@ -187,7 +187,7 @@ function make_vertex_shader() {
187
187
 
188
188
  float radius = vSize * 0.5;
189
189
 
190
- float projected_radius = resolution.y * projectionMatrix[1][1] * radius / gl_Position.w;;
190
+ float projected_radius = resolution.y * projectionMatrix[1][1] * radius / gl_Position.w;
191
191
 
192
192
  #ifdef DEPTH_SOFT_ENABLED
193
193
 
@@ -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,qBAgBhB;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,gCA0BC;IAED;;;;;;OAMG;IACH,iEAFa,OAAO,CAOnB;IAED,gBA0FC;IAED;;;OAGG;IACH,uCAqCC;IAED;;;OAGG;IACH,eAFY,MAAM,CAiEjB;CACJ;8BAnb6B,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;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,qBAgBhB;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,gCA0BC;IAED;;;;;;OAMG;IACH,iEAFa,OAAO,CAOnB;IAED,gBA6FC;IAED;;;OAGG;IACH,uCA2CC;IAED;;;OAGG;IACH,eAFY,MAAM,CAiEjB;CACJ;8BA5b6B,oBAAoB;6BACrB,mBAAmB"}
@@ -307,14 +307,17 @@ export class RenderGraph {
307
307
  }
308
308
 
309
309
  // calculate lifetimes
310
- for (const pass of pass_nodes) {
310
+ for (let i = 0; i < pass_node_count; i++){
311
+ const pass = pass_nodes[i];
311
312
  if (pass.ref_count === 0) {
312
313
  // unused pass
313
314
  continue;
314
315
  }
315
316
 
316
317
  for (const id of pass.resource_creates) {
317
- this.getResourceEntry(id).producer = pass;
318
+ const entry = this.getResourceEntry(id);
319
+ entry.producer = pass;
320
+ entry.last = pass;
318
321
  }
319
322
 
320
323
  for (const id of pass.resource_writes) {
@@ -360,11 +363,17 @@ export class RenderGraph {
360
363
  // execute pass
361
364
  node.pass.execute(node.data, resources, context);
362
365
 
363
- for (const entry of this.__resource_registry) {
366
+ const resource_entries = this.__resource_registry;
367
+ const resource_entry_count = resource_entries.length;
368
+
369
+ for (let entry_index = 0; entry_index < resource_entry_count; entry_index++){
370
+ const entry = resource_entries[entry_index];
371
+
364
372
  if (entry.last === node && entry.isTransient()) {
365
373
  // this was the last user of the resource and the resource is transient (no external usage)
366
374
  entry.destroy(context.resource_manager);
367
375
  }
376
+
368
377
  }
369
378
 
370
379
  }