@woosh/meep-engine 2.86.1 → 2.86.2
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
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @param {TerrainOverlay} overlay
|
|
4
|
-
* @param {Sampler2D} sampler
|
|
5
|
-
* @param {ParameterLookupTable} [lut]
|
|
6
|
-
* @param {NumericInterval} range Range of values of interest within the sampler that are to be mapped onto LUT
|
|
7
|
-
* @param {function(number):number} [lookupScaleFunction]
|
|
2
|
+
* @param {Object} params
|
|
3
|
+
* @param {TerrainOverlay} params.overlay
|
|
4
|
+
* @param {Sampler2D} params.sampler
|
|
5
|
+
* @param {ParameterLookupTable} [params.lut]
|
|
6
|
+
* @param {NumericInterval} [params.range] Range of values of interest within the sampler that are to be mapped onto LUT
|
|
7
|
+
* @param {function(number):number} [params.lookupScaleFunction]
|
|
8
8
|
*/
|
|
9
|
-
export function paintTerrainOverlayViaLookupTable({ overlay, sampler, lut, range, lookupScaleFunction }:
|
|
9
|
+
export function paintTerrainOverlayViaLookupTable({ overlay, sampler, lut, range, lookupScaleFunction }: {
|
|
10
|
+
overlay: TerrainOverlay;
|
|
11
|
+
sampler: Sampler2D;
|
|
12
|
+
lut?: ParameterLookupTable;
|
|
13
|
+
range?: NumericInterval;
|
|
14
|
+
lookupScaleFunction?: (arg0: number) => number;
|
|
15
|
+
}): void;
|
|
16
|
+
import { Sampler2D } from "../../../graphics/texture/sampler/Sampler2D.js";
|
|
17
|
+
import { ParameterLookupTable } from "../../../graphics/particles/particular/engine/parameter/ParameterLookupTable.js";
|
|
18
|
+
import { NumericInterval } from "../../../../core/math/interval/NumericInterval.js";
|
|
10
19
|
//# sourceMappingURL=paintTerrainOverlayViaLookupTable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paintTerrainOverlayViaLookupTable.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/ecs/terrain/util/paintTerrainOverlayViaLookupTable.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"paintTerrainOverlayViaLookupTable.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/ecs/terrain/util/paintTerrainOverlayViaLookupTable.js"],"names":[],"mappings":"AAmBA;;;;;;;GAOG;AACH;IANkC,OAAO;IACZ,OAAO,EAAzB,SAAS;IACqB,GAAG,GAAjC,oBAAoB;IACK,KAAK,GAA9B,eAAe;IACkB,mBAAmB,UAA3C,MAAM,KAAE,MAAM;SA0CjC;0BA9DyB,gDAAgD;qCAFrC,iFAAiF;gCADtF,mDAAmD"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { passThrough } from "../../../../core/function/passThrough.js";
|
|
2
2
|
import { clamp01 } from "../../../../core/math/clamp01.js";
|
|
3
|
+
import { NumericInterval } from "../../../../core/math/interval/NumericInterval.js";
|
|
3
4
|
import { ParameterLookupTable } from "../../../graphics/particles/particular/engine/parameter/ParameterLookupTable.js";
|
|
4
5
|
import { sampler2d_scale } from "../../../graphics/texture/sampler/resize/sampler2d_scale.js";
|
|
5
6
|
import { Sampler2D } from "../../../graphics/texture/sampler/Sampler2D.js";
|
|
@@ -17,18 +18,18 @@ heatmap_lut.write([
|
|
|
17
18
|
heatmap_lut.computeUniformPositions();
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
|
-
*
|
|
21
|
-
* @param {TerrainOverlay} overlay
|
|
22
|
-
* @param {Sampler2D} sampler
|
|
23
|
-
* @param {ParameterLookupTable} [lut]
|
|
24
|
-
* @param {NumericInterval} range Range of values of interest within the sampler that are to be mapped onto LUT
|
|
25
|
-
* @param {function(number):number} [lookupScaleFunction]
|
|
21
|
+
* @param {Object} params
|
|
22
|
+
* @param {TerrainOverlay} params.overlay
|
|
23
|
+
* @param {Sampler2D} params.sampler
|
|
24
|
+
* @param {ParameterLookupTable} [params.lut]
|
|
25
|
+
* @param {NumericInterval} [params.range] Range of values of interest within the sampler that are to be mapped onto LUT
|
|
26
|
+
* @param {function(number):number} [params.lookupScaleFunction]
|
|
26
27
|
*/
|
|
27
28
|
export function paintTerrainOverlayViaLookupTable({
|
|
28
29
|
overlay,
|
|
29
30
|
sampler,
|
|
30
31
|
lut = heatmap_lut,
|
|
31
|
-
range,
|
|
32
|
+
range = new NumericInterval(0, 1),
|
|
32
33
|
lookupScaleFunction = passThrough
|
|
33
34
|
}) {
|
|
34
35
|
let i, j;
|