@woosh/meep-engine 2.118.8 → 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.
Files changed (74) hide show
  1. package/build/meep.cjs +10 -144
  2. package/build/meep.min.js +1 -1
  3. package/build/meep.module.js +10 -144
  4. package/package.json +1 -1
  5. package/samples/generation/SampleGenerator0.js +55 -55
  6. package/samples/generation/generators/interactive/mir_generator_place_buff_objects.js +21 -23
  7. package/samples/generation/generators/mir_generator_place_bases.js +20 -20
  8. package/samples/generation/generators/mir_generator_place_road_decorators.js +11 -11
  9. package/src/core/geom/2d/quad-tree/qt_collect_data_all.d.ts +9 -0
  10. package/src/core/geom/2d/quad-tree/qt_collect_data_all.d.ts.map +1 -0
  11. package/src/core/geom/2d/quad-tree/qt_collect_data_all.js +29 -0
  12. package/src/core/math/gaussian.d.ts.map +1 -1
  13. package/src/core/math/gaussian.js +4 -1
  14. package/src/core/math/physics/pdf/pdf_GGX.d.ts +3 -3
  15. package/src/core/math/physics/pdf/pdf_GGX.d.ts.map +1 -1
  16. package/src/core/math/physics/pdf/pdf_GGX.js +7 -6
  17. package/src/core/model/ObservedBoolean.js +1 -1
  18. package/src/core/model/node-graph/json/deserializeNodeGraphFromJSON.d.ts +1 -1
  19. package/src/core/model/node-graph/json/deserializeNodeGraphFromJSON.js +7 -7
  20. package/src/core/model/object/validatedObjectValueByKey.js +1 -1
  21. package/src/core/model/reactive/transform/{ReactiveTypeInferrence.d.ts → inferReactiveExpressionTypes.d.ts} +1 -1
  22. package/src/core/model/reactive/transform/inferReactiveExpressionTypes.d.ts.map +1 -0
  23. package/src/core/model/reactive/transform/inferReactiveExpressionTypes.js +60 -0
  24. package/src/core/model/reactive/trigger/ReactiveTrigger.js +1 -1
  25. package/src/core/process/delay.d.ts.map +1 -1
  26. package/src/core/process/delay.js +6 -0
  27. package/src/core/process/task/TaskGroup.d.ts.map +1 -1
  28. package/src/core/process/task/TaskGroup.js +3 -8
  29. package/src/core/process/undo/ActionGroup.d.ts.map +1 -1
  30. package/src/core/process/undo/ActionGroup.js +6 -9
  31. package/src/core/process/worker/extractTransferables.d.ts +3 -2
  32. package/src/core/process/worker/extractTransferables.d.ts.map +1 -1
  33. package/src/core/process/worker/extractTransferables.js +32 -12
  34. package/src/engine/ecs/dynamic_actions/rules/DynamicRuleDescription.d.ts.map +1 -1
  35. package/src/engine/ecs/dynamic_actions/rules/DynamicRuleDescription.js +3 -1
  36. package/src/engine/graphics/GraphicsEngine.d.ts.map +1 -1
  37. package/src/engine/graphics/GraphicsEngine.js +4 -0
  38. package/src/engine/graphics/ecs/camera/CameraSystem.d.ts.map +1 -1
  39. package/src/engine/graphics/ecs/camera/CameraSystem.js +4 -0
  40. package/src/generation/grid/actions/ContinuousGridCellAction.d.ts.map +1 -1
  41. package/src/generation/grid/actions/ContinuousGridCellAction.js +6 -8
  42. package/src/generation/grid/actions/ContinuousGridCellActionSetTerrainHeight.d.ts.map +1 -1
  43. package/src/generation/grid/actions/ContinuousGridCellActionSetTerrainHeight.js +20 -22
  44. package/src/generation/grid/generation/GridTaskDensityMarkerDistribution.d.ts.map +1 -1
  45. package/src/generation/grid/generation/GridTaskDensityMarkerDistribution.js +23 -28
  46. package/src/generation/grid/generation/GridTaskExecuteRuleTimes.d.ts.map +1 -1
  47. package/src/generation/grid/generation/GridTaskExecuteRuleTimes.js +7 -10
  48. package/src/generation/grid/generation/GridTaskSequence.d.ts.map +1 -1
  49. package/src/generation/grid/generation/GridTaskSequence.js +2 -5
  50. package/src/generation/grid/generation/discrete/{GridTaskCellActionRuleSet.d.ts → GridTaskActionRuleSet.d.ts} +1 -1
  51. package/src/generation/grid/generation/discrete/GridTaskActionRuleSet.d.ts.map +1 -0
  52. package/src/generation/grid/generation/discrete/{GridTaskCellActionRuleSet.js → GridTaskActionRuleSet.js} +13 -16
  53. package/src/generation/grid/generation/discrete/GridTaskConnectRooms.d.ts.map +1 -1
  54. package/src/generation/grid/generation/discrete/GridTaskConnectRooms.js +51 -53
  55. package/src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.d.ts.map +1 -1
  56. package/src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.js +20 -23
  57. package/src/generation/grid/generation/grid/select/CellSupplierBestN.d.ts.map +1 -1
  58. package/src/generation/grid/generation/grid/select/CellSupplierBestN.js +38 -39
  59. package/src/generation/grid/generation/grid/select/CellSupplierPathUpHill.d.ts.map +1 -1
  60. package/src/generation/grid/generation/grid/select/CellSupplierPathUpHill.js +8 -11
  61. package/src/generation/grid/generation/road/PathEndPoint.d.ts.map +1 -1
  62. package/src/generation/grid/generation/road/PathEndPoint.js +8 -10
  63. package/src/generation/grid/generation/road/RoadConnection.d.ts.map +1 -1
  64. package/src/generation/grid/generation/road/RoadConnection.js +4 -5
  65. package/src/generation/markers/GridCellActionPlaceMarker.d.ts.map +1 -1
  66. package/src/generation/markers/GridCellActionPlaceMarker.js +7 -5
  67. package/src/view/common/LabelView.d.ts.map +1 -1
  68. package/src/view/common/LabelView.js +0 -3
  69. package/src/core/model/LinearValue.d.ts +0 -88
  70. package/src/core/model/LinearValue.d.ts.map +0 -1
  71. package/src/core/model/LinearValue.js +0 -140
  72. package/src/core/model/reactive/transform/ReactiveTypeInferrence.d.ts.map +0 -1
  73. package/src/core/model/reactive/transform/ReactiveTypeInferrence.js +0 -54
  74. package/src/generation/grid/generation/discrete/GridTaskCellActionRuleSet.d.ts.map +0 -1
@@ -1,22 +1,19 @@
1
- import { GridTaskGenerator } from "../../GridTaskGenerator.js";
2
1
  import { assert } from "../../../../core/assert.js";
2
+ import { GridTaskGenerator } from "../../GridTaskGenerator.js";
3
3
 
4
4
  export class GridTaskActionRuleSet extends GridTaskGenerator {
5
- constructor() {
6
- super();
7
-
8
- /**
9
- *
10
- * @type {GridActionRuleSet}
11
- */
12
- this.rules = null;
13
-
14
- /**
15
- *
16
- * @type {number}
17
- */
18
- this.resolution = 1;
19
- }
5
+
6
+ /**
7
+ *
8
+ * @type {GridActionRuleSet}
9
+ */
10
+ rules = null;
11
+
12
+ /**
13
+ *
14
+ * @type {number}
15
+ */
16
+ resolution = 1;
20
17
 
21
18
  /**
22
19
  *
@@ -1 +1 @@
1
- {"version":3,"file":"GridTaskConnectRooms.d.ts","sourceRoot":"","sources":["../../../../../../src/generation/grid/generation/discrete/GridTaskConnectRooms.js"],"names":[],"mappings":"AAqBA;;;;;;;GAOG;AACH;IAuDI;;;;;;;OAOG;IACH;;;;;QAFa,oBAAoB,CAiBhC;IA1EG;;;OAGG;IACH,qBAAmB;IAEnB;;;OAGG;IACH,wBAAwC;IAExC;;;OAGG;IACH,yBAFU,MAAM,EAAE,CASjB;IAED;;;OAGG;IACH,uBAFU,MAAM,EAAE,CAajB;IAED,kBAAkB;IAElB;;;OAGG;IACH,uBAAkB;IA4BtB;;;;;OAKG;IACH,sCAHW,OAAO,GACL,IAAI,CAqChB;IAED;;;;;;OAMG;IACH,qBALW,MAAM,KACN,MAAM,6BAEN,MAAM,QA8DhB;IAED;;;;;;;OAOG;IACH,mCANW,OAAO,aACP,WAAW,6BAEX,MAAM,GACJ,OAAO,CAwFnB;IAED;;;;;;;;OAQG;IACH,gBAPW,MAAM,KACN,MAAM,aACN,MAAM,6BAEN,WAAW,aACX,MAAM,QAuEhB;IAED;;;;;;;OAOG;IACH,mCALW,MAAM,EAAE,aACR,MAAM,aACN,MAAM,EAAE,GACN,SAAS,CAyBrB;IAED;;;;;;;OAOG;IACH,0BANW,MAAM,0BAEN,MAAM,EAAE,aACR,MAAM,aACN,MAAM,EAAE,QAWlB;IAED,iDAuEC;CACJ;kCA1fiC,4BAA4B;oBAT1C,kCAAkC;iBAErC,uCAAuC;uBANjC,mCAAmC;0BAUhC,0DAA0D;sBAH9D,4CAA4C"}
1
+ {"version":3,"file":"GridTaskConnectRooms.d.ts","sourceRoot":"","sources":["../../../../../../src/generation/grid/generation/discrete/GridTaskConnectRooms.js"],"names":[],"mappings":"AAqBA;;;;;;;GAOG;AACH;IAqDI;;;;;;;OAOG;IACH;;;;;QAFa,oBAAoB,CAiBhC;IA1ED;;;OAGG;IACH,qBAAe;IAEf;;;OAGG;IACH,wBAAoC;IAEpC;;;OAGG;IACH,yBAFU,MAAM,EAAE,CAShB;IAEF;;;OAGG;IACH,uBAFU,MAAM,EAAE,CAahB;IAEF,kBAAc;IAEd;;;OAGG;IACH,uBAAa;IA4Bb;;;;;OAKG;IACH,sCAHW,OAAO,GACL,IAAI,CAqChB;IAED;;;;;;OAMG;IACH,qBALW,MAAM,KACN,MAAM,6BAEN,MAAM,QA8DhB;IAED;;;;;;;OAOG;IACH,mCANW,OAAO,aACP,WAAW,6BAEX,MAAM,GACJ,OAAO,CAwFnB;IAED;;;;;;;;OAQG;IACH,gBAPW,MAAM,KACN,MAAM,aACN,MAAM,6BAEN,WAAW,aACX,MAAM,QAuEhB;IAED;;;;;;;OAOG;IACH,mCALW,MAAM,EAAE,aACR,MAAM,aACN,MAAM,EAAE,GACN,SAAS,CAyBrB;IAED;;;;;;;OAOG;IACH,0BANW,MAAM,0BAEN,MAAM,EAAE,aACR,MAAM,aACN,MAAM,EAAE,QAWlB;IAED,iDAuEC;CACJ;kCAxfiC,4BAA4B;oBAT1C,kCAAkC;iBAErC,uCAAuC;uBANjC,mCAAmC;0BAUhC,0DAA0D;sBAH9D,4CAA4C"}
@@ -28,59 +28,57 @@ const ESTIMATED_TILES_PER_ROOM = 900;
28
28
  * 5) perform the connection, expand the "connected" room and repeat steps from 3
29
29
  */
30
30
  export class GridTaskConnectRooms extends GridTaskGenerator {
31
- constructor() {
32
- super();
33
-
34
- /**
35
- * Matches a room tile
36
- * @type {CellMatcher}
37
- */
38
- this.matcher = null;
39
-
40
- /**
41
- * Matches tiles that can be tunneled through
42
- * @type {CellMatcher}
43
- */
44
- this.modifiable = matcher_tag_unoccupied;
45
-
46
- /**
47
- *
48
- * @type {number[]}
49
- */
50
- this.neighbourhoodSearchMask = [
51
- 0, -1,
52
-
53
- -1, 0,
54
- 1, 0,
55
-
56
- 0, 1,
57
- ];
58
-
59
- /**
60
- *
61
- * @type {number[]}
62
- */
63
- this.neighbourhoodDrawMask = [
64
- -1, -1,
65
- 0, -1,
66
- 1, -1,
67
-
68
- -1, 0,
69
- 1, 0,
70
-
71
- -1, 1,
72
- 0, 1,
73
- 1, 1
74
- ];
75
-
76
- this.thickness = 3;
77
-
78
- /**
79
- * Action to perform on created corridors
80
- * @type {GridCellAction}
81
- */
82
- this.action = null
83
- }
31
+
32
+ /**
33
+ * Matches a room tile
34
+ * @type {CellMatcher}
35
+ */
36
+ matcher = null;
37
+
38
+ /**
39
+ * Matches tiles that can be tunneled through
40
+ * @type {CellMatcher}
41
+ */
42
+ modifiable = matcher_tag_unoccupied;
43
+
44
+ /**
45
+ *
46
+ * @type {number[]}
47
+ */
48
+ neighbourhoodSearchMask = [
49
+ 0, -1,
50
+
51
+ -1, 0,
52
+ 1, 0,
53
+
54
+ 0, 1,
55
+ ];
56
+
57
+ /**
58
+ *
59
+ * @type {number[]}
60
+ */
61
+ neighbourhoodDrawMask = [
62
+ -1, -1,
63
+ 0, -1,
64
+ 1, -1,
65
+
66
+ -1, 0,
67
+ 1, 0,
68
+
69
+ -1, 1,
70
+ 0, 1,
71
+ 1, 1
72
+ ];
73
+
74
+ thickness = 3;
75
+
76
+ /**
77
+ * Action to perform on created corridors
78
+ * @type {GridCellAction}
79
+ */
80
+ action = null
81
+
84
82
 
85
83
  /**
86
84
  *
@@ -1 +1 @@
1
- {"version":3,"file":"GridTaskBuildSourceDistanceMap.d.ts","sourceRoot":"","sources":["../../../../../../../src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.js"],"names":[],"mappings":"AAUA;;GAEG;AACH;IA6BI;;;;;;;OAOG;IACH;;;;;;uCAgBC;IAjDG;;;OAGG;IACH,2BAAyB;IAEzB;;;OAGG;IACH,yBAAuB;IAEvB;;;OAGG;IACH,cAAiB;IAEjB;;;OAGG;IACH,SAFU,MAAM,CAEI;IA6BxB,iDA8IC;CACJ;kCA3MiC,+BAA+B;sBAJ3C,+CAA+C"}
1
+ {"version":3,"file":"GridTaskBuildSourceDistanceMap.d.ts","sourceRoot":"","sources":["../../../../../../../src/generation/grid/generation/discrete/layer/GridTaskBuildSourceDistanceMap.js"],"names":[],"mappings":"AAUA;;GAEG;AACH;IA0BI;;;;;;;OAOG;IACH;;;;;;uCAgBC;IAhDD;;;OAGG;IACH,2BAAqB;IAErB;;;OAGG;IACH,yBAAmB;IAEnB;;;OAGG;IACH,cAAa;IAEb;;;OAGG;IACH,SAFU,MAAM,CAEA;IA4BhB,iDA8IC;CACJ;kCAxMiC,+BAA+B;sBAJ3C,+CAA+C"}
@@ -12,33 +12,30 @@ import { GridTaskGenerator } from "../../../GridTaskGenerator.js";
12
12
  * Build a map of distances across the grid, using 2 concepts: source cells and passable cells. Source cells are where the distance is 0, and passable cells are those that can be travelled through
13
13
  */
14
14
  export class GridTaskBuildSourceDistanceMap extends GridTaskGenerator {
15
- constructor() {
16
- super();
17
15
 
18
- /**
19
- *
20
- * @type {CellMatcher}
21
- */
22
- this.sourceMatcher = null;
16
+ /**
17
+ *
18
+ * @type {CellMatcher}
19
+ */
20
+ sourceMatcher = null;
23
21
 
24
- /**
25
- *
26
- * @type {CellMatcher}
27
- */
28
- this.passMatcher = null;
22
+ /**
23
+ *
24
+ * @type {CellMatcher}
25
+ */
26
+ passMatcher = null;
29
27
 
30
- /**
31
- * ID of the target layer
32
- * @type {String}
33
- */
34
- this.layer = null;
28
+ /**
29
+ * ID of the target layer
30
+ * @type {String}
31
+ */
32
+ layer = null;
35
33
 
36
- /**
37
- *
38
- * @type {number}
39
- */
40
- this.initial = 65535;
41
- }
34
+ /**
35
+ *
36
+ * @type {number}
37
+ */
38
+ initial = 65535;
42
39
 
43
40
  /**
44
41
  *
@@ -1 +1 @@
1
- {"version":3,"file":"CellSupplierBestN.d.ts","sourceRoot":"","sources":["../../../../../../../src/generation/grid/generation/grid/select/CellSupplierBestN.js"],"names":[],"mappings":"AAyBA;IAwCI;;;;;OAKG;IACH,0FAoBC;IA7DG;;;OAGG;IACH,SAFU,aAAW,IAAI,CAEN;IACnB;;;OAGG;IACH,QAFU,MAAM,CAED;IACf;;;OAGG;IACH,UAFU;QAAC,CAAC,EAAC,MAAM,CAAC;QAAC,CAAC,EAAC,MAAM,CAAC;QAAC,QAAQ,EAAC,MAAM,CAAA;KAAC,EAAE,CAE/B;IAElB;;;OAGG;IACH,WAFU,cAAY,IAAI,CAEL;IAErB;;;OAGG;IACH,OAFU,MAAM,CAEF;IAEd;;;OAGG;IACH,gBAFU,OAAO,CAEU;IA+B/B,uCA8EC;CAgBJ;6BA3L4B,mBAAmB"}
1
+ {"version":3,"file":"CellSupplierBestN.d.ts","sourceRoot":"","sources":["../../../../../../../src/generation/grid/generation/grid/select/CellSupplierBestN.js"],"names":[],"mappings":"AAyBA;IAsCI;;;;;OAKG;IACH,0FAqBC;IA/DD;;;OAGG;IACH,SAFU,aAAW,IAAI,CAEV;IAEf;;;OAGG;IACH,QAFU,MAAM,CAEL;IAEX;;;OAGG;IACH,UAFU;QAAC,CAAC,EAAC,MAAM,CAAC;QAAC,CAAC,EAAC,MAAM,CAAC;QAAC,QAAQ,EAAC,MAAM,CAAA;KAAC,EAAE,CAEnC;IAEd;;;OAGG;IACH,WAFU,cAAY,IAAI,CAET;IAEjB;;;OAGG;IACH,OAFU,MAAM,CAEN;IAEV;;;OAGG;IACH,gBAFU,OAAO,CAEM;IA+BvB,uCA8EC;CAgBJ;6BAvL4B,mBAAmB"}
@@ -1,7 +1,7 @@
1
- import { CellSupplier } from "./CellSupplier.js";
2
1
  import { assert } from "../../../../../core/assert.js";
3
- import { CellMatcherAny } from "../../../../rules/CellMatcherAny.js";
4
2
  import { PI_HALF } from "../../../../../core/math/PI_HALF.js";
3
+ import { CellMatcherAny } from "../../../../rules/CellMatcherAny.js";
4
+ import { CellSupplier } from "./CellSupplier.js";
5
5
 
6
6
  /**
7
7
  *
@@ -24,44 +24,42 @@ function byIndex(a, b) {
24
24
  }
25
25
 
26
26
  export class CellSupplierBestN extends CellSupplier {
27
- constructor() {
28
- super();
29
-
30
-
31
- /**
32
- *
33
- * @type {CellFilter|null}
34
- */
35
- this.fitness = null;
36
- /**
37
- *
38
- * @type {number}
39
- */
40
- this.cursor = 0;
41
- /**
42
- *
43
- * @type {{x:number, y:number, rotation:number}[]}
44
- */
45
- this.elements = [];
46
27
 
47
- /**
48
- *
49
- * @type {CellMatcher|null}
50
- */
51
- this.predicate = null;
52
-
53
- /**
54
- *
55
- * @type {number}
56
- */
57
- this.limit = 0;
58
-
59
- /**
60
- *
61
- * @type {boolean}
62
- */
63
- this.allow_rotation = false;
64
- }
28
+ /**
29
+ *
30
+ * @type {CellFilter|null}
31
+ */
32
+ fitness = null;
33
+
34
+ /**
35
+ *
36
+ * @type {number}
37
+ */
38
+ cursor = 0;
39
+
40
+ /**
41
+ *
42
+ * @type {{x:number, y:number, rotation:number}[]}
43
+ */
44
+ elements = [];
45
+
46
+ /**
47
+ *
48
+ * @type {CellMatcher|null}
49
+ */
50
+ predicate = null;
51
+
52
+ /**
53
+ *
54
+ * @type {number}
55
+ */
56
+ limit = 0;
57
+
58
+ /**
59
+ *
60
+ * @type {boolean}
61
+ */
62
+ allow_rotation = false;
65
63
 
66
64
  /**
67
65
  * @param {CellFilter} fitness
@@ -75,6 +73,7 @@ export class CellSupplierBestN extends CellSupplier {
75
73
  limit = 1,
76
74
  allow_rotation = false
77
75
  }) {
76
+
78
77
  assert.isNumber(limit, 'limit');
79
78
  assert.isNonNegativeInteger(limit, 'limit');
80
79
  assert.equal(fitness.isCellFilter, true, 'fitness.isCellFilter !== true');
@@ -1 +1 @@
1
- {"version":3,"file":"CellSupplierPathUpHill.d.ts","sourceRoot":"","sources":["../../../../../../../src/generation/grid/generation/grid/select/CellSupplierPathUpHill.js"],"names":[],"mappings":"AAUA;;;GAGG;AACH;IA4CI;;;;OAIG;IACH,4EAUC;IAvDG;;;OAGG;IACH,QAFU,cAAY,IAAI,CAER;IAElB;;;OAGG;IACH,OAFU,aAAW,IAAI,CAER;IAEjB;;;;OAIG;IACH,mBAA8B;IAC9B;;;;OAIG;IACH,sBAAiC;IAEjC;;;;OAIG;IACH,wBAA2B;IAE3B;;;;OAIG;IACH,eAAkB;IAoBtB,uCAiCC;CA8EJ;6BA1L4B,mBAAmB"}
1
+ {"version":3,"file":"CellSupplierPathUpHill.d.ts","sourceRoot":"","sources":["../../../../../../../src/generation/grid/generation/grid/select/CellSupplierPathUpHill.js"],"names":[],"mappings":"AAUA;;;GAGG;AACH;IAyCI;;;;OAIG;IACH,4EAUC;IAtDG;;;OAGG;IACH,QAFU,cAAY,IAAI,CAEZ;IAEd;;;OAGG;IACH,OAFU,aAAW,IAAI,CAEZ;IAEb;;;;OAIG;IACH,mBAA0B;IAC1B;;;;OAIG;IACH,sBAA6B;IAE7B;;;;OAIG;IACH,wBAAuB;IAEvB;;;;OAIG;IACH,eAAc;IAmBlB,uCAiCC;CA8EJ;6BArL4B,mBAAmB"}
@@ -1,6 +1,6 @@
1
- import { CellSupplier } from "./CellSupplier.js";
2
- import { BitSet } from "../../../../../core/binary/BitSet.js";
3
1
  import { assert } from "../../../../../core/assert.js";
2
+ import { BitSet } from "../../../../../core/binary/BitSet.js";
3
+ import { CellSupplier } from "./CellSupplier.js";
4
4
 
5
5
  /**
6
6
  *
@@ -13,48 +13,45 @@ const scratch_neighbours = new Uint32Array(4);
13
13
  * Useful for tracing paths between features, such as path between a shipyard and the nearest water source
14
14
  */
15
15
  export class CellSupplierPathUpHill extends CellSupplier {
16
- constructor() {
17
- super();
18
16
 
19
17
  /**
20
18
  *
21
19
  * @type {CellMatcher|null}
22
20
  */
23
- this.source = null;
21
+ source = null;
24
22
 
25
23
  /**
26
24
  *
27
25
  * @type {CellFilter|null}
28
26
  */
29
- this.value = null;
27
+ value = null;
30
28
 
31
29
  /**
32
30
  *
33
31
  * @type {BitSet}
34
32
  * @private
35
33
  */
36
- this.__open_set = new BitSet();
34
+ __open_set = new BitSet();
37
35
  /**
38
36
  *
39
37
  * @type {BitSet}
40
38
  * @private
41
39
  */
42
- this.__visited_set = new BitSet();
40
+ __visited_set = new BitSet();
43
41
 
44
42
  /**
45
43
  *
46
44
  * @type { Float32Array|null}
47
45
  * @private
48
46
  */
49
- this.__cached_values = null;
47
+ __cached_values = null;
50
48
 
51
49
  /**
52
50
  *
53
51
  * @type {GridData|null}
54
52
  * @private
55
53
  */
56
- this.__grid = null;
57
- }
54
+ __grid = null;
58
55
 
59
56
  /**
60
57
  *
@@ -1 +1 @@
1
- {"version":3,"file":"PathEndPoint.d.ts","sourceRoot":"","sources":["../../../../../../src/generation/grid/generation/road/PathEndPoint.js"],"names":[],"mappings":"AAKA;IAcI;;;;OAIG;IACH,mCAFa,YAAY,CAaxB;IAED;;;;;;OAMG;IACH,mBALW,MAAM,KACN,MAAM,eAEJ,YAAY,CAUxB;IA5CG,kBAA6B;IAE7B,aAAoC;IAEpC;;;OAGG;IACH,YAFU,iBAAe,CAEH;IAuC1B;;;;OAIG;IACH,oCAFa,OAAO,CAInB;IAED;;;;OAIG;IACH,4BAHW,MAAM,GACJ,OAAO,CAInB;CACJ;oBAxEmB,kCAAkC"}
1
+ {"version":3,"file":"PathEndPoint.d.ts","sourceRoot":"","sources":["../../../../../../src/generation/grid/generation/road/PathEndPoint.js"],"names":[],"mappings":"AAKA;IAYI;;;;OAIG;IACH,mCAFa,YAAY,CAaxB;IAED;;;;;;OAMG;IACH,mBALW,MAAM,KACN,MAAM,eAEJ,YAAY,CAUxB;IA3CD,kBAAyB;IAEzB,aAAgC;IAEhC;;;OAGG;IACH,YAFU,iBAAe,CAEP;IAsClB;;;;OAIG;IACH,oCAFa,OAAO,CAInB;IAED;;;;OAIG;IACH,4BAHW,MAAM,GACJ,OAAO,CAInB;CACJ;oBArEmB,kCAAkC"}
@@ -1,21 +1,19 @@
1
+ import { assert } from "../../../../core/assert.js";
1
2
  import Vector2 from "../../../../core/geom/Vector2.js";
2
3
  import { PathEndPointKind } from "./PathEndPointKind.js";
3
- import { assert } from "../../../../core/assert.js";
4
4
  import { readMarkerNodeGroupId } from "./readMarkerNodeGroupId.js";
5
5
 
6
6
  export class PathEndPoint {
7
- constructor() {
8
7
 
9
- this.position = new Vector2();
8
+ position = new Vector2();
10
9
 
11
- this.type = PathEndPointKind.Unknown;
10
+ type = PathEndPointKind.Unknown;
12
11
 
13
- /**
14
- *
15
- * @type {MarkerNode|Path}
16
- */
17
- this.attachment = null;
18
- }
12
+ /**
13
+ *
14
+ * @type {MarkerNode|Path}
15
+ */
16
+ attachment = null;
19
17
 
20
18
  /**
21
19
  *
@@ -1 +1 @@
1
- {"version":3,"file":"RoadConnection.d.ts","sourceRoot":"","sources":["../../../../../../src/generation/grid/generation/road/RoadConnection.js"],"names":[],"mappings":"AAEA;IAsBI;;;;;OAKG;IACH,iEAFW,MAAM,EAAE,kBAgBlB;IAvCG;;;OAGG;IACH,qBAAkB;IAClB;;;OAGG;IACH,qBAAkB;IAElB;;;OAGG;IACH,SAFU,MAAM,EAAE,CAED;IA0BrB;;;;OAIG;IACH,oCAFW,MAAM,QAuBhB;IAED;;;;OAIG;IACH,YAHW,MAAM,GACJ,OAAO,CAcnB;IAED;;;;OAIG;IACH,4CAFa,OAAO,CAInB;IAED;;;;OAIG;IACH,4BAHW,MAAM,GACJ,OAAO,CAInB;CACJ"}
1
+ {"version":3,"file":"RoadConnection.d.ts","sourceRoot":"","sources":["../../../../../../src/generation/grid/generation/road/RoadConnection.js"],"names":[],"mappings":"AAEA;IAqBI;;;;;OAKG;IACH,iEAFW,MAAM,EAAE,kBAgBlB;IAvCG;;;OAGG;IACH,qBAAc;IAEd;;;OAGG;IACH,qBAAc;IAEd;;;OAGG;IACH,SAFU,MAAM,EAAE,CAEL;IAyBjB;;;;OAIG;IACH,oCAFW,MAAM,QAuBhB;IAED;;;;OAIG;IACH,YAHW,MAAM,GACJ,OAAO,CAcnB;IAED;;;;OAIG;IACH,4CAFa,OAAO,CAInB;IAED;;;;OAIG;IACH,4BAHW,MAAM,GACJ,OAAO,CAInB;CACJ"}
@@ -1,26 +1,25 @@
1
1
  import { assert } from "../../../../core/assert.js";
2
2
 
3
3
  export class RoadConnection {
4
- constructor() {
5
4
 
6
5
  /**
7
6
  *
8
7
  * @type {PathEndPoint}
9
8
  */
10
- this.source = null;
9
+ source = null;
10
+
11
11
  /**
12
12
  *
13
13
  * @type {PathEndPoint}
14
14
  */
15
- this.target = null;
15
+ target = null;
16
16
 
17
17
  /**
18
18
  *
19
19
  * @type {number[]}
20
20
  */
21
- this.indices = [];
21
+ indices = [];
22
22
 
23
- }
24
23
 
25
24
  /**
26
25
  *
@@ -1 +1 @@
1
- {"version":3,"file":"GridCellActionPlaceMarker.d.ts","sourceRoot":"","sources":["../../../../src/generation/markers/GridCellActionPlaceMarker.js"],"names":[],"mappings":"AAOA;IAkFI;;;;;;;;;;OAUG;IACH,0FAFY,yBAAyB,CAsCpC;IA/HD;;;OAGG;IACH,aAAY;IAEZ;;;OAGG;IACH,WAFU,SAAS,CAES;IAE5B;;;OAGG;IACH,MAFU,QAAQ,CAER;IAEV,eAAgB;IAEhB,aAAS;IAET;;;OAGG;IACH,cAFU,uBAAuB,CAEf;IAElB;;;OAGG;IACH,UAFU,MAAM,CAEH;IAEb;;;OAGG;IACH,QAFU,OAAO,CAEM;IAEvB,uCAWC;IAED;;;;OAIG;IACH,qBAFa,OAAO,CAYnB;IAED;;;OAGG;IACH,yDAIC;IAmDD;;;;;;;OAOG;IACH,6BALW,MAAM,KACN,MAAM,YACN,MAAM,GACJ,UAAU,CAgEtB;IAED,wDAIC;IAGL;;;OAGG;IACH,sCAFU,OAAO,CAE8C;CAN9D;+BAvN8B,uCAAuC;0BAE5C,yCAAyC;oBAC/C,4BAA4B;2BAFrB,iBAAiB"}
1
+ {"version":3,"file":"GridCellActionPlaceMarker.d.ts","sourceRoot":"","sources":["../../../../src/generation/markers/GridCellActionPlaceMarker.js"],"names":[],"mappings":"AAOA;IAkFI;;;;;;;;;;OAUG;IACH,0FAFY,yBAAyB,CAwCpC;IAjID;;;OAGG;IACH,aAAY;IAEZ;;;OAGG;IACH,WAFU,SAAS,CAES;IAE5B;;;OAGG;IACH,MAFU,QAAQ,CAER;IAEV,eAAgB;IAEhB,aAAS;IAET;;;OAGG;IACH,cAFU,uBAAuB,CAEf;IAElB;;;OAGG;IACH,UAFU,MAAM,CAEH;IAEb;;;OAGG;IACH,QAFU,OAAO,CAEM;IAEvB,uCAWC;IAED;;;;OAIG;IACH,qBAFa,OAAO,CAYnB;IAED;;;OAGG;IACH,yDAIC;IAqDD;;;;;;;OAOG;IACH,6BALW,MAAM,KACN,MAAM,YACN,MAAM,GACJ,UAAU,CAgEtB;IAED,wDAIC;IAGL;;;OAGG;IACH,sCAFU,OAAO,CAE8C;CAN9D;+BArN8B,uCAAuC;0BAD5C,yCAAyC;oBAF/C,4BAA4B;2BAIrB,iBAAiB"}
@@ -1,9 +1,9 @@
1
- import { GridCellAction } from "../placement/action/GridCellAction.js";
2
- import { MarkerNode } from "./MarkerNode.js";
3
- import { Transform } from "../../engine/ecs/transform/Transform.js";
4
- import Vector2 from "../../core/geom/Vector2.js";
5
1
  import { assert } from "../../core/assert.js";
2
+ import Vector2 from "../../core/geom/Vector2.js";
6
3
  import Vector3 from "../../core/geom/Vector3.js";
4
+ import { Transform } from "../../engine/ecs/transform/Transform.js";
5
+ import { GridCellAction } from "../placement/action/GridCellAction.js";
6
+ import { MarkerNode } from "./MarkerNode.js";
7
7
 
8
8
  export class GridCellActionPlaceMarker extends GridCellAction {
9
9
 
@@ -108,7 +108,9 @@ export class GridCellActionPlaceMarker extends GridCellAction {
108
108
  priority = 0
109
109
  }) {
110
110
 
111
- assert.typeOf(type, 'string', 'type');
111
+ assert.isString(type, 'type');
112
+ assert.isNumber(size, 'size');
113
+ assert.greaterThanOrEqual(size, 0, 'size must be non-negative');
112
114
 
113
115
  const r = new GridCellActionPlaceMarker();
114
116
 
@@ -1 +1 @@
1
- {"version":3,"file":"LabelView.d.ts","sourceRoot":"","sources":["../../../../src/view/common/LabelView.js"],"names":[],"mappings":";AA8IA;IACI;;;;;;;OA+CC;IArCG,WAAkB;IASlB,gCAA4B;IAC5B,mDAA4B;IAC5B,gCAA4B;IA4BhC;;;;OAIG;IACH,mBAEC;IAGD;;;OAGG;IACH,cAFW,MAAM,QAIhB;IAED,wBAYC;CAOJ;iBApNgB,YAAY;qBAfR,6BAA6B;4BACtB,oCAAoC"}
1
+ {"version":3,"file":"LabelView.d.ts","sourceRoot":"","sources":["../../../../src/view/common/LabelView.js"],"names":[],"mappings":";AA2IA;IACI;;;;;;;OA+CC;IArCG,WAAkB;IASlB,gCAA4B;IAC5B,mDAA4B;IAC5B,gCAA4B;IA4BhC;;;;OAIG;IACH,mBAEC;IAGD;;;OAGG;IACH,cAFW,MAAM,QAIhB;IAED,wBAYC;CAOJ;iBAlNgB,YAAY;qBAdR,6BAA6B;4BACtB,oCAAoC"}
@@ -4,7 +4,6 @@ import { noop } from "../../core/function/noop.js";
4
4
  import { passThrough } from "../../core/function/passThrough.js";
5
5
  import Vector1 from "../../core/geom/Vector1.js";
6
6
  import BoundedValue from "../../core/model/BoundedValue.js";
7
- import LinearValue from "../../core/model/LinearValue.js";
8
7
  import ObservedBoolean from "../../core/model/ObservedBoolean.js";
9
8
  import ObservedInteger from "../../core/model/ObservedInteger.js";
10
9
  import ObservedString from "../../core/model/ObservedString.js";
@@ -80,7 +79,6 @@ function findProcessor(model) {
80
79
  }
81
80
 
82
81
 
83
-
84
82
  class ValueProcessor {
85
83
  /**
86
84
  * @template Container, Value
@@ -127,7 +125,6 @@ const processors = [
127
125
  p(isInstanceOf(ObservedBoolean), extractorGetValue, format),
128
126
  p(isInstanceOf(ObservedValue), extractorGetValue, format),
129
127
  p(isInstanceOf(ObservedString), extractorGetValue, format),
130
- p(isInstanceOf(LinearValue), extractorGetValue, formatNumber),
131
128
  p(isInstanceOf(BoundedValue), extractBoundedValue, formatArray),
132
129
  p(isInstanceOf(Stat), extractorGetValue, formatNumber),
133
130
  p(isInstanceOf(Vector1), extractorGetValue, formatNumber),
@@ -1,88 +0,0 @@
1
- export default LinearValue;
2
- declare class LinearValue {
3
- /**
4
- *
5
- * @param {number} [x = 0]
6
- * @param {number} [a = 0]
7
- * @param {number} [b = 1]
8
- * @constructor
9
- */
10
- constructor(x?: number, a?: number, b?: number);
11
- /**
12
- * @readonly
13
- * @type {Signal}
14
- */
15
- readonly onChanged: Signal;
16
- /**
17
- *
18
- * @type {number}
19
- */
20
- x: number;
21
- /**
22
- *
23
- * @type {number}
24
- */
25
- a: number;
26
- /**
27
- *
28
- * @type {number}
29
- */
30
- b: number;
31
- /**
32
- *
33
- * @param {LinearValue} other
34
- * @returns {LinearValue}
35
- */
36
- copy(other: LinearValue): LinearValue;
37
- /**
38
- *
39
- * @param {number} x
40
- * @param {number} a
41
- * @param {number} b
42
- * @returns {LinearValue}
43
- */
44
- set(x: number, a: number, b: number): LinearValue;
45
- /**
46
- *
47
- * @param v
48
- * @returns {LinearValue}
49
- */
50
- addMultiplier(v: any): LinearValue;
51
- /**
52
- *
53
- * @param v
54
- * @returns {LinearValue}
55
- */
56
- subMultiplier(v: any): LinearValue;
57
- /**
58
- *
59
- * @param v
60
- * @returns {LinearValue}
61
- */
62
- addConstant(v: any): LinearValue;
63
- /**
64
- *
65
- * @param v
66
- * @returns {LinearValue}
67
- */
68
- subConstant(v: any): LinearValue;
69
- /**
70
- *
71
- * @returns {number}
72
- */
73
- getValue(): number;
74
- /**
75
- *
76
- * @param {LinearValue} other
77
- * @returns {boolean}
78
- */
79
- equals(other: LinearValue): boolean;
80
- toJSON(): {
81
- x: number;
82
- a: number;
83
- b: number;
84
- };
85
- fromJSON(json: any): void;
86
- }
87
- import Signal from "../events/signal/Signal.js";
88
- //# sourceMappingURL=LinearValue.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LinearValue.d.ts","sourceRoot":"","sources":["../../../../src/core/model/LinearValue.js"],"names":[],"mappings":";AAGA;IAQI;;;;;;OAMG;IACH,gBALW,MAAM,MACN,MAAM,MACN,MAAM,EAwBhB;IAlCD;;;OAGG;IACH,oBAFU,MAAM,CAES;IAcrB;;;OAGG;IACH,GAFU,MAAM,CAEN;IACV;;;OAGG;IACH,GAFU,MAAM,CAEN;IACV;;;OAGG;IACH,GAFU,MAAM,CAEN;IAId;;;;OAIG;IACH,YAHW,WAAW,GACT,WAAW,CAIvB;IAED;;;;;;OAMG;IACH,OALW,MAAM,KACN,MAAM,KACN,MAAM,GACJ,WAAW,CASvB;IAED;;;;OAIG;IACH,uBAFa,WAAW,CAOvB;IAED;;;;OAIG;IACH,uBAFa,WAAW,CAIvB;IAED;;;;OAIG;IACH,qBAFa,WAAW,CAOvB;IAED;;;;OAIG;IACH,qBAFa,WAAW,CAIvB;IAED;;;OAGG;IACH,YAFa,MAAM,CAKlB;IAED;;;;OAIG;IACH,cAHW,WAAW,GACT,OAAO,CAInB;IAED;;;;MAMC;IAED,0BAEC;CACJ;mBAxIkB,4BAA4B"}