@woosh/meep-engine 2.116.1 → 2.117.1
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/build/meep.cjs +30 -32
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +30 -32
- package/package.json +1 -1
- package/src/core/model/object/object_deep_clone.d.ts +7 -0
- package/src/core/model/object/object_deep_clone.d.ts.map +1 -0
- package/src/core/model/object/object_deep_clone.js +47 -0
- package/src/engine/development/performance/MetricCollection.d.ts +1 -1
- package/src/engine/development/performance/MetricCollection.js +2 -2
- package/src/engine/development/performance/monitor/MetricCollectionConsoleMonitor.d.ts +10 -0
- package/src/engine/development/performance/monitor/MetricCollectionConsoleMonitor.d.ts.map +1 -0
- package/src/engine/development/performance/monitor/MetricCollectionConsoleMonitor.js +23 -0
- package/src/engine/graphics/render/forward_plus/model/AbstractLight.d.ts.map +1 -1
- package/src/engine/graphics/render/forward_plus/model/AbstractLight.js +3 -3
- package/src/engine/graphics/render/forward_plus/model/DirectionalLight.d.ts +6 -6
- package/src/engine/graphics/render/forward_plus/model/DirectionalLight.d.ts.map +1 -1
- package/src/engine/graphics/render/forward_plus/model/DirectionalLight.js +26 -27
- package/src/engine/graphics/render/forward_plus/model/PointLight.d.ts +4 -4
- package/src/engine/graphics/render/forward_plus/model/PointLight.d.ts.map +1 -1
- package/src/engine/graphics/render/forward_plus/model/PointLight.js +31 -33
- package/src/engine/graphics/render/forward_plus/model/SpotLight.d.ts +14 -14
- package/src/engine/graphics/render/forward_plus/model/SpotLight.d.ts.map +1 -1
- package/src/engine/graphics/render/forward_plus/model/SpotLight.js +46 -47
- package/src/engine/graphics/render/visibility/hiz/query/QueryShader.d.ts.map +1 -1
- package/src/engine/graphics/render/visibility/hiz/query/QueryShader.js +0 -4
- package/src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.d.ts.map +1 -1
- package/src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.js +3 -4
- package/src/engine/physics/fluid/prototype.js +7 -12
- package/src/view/elements/progress/SmoothProgressBar.d.ts +7 -14
- package/src/view/elements/progress/SmoothProgressBar.d.ts.map +1 -1
- package/src/view/elements/progress/SmoothProgressBar.js +23 -6
|
@@ -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
|
-
|
|
28
|
-
// sample_count =
|
|
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
|
-
|
|
52
|
+
16
|
|
54
53
|
);
|
|
55
54
|
}
|
|
56
55
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
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
|
-
|
|
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))
|
|
@@ -3,19 +3,13 @@ declare class ProgressBarView extends View<HTMLElement> {
|
|
|
3
3
|
/**
|
|
4
4
|
*
|
|
5
5
|
* @param {number[]|BoundedValue} [model]
|
|
6
|
-
* @param classList
|
|
7
|
-
* @param displayLabel
|
|
8
|
-
* @param displayLabelType
|
|
9
|
-
* @param displayTipMarker
|
|
10
|
-
* @param process
|
|
6
|
+
* @param {string[]} [classList]
|
|
7
|
+
* @param {boolean} [displayLabel]
|
|
8
|
+
* @param {string} [displayLabelType]
|
|
9
|
+
* @param {boolean} [displayTipMarker]
|
|
10
|
+
* @param {function(number):string} [process]
|
|
11
11
|
*/
|
|
12
|
-
constructor(model?: number[] | BoundedValue, { classList, displayLabel, displayLabelType, displayTipMarker, process }?:
|
|
13
|
-
classList?: any[];
|
|
14
|
-
displayLabel?: boolean;
|
|
15
|
-
displayLabelType?: string;
|
|
16
|
-
displayTipMarker?: boolean;
|
|
17
|
-
process?: typeof passThrough;
|
|
18
|
-
});
|
|
12
|
+
constructor(model?: number[] | BoundedValue, { classList, displayLabel, displayLabelType, displayTipMarker, process }?: string[]);
|
|
19
13
|
model: number[] | BoundedValue;
|
|
20
14
|
el: Element;
|
|
21
15
|
/**
|
|
@@ -23,7 +17,7 @@ declare class ProgressBarView extends View<HTMLElement> {
|
|
|
23
17
|
*/
|
|
24
18
|
__el_fill: HTMLElement;
|
|
25
19
|
__el_fill_container: HTMLDivElement;
|
|
26
|
-
__display_tip_marker:
|
|
20
|
+
__display_tip_marker: any;
|
|
27
21
|
__el_tip_marker: HTMLDivElement;
|
|
28
22
|
/**
|
|
29
23
|
*
|
|
@@ -68,5 +62,4 @@ declare class ProgressBarView extends View<HTMLElement> {
|
|
|
68
62
|
}
|
|
69
63
|
import View from "../../View.js";
|
|
70
64
|
import BoundedValue from "../../../core/model/BoundedValue.js";
|
|
71
|
-
import { passThrough } from "../../../core/function/passThrough.js";
|
|
72
65
|
//# sourceMappingURL=SmoothProgressBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SmoothProgressBar.d.ts","sourceRoot":"","sources":["../../../../../src/view/elements/progress/SmoothProgressBar.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"SmoothProgressBar.d.ts","sourceRoot":"","sources":["../../../../../src/view/elements/progress/SmoothProgressBar.js"],"names":[],"mappings":";AAmCA;IACI;;;;;;;;OAQG;IACH,oBAPW,MAAM,EAAE,GAAC,YAAY,6EACrB,MAAM,EAAE,EAmGlB;IAnFG,+BAAkB;IAIlB,YAAkB;IAIlB;;OAEG;IACH,WAFU,WAAW,CAEmC;IAExD,oCAAwD;IAaxD,0BAA4C;IAGxC,gCAAoD;IAOxD;;;;OAIG;IACH,kBAAwB;IAExB;;;;OAIG;IACH,gCAA2C;IAC3C;;;;OAIG;IACH,6BAA4C;IAE5C;;;;OAIG;IACH,oBAAyB;IAEzB,wBAAwB;IACxB,oBAAoB;IAGpB,6BAA0D;IAsB9D,uBAQC;IAZD,oBAEC;IAgBD,qBAQC;IAZD,kBAEC;IAYD,eA2BC;IAED;;OAEG;IACH,0BAGC;IAED;;OAEG;IACH,iCAGC;CACJ;iBA9MgB,eAAe;yBAHP,qCAAqC"}
|
|
@@ -6,25 +6,42 @@ import { frameThrottle } from "../../../engine/graphics/FrameThrottle.js";
|
|
|
6
6
|
import dom from "../../DOM.js";
|
|
7
7
|
import View from "../../View.js";
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* @param {number} value
|
|
12
|
+
* @param {number} max
|
|
13
|
+
* @param {function(number):string} process
|
|
14
|
+
* @returns {string}
|
|
15
|
+
*/
|
|
9
16
|
function makeTextPercentage(value, max, process) {
|
|
10
17
|
const r = (value / max) * 100;
|
|
11
18
|
const x = process(r);
|
|
12
19
|
return `${x}%`;
|
|
13
20
|
}
|
|
14
21
|
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @param {number} value
|
|
25
|
+
* @param {number} max
|
|
26
|
+
* @param {function(number):string} process
|
|
27
|
+
* @returns {string}
|
|
28
|
+
*/
|
|
15
29
|
function makeTextAbsolute(value, max, process) {
|
|
16
|
-
|
|
30
|
+
const _max = process(max);
|
|
31
|
+
const _val = process(value);
|
|
32
|
+
|
|
33
|
+
return `${_val} / ${_max}`;
|
|
17
34
|
}
|
|
18
35
|
|
|
19
36
|
class ProgressBarView extends View {
|
|
20
37
|
/**
|
|
21
38
|
*
|
|
22
39
|
* @param {number[]|BoundedValue} [model]
|
|
23
|
-
* @param classList
|
|
24
|
-
* @param displayLabel
|
|
25
|
-
* @param displayLabelType
|
|
26
|
-
* @param displayTipMarker
|
|
27
|
-
* @param process
|
|
40
|
+
* @param {string[]} [classList]
|
|
41
|
+
* @param {boolean} [displayLabel]
|
|
42
|
+
* @param {string} [displayLabelType]
|
|
43
|
+
* @param {boolean} [displayTipMarker]
|
|
44
|
+
* @param {function(number):string} [process]
|
|
28
45
|
*/
|
|
29
46
|
constructor(model, {
|
|
30
47
|
classList = [],
|