@woosh/meep-engine 2.116.1 → 2.117.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 (25) hide show
  1. package/build/meep.cjs +30 -32
  2. package/build/meep.min.js +1 -1
  3. package/build/meep.module.js +30 -32
  4. package/package.json +1 -1
  5. package/src/engine/development/performance/MetricCollection.d.ts +1 -1
  6. package/src/engine/development/performance/MetricCollection.js +2 -2
  7. package/src/engine/development/performance/monitor/MetricCollectionConsoleMonitor.d.ts +10 -0
  8. package/src/engine/development/performance/monitor/MetricCollectionConsoleMonitor.d.ts.map +1 -0
  9. package/src/engine/development/performance/monitor/MetricCollectionConsoleMonitor.js +23 -0
  10. package/src/engine/graphics/render/forward_plus/model/AbstractLight.d.ts.map +1 -1
  11. package/src/engine/graphics/render/forward_plus/model/AbstractLight.js +3 -3
  12. package/src/engine/graphics/render/forward_plus/model/DirectionalLight.d.ts +6 -6
  13. package/src/engine/graphics/render/forward_plus/model/DirectionalLight.d.ts.map +1 -1
  14. package/src/engine/graphics/render/forward_plus/model/DirectionalLight.js +26 -27
  15. package/src/engine/graphics/render/forward_plus/model/PointLight.d.ts +4 -4
  16. package/src/engine/graphics/render/forward_plus/model/PointLight.d.ts.map +1 -1
  17. package/src/engine/graphics/render/forward_plus/model/PointLight.js +31 -33
  18. package/src/engine/graphics/render/forward_plus/model/SpotLight.d.ts +14 -14
  19. package/src/engine/graphics/render/forward_plus/model/SpotLight.d.ts.map +1 -1
  20. package/src/engine/graphics/render/forward_plus/model/SpotLight.js +46 -47
  21. package/src/engine/graphics/render/visibility/hiz/query/QueryShader.d.ts.map +1 -1
  22. package/src/engine/graphics/render/visibility/hiz/query/QueryShader.js +0 -4
  23. package/src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.d.ts.map +1 -1
  24. package/src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.js +3 -4
  25. package/src/engine/physics/fluid/prototype.js +7 -12
@@ -87665,7 +87665,7 @@ class MetricCollection {
87665
87665
  /**
87666
87666
  *
87667
87667
  * @param {string} name
87668
- * @param {number} buffer_size
87668
+ * @param {number} [buffer_size]
87669
87669
  * @returns {AbstractMetric}
87670
87670
  */
87671
87671
  create({ name, buffer_size = 1000 }) {
@@ -110512,9 +110512,9 @@ class LightRenderMetadata {
110512
110512
  let id_counter = 0;
110513
110513
 
110514
110514
  class AbstractLight {
110515
- constructor() {
110516
- this.id = id_counter++;
110517
- }
110515
+
110516
+ id = id_counter++;
110517
+
110518
110518
 
110519
110519
  toString() {
110520
110520
  return `Light#${this.id}`;
@@ -112707,33 +112707,31 @@ class SystemEntityContext {
112707
112707
  }
112708
112708
 
112709
112709
  class PointLight extends AbstractLight {
112710
- constructor() {
112711
- super();
112712
112710
 
112713
- /**
112714
- * @readonly
112715
- * @type {Vector3}
112716
- */
112717
- this.position = new Vector3$1();
112711
+ /**
112712
+ * @readonly
112713
+ * @type {Vector3}
112714
+ */
112715
+ position = new Vector3$1();
112718
112716
 
112719
- /**
112720
- *
112721
- * @type {Vector1}
112722
- */
112723
- this.radius = new Vector1(1);
112717
+ /**
112718
+ * @readonly
112719
+ * @type {Vector1}
112720
+ */
112721
+ radius = new Vector1(1);
112724
112722
 
112725
- /**
112726
- * @readonly
112727
- * @type {Color}
112728
- */
112729
- this.color = new Color(1, 1, 1);
112723
+ /**
112724
+ * @readonly
112725
+ * @type {Color}
112726
+ */
112727
+ color = new Color(1, 1, 1);
112728
+
112729
+ /**
112730
+ * @readonly
112731
+ * @type {Vector1}
112732
+ */
112733
+ intensity = new Vector1(1);
112730
112734
 
112731
- /**
112732
- *
112733
- * @type {Vector1}
112734
- */
112735
- this.intensity = new Vector1(1);
112736
- }
112737
112735
 
112738
112736
  getCenter(result) {
112739
112737
  this.position.writeToArray(result, 0);
@@ -112748,12 +112746,12 @@ class PointLight extends AbstractLight {
112748
112746
  const center_z = p.z;
112749
112747
 
112750
112748
  result[0] = center_x - r;
112751
- result[1] = center_y - r;
112752
- result[2] = center_z - r;
112749
+ result[1] = center_y - r;
112750
+ result[2] = center_z - r;
112753
112751
 
112754
- result[3] = center_x + r;
112755
- result[4] = center_y + r;
112756
- result[5] = center_z + r;
112752
+ result[3] = center_x + r;
112753
+ result[4] = center_y + r;
112754
+ result[5] = center_z + r;
112757
112755
  }
112758
112756
 
112759
112757
  onDimensionChanged(listener, context) {
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.116.1",
8
+ "version": "2.117.0",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -13,7 +13,7 @@ export class MetricCollection {
13
13
  /**
14
14
  *
15
15
  * @param {string} name
16
- * @param {number} buffer_size
16
+ * @param {number} [buffer_size]
17
17
  * @returns {AbstractMetric}
18
18
  */
19
19
  create({ name, buffer_size }: string): AbstractMetric;
@@ -1,5 +1,5 @@
1
- import { RingBufferMetric } from "./RingBufferMetric.js";
2
1
  import { assert } from "../../../core/assert.js";
2
+ import { RingBufferMetric } from "./RingBufferMetric.js";
3
3
 
4
4
  export class MetricCollection {
5
5
  constructor() {
@@ -27,7 +27,7 @@ export class MetricCollection {
27
27
  /**
28
28
  *
29
29
  * @param {string} name
30
- * @param {number} buffer_size
30
+ * @param {number} [buffer_size]
31
31
  * @returns {AbstractMetric}
32
32
  */
33
33
  create({ name, buffer_size = 1000 }) {
@@ -0,0 +1,10 @@
1
+ export class MetricCollectionConsoleMonitor {
2
+ /**
3
+ *
4
+ * @param {MetricCollection} metrics
5
+ * @returns {PeriodicConsolePrinter}
6
+ */
7
+ static from(metrics: MetricCollection): PeriodicConsolePrinter;
8
+ }
9
+ import { PeriodicConsolePrinter } from "./PeriodicConsolePrinter.js";
10
+ //# sourceMappingURL=MetricCollectionConsoleMonitor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MetricCollectionConsoleMonitor.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/development/performance/monitor/MetricCollectionConsoleMonitor.js"],"names":[],"mappings":"AAGA;IAEI;;;;OAIG;IACH,wCAFa,sBAAsB,CAYlC;CAEJ;uCArBsC,6BAA6B"}
@@ -0,0 +1,23 @@
1
+ import { MetricStatistics } from "../MetricStatistics.js";
2
+ import { PeriodicConsolePrinter } from "./PeriodicConsolePrinter.js";
3
+
4
+ export class MetricCollectionConsoleMonitor{
5
+
6
+ /**
7
+ *
8
+ * @param {MetricCollection} metrics
9
+ * @returns {PeriodicConsolePrinter}
10
+ */
11
+ static from(metrics){
12
+
13
+ const metric_stats = new MetricStatistics();
14
+
15
+ return new PeriodicConsolePrinter(3, () => metrics.list().map(m => {
16
+ metrics.get(m).computeStats(metric_stats);
17
+
18
+ return `${m}: ${metric_stats}`;
19
+ }).join('\n'));
20
+
21
+ }
22
+
23
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"AbstractLight.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/render/forward_plus/model/AbstractLight.js"],"names":[],"mappings":"AAEA;IAEQ,WAAsB;IAG1B,mBAEC;IAED;;;;;OAKG;IACH,gDAFa,IAAI,CAIhB;IAED;;;;;OAKG;IACH,iDAFa,IAAI,CAIhB;IAED;;;;OAIG;IACH,kBAHW,MAAM,EAAE,GACN,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM,EAAE,GAAC,UAAU,MAAM,CAAC,GAAC,YAAY,GACrC,IAAI,CAIhB;IAED;;;;;OAKG;IACH,qBAJW,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,WAClC,MAAM,GACJ,MAAM,CAIlB;IAED;;;;OAIG;IACH,eAHW,aAAa,GACX,MAAM,CAIlB;IAGL,aAA4B;CAF3B"}
1
+ {"version":3,"file":"AbstractLight.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/render/forward_plus/model/AbstractLight.js"],"names":[],"mappings":"AAEA;IAEI,WAAkB;IAGlB,mBAEC;IAED;;;;;OAKG;IACH,gDAFa,IAAI,CAIhB;IAED;;;;;OAKG;IACH,iDAFa,IAAI,CAIhB;IAED;;;;OAIG;IACH,kBAHW,MAAM,EAAE,GACN,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM,EAAE,GAAC,UAAU,MAAM,CAAC,GAAC,YAAY,GACrC,IAAI,CAIhB;IAED;;;;;OAKG;IACH,qBAJW,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,WAClC,MAAM,GACJ,MAAM,CAIlB;IAED;;;;OAIG;IACH,eAHW,aAAa,GACX,MAAM,CAIlB;IAGL,aAA4B;CAF3B"}
@@ -1,9 +1,9 @@
1
1
  let id_counter = 0;
2
2
 
3
3
  export class AbstractLight {
4
- constructor() {
5
- this.id = id_counter++;
6
- }
4
+
5
+ id = id_counter++;
6
+
7
7
 
8
8
  toString() {
9
9
  return `Light#${this.id}`;
@@ -1,24 +1,24 @@
1
1
  export class DirectionalLight extends AbstractLight {
2
2
  /**
3
- *
3
+ * @readonly
4
4
  * @type {Vector3}
5
5
  */
6
- position: Vector3;
6
+ readonly position: Vector3;
7
7
  /**
8
- *
8
+ * @readonly
9
9
  * @type {Vector3}
10
10
  */
11
- direction: Vector3;
11
+ readonly direction: Vector3;
12
12
  /**
13
13
  * @readonly
14
14
  * @type {Color}
15
15
  */
16
16
  readonly color: Color;
17
17
  /**
18
- *
18
+ * @readonly
19
19
  * @type {Vector1}
20
20
  */
21
- intensity: Vector1;
21
+ readonly intensity: Vector1;
22
22
  /**
23
23
  * @readonly
24
24
  * @type {boolean}
@@ -1 +1 @@
1
- {"version":3,"file":"DirectionalLight.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/render/forward_plus/model/DirectionalLight.js"],"names":[],"mappings":"AAKA;IAIQ;;;OAGG;IACH,UAFU,OAAO,CAEY;IAE7B;;;OAGG;IACH,WAFU,OAAO,CAEa;IAE9B;;;OAGG;IACH,gBAFU,KAAK,CAEgB;IAE/B;;;OAGG;IACH,WAFU,OAAO,CAEc;IAIvC;;;OAGG;IACH,6BAFU,OAAO,CAE4B;CAN5C;8BA9B6B,oBAAoB;oBAD9B,qCAAqC;sBAFnC,oCAAoC;oBACtC,qCAAqC"}
1
+ {"version":3,"file":"DirectionalLight.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/render/forward_plus/model/DirectionalLight.js"],"names":[],"mappings":"AAKA;IAGI;;;OAGG;IACH,mBAFU,OAAO,CAEQ;IAEzB;;;OAGG;IACH,oBAFU,OAAO,CAES;IAE1B;;;OAGG;IACH,gBAFU,KAAK,CAEY;IAE3B;;;OAGG;IACH,oBAFU,OAAO,CAEU;IAI/B;;;OAGG;IACH,6BAFU,OAAO,CAE4B;CAN5C;8BA7B6B,oBAAoB;oBAD9B,qCAAqC;sBAFnC,oCAAoC;oBACtC,qCAAqC"}
@@ -4,33 +4,32 @@ import Vector3 from "../../../../../core/geom/Vector3.js";
4
4
  import { AbstractLight } from "./AbstractLight.js";
5
5
 
6
6
  export class DirectionalLight extends AbstractLight {
7
- constructor() {
8
- super();
9
-
10
- /**
11
- *
12
- * @type {Vector3}
13
- */
14
- this.position = new Vector3();
15
-
16
- /**
17
- *
18
- * @type {Vector3}
19
- */
20
- this.direction = new Vector3();
21
-
22
- /**
23
- * @readonly
24
- * @type {Color}
25
- */
26
- this.color = new Color(1, 1, 1);
27
-
28
- /**
29
- *
30
- * @type {Vector1}
31
- */
32
- this.intensity = new Vector1(1);
33
- }
7
+
8
+
9
+ /**
10
+ * @readonly
11
+ * @type {Vector3}
12
+ */
13
+ position = new Vector3();
14
+
15
+ /**
16
+ * @readonly
17
+ * @type {Vector3}
18
+ */
19
+ direction = new Vector3();
20
+
21
+ /**
22
+ * @readonly
23
+ * @type {Color}
24
+ */
25
+ color = new Color(1, 1, 1);
26
+
27
+ /**
28
+ * @readonly
29
+ * @type {Vector1}
30
+ */
31
+ intensity = new Vector1(1);
32
+
34
33
  }
35
34
 
36
35
  /**
@@ -5,20 +5,20 @@ export class PointLight extends AbstractLight {
5
5
  */
6
6
  readonly position: Vector3;
7
7
  /**
8
- *
8
+ * @readonly
9
9
  * @type {Vector1}
10
10
  */
11
- radius: Vector1;
11
+ readonly radius: Vector1;
12
12
  /**
13
13
  * @readonly
14
14
  * @type {Color}
15
15
  */
16
16
  readonly color: Color;
17
17
  /**
18
- *
18
+ * @readonly
19
19
  * @type {Vector1}
20
20
  */
21
- intensity: Vector1;
21
+ readonly intensity: Vector1;
22
22
  getCenter(result: any): void;
23
23
  getAABB(result: any): void;
24
24
  onDimensionChanged(listener: any, context: any): void;
@@ -1 +1 @@
1
- {"version":3,"file":"PointLight.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/render/forward_plus/model/PointLight.js"],"names":[],"mappings":"AAKA;IAIQ;;;OAGG;IACH,mBAFU,OAAO,CAEY;IAE7B;;;OAGG;IACH,QAFU,OAAO,CAEW;IAE5B;;;OAGG;IACH,gBAFU,KAAK,CAEgB;IAE/B;;;OAGG;IACH,WAFU,OAAO,CAEc;IAGnC,6BAEC;IAED,2BAeC;IAED,sDAGC;IAED,uDAGC;IA6BL;;;OAGG;IACH,uBAFU,OAAO,CAEgB;IAEjC,2BAAuC;CARtC;8BAvF6B,oBAAoB;oBAH9B,qCAAqC;oBAErC,qCAAqC;sBADnC,oCAAoC"}
1
+ {"version":3,"file":"PointLight.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/render/forward_plus/model/PointLight.js"],"names":[],"mappings":"AAKA;IAEI;;;OAGG;IACH,mBAFU,OAAO,CAEQ;IAEzB;;;OAGG;IACH,iBAFU,OAAO,CAEO;IAExB;;;OAGG;IACH,gBAFU,KAAK,CAEY;IAE3B;;;OAGG;IACH,oBAFU,OAAO,CAEU;IAG3B,6BAEC;IAED,2BAeC;IAED,sDAGC;IAED,uDAGC;IA6BL;;;OAGG;IACH,uBAFU,OAAO,CAEgB;IAEjC,2BAAuC;CARtC;8BArF6B,oBAAoB;oBAD9B,qCAAqC;oBADrC,qCAAqC;sBADnC,oCAAoC"}
@@ -1,36 +1,34 @@
1
- import Vector3 from "../../../../../core/geom/Vector3.js";
2
1
  import { Color } from "../../../../../core/color/Color.js";
3
2
  import Vector1 from "../../../../../core/geom/Vector1.js";
3
+ import Vector3 from "../../../../../core/geom/Vector3.js";
4
4
  import { AbstractLight } from "./AbstractLight.js";
5
5
 
6
6
  export class PointLight extends AbstractLight {
7
- constructor() {
8
- super();
9
-
10
- /**
11
- * @readonly
12
- * @type {Vector3}
13
- */
14
- this.position = new Vector3();
15
-
16
- /**
17
- *
18
- * @type {Vector1}
19
- */
20
- this.radius = new Vector1(1);
21
-
22
- /**
23
- * @readonly
24
- * @type {Color}
25
- */
26
- this.color = new Color(1, 1, 1);
27
-
28
- /**
29
- *
30
- * @type {Vector1}
31
- */
32
- this.intensity = new Vector1(1);
33
- }
7
+
8
+ /**
9
+ * @readonly
10
+ * @type {Vector3}
11
+ */
12
+ position = new Vector3();
13
+
14
+ /**
15
+ * @readonly
16
+ * @type {Vector1}
17
+ */
18
+ radius = new Vector1(1);
19
+
20
+ /**
21
+ * @readonly
22
+ * @type {Color}
23
+ */
24
+ color = new Color(1, 1, 1);
25
+
26
+ /**
27
+ * @readonly
28
+ * @type {Vector1}
29
+ */
30
+ intensity = new Vector1(1);
31
+
34
32
 
35
33
  getCenter(result) {
36
34
  this.position.writeToArray(result, 0);
@@ -45,12 +43,12 @@ export class PointLight extends AbstractLight {
45
43
  const center_z = p.z;
46
44
 
47
45
  result[0] = center_x - r;
48
- result[1] = center_y - r;
49
- result[2] = center_z - r;
46
+ result[1] = center_y - r;
47
+ result[2] = center_z - r;
50
48
 
51
- result[3] = center_x + r;
52
- result[4] = center_y + r;
53
- result[5] = center_z + r;
49
+ result[3] = center_x + r;
50
+ result[4] = center_y + r;
51
+ result[5] = center_z + r;
54
52
  }
55
53
 
56
54
  onDimensionChanged(listener, context) {
@@ -1,39 +1,39 @@
1
1
  export class SpotLight extends AbstractLight {
2
2
  /**
3
- *
3
+ * @readonly
4
4
  * @type {Vector3}
5
5
  */
6
- position: Vector3;
6
+ readonly position: Vector3;
7
7
  /**
8
- *
8
+ * @readonly
9
9
  * @type {Vector3}
10
10
  */
11
- direction: Vector3;
11
+ readonly direction: Vector3;
12
12
  /**
13
- *
13
+ * @readonly
14
14
  * @type {Vector1}
15
15
  */
16
- angle: Vector1;
16
+ readonly angle: Vector1;
17
17
  /**
18
- *
18
+ * @readonly
19
19
  * @type {Vector1}
20
20
  */
21
- distance: Vector1;
21
+ readonly distance: Vector1;
22
22
  /**
23
- *
23
+ * @readonly
24
24
  * @type {Color}
25
25
  */
26
- color: Color;
26
+ readonly color: Color;
27
27
  /**
28
- *
28
+ * @readonly
29
29
  * @type {Vector1}
30
30
  */
31
- intensity: Vector1;
31
+ readonly intensity: Vector1;
32
32
  /**
33
- *
33
+ * @readonly
34
34
  * @type {Vector1}
35
35
  */
36
- penumbra: Vector1;
36
+ readonly penumbra: Vector1;
37
37
  getCenter(result: any): void;
38
38
  getAABB(result: any): void;
39
39
  onDimensionChanged(listener: any, context: any): void;
@@ -1 +1 @@
1
- {"version":3,"file":"SpotLight.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/render/forward_plus/model/SpotLight.js"],"names":[],"mappings":"AAMA;IAIQ;;;OAGG;IACH,UAFU,OAAO,CAEY;IAE7B;;;OAGG;IACH,WAFU,OAAO,CAEa;IAE9B;;;OAGG;IACH,OAFU,OAAO,CAEoB;IAErC;;;OAGG;IACH,UAFU,OAAO,CAEa;IAE9B;;;OAGG;IACH,OAFU,KAAK,CAEgB;IAE/B;;;OAGG;IACH,WAFU,OAAO,CAEc;IAE/B;;;OAGG;IACH,UAFU,OAAO,CAEe;IAGpC,6BAYC;IAED,2BAcC;IAED,sDAKC;IAED,uDAKC;IAuCL;;;OAGG;IACH,sBAFU,OAAO,CAEc;CAN9B;8BAhI6B,oBAAoB;oBAJ9B,qCAAqC;oBACrC,qCAAqC;sBACnC,oCAAoC"}
1
+ {"version":3,"file":"SpotLight.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/render/forward_plus/model/SpotLight.js"],"names":[],"mappings":"AAMA;IAGI;;;OAGG;IACH,mBAFU,OAAO,CAEQ;IAEzB;;;OAGG;IACH,oBAFU,OAAO,CAES;IAE1B;;;OAGG;IACH,gBAFU,OAAO,CAEgB;IAEjC;;;OAGG;IACH,mBAFU,OAAO,CAES;IAE1B;;;OAGG;IACH,gBAFU,KAAK,CAEY;IAE3B;;;OAGG;IACH,oBAFU,OAAO,CAEU;IAE3B;;;OAGG;IACH,mBAFU,OAAO,CAEW;IAG5B,6BAYC;IAED,2BAcC;IAED,sDAKC;IAED,uDAKC;IAuCL;;;OAGG;IACH,sBAFU,OAAO,CAEc;CAN9B;8BA/H6B,oBAAoB;oBAD9B,qCAAqC;oBADrC,qCAAqC;sBAFnC,oCAAoC"}
@@ -1,55 +1,54 @@
1
- import Vector3 from "../../../../../core/geom/Vector3.js";
2
- import Vector1 from "../../../../../core/geom/Vector1.js";
3
1
  import { Color } from "../../../../../core/color/Color.js";
4
2
  import { computeConeBoundingBox } from "../../../../../core/geom/3d/cone/computeConeBoundingBox.js";
3
+ import Vector1 from "../../../../../core/geom/Vector1.js";
4
+ import Vector3 from "../../../../../core/geom/Vector3.js";
5
5
  import { AbstractLight } from "./AbstractLight.js";
6
6
 
7
7
  export class SpotLight extends AbstractLight {
8
- constructor() {
9
- super();
10
-
11
- /**
12
- *
13
- * @type {Vector3}
14
- */
15
- this.position = new Vector3();
16
-
17
- /**
18
- *
19
- * @type {Vector3}
20
- */
21
- this.direction = new Vector3();
22
-
23
- /**
24
- *
25
- * @type {Vector1}
26
- */
27
- this.angle = new Vector1(Math.PI / 2);
28
-
29
- /**
30
- *
31
- * @type {Vector1}
32
- */
33
- this.distance = new Vector1(1);
34
-
35
- /**
36
- *
37
- * @type {Color}
38
- */
39
- this.color = new Color(1, 1, 1);
40
-
41
- /**
42
- *
43
- * @type {Vector1}
44
- */
45
- this.intensity = new Vector1(1);
46
-
47
- /**
48
- *
49
- * @type {Vector1}
50
- */
51
- this.penumbra = new Vector1(0.4);
52
- }
8
+
9
+
10
+ /**
11
+ * @readonly
12
+ * @type {Vector3}
13
+ */
14
+ position = new Vector3();
15
+
16
+ /**
17
+ * @readonly
18
+ * @type {Vector3}
19
+ */
20
+ direction = new Vector3();
21
+
22
+ /**
23
+ * @readonly
24
+ * @type {Vector1}
25
+ */
26
+ angle = new Vector1(Math.PI / 2);
27
+
28
+ /**
29
+ * @readonly
30
+ * @type {Vector1}
31
+ */
32
+ distance = new Vector1(1);
33
+
34
+ /**
35
+ * @readonly
36
+ * @type {Color}
37
+ */
38
+ color = new Color(1, 1, 1);
39
+
40
+ /**
41
+ * @readonly
42
+ * @type {Vector1}
43
+ */
44
+ intensity = new Vector1(1);
45
+
46
+ /**
47
+ * @readonly
48
+ * @type {Vector1}
49
+ */
50
+ penumbra = new Vector1(0.4);
51
+
53
52
 
54
53
  getCenter(result) {
55
54
  // find center of the cone (mid point along the cone length)
@@ -1 +1 @@
1
- {"version":3,"file":"QueryShader.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/render/visibility/hiz/query/QueryShader.js"],"names":[],"mappings":"AAEA,kDA0KC;+BA5K8C,OAAO"}
1
+ {"version":3,"file":"QueryShader.d.ts","sourceRoot":"","sources":["../../../../../../../../src/engine/graphics/render/visibility/hiz/query/QueryShader.js"],"names":[],"mappings":"AAEA,kDAsKC;+BAxK8C,OAAO"}
@@ -15,10 +15,6 @@ export function makeQueryShader() {
15
15
 
16
16
  out highp vec4 out_value;
17
17
 
18
- float reduce(float a, float b, float c, float d){
19
- return max( a, max( b, max( c, d ) ) );
20
- }
21
-
22
18
  vec3 read_input_v3(ivec2 start){
23
19
  float x = texelFetch(utInput, start, 0).x;
24
20
  float y = texelFetch(utInput, start + ivec2(1,0), 0).x;
@@ -1 +1 @@
1
- {"version":3,"file":"PathTracerProbeRenderer.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.js"],"names":[],"mappings":"AAuBA;IACI,mBAA0B;IAC1B,yBAAqB;IAGrB,qBAAoB;IACpB,qBAAyB;IAEzB,uBAA6B;IAE7B;;;;;;;;OAQG;IACH,kCAPW,MAAM,aACN,MAAM,YACN,MAAM,EAAE,mBACR,MAAM,UACN,MAAM,EAAE,iBACR,MAAM,QAchB;IAED,iFAuCC;IAKD,mBACC;IAED,4BAKC;CACJ;8BA/F6B,oBAAoB;2BAHvB,8BAA8B;gCADzB,mCAAmC"}
1
+ {"version":3,"file":"PathTracerProbeRenderer.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.js"],"names":[],"mappings":"AAuBA;IACI,mBAA0B;IAC1B,yBAAqB;IACrB,qBAAmB;IAEnB,qBAAyB;IAEzB,uBAA6B;IAE7B;;;;;;;;OAQG;IACH,kCAPW,MAAM,aACN,MAAM,YACN,MAAM,EAAE,mBACR,MAAM,UACN,MAAM,EAAE,iBACR,MAAM,QAchB;IAED,iFAuCC;IAKD,mBACC;IAED,4BAKC;CACJ;8BA9F6B,oBAAoB;2BAHvB,8BAA8B;gCADzB,mCAAmC"}
@@ -24,9 +24,8 @@ const sampled_irradiance = new Float32Array(3);
24
24
  export class PathTracerProbeRenderer extends ProbeRenderer {
25
25
  tracer = new PathTracer();
26
26
  max_bounce_count = 5;
27
- // sample_count = 192;
28
- // sample_count = 1000;
29
- sample_count = 4096;
27
+ sample_count = 256;
28
+ // sample_count = 40960;
30
29
  random = seededRandom(0);
31
30
 
32
31
  scene = new PathTracedScene()
@@ -50,7 +49,7 @@ export class PathTracerProbeRenderer extends ProbeRenderer {
50
49
  this.scene,
51
50
  position, position_offset,
52
51
  resolution, max_depth,
53
- 8
52
+ 16
54
53
  );
55
54
  }
56
55
 
@@ -1,12 +1,13 @@
1
- import { EngineHarness } from "../../EngineHarness.js";
2
- import GUIElementSystem from "../../ecs/gui/GUIElementSystem.js";
1
+ import { MetricCollection } from "../../development/performance/MetricCollection.js";
2
+ import {
3
+ MetricCollectionConsoleMonitor
4
+ } from "../../development/performance/monitor/MetricCollectionConsoleMonitor.js";
3
5
  import Entity from "../../ecs/Entity.js";
4
6
  import GUIElement from "../../ecs/gui/GUIElement.js";
7
+ import GUIElementSystem from "../../ecs/gui/GUIElementSystem.js";
8
+ import { EngineHarness } from "../../EngineHarness.js";
5
9
  import { BehaviorComponent } from "../../intelligence/behavior/ecs/BehaviorComponent.js";
6
10
  import { BehaviorSystem } from "../../intelligence/behavior/ecs/BehaviorSystem.js";
7
- import { MetricCollection } from "../../development/performance/MetricCollection.js";
8
- import { PeriodicConsolePrinter } from "../../development/performance/monitor/PeriodicConsolePrinter.js";
9
- import { MetricStatistics } from "../../development/performance/MetricStatistics.js";
10
11
  import { FluidField } from "./FluidField.js";
11
12
  import { FluidSimulator } from "./FluidSimulator.js";
12
13
  import { SliceVisualiser } from "./SliceVisualiser.js";
@@ -74,13 +75,7 @@ function main(engine) {
74
75
  }))
75
76
  .build(ecd);
76
77
 
77
- const metric_stats = new MetricStatistics();
78
-
79
- new PeriodicConsolePrinter(3, () => metrics.list().map(m => {
80
- metrics.get(m).computeStats(metric_stats);
81
-
82
- return `${m}: ${metric_stats}`;
83
- }).join('\n')).start()
78
+ MetricCollectionConsoleMonitor.from(metrics).start()
84
79
 
85
80
  new Entity()
86
81
  .add(GUIElement.fromView(slice_view))