@woosh/meep-engine 2.118.7 → 2.118.9
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 +11 -145
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +11 -145
- package/package.json +1 -1
- package/samples/generation/SampleGenerator0.js +55 -55
- package/samples/generation/generators/interactive/mir_generator_place_buff_objects.js +21 -23
- package/samples/generation/generators/mir_generator_place_bases.js +20 -20
- package/samples/generation/generators/mir_generator_place_road_decorators.js +11 -11
- package/src/core/color/Color.js +1 -1
- package/src/core/color/operations/color_darken.d.ts +8 -0
- package/src/core/color/operations/color_darken.d.ts.map +1 -0
- package/src/core/color/operations/color_darken.js +27 -0
- package/src/core/color/operations/color_desaturate.d.ts +3 -2
- package/src/core/color/operations/color_desaturate.d.ts.map +1 -1
- package/src/core/color/operations/color_desaturate.js +16 -5
- package/src/core/color/operations/color_lighten.d.ts +8 -0
- package/src/core/color/operations/color_lighten.d.ts.map +1 -0
- package/src/core/color/operations/color_lighten.js +27 -0
- package/src/core/color/operations/color_saturate.d.ts +8 -0
- package/src/core/color/operations/color_saturate.d.ts.map +1 -0
- package/src/core/color/operations/color_saturate.js +27 -0
- package/src/core/geom/2d/quad-tree/qt_collect_data_all.d.ts +9 -0
- package/src/core/geom/2d/quad-tree/qt_collect_data_all.d.ts.map +1 -0
- package/src/core/geom/2d/quad-tree/qt_collect_data_all.js +29 -0
- package/src/core/math/gaussian.d.ts.map +1 -1
- package/src/core/math/gaussian.js +4 -1
- package/src/core/math/physics/pdf/pdf_GGX.d.ts +3 -3
- package/src/core/math/physics/pdf/pdf_GGX.d.ts.map +1 -1
- package/src/core/math/physics/pdf/pdf_GGX.js +7 -6
- package/src/core/model/ObservedBoolean.js +1 -1
- package/src/core/model/node-graph/json/deserializeNodeGraphFromJSON.d.ts +1 -1
- package/src/core/model/node-graph/json/deserializeNodeGraphFromJSON.js +7 -7
- package/src/core/model/object/validatedObjectValueByKey.js +1 -1
- package/src/core/model/reactive/transform/{ReactiveTypeInferrence.d.ts → inferReactiveExpressionTypes.d.ts} +1 -1
- package/src/core/model/reactive/transform/inferReactiveExpressionTypes.d.ts.map +1 -0
- package/src/core/model/reactive/transform/inferReactiveExpressionTypes.js +60 -0
- package/src/core/model/reactive/trigger/ReactiveTrigger.js +1 -1
- package/src/core/process/delay.d.ts.map +1 -1
- package/src/core/process/delay.js +6 -0
- package/src/core/process/task/TaskGroup.d.ts.map +1 -1
- package/src/core/process/task/TaskGroup.js +3 -8
- package/src/core/process/undo/ActionGroup.d.ts.map +1 -1
- package/src/core/process/undo/ActionGroup.js +6 -9
- package/src/core/process/worker/extractTransferables.d.ts +3 -2
- package/src/core/process/worker/extractTransferables.d.ts.map +1 -1
- package/src/core/process/worker/extractTransferables.js +32 -12
- package/src/engine/ecs/dynamic_actions/rules/DynamicRuleDescription.d.ts.map +1 -1
- package/src/engine/ecs/dynamic_actions/rules/DynamicRuleDescription.js +3 -1
- package/src/engine/graphics/GraphicsEngine.d.ts.map +1 -1
- package/src/engine/graphics/GraphicsEngine.js +4 -0
- package/src/engine/graphics/ecs/camera/CameraSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/camera/CameraSystem.js +4 -0
- package/src/generation/grid/actions/ContinuousGridCellAction.d.ts.map +1 -1
- package/src/generation/grid/actions/ContinuousGridCellAction.js +6 -8
- package/src/generation/grid/actions/ContinuousGridCellActionSetTerrainHeight.d.ts.map +1 -1
- package/src/generation/grid/actions/ContinuousGridCellActionSetTerrainHeight.js +20 -22
- package/src/generation/grid/generation/GridTaskDensityMarkerDistribution.d.ts.map +1 -1
- package/src/generation/grid/generation/GridTaskDensityMarkerDistribution.js +23 -28
- package/src/generation/grid/generation/GridTaskExecuteRuleTimes.d.ts.map +1 -1
- package/src/generation/grid/generation/GridTaskExecuteRuleTimes.js +7 -10
- package/src/generation/grid/generation/GridTaskSequence.d.ts.map +1 -1
- package/src/generation/grid/generation/GridTaskSequence.js +2 -5
- package/src/generation/grid/generation/discrete/{GridTaskCellActionRuleSet.d.ts → GridTaskActionRuleSet.d.ts} +1 -1
- package/src/generation/grid/generation/discrete/GridTaskActionRuleSet.d.ts.map +1 -0
- package/src/generation/grid/generation/discrete/{GridTaskCellActionRuleSet.js → GridTaskActionRuleSet.js} +13 -16
- package/src/generation/grid/generation/discrete/GridTaskConnectRooms.d.ts.map +1 -1
- package/src/generation/grid/generation/discrete/GridTaskConnectRooms.js +51 -53
- package/src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.d.ts.map +1 -1
- package/src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.js +20 -23
- package/src/generation/grid/generation/grid/select/CellSupplierBestN.d.ts.map +1 -1
- package/src/generation/grid/generation/grid/select/CellSupplierBestN.js +38 -39
- package/src/generation/grid/generation/grid/select/CellSupplierPathUpHill.d.ts.map +1 -1
- package/src/generation/grid/generation/grid/select/CellSupplierPathUpHill.js +8 -11
- package/src/generation/grid/generation/road/PathEndPoint.d.ts.map +1 -1
- package/src/generation/grid/generation/road/PathEndPoint.js +8 -10
- package/src/generation/grid/generation/road/RoadConnection.d.ts.map +1 -1
- package/src/generation/grid/generation/road/RoadConnection.js +4 -5
- package/src/generation/markers/GridCellActionPlaceMarker.d.ts.map +1 -1
- package/src/generation/markers/GridCellActionPlaceMarker.js +7 -5
- package/src/view/common/LabelView.d.ts.map +1 -1
- package/src/view/common/LabelView.js +0 -3
- package/src/core/model/LinearValue.d.ts +0 -88
- package/src/core/model/LinearValue.d.ts.map +0 -1
- package/src/core/model/LinearValue.js +0 -140
- package/src/core/model/reactive/transform/ReactiveTypeInferrence.d.ts.map +0 -1
- package/src/core/model/reactive/transform/ReactiveTypeInferrence.js +0 -54
- package/src/generation/grid/generation/discrete/GridTaskCellActionRuleSet.d.ts.map +0 -1
package/build/meep.module.js
CHANGED
|
@@ -54449,7 +54449,7 @@ class Color {
|
|
|
54449
54449
|
return output;
|
|
54450
54450
|
}
|
|
54451
54451
|
}
|
|
54452
|
-
|
|
54452
|
+
|
|
54453
54453
|
/**
|
|
54454
54454
|
* @deprecated use {@link Color#toArray} instead
|
|
54455
54455
|
* @readonly
|
|
@@ -59635,7 +59635,10 @@ const AmbientOcclusionShader = function () {
|
|
|
59635
59635
|
* @returns {number}
|
|
59636
59636
|
*/
|
|
59637
59637
|
function gaussian$1(sigma, v) {
|
|
59638
|
-
|
|
59638
|
+
const v2 = v * v;
|
|
59639
|
+
const sigma2 = sigma * sigma;
|
|
59640
|
+
|
|
59641
|
+
return Math.exp(- v2 / (2 * sigma2));
|
|
59639
59642
|
}
|
|
59640
59643
|
|
|
59641
59644
|
/**
|
|
@@ -90948,6 +90951,10 @@ function configureThreeRenderer(webGLRenderer) {
|
|
|
90948
90951
|
class GraphicsEngine {
|
|
90949
90952
|
#debug = false;
|
|
90950
90953
|
|
|
90954
|
+
get isGraphicsEngine(){
|
|
90955
|
+
return true;
|
|
90956
|
+
}
|
|
90957
|
+
|
|
90951
90958
|
/**
|
|
90952
90959
|
*
|
|
90953
90960
|
* @param {Camera} camera
|
|
@@ -92426,13 +92433,7 @@ class TaskGroup {
|
|
|
92426
92433
|
* @returns {boolean}
|
|
92427
92434
|
*/
|
|
92428
92435
|
addChild(child) {
|
|
92429
|
-
|
|
92430
|
-
return false;
|
|
92431
|
-
}
|
|
92432
|
-
|
|
92433
|
-
this.children.push(child);
|
|
92434
|
-
|
|
92435
|
-
return true;
|
|
92436
|
+
return array_push_if_unique(this.children, child);
|
|
92436
92437
|
}
|
|
92437
92438
|
|
|
92438
92439
|
/**
|
|
@@ -92582,7 +92583,7 @@ class TaskGroup {
|
|
|
92582
92583
|
* @returns {Promise<unknown>}
|
|
92583
92584
|
*/
|
|
92584
92585
|
promise() {
|
|
92585
|
-
return
|
|
92586
|
+
return new Promise((resolve, reject) => this.join(resolve, reject));
|
|
92586
92587
|
}
|
|
92587
92588
|
}
|
|
92588
92589
|
|
|
@@ -97801,139 +97802,6 @@ class SimpleLifecycle {
|
|
|
97801
97802
|
}
|
|
97802
97803
|
}
|
|
97803
97804
|
|
|
97804
|
-
class LinearValue {
|
|
97805
|
-
|
|
97806
|
-
/**
|
|
97807
|
-
* @readonly
|
|
97808
|
-
* @type {Signal}
|
|
97809
|
-
*/
|
|
97810
|
-
onChanged = new Signal();
|
|
97811
|
-
|
|
97812
|
-
/**
|
|
97813
|
-
*
|
|
97814
|
-
* @param {number} [x = 0]
|
|
97815
|
-
* @param {number} [a = 0]
|
|
97816
|
-
* @param {number} [b = 1]
|
|
97817
|
-
* @constructor
|
|
97818
|
-
*/
|
|
97819
|
-
constructor(x = 0, a = 0, b = 1) {
|
|
97820
|
-
|
|
97821
|
-
/**
|
|
97822
|
-
*
|
|
97823
|
-
* @type {number}
|
|
97824
|
-
*/
|
|
97825
|
-
this.x = x;
|
|
97826
|
-
/**
|
|
97827
|
-
*
|
|
97828
|
-
* @type {number}
|
|
97829
|
-
*/
|
|
97830
|
-
this.a = a;
|
|
97831
|
-
/**
|
|
97832
|
-
*
|
|
97833
|
-
* @type {number}
|
|
97834
|
-
*/
|
|
97835
|
-
this.b = b;
|
|
97836
|
-
|
|
97837
|
-
}
|
|
97838
|
-
|
|
97839
|
-
/**
|
|
97840
|
-
*
|
|
97841
|
-
* @param {LinearValue} other
|
|
97842
|
-
* @returns {LinearValue}
|
|
97843
|
-
*/
|
|
97844
|
-
copy(other) {
|
|
97845
|
-
return this.set(other.x, other.a, other.b);
|
|
97846
|
-
}
|
|
97847
|
-
|
|
97848
|
-
/**
|
|
97849
|
-
*
|
|
97850
|
-
* @param {number} x
|
|
97851
|
-
* @param {number} a
|
|
97852
|
-
* @param {number} b
|
|
97853
|
-
* @returns {LinearValue}
|
|
97854
|
-
*/
|
|
97855
|
-
set(x, a, b) {
|
|
97856
|
-
this.x = x;
|
|
97857
|
-
this.a = a;
|
|
97858
|
-
this.b = b;
|
|
97859
|
-
|
|
97860
|
-
this.onChanged.dispatch(x, a, b);
|
|
97861
|
-
return this;
|
|
97862
|
-
}
|
|
97863
|
-
|
|
97864
|
-
/**
|
|
97865
|
-
*
|
|
97866
|
-
* @param v
|
|
97867
|
-
* @returns {LinearValue}
|
|
97868
|
-
*/
|
|
97869
|
-
addMultiplier(v) {
|
|
97870
|
-
this.b += v;
|
|
97871
|
-
|
|
97872
|
-
this.onChanged.dispatch(this.x, this.a, this.b);
|
|
97873
|
-
return this;
|
|
97874
|
-
}
|
|
97875
|
-
|
|
97876
|
-
/**
|
|
97877
|
-
*
|
|
97878
|
-
* @param v
|
|
97879
|
-
* @returns {LinearValue}
|
|
97880
|
-
*/
|
|
97881
|
-
subMultiplier(v) {
|
|
97882
|
-
return this.addMultiplier(-v);
|
|
97883
|
-
}
|
|
97884
|
-
|
|
97885
|
-
/**
|
|
97886
|
-
*
|
|
97887
|
-
* @param v
|
|
97888
|
-
* @returns {LinearValue}
|
|
97889
|
-
*/
|
|
97890
|
-
addConstant(v) {
|
|
97891
|
-
this.a += v;
|
|
97892
|
-
|
|
97893
|
-
this.onChanged.dispatch(this.x, this.a, this.b);
|
|
97894
|
-
return this;
|
|
97895
|
-
}
|
|
97896
|
-
|
|
97897
|
-
/**
|
|
97898
|
-
*
|
|
97899
|
-
* @param v
|
|
97900
|
-
* @returns {LinearValue}
|
|
97901
|
-
*/
|
|
97902
|
-
subConstant(v) {
|
|
97903
|
-
return this.addConstant(-v);
|
|
97904
|
-
}
|
|
97905
|
-
|
|
97906
|
-
/**
|
|
97907
|
-
*
|
|
97908
|
-
* @returns {number}
|
|
97909
|
-
*/
|
|
97910
|
-
getValue() {
|
|
97911
|
-
// y = b*x + a
|
|
97912
|
-
return this.x * this.b + this.a;
|
|
97913
|
-
}
|
|
97914
|
-
|
|
97915
|
-
/**
|
|
97916
|
-
*
|
|
97917
|
-
* @param {LinearValue} other
|
|
97918
|
-
* @returns {boolean}
|
|
97919
|
-
*/
|
|
97920
|
-
equals(other) {
|
|
97921
|
-
return this.x === other.x && this.a === other.a && this.b === other.b;
|
|
97922
|
-
}
|
|
97923
|
-
|
|
97924
|
-
toJSON() {
|
|
97925
|
-
return {
|
|
97926
|
-
x: this.x,
|
|
97927
|
-
a: this.a,
|
|
97928
|
-
b: this.b
|
|
97929
|
-
};
|
|
97930
|
-
}
|
|
97931
|
-
|
|
97932
|
-
fromJSON(json) {
|
|
97933
|
-
this.set(json.x, json.a, json.b);
|
|
97934
|
-
}
|
|
97935
|
-
}
|
|
97936
|
-
|
|
97937
97805
|
/**
|
|
97938
97806
|
*
|
|
97939
97807
|
* @param {string} string
|
|
@@ -98113,7 +97981,6 @@ function findProcessor(model) {
|
|
|
98113
97981
|
}
|
|
98114
97982
|
|
|
98115
97983
|
|
|
98116
|
-
|
|
98117
97984
|
class ValueProcessor {
|
|
98118
97985
|
/**
|
|
98119
97986
|
* @template Container, Value
|
|
@@ -98160,7 +98027,6 @@ const processors = [
|
|
|
98160
98027
|
p(isInstanceOf(ObservedBoolean), extractorGetValue, format),
|
|
98161
98028
|
p(isInstanceOf(ObservedValue), extractorGetValue, format),
|
|
98162
98029
|
p(isInstanceOf(ObservedString), extractorGetValue, format),
|
|
98163
|
-
p(isInstanceOf(LinearValue), extractorGetValue, formatNumber),
|
|
98164
98030
|
p(isInstanceOf(BoundedValue), extractBoundedValue, formatArray),
|
|
98165
98031
|
p(isInstanceOf(Stat), extractorGetValue, formatNumber),
|
|
98166
98032
|
p(isInstanceOf(Vector1), extractorGetValue, formatNumber),
|
package/package.json
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import Vector3 from "../../src/core/geom/Vector3js";
|
|
2
|
+
import { NumericInterval } from "../../src/core/math/interval/NumericInterval.js";
|
|
3
|
+
import { CellFilterCellMatcher } from "../../src/generation/filtering/CellFilterCellMatcher.js";
|
|
4
|
+
import { CellFilterCache } from "../../src/generation/filtering/numeric/CellFilterCache.js";
|
|
5
|
+
import { CellFilterLiteralFloat } from "../../src/generation/filtering/numeric/CellFilterLiteralFloat.js";
|
|
6
|
+
import { CellFilterAngleToNormal } from "../../src/generation/filtering/numeric/complex/CellFilterAngleToNormal.js";
|
|
7
|
+
import { CellFilterGaussianBlur } from "../../src/generation/filtering/numeric/complex/CellFilterGaussianBlur.js";
|
|
8
|
+
import { CellFilterSimplexNoise } from "../../src/generation/filtering/numeric/complex/CellFilterSimplexNoise.js";
|
|
9
|
+
import { CellFilterAdd } from "../../src/generation/filtering/numeric/math/algebra/CellFilterAdd.js";
|
|
10
|
+
import { CellFilterDivide } from "../../src/generation/filtering/numeric/math/algebra/CellFilterDivide.js";
|
|
11
|
+
import { CellFilterMultiply } from "../../src/generation/filtering/numeric/math/algebra/CellFilterMultiply.js";
|
|
12
|
+
import { CellFilterSubtract } from "../../src/generation/filtering/numeric/math/algebra/CellFilterSubtract.js";
|
|
13
|
+
import { CellFilterClamp } from "../../src/generation/filtering/numeric/math/CellFilterClamp.js";
|
|
14
|
+
import { CellFilterInverseLerp } from "../../src/generation/filtering/numeric/math/CellFilterInverseLerp.js";
|
|
15
|
+
import { CellFilterLerp } from "../../src/generation/filtering/numeric/math/CellFilterLerp.js";
|
|
16
|
+
import { CellFilterMax2 } from "../../src/generation/filtering/numeric/math/CellFilterMax2.js";
|
|
17
|
+
import { CellFilterOneMinus } from "../../src/generation/filtering/numeric/math/CellFilterOneMinus.js";
|
|
18
|
+
import { CellFilterSmoothStep } from "../../src/generation/filtering/numeric/math/CellFilterSmoothStep.js";
|
|
19
|
+
import { CellFilterStep } from "../../src/generation/filtering/numeric/math/CellFilterStep.js";
|
|
20
|
+
import { CellFilterCubicFunction } from "../../src/generation/filtering/numeric/math/poly/CellFilterCubicFunction.js";
|
|
21
|
+
import {
|
|
22
|
+
CellFilterSampleLayerLinear
|
|
23
|
+
} from "../../src/generation/filtering/numeric/sampling/CellFilterSampleLayerLinear.js";
|
|
24
|
+
import { GridTaskActionRuleSet } from "../../src/generation/grid/generation/discrete/GridTaskActionRuleSet.js";
|
|
8
25
|
import { GridTaskCellularAutomata } from "../../src/generation/grid/generation/discrete/GridTaskCellularAutomata.js";
|
|
9
|
-
import {
|
|
10
|
-
import { GridActionRuleSet } from "../../src/generation/markers/GridActionRuleSet.js";
|
|
26
|
+
import { GridTaskConnectRooms } from "../../src/generation/grid/generation/discrete/GridTaskConnectRooms.js";
|
|
11
27
|
import {
|
|
12
28
|
GridTaskBuildSourceDistanceMap
|
|
13
29
|
} from "../../src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.js";
|
|
14
|
-
import { CellMatcherAnd } from "../../src/generation/rules/logic/CellMatcherAnd.js";
|
|
15
|
-
import { GridCellActionPlaceTags } from "../../src/generation/placement/action/GridCellActionPlaceTags.js";
|
|
16
30
|
import {
|
|
17
|
-
|
|
18
|
-
} from "../../src/generation/
|
|
19
|
-
import {
|
|
20
|
-
import { mir_generator_place_bases } from "./generators/mir_generator_place_bases.js";
|
|
21
|
-
import { matcher_tag_traversable_unoccupied } from "./rules/matcher_tag_traversable_unoccupied.js";
|
|
22
|
-
import { mir_generator_place_starting_point } from "./generators/mir_generator_place_starting_point.js";
|
|
23
|
-
import { GridTaskConnectRooms } from "../../src/generation/grid/generation/discrete/GridTaskConnectRooms.js";
|
|
24
|
-
import { matcher_tag_traversable } from "./rules/matcher_tag_traversable.js";
|
|
31
|
+
GridTaskDensityMarkerDistribution
|
|
32
|
+
} from "../../src/generation/grid/generation/GridTaskDensityMarkerDistribution.js";
|
|
33
|
+
import { GridTaskSequence } from "../../src/generation/grid/generation/GridTaskSequence.js";
|
|
25
34
|
import { GridTaskGenerateRoads } from "../../src/generation/grid/generation/road/GridTaskGenerateRoads.js";
|
|
26
|
-
import {
|
|
35
|
+
import { GridTaskGroup } from "../../src/generation/GridTaskGroup.js";
|
|
36
|
+
import { GridActionRuleSet } from "../../src/generation/markers/GridActionRuleSet.js";
|
|
37
|
+
import { GridCellActionPlaceMarker } from "../../src/generation/markers/GridCellActionPlaceMarker.js";
|
|
27
38
|
import { MarkerNodeMatcherByType } from "../../src/generation/markers/matcher/MarkerNodeMatcherByType.js";
|
|
28
39
|
import {
|
|
29
|
-
|
|
30
|
-
} from "../../src/generation/
|
|
31
|
-
import {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
import {
|
|
35
|
-
import { CellFilterLiteralFloat } from "../../src/generation/filtering/numeric/CellFilterLiteralFloat.js";
|
|
36
|
-
import { MirGridLayers } from "./grid/MirGridLayers.js";
|
|
37
|
-
import { CellFilterLerp } from "../../src/generation/filtering/numeric/math/CellFilterLerp.js";
|
|
40
|
+
MarkerNodeTransformerRecordProperty
|
|
41
|
+
} from "../../src/generation/markers/transform/MarkerNodeTransformerRecordProperty.js";
|
|
42
|
+
import {
|
|
43
|
+
MarkerNodeTransformerYRotateByFilter
|
|
44
|
+
} from "../../src/generation/markers/transform/MarkerNodeTransformerYRotateByFilter.js";
|
|
45
|
+
import { GridCellActionPlaceTags } from "../../src/generation/placement/action/GridCellActionPlaceTags.js";
|
|
38
46
|
import {
|
|
39
47
|
GridCellActionWriteFilterToLayer
|
|
40
48
|
} from "../../src/generation/placement/action/GridCellActionWriteFilterToLayer.js";
|
|
41
|
-
import { CellMatcherAny } from "../../src/generation/rules/CellMatcherAny.js";
|
|
42
|
-
import { CellFilterGaussianBlur } from "../../src/generation/filtering/numeric/complex/CellFilterGaussianBlur.js";
|
|
43
49
|
import { GridCellActionSequence } from "../../src/generation/placement/action/util/GridCellActionSequence.js";
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
CellFilterSampleLayerLinear
|
|
47
|
-
} from "../../src/generation/filtering/numeric/sampling/CellFilterSampleLayerLinear.js";
|
|
48
|
-
import { CellFilterAngleToNormal } from "../../src/generation/filtering/numeric/complex/CellFilterAngleToNormal.js";
|
|
49
|
-
import Vector3 from "../../src/core/geom/Vector3js";
|
|
50
|
-
import { CellFilterOneMinus } from "../../src/generation/filtering/numeric/math/CellFilterOneMinus.js";
|
|
51
|
-
import { CellFilterSmoothStep } from "../../src/generation/filtering/numeric/math/CellFilterSmoothStep.js";
|
|
52
|
-
import { SampleNoise20_0 } from "./filters/SampleNoise20_0.js";
|
|
53
|
-
import { SampleGroundMoistureFilter } from "./filters/SampleGroundMoistureFilter.js";
|
|
54
|
-
import { GridTaskSequence } from "../../src/generation/grid/generation/GridTaskSequence.js";
|
|
55
|
-
import { CellFilterSubtract } from "../../src/generation/filtering/numeric/math/algebra/CellFilterSubtract.js";
|
|
56
|
-
import { CellFilterCache } from "../../src/generation/filtering/numeric/CellFilterCache.js";
|
|
57
|
-
import { CellFilterInverseLerp } from "../../src/generation/filtering/numeric/math/CellFilterInverseLerp.js";
|
|
58
|
-
import { CellFilterClamp } from "../../src/generation/filtering/numeric/math/CellFilterClamp.js";
|
|
50
|
+
import { GridCellPlacementRule } from "../../src/generation/placement/GridCellPlacementRule.js";
|
|
59
51
|
import {
|
|
60
|
-
|
|
61
|
-
} from "../../src/generation/
|
|
52
|
+
CellMatcherContainsMarkerWithinRadius
|
|
53
|
+
} from "../../src/generation/rules/cell/CellMatcherContainsMarkerWithinRadius.js";
|
|
54
|
+
import { CellMatcherGridPattern } from "../../src/generation/rules/cell/CellMatcherGridPattern.js";
|
|
62
55
|
import { GridPatternMatcherCell } from "../../src/generation/rules/cell/GridPatternMatcherCell.js";
|
|
63
|
-
import {
|
|
64
|
-
|
|
65
|
-
} from "../../src/generation/
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
56
|
+
import { CellMatcherAny } from "../../src/generation/rules/CellMatcherAny.js";
|
|
57
|
+
import { CellMatcherLayerBitMaskTest } from "../../src/generation/rules/CellMatcherLayerBitMaskTest.js";
|
|
58
|
+
import { CellMatcherAnd } from "../../src/generation/rules/logic/CellMatcherAnd.js";
|
|
59
|
+
import { CellMatcherNot } from "../../src/generation/rules/logic/CellMatcherNot.js";
|
|
60
|
+
import { SampleGroundMoistureFilter } from "./filters/SampleGroundMoistureFilter.js";
|
|
61
|
+
import { SampleNoise20_0 } from "./filters/SampleNoise20_0.js";
|
|
62
|
+
import { mir_generator_place_bases } from "./generators/mir_generator_place_bases.js";
|
|
63
|
+
import { mir_generator_place_road_decorators } from "./generators/mir_generator_place_road_decorators.js";
|
|
64
|
+
import { mir_generator_place_starting_point } from "./generators/mir_generator_place_starting_point.js";
|
|
65
|
+
import { GridTags } from "./grid/GridTags.js";
|
|
66
|
+
import { MirGridLayers } from "./grid/MirGridLayers.js";
|
|
70
67
|
import { matcher_not_play_area } from "./rules/matcher_not_play_area.js";
|
|
68
|
+
import { matcher_tag_traversable } from "./rules/matcher_tag_traversable.js";
|
|
69
|
+
import { matcher_tag_traversable_unoccupied } from "./rules/matcher_tag_traversable_unoccupied.js";
|
|
70
|
+
import { mir_matcher_attack_corridor } from "./rules/mir_matcher_attack_corridor.js";
|
|
71
71
|
|
|
72
72
|
export const SampleGenerator0 = new GridTaskGroup();
|
|
73
73
|
|
|
@@ -1,35 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
CellMatcherContainsMarkerWithinRadius
|
|
6
|
-
} from "../../../../src/generation/rules/cell/CellMatcherContainsMarkerWithinRadius.js";
|
|
7
|
-
import { GridCellActionPlaceTags } from "../../../../src/generation/placement/action/GridCellActionPlaceTags.js";
|
|
8
|
-
import { GridTags } from "../../grid/GridTags.js";
|
|
1
|
+
import { BuffObjectTypes } from "../../../../../../generator/BuffObjectTypes.js";
|
|
2
|
+
import { UnlockableElementsManager } from "../../../../../../model/unlocks/UnlockableElementsManager.js";
|
|
3
|
+
import { MirMarkerTypes } from "../../../../../generator/MirMarkerTypes.js";
|
|
9
4
|
import { bitwiseAnd } from "../../../../src/core/binary/operations/bitwiseAnd.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
GridTaskActionRuleSet
|
|
14
|
-
} from "../../../../src/generation/grid/generation/discrete/GridTaskCellActionRuleSet.js";
|
|
5
|
+
import { CellFilterLiteralFloat } from "../../../../src/generation/filtering/numeric/CellFilterLiteralFloat.js";
|
|
6
|
+
import { GridTaskActionRuleSet } from "../../../../src/generation/grid/generation/discrete/GridTaskActionRuleSet.js";
|
|
15
7
|
import { GridActionRuleSet } from "../../../../src/generation/markers/GridActionRuleSet.js";
|
|
8
|
+
import { GridCellActionPlaceMarker } from "../../../../src/generation/markers/GridCellActionPlaceMarker.js";
|
|
16
9
|
import { GridCellActionPlaceMarkerGroup } from "../../../../src/generation/markers/GridCellActionPlaceMarkerGroup.js";
|
|
17
|
-
import {
|
|
10
|
+
import { MarkerNodeMatcherAnd } from "../../../../src/generation/markers/matcher/MarkerNodeMatcherAnd.js";
|
|
11
|
+
import { MarkerNodeMatcherByType } from "../../../../src/generation/markers/matcher/MarkerNodeMatcherByType.js";
|
|
18
12
|
import {
|
|
19
13
|
MarkerNodeMatcherContainsTag
|
|
20
14
|
} from "../../../../src/generation/markers/matcher/MarkerNodeMatcherContainsTag.js";
|
|
15
|
+
import { RuleSelectionPolicyType } from "../../../../src/generation/markers/RuleSelectionPolicyType.js";
|
|
16
|
+
import { GridCellActionPlaceTags } from "../../../../src/generation/placement/action/GridCellActionPlaceTags.js";
|
|
17
|
+
import { GridCellActionSequence } from "../../../../src/generation/placement/action/util/GridCellActionSequence.js";
|
|
18
|
+
import { GridCellPlacementRule } from "../../../../src/generation/placement/GridCellPlacementRule.js";
|
|
19
|
+
import {
|
|
20
|
+
CellMatcherContainsMarkerWithinRadius
|
|
21
|
+
} from "../../../../src/generation/rules/cell/CellMatcherContainsMarkerWithinRadius.js";
|
|
22
|
+
import { CellMatcherGridPattern } from "../../../../src/generation/rules/cell/CellMatcherGridPattern.js";
|
|
23
|
+
import { GridPatternMatcherCell } from "../../../../src/generation/rules/cell/GridPatternMatcherCell.js";
|
|
21
24
|
import { CellMatcherAnd } from "../../../../src/generation/rules/logic/CellMatcherAnd.js";
|
|
22
|
-
import {
|
|
25
|
+
import { CellMatcherNot } from "../../../../src/generation/rules/logic/CellMatcherNot.js";
|
|
23
26
|
import { CellMatcherOr } from "../../../../src/generation/rules/logic/CellMatcherOr.js";
|
|
24
|
-
import {
|
|
25
|
-
import { MarkerNodeMatcherAnd } from "../../../../src/generation/markers/matcher/MarkerNodeMatcherAnd.js";
|
|
27
|
+
import { GridTags } from "../../grid/GridTags.js";
|
|
26
28
|
import { MirGridLayers } from "../../grid/MirGridLayers.js";
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import { GridPatternMatcherCell } from "../../../../src/generation/rules/cell/GridPatternMatcherCell.js";
|
|
30
|
-
import { BuffObjectTypes } from "../../../../../../generator/BuffObjectTypes.js";
|
|
31
|
-
import { UnlockableElementsManager } from "../../../../../../model/unlocks/UnlockableElementsManager.js";
|
|
32
|
-
import { GridCellActionSequence } from "../../../../src/generation/placement/action/util/GridCellActionSequence.js";
|
|
29
|
+
import { matcher_tag_not_traversable } from "../../rules/matcher_tag_not_traversable.js";
|
|
30
|
+
import { matcher_tag_traversable_unoccupied } from "../../rules/matcher_tag_traversable_unoccupied.js";
|
|
33
31
|
|
|
34
32
|
const TAG_MAJOR = 'Major Buff';
|
|
35
33
|
const TAG_MINOR = 'Minor Buff';
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { CellMatcherGridPattern } from "../../../src/generation/rules/cell/CellMatcherGridPattern.js";
|
|
4
|
-
import { GridActionRuleSet } from "../../../src/generation/markers/GridActionRuleSet.js";
|
|
5
|
-
import { GridCellActionPlaceTags } from "../../../src/generation/placement/action/GridCellActionPlaceTags.js";
|
|
6
|
-
import { GridTags } from "../grid/GridTags.js";
|
|
7
|
-
import { GridCellActionPlaceMarker } from "../../../src/generation/markers/GridCellActionPlaceMarker.js";
|
|
8
|
-
import { CellMatcherNot } from "../../../src/generation/rules/logic/CellMatcherNot.js";
|
|
9
|
-
import {
|
|
10
|
-
CellMatcherContainsMarkerWithinRadius
|
|
11
|
-
} from "../../../src/generation/rules/cell/CellMatcherContainsMarkerWithinRadius.js";
|
|
12
|
-
import { matcher_tag_traversable_unoccupied } from "../rules/matcher_tag_traversable_unoccupied.js";
|
|
1
|
+
import { MirMarkerTags } from "../../../../generator/MirMarkerTags.js";
|
|
2
|
+
import { MirMarkerTypes } from "../../../../generator/MirMarkerTypes.js";
|
|
13
3
|
import { bitwiseAnd } from "../../../src/core/binary/operations/bitwiseAnd.js";
|
|
14
|
-
import {
|
|
15
|
-
import { MarkerNodeMatcherByType } from "../../../src/generation/markers/matcher/MarkerNodeMatcherByType.js";
|
|
16
|
-
import { MirGridLayers } from "../grid/MirGridLayers.js";
|
|
4
|
+
import { Transform } from "../../../src/engine/ecs/transform/Transform.js";
|
|
17
5
|
import { CellFilterLiteralFloat } from "../../../src/generation/filtering/numeric/CellFilterLiteralFloat.js";
|
|
6
|
+
import { GridTaskActionRuleSet } from "../../../src/generation/grid/generation/discrete/GridTaskActionRuleSet.js";
|
|
7
|
+
import { MarkerNodeEmitterFromAction } from "../../../src/generation/markers/emitter/MarkerNodeEmitterFromAction.js";
|
|
18
8
|
import {
|
|
19
9
|
MarkerNodeEmitterGridCellAction
|
|
20
10
|
} from "../../../src/generation/markers/emitter/MarkerNodeEmitterGridCellAction.js";
|
|
21
11
|
import { MarkerNodeEmitterPredicated } from "../../../src/generation/markers/emitter/MarkerNodeEmitterPredicated.js";
|
|
12
|
+
import { GridActionRuleSet } from "../../../src/generation/markers/GridActionRuleSet.js";
|
|
13
|
+
import { GridCellActionPlaceMarker } from "../../../src/generation/markers/GridCellActionPlaceMarker.js";
|
|
14
|
+
import { GridCellActionPlaceMarkerGroup } from "../../../src/generation/markers/GridCellActionPlaceMarkerGroup.js";
|
|
15
|
+
import { MarkerNodeMatcherAny } from "../../../src/generation/markers/matcher/MarkerNodeMatcherAny.js";
|
|
16
|
+
import { MarkerNodeMatcherByType } from "../../../src/generation/markers/matcher/MarkerNodeMatcherByType.js";
|
|
22
17
|
import { GridDataNodePredicateNot } from "../../../src/generation/markers/predicate/GridDataNodePredicateNot.js";
|
|
23
18
|
import {
|
|
24
19
|
GridDataNodePredicateOverlaps
|
|
25
20
|
} from "../../../src/generation/markers/predicate/GridDataNodePredicateOverlaps.js";
|
|
26
|
-
import { MarkerNodeMatcherAny } from "../../../src/generation/markers/matcher/MarkerNodeMatcherAny.js";
|
|
27
|
-
import { MarkerNodeEmitterFromAction } from "../../../src/generation/markers/emitter/MarkerNodeEmitterFromAction.js";
|
|
28
|
-
import { Transform } from "../../../src/engine/ecs/transform/Transform.js";
|
|
29
21
|
import {
|
|
30
22
|
MarkerNodeTransformerOffsetPosition
|
|
31
23
|
} from "../../../src/generation/markers/transform/MarkerNodeTransformerOffsetPosition.js";
|
|
32
24
|
import {
|
|
33
25
|
MarkerNodeTransformerRecordUniqueRandomEnum
|
|
34
26
|
} from "../../../src/generation/markers/transform/MarkerNodeTransformerRecordUniqueRandomEnum.js";
|
|
35
|
-
import {
|
|
36
|
-
import { MirMarkerTags } from "../../../../generator/MirMarkerTags.js";
|
|
27
|
+
import { GridCellActionPlaceTags } from "../../../src/generation/placement/action/GridCellActionPlaceTags.js";
|
|
37
28
|
import { GridCellActionSequence } from "../../../src/generation/placement/action/util/GridCellActionSequence.js";
|
|
29
|
+
import { GridCellPlacementRule } from "../../../src/generation/placement/GridCellPlacementRule.js";
|
|
30
|
+
import {
|
|
31
|
+
CellMatcherContainsMarkerWithinRadius
|
|
32
|
+
} from "../../../src/generation/rules/cell/CellMatcherContainsMarkerWithinRadius.js";
|
|
33
|
+
import { CellMatcherGridPattern } from "../../../src/generation/rules/cell/CellMatcherGridPattern.js";
|
|
34
|
+
import { CellMatcherNot } from "../../../src/generation/rules/logic/CellMatcherNot.js";
|
|
35
|
+
import { GridTags } from "../grid/GridTags.js";
|
|
36
|
+
import { MirGridLayers } from "../grid/MirGridLayers.js";
|
|
37
|
+
import { matcher_tag_traversable_unoccupied } from "../rules/matcher_tag_traversable_unoccupied.js";
|
|
38
38
|
|
|
39
39
|
const pMatcher = new CellMatcherGridPattern();
|
|
40
40
|
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CellFilterLiteralFloat } from "../../../src/generation/filtering/numeric/CellFilterLiteralFloat.js";
|
|
2
|
+
import { GridTaskActionRuleSet } from "../../../src/generation/grid/generation/discrete/GridTaskActionRuleSet.js";
|
|
2
3
|
import { GridActionRuleSet } from "../../../src/generation/markers/GridActionRuleSet.js";
|
|
4
|
+
import { GridCellActionPlaceMarker } from "../../../src/generation/markers/GridCellActionPlaceMarker.js";
|
|
5
|
+
import { MarkerNodeMatcherAny } from "../../../src/generation/markers/matcher/MarkerNodeMatcherAny.js";
|
|
6
|
+
import { MarkerNodeMatcherByType } from "../../../src/generation/markers/matcher/MarkerNodeMatcherByType.js";
|
|
7
|
+
import { MarkerNodeMatcherContainsTag } from "../../../src/generation/markers/matcher/MarkerNodeMatcherContainsTag.js";
|
|
3
8
|
import { GridCellPlacementRule } from "../../../src/generation/placement/GridCellPlacementRule.js";
|
|
9
|
+
import {
|
|
10
|
+
CellMatcherContainsMarkerWithinRadius
|
|
11
|
+
} from "../../../src/generation/rules/cell/CellMatcherContainsMarkerWithinRadius.js";
|
|
4
12
|
import { CellMatcherGridPattern } from "../../../src/generation/rules/cell/CellMatcherGridPattern.js";
|
|
5
13
|
import { CellMatcherLayerBitMaskTest } from "../../../src/generation/rules/CellMatcherLayerBitMaskTest.js";
|
|
6
|
-
import { GridTags } from "../grid/GridTags.js";
|
|
7
14
|
import { CellMatcherAnd } from "../../../src/generation/rules/logic/CellMatcherAnd.js";
|
|
8
15
|
import { CellMatcherNot } from "../../../src/generation/rules/logic/CellMatcherNot.js";
|
|
9
|
-
import {
|
|
10
|
-
import { matcher_tag_traversable_unoccupied } from "../rules/matcher_tag_traversable_unoccupied.js";
|
|
11
|
-
import {
|
|
12
|
-
CellMatcherContainsMarkerWithinRadius
|
|
13
|
-
} from "../../../src/generation/rules/cell/CellMatcherContainsMarkerWithinRadius.js";
|
|
14
|
-
import { MarkerNodeMatcherByType } from "../../../src/generation/markers/matcher/MarkerNodeMatcherByType.js";
|
|
15
|
-
import { MarkerNodeMatcherContainsTag } from "../../../src/generation/markers/matcher/MarkerNodeMatcherContainsTag.js";
|
|
16
|
-
import { MarkerNodeMatcherAny } from "../../../src/generation/markers/matcher/MarkerNodeMatcherAny.js";
|
|
16
|
+
import { GridTags } from "../grid/GridTags.js";
|
|
17
17
|
import { MirGridLayers } from "../grid/MirGridLayers.js";
|
|
18
|
-
import {
|
|
18
|
+
import { matcher_tag_traversable_unoccupied } from "../rules/matcher_tag_traversable_unoccupied.js";
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
const matcher_tag_road = CellMatcherLayerBitMaskTest.from(GridTags.Road, MirGridLayers.Tags);
|
package/src/core/color/Color.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color_darken.d.ts","sourceRoot":"","sources":["../../../../../src/core/color/operations/color_darken.js"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,oCAHW,KAAK,WACL,MAAM,SAehB;sBAxBqB,aAAa"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { assert } from "../../assert.js";
|
|
2
|
+
import { clamp01 } from "../../math/clamp01.js";
|
|
3
|
+
import { Color } from "../Color.js";
|
|
4
|
+
import { linear_srgb_to_okhsv } from "../oklab/linear_srgb_to_okhsv.js";
|
|
5
|
+
import { okhsv_to_linear_srgb } from "../oklab/okhsv_to_linear_srgb.js";
|
|
6
|
+
|
|
7
|
+
const hsv = [0, 0, 0];
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* @param {Color} input
|
|
12
|
+
* @param {number} [amount]
|
|
13
|
+
*/
|
|
14
|
+
export function color_darken(input, amount = 1) {
|
|
15
|
+
assert.isNumber(amount, 'amount');
|
|
16
|
+
assert.greaterThanOrEqual(amount, 0, 'amount');
|
|
17
|
+
|
|
18
|
+
const r = new Color();
|
|
19
|
+
|
|
20
|
+
linear_srgb_to_okhsv(hsv, input.r, input.g, input.b);
|
|
21
|
+
|
|
22
|
+
hsv[2] = clamp01(hsv[2] * (1 - amount));
|
|
23
|
+
|
|
24
|
+
okhsv_to_linear_srgb(r, ...hsv);
|
|
25
|
+
|
|
26
|
+
return r;
|
|
27
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
*
|
|
3
3
|
* @param {Color} input
|
|
4
|
-
* @param {number} amount
|
|
4
|
+
* @param {number} [amount]
|
|
5
5
|
*/
|
|
6
|
-
export function color_desaturate(input: Color, amount
|
|
6
|
+
export function color_desaturate(input: Color, amount?: number): Color;
|
|
7
|
+
import { Color } from "../Color.js";
|
|
7
8
|
//# sourceMappingURL=color_desaturate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color_desaturate.d.ts","sourceRoot":"","sources":["../../../../../src/core/color/operations/color_desaturate.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"color_desaturate.d.ts","sourceRoot":"","sources":["../../../../../src/core/color/operations/color_desaturate.js"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,wCAHW,KAAK,WACL,MAAM,SAehB;sBAxBqB,aAAa"}
|
|
@@ -1,16 +1,27 @@
|
|
|
1
|
+
import { assert } from "../../assert.js";
|
|
1
2
|
import { clamp01 } from "../../math/clamp01.js";
|
|
3
|
+
import { Color } from "../Color.js";
|
|
4
|
+
import { linear_srgb_to_okhsv } from "../oklab/linear_srgb_to_okhsv.js";
|
|
5
|
+
import { okhsv_to_linear_srgb } from "../oklab/okhsv_to_linear_srgb.js";
|
|
6
|
+
|
|
7
|
+
const hsv = [0, 0, 0];
|
|
2
8
|
|
|
3
9
|
/**
|
|
4
10
|
*
|
|
5
11
|
* @param {Color} input
|
|
6
|
-
* @param {number} amount
|
|
12
|
+
* @param {number} [amount]
|
|
7
13
|
*/
|
|
8
|
-
export function color_desaturate(input, amount) {
|
|
9
|
-
|
|
14
|
+
export function color_desaturate(input, amount=1) {
|
|
15
|
+
assert.isNumber(amount,'amount');
|
|
16
|
+
assert.greaterThanOrEqual(amount,0,'amount');
|
|
17
|
+
|
|
18
|
+
const r = new Color();
|
|
19
|
+
|
|
20
|
+
linear_srgb_to_okhsv(hsv, input.r, input.g, input.b);
|
|
10
21
|
|
|
11
|
-
|
|
22
|
+
hsv[1] = clamp01(hsv[1] * (1 - amount));
|
|
12
23
|
|
|
13
|
-
r
|
|
24
|
+
okhsv_to_linear_srgb(r, ...hsv);
|
|
14
25
|
|
|
15
26
|
return r;
|
|
16
27
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color_lighten.d.ts","sourceRoot":"","sources":["../../../../../src/core/color/operations/color_lighten.js"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,qCAHW,KAAK,WACL,MAAM,SAehB;sBAxBqB,aAAa"}
|