@woosh/meep-engine 2.55.0 → 2.56.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 (155) hide show
  1. package/editor/view/node-graph/PortView.js +2 -2
  2. package/package.json +1 -1
  3. package/src/core/binary/BinaryBuffer.js +2 -1
  4. package/src/core/cache/LoadingCache.js +10 -5
  5. package/src/core/collection/array/array_remove_element.js +6 -9
  6. package/src/core/collection/array/array_remove_first.js +13 -6
  7. package/src/core/collection/array/array_remove_first.spec.js +39 -0
  8. package/src/core/collection/array/binarySearchHighIndex.spec.js +10 -9
  9. package/src/core/collection/heap/Uin32Heap.spec.js +36 -0
  10. package/src/core/collection/heap/Uint32Heap.js +10 -5
  11. package/src/core/function/FunctionCompiler.js +4 -4
  12. package/src/core/function/Functions.js +0 -19
  13. package/src/core/geom/3d/SurfacePoint3.js +30 -20
  14. package/src/core/geom/3d/SurfacePoint3.spec.js +116 -0
  15. package/src/core/geom/3d/aabb/AABB3.js +10 -9
  16. package/src/core/geom/3d/aabb/{aabb3_array_contains_point.js → aabb3_array_intersects_point.js} +4 -1
  17. package/src/core/geom/3d/aabb/aabb3_from_min_max.js +25 -1
  18. package/src/core/geom/3d/aabb/aabb3_from_threejs_geometry.js +2 -25
  19. package/src/core/geom/3d/aabb/aabb3_signed_distance_sqr_to_point.js +5 -1
  20. package/src/core/geom/3d/apply_mat4_transform_to_direction_v3_array.js +5 -1
  21. package/src/core/geom/3d/apply_mat4_transform_to_v3_array.js +5 -1
  22. package/src/core/geom/3d/tetrahedra/TetrahedralMesh.js +2 -2
  23. package/src/core/geom/3d/triangle/computeTriangleRayIntersectionBarycentric.spec.js +26 -0
  24. package/src/core/geom/3d/v3_compute_triangle_normal.spec.js +18 -0
  25. package/src/core/geom/Vector2.js +1 -1
  26. package/src/core/geom/Vector3.js +1 -1
  27. package/src/core/geom/packing/miniball/Miniball.spec.js +24 -0
  28. package/src/core/math/statistics/computeStatisticalPartialMedian.js +2 -2
  29. package/src/core/model/object/read_property.js +2 -2
  30. package/src/core/model/object/write_property.js +3 -3
  31. package/src/core/primitives/numbers/compareNumbers.js +4 -4
  32. package/src/core/primitives/numbers/number_compare_ascending.js +9 -0
  33. package/src/core/primitives/numbers/number_compare_ascending.spec.js +9 -0
  34. package/src/core/primitives/numbers/number_compare_descending.js +9 -0
  35. package/src/core/primitives/numbers/number_compare_descending.spec.js +9 -0
  36. package/src/core/primitives/numbers/number_format_by_thousands.spec.js +12 -0
  37. package/src/core/primitives/numbers/number_pretty_print.js +1 -1
  38. package/src/core/primitives/strings/compareStrings.spec.js +12 -0
  39. package/src/core/primitives/strings/string_capitalize.js +15 -0
  40. package/src/core/primitives/strings/string_capitalize.spec.js +13 -0
  41. package/src/core/primitives/strings/string_compute_byte_size.js +21 -0
  42. package/src/core/primitives/strings/string_compute_common_prefix.js +44 -0
  43. package/src/core/primitives/strings/string_compute_common_prefix.spec.js +23 -0
  44. package/src/core/primitives/strings/string_format_camel_to_kebab.js +9 -0
  45. package/src/core/primitives/strings/string_format_camel_to_kebab.spec.js +8 -0
  46. package/src/core/primitives/strings/string_format_kebab_to_underscore.js +8 -0
  47. package/src/core/time/current_time_in_seconds.js +11 -0
  48. package/src/engine/Clock.js +3 -13
  49. package/src/engine/animation/curve/AnimationCurve.spec.js +27 -0
  50. package/src/engine/asset/AssetManager.js +2 -2
  51. package/src/engine/ecs/EntityManager.js +8 -1
  52. package/src/engine/ecs/EntityManager.spec.js +56 -6
  53. package/src/engine/ecs/animation/Animation.spec.js +22 -0
  54. package/src/engine/ecs/attachment/Attachment.js +24 -25
  55. package/src/engine/ecs/attachment/AttachmentBinding.js +27 -30
  56. package/src/engine/ecs/attachment/AttachmentSystem.js +21 -24
  57. package/src/engine/ecs/attachment/BoneAttachmentBinding.js +6 -9
  58. package/src/engine/ecs/attachment/TransformAttachmentBinding.js +0 -3
  59. package/src/engine/ecs/components/CharacterController.js +24 -18
  60. package/src/engine/ecs/dynamic_actions/DynamicActorSystem.js +3 -2
  61. package/src/engine/ecs/fow/FogOfWarRevealer.js +2 -3
  62. package/src/engine/ecs/ik/IKMath.js +6 -1
  63. package/src/engine/ecs/ik/IKProblem.js +17 -17
  64. package/src/engine/ecs/ik/InverseKinematics.js +6 -7
  65. package/src/engine/ecs/ik/InverseKinematicsSystem.js +24 -26
  66. package/src/engine/ecs/storage/BinaryBufferSerializer.js +3 -3
  67. package/src/engine/ecs/systems/TagSystem.js +1 -6
  68. package/src/engine/ecs/terrain/ecs/layers/TerrainLayer.js +2 -2
  69. package/src/engine/graphics/ecs/mesh/skeleton/BoneMapping.js +2 -2
  70. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometry.spec.js +14 -0
  71. package/src/engine/graphics/ecs/mesh-v2/render/adapters/SGCacheKey.js +21 -9
  72. package/src/engine/graphics/ecs/mesh-v2/render/adapters/SGCacheKey.spec.js +79 -0
  73. package/src/engine/graphics/render/visibility/IncrementalDeltaSet.spec.js +7 -6
  74. package/src/engine/simulation/Ticker.js +17 -20
  75. package/src/generation/GridTaskGroup.js +5 -9
  76. package/src/generation/filtering/numeric/CellFilterCache.js +12 -16
  77. package/src/generation/filtering/numeric/complex/CellFilterFXAA.js +31 -32
  78. package/src/generation/filtering/numeric/complex/CellFilterLookupTable.js +6 -9
  79. package/src/generation/filtering/numeric/complex/CellFilterSimplexNoise.js +7 -10
  80. package/src/generation/filtering/numeric/complex/CellFilterSobel.js +6 -9
  81. package/src/generation/filtering/numeric/math/CellFilterMembershipGeneralizedBell.js +18 -21
  82. package/src/generation/filtering/numeric/sampling/AbstractCellFilterSampleGridLayer.js +24 -25
  83. package/src/generation/filtering/numeric/sampling/CellFilterSampleLayerLinear.js +1 -1
  84. package/src/generation/grid/GridData.js +23 -22
  85. package/src/generation/grid/GridData.spec.js +41 -0
  86. package/src/generation/grid/GridTaskGenerator.js +7 -8
  87. package/src/generation/grid/layers/GridDataLayer.js +23 -25
  88. package/src/generation/markers/GridActionRuleSet.js +20 -22
  89. package/src/generation/markers/GridCellActionPlaceMarker.js +40 -43
  90. package/src/generation/markers/GridCellActionPlaceMarkerGroup.js +7 -9
  91. package/src/generation/markers/MarkerNode.js +44 -44
  92. package/src/generation/markers/actions/MarkerNodeActionEntityPlacement.js +15 -18
  93. package/src/generation/markers/actions/MarkerNodeActionSequence.js +6 -9
  94. package/src/generation/markers/actions/MarkerNodeProcessingRuleSet.js +5 -7
  95. package/src/generation/markers/actions/MarkerProcessingRule.js +25 -26
  96. package/src/generation/markers/actions/placement/MarkerNodeEntityProcessorClingToTerrain.js +12 -15
  97. package/src/generation/markers/actions/placement/MarkerNodeEntityProcessorRandomRotation.js +2 -5
  98. package/src/generation/markers/actions/placement/MarkerNodeEntityProcessorSequence.js +6 -9
  99. package/src/generation/markers/actions/probability/MarkerNodeActionSelectWeighted.js +8 -11
  100. package/src/generation/markers/actions/probability/MarkerNodeActionWeightedElement.js +13 -13
  101. package/src/generation/markers/actions/util/GridCellActionDebugBreak.js +5 -8
  102. package/src/generation/markers/actions/util/GridCellActionLogToConsole.js +1 -4
  103. package/src/generation/markers/emitter/MarkerNodeConsumerBuffer.js +10 -13
  104. package/src/generation/markers/emitter/MarkerNodeEmitterFromAction.js +5 -9
  105. package/src/generation/markers/emitter/MarkerNodeEmitterGridCellAction.js +12 -15
  106. package/src/generation/markers/emitter/MarkerNodeEmitterGroup.js +5 -8
  107. package/src/generation/markers/emitter/MarkerNodeEmitterPredicated.js +18 -21
  108. package/src/generation/markers/matcher/MarkerNodeMatcher.js +2 -1
  109. package/src/generation/markers/matcher/MarkerNodeMatcherBinary.js +12 -13
  110. package/src/generation/markers/matcher/MarkerNodeMatcherContainsTag.js +7 -9
  111. package/src/generation/markers/matcher/MarkerNodeMatcherNot.js +7 -9
  112. package/src/generation/markers/predicate/GridDataNodePredicateBinary.js +10 -14
  113. package/src/generation/markers/predicate/GridDataNodePredicateNot.js +9 -11
  114. package/src/generation/markers/predicate/GridDataNodePredicateOverlaps.js +6 -9
  115. package/src/generation/markers/transform/MarkerNodeTransformRotateRandom.js +2 -6
  116. package/src/generation/markers/transform/MarkerNodeTransformerAddPositionYFromFilter.js +6 -9
  117. package/src/generation/markers/transform/MarkerNodeTransformerOffsetPosition.js +1 -4
  118. package/src/generation/markers/transform/MarkerNodeTransformerRecordProperty.js +12 -15
  119. package/src/generation/markers/transform/MarkerNodeTransformerRecordPropertyClosure.js +14 -17
  120. package/src/generation/markers/transform/MarkerNodeTransformerRecordUniqueRandomEnum.js +21 -23
  121. package/src/generation/markers/transform/MarkerNodeTransformerRemoveTag.js +1 -4
  122. package/src/generation/markers/transform/MarkerNodeTransformerSequence.js +6 -9
  123. package/src/generation/markers/transform/MarkerNodeTransformerYRotateByFilter.js +13 -17
  124. package/src/generation/markers/transform/MarkerNodeTransformerYRotateByFilterGradient.js +12 -16
  125. package/src/generation/placement/GridCellActionTransformNearbyMarkers.js +26 -29
  126. package/src/generation/placement/GridCellPlacementRule.js +30 -32
  127. package/src/generation/placement/action/GridCellActionPlaceTags.js +26 -28
  128. package/src/generation/placement/action/GridCellActionWriteFilterToLayer.js +16 -20
  129. package/src/generation/placement/action/random/weighted/CellActionSelectWeightedRandom.js +13 -16
  130. package/src/generation/placement/action/random/weighted/WeightedGridCellAction.js +11 -14
  131. package/src/generation/placement/action/util/CellMatcherWithinAABB.js +2 -6
  132. package/src/generation/placement/action/util/GridCellActionSequence.js +7 -9
  133. package/src/generation/placement/action/util/GridCellDisplacedAction.js +9 -12
  134. package/src/generation/rules/CellMatcherFromFilter.js +6 -9
  135. package/src/generation/rules/CellMatcherLayerBitMaskTest.js +6 -9
  136. package/src/generation/rules/GridLayerCellMatcher.js +11 -14
  137. package/src/generation/rules/cell/CellMatcherContainsMarkerWithinRadius.js +11 -14
  138. package/src/generation/rules/cell/CellMatcherGridPattern.js +6 -8
  139. package/src/generation/rules/cell/GridPatternMatcherCell.js +11 -12
  140. package/src/generation/rules/logic/CellMatcherBinary.js +10 -14
  141. package/src/generation/rules/logic/CellMatcherDecorator.js +5 -8
  142. package/src/generation/theme/AreaMask.js +15 -17
  143. package/src/generation/theme/AreaTheme.js +7 -8
  144. package/src/generation/theme/TerrainLayerDescription.js +10 -12
  145. package/src/generation/theme/TerrainLayerRule.js +11 -13
  146. package/src/generation/theme/TerrainTheme.js +6 -7
  147. package/src/generation/theme/Theme.js +15 -17
  148. package/src/generation/theme/ThemeEngine.js +16 -18
  149. package/src/view/string_tag_to_css_class_name.js +2 -2
  150. package/src/view/tooltip/gml/TooltipParser.js +2 -2
  151. package/src/core/cache/PersistentCacheAdapter.js +0 -378
  152. package/src/core/primitives/strings/StringUtils.js +0 -105
  153. package/src/core/primitives/strings/StringUtils.spec.js +0 -42
  154. package/src/engine/ecs/components/MonsterAI.js +0 -15
  155. package/src/generation/markers/MarkerRelation.js +0 -13
@@ -4,39 +4,36 @@ import { assert } from "../../core/assert.js";
4
4
  import { qt_match_data_by_circle } from "../../core/geom/2d/quad-tree/qt_match_data_by_circle.js";
5
5
 
6
6
  export class GridCellActionTransformNearbyMarkers extends GridCellAction {
7
- constructor() {
8
- super();
9
7
 
10
- /**
11
- *
12
- * @type {MarkerNodeMatcher}
13
- */
14
- this.matcher = MarkerNodeMatcherAny.INSTANCE;
15
- /**
16
- *
17
- * @type {number}
18
- */
19
- this.radius = 1;
8
+ /**
9
+ *
10
+ * @type {MarkerNodeMatcher}
11
+ */
12
+ matcher = MarkerNodeMatcherAny.INSTANCE;
13
+ /**
14
+ *
15
+ * @type {number}
16
+ */
17
+ radius = 1;
20
18
 
21
- /**
22
- *
23
- * @type {MarkerNodeTransformer}
24
- */
25
- this.transformer = null;
19
+ /**
20
+ *
21
+ * @type {MarkerNodeTransformer}
22
+ */
23
+ transformer = null;
26
24
 
27
- /**
28
- * @private
29
- * @type {QuadTreeDatum<MarkerNode>[]}
30
- */
31
- this.__leaves = [];
25
+ /**
26
+ * @private
27
+ * @type {QuadTreeDatum<MarkerNode>[]}
28
+ */
29
+ __leaves = [];
32
30
 
33
- /**
34
- *
35
- * @type {number}
36
- * @private
37
- */
38
- this.__leaf_cursor = 0;
39
- }
31
+ /**
32
+ *
33
+ * @type {number}
34
+ * @private
35
+ */
36
+ __leaf_cursor = 0;
40
37
 
41
38
  /**
42
39
  *
@@ -4,38 +4,36 @@ import { CellFilterLiteralFloat } from "../filtering/numeric/CellFilterLiteralFl
4
4
  import { GridCellActionSequence } from "./action/util/GridCellActionSequence.js";
5
5
 
6
6
  export class GridCellPlacementRule {
7
- constructor() {
8
- /**
9
- *
10
- * @type {CellMatcher}
11
- */
12
- this.pattern = null;
13
-
14
- /**
15
- *
16
- * @type {CellFilter}
17
- */
18
- this.probability = CellFilterLiteralFloat.from(1);
19
-
20
- /**
21
- *
22
- * @type {Vector2}
23
- */
24
- this.positionOffset = new Vector2();
25
-
26
-
27
- /**
28
- *
29
- * @type {GridCellAction}
30
- */
31
- this.action = null;
32
-
33
- /**
34
- *
35
- * @type {boolean}
36
- */
37
- this.allowRotation = true;
38
- }
7
+ /**
8
+ *
9
+ * @type {CellMatcher}
10
+ */
11
+ pattern = null;
12
+
13
+ /**
14
+ *
15
+ * @type {CellFilter}
16
+ */
17
+ probability = CellFilterLiteralFloat.from(1);
18
+
19
+ /**
20
+ *
21
+ * @type {Vector2}
22
+ */
23
+ positionOffset = new Vector2();
24
+
25
+
26
+ /**
27
+ *
28
+ * @type {GridCellAction}
29
+ */
30
+ action = null;
31
+
32
+ /**
33
+ *
34
+ * @type {boolean}
35
+ */
36
+ allowRotation = true;
39
37
 
40
38
  /**
41
39
  *
@@ -4,34 +4,32 @@ import { assert } from "../../../core/assert.js";
4
4
  import { bitwiseOr } from "../../../core/binary/operations/bitwiseOr.js";
5
5
 
6
6
  export class GridCellActionPlaceTags extends GridCellAction {
7
- constructor() {
8
- super();
9
-
10
- /**
11
- *
12
- * @type {function(number, number): number}
13
- */
14
- this.operation = bitwiseOr;
15
-
16
- /**
17
- *
18
- * @type {Sampler2D}
19
- */
20
- this.tags = Sampler2D.uint32(1, 1, 1);
21
-
22
- /**
23
- *
24
- * @type {string}
25
- */
26
- this.layerId = null;
27
-
28
- /**
29
- *
30
- * @type {GridDataLayer}
31
- * @private
32
- */
33
- this.__layer = null;
34
- }
7
+
8
+ /**
9
+ *
10
+ * @type {function(number, number): number}
11
+ */
12
+ operation = bitwiseOr;
13
+
14
+ /**
15
+ *
16
+ * @type {Sampler2D}
17
+ */
18
+ tags = Sampler2D.uint32(1, 1, 1);
19
+
20
+ /**
21
+ *
22
+ * @type {string}
23
+ */
24
+ layerId = null;
25
+
26
+ /**
27
+ *
28
+ * @type {GridDataLayer}
29
+ * @private
30
+ */
31
+ __layer = null;
32
+
35
33
 
36
34
  initialize(data, seed) {
37
35
  const layer = data.getLayerById(this.layerId);
@@ -2,29 +2,25 @@ import { GridCellAction } from "./GridCellAction.js";
2
2
  import { assert } from "../../../core/assert.js";
3
3
 
4
4
  export class GridCellActionWriteFilterToLayer extends GridCellAction {
5
- constructor() {
6
- super();
7
5
 
6
+ /**
7
+ *
8
+ * @type {CellFilter}
9
+ */
10
+ filter = null;
8
11
 
9
- /**
10
- *
11
- * @type {CellFilter}
12
- */
13
- this.filter = null;
14
-
15
- /**
16
- *
17
- * @type {string}
18
- */
19
- this.layerId = null;
12
+ /**
13
+ *
14
+ * @type {string}
15
+ */
16
+ layerId = null;
20
17
 
21
- /**
22
- *
23
- * @type {GridDataLayer}
24
- * @private
25
- */
26
- this.__layer = null;
27
- }
18
+ /**
19
+ *
20
+ * @type {GridDataLayer}
21
+ * @private
22
+ */
23
+ __layer = null;
28
24
 
29
25
  /**
30
26
  *
@@ -11,22 +11,19 @@ import { binarySearchHighIndex } from "../../../../../core/collection/array/bina
11
11
  const evaluatedWeights = [];
12
12
 
13
13
  export class CellActionSelectWeightedRandom extends GridCellAction {
14
- constructor() {
15
- super();
16
-
17
- /**
18
- *
19
- * @type {function}
20
- * @private
21
- */
22
- this.__random = seededRandom(0);
23
-
24
- /**
25
- *
26
- * @type {WeightedGridCellAction[]}
27
- */
28
- this.options = [];
29
- }
14
+
15
+ /**
16
+ *
17
+ * @type {function}
18
+ * @private
19
+ */
20
+ __random = seededRandom(0);
21
+
22
+ /**
23
+ *
24
+ * @type {WeightedGridCellAction[]}
25
+ */
26
+ options = [];
30
27
 
31
28
 
32
29
  /**
@@ -2,20 +2,17 @@ import { assert } from "../../../../../core/assert.js";
2
2
 
3
3
  export class WeightedGridCellAction {
4
4
 
5
- constructor() {
6
-
7
- /**
8
- *
9
- * @type {GridCellAction}
10
- */
11
- this.action = null;
12
-
13
- /**
14
- *
15
- * @type {CellFilter}
16
- */
17
- this.weight = null;
18
- }
5
+ /**
6
+ *
7
+ * @type {GridCellAction}
8
+ */
9
+ action = null;
10
+
11
+ /**
12
+ *
13
+ * @type {CellFilter}
14
+ */
15
+ weight = null;
19
16
 
20
17
  /**
21
18
  *
@@ -1,13 +1,9 @@
1
1
  import { CellMatcher } from "../../../rules/CellMatcher.js";
2
- import AABB2 from "../../../../core/geom/AABB2.js";
2
+ import AABB2 from "../../../../core/geom/2d/aabb/AABB2.js";
3
3
 
4
4
  export class CellMatcherWithinAABB extends CellMatcher {
5
5
 
6
- constructor() {
7
- super();
8
-
9
- this.area = new AABB2();
10
- }
6
+ area = new AABB2();
11
7
 
12
8
  /**
13
9
  *
@@ -5,15 +5,13 @@ import { assert } from "../../../../core/assert.js";
5
5
  * Wrapper around multiple actions
6
6
  */
7
7
  export class GridCellActionSequence extends GridCellAction {
8
- constructor() {
9
- super();
10
-
11
- /**
12
- *
13
- * @type {GridCellAction[]}
14
- */
15
- this.elements = [];
16
- }
8
+
9
+ /**
10
+ *
11
+ * @type {GridCellAction[]}
12
+ */
13
+ elements = [];
14
+
17
15
 
18
16
  /**
19
17
  *
@@ -3,17 +3,14 @@ import Vector2 from "../../../../core/geom/Vector2.js";
3
3
  import { assert } from "../../../../core/assert.js";
4
4
 
5
5
  export class GridCellDisplacedAction extends GridCellAction {
6
- constructor() {
7
- super();
8
6
 
9
- this.offset = new Vector2();
7
+ offset = new Vector2();
10
8
 
11
- /**
12
- *
13
- * @type {GridCellAction}
14
- */
15
- this.action = null;
16
- }
9
+ /**
10
+ *
11
+ * @type {GridCellAction}
12
+ */
13
+ action = null;
17
14
 
18
15
  /**
19
16
  *
@@ -22,13 +19,13 @@ export class GridCellDisplacedAction extends GridCellAction {
22
19
  * @param {number} y
23
20
  * @returns {GridCellDisplacedAction}
24
21
  */
25
- static from(source, x,y){
22
+ static from(source, x, y) {
26
23
 
27
- assert.equal(source.isGridCellAction, true,'source.isGridCellAction !== true');
24
+ assert.equal(source.isGridCellAction, true, 'source.isGridCellAction !== true');
28
25
 
29
26
  const r = new GridCellDisplacedAction();
30
27
 
31
- r.offset.set(x,y);
28
+ r.offset.set(x, y);
32
29
  r.action = source;
33
30
 
34
31
  return r;
@@ -1,15 +1,12 @@
1
1
  import { CellMatcher } from "./CellMatcher.js";
2
2
 
3
3
  export class CellMatcherFromFilter extends CellMatcher {
4
- constructor() {
5
- super();
6
-
7
- /**
8
- *
9
- * @type {CellFilter|null}
10
- */
11
- this.filter = null;
12
- }
4
+
5
+ /**
6
+ *
7
+ * @type {CellFilter|null}
8
+ */
9
+ filter = null;
13
10
 
14
11
  /**
15
12
  *
@@ -3,15 +3,12 @@ import { GridLayerCellMatcher } from "./GridLayerCellMatcher.js";
3
3
  import { clamp01 } from "../../core/math/clamp01.js";
4
4
 
5
5
  export class CellMatcherLayerBitMaskTest extends GridLayerCellMatcher {
6
- constructor() {
7
- super();
8
-
9
- /**
10
- * Mask
11
- * @type {number}
12
- */
13
- this.mask = 0;
14
- }
6
+
7
+ /**
8
+ * Mask
9
+ * @type {number}
10
+ */
11
+ mask = 0;
15
12
 
16
13
 
17
14
  match(grid, x, y, rotation) {
@@ -1,22 +1,19 @@
1
1
  import { CellMatcher } from "./CellMatcher.js";
2
2
 
3
3
  export class GridLayerCellMatcher extends CellMatcher {
4
- constructor() {
5
- super();
6
4
 
7
- /**
8
- *
9
- * @type {string}
10
- */
11
- this.layerId = null;
5
+ /**
6
+ *
7
+ * @type {string}
8
+ */
9
+ layerId = null;
12
10
 
13
- /**
14
- *
15
- * @type {GridDataLayer}
16
- * @protected
17
- */
18
- this.__layer = null;
19
- }
11
+ /**
12
+ *
13
+ * @type {GridDataLayer}
14
+ * @protected
15
+ */
16
+ __layer = null;
20
17
 
21
18
 
22
19
  initialize(grid, seed) {
@@ -2,20 +2,17 @@ import { CellMatcher } from "../CellMatcher.js";
2
2
  import { assert } from "../../../core/assert.js";
3
3
 
4
4
  export class CellMatcherContainsMarkerWithinRadius extends CellMatcher {
5
- constructor() {
6
- super();
7
-
8
- /**
9
- * @type {MarkerNodeMatcher}
10
- */
11
- this.matcher = null;
12
-
13
- /**
14
- * Search radius
15
- * @type {number}
16
- */
17
- this.radius = 1;
18
- }
5
+
6
+ /**
7
+ * @type {MarkerNodeMatcher}
8
+ */
9
+ matcher = null;
10
+
11
+ /**
12
+ * Search radius
13
+ * @type {number}
14
+ */
15
+ radius = 1;
19
16
 
20
17
  /**
21
18
  *
@@ -3,14 +3,12 @@ import { GridPatternMatcherCell } from "./GridPatternMatcherCell.js";
3
3
  import { CellMatcher } from "../CellMatcher.js";
4
4
 
5
5
  export class CellMatcherGridPattern extends CellMatcher {
6
- constructor() {
7
- super();
8
- /**
9
- * NOTE: All rules have local coordinates
10
- * @type {GridPatternMatcherCell[]}
11
- */
12
- this.rules = [];
13
- }
6
+
7
+ /**
8
+ * NOTE: All rules have local coordinates
9
+ * @type {GridPatternMatcherCell[]}
10
+ */
11
+ rules = [];
14
12
 
15
13
  /**
16
14
  *
@@ -1,19 +1,18 @@
1
1
  import Vector2 from "../../../core/geom/Vector2.js";
2
2
 
3
3
  export class GridPatternMatcherCell {
4
- constructor() {
5
- /**
6
- *
7
- * @type {CellMatcher}
8
- */
9
- this.rule = null;
4
+ /**
5
+ *
6
+ * @type {CellMatcher}
7
+ */
8
+ rule = null;
9
+
10
+ /**
11
+ *
12
+ * @type {Vector2}
13
+ */
14
+ position = new Vector2();
10
15
 
11
- /**
12
- *
13
- * @type {Vector2}
14
- */
15
- this.position = new Vector2();
16
- }
17
16
 
18
17
  /**
19
18
  *
@@ -2,20 +2,16 @@ import { CellMatcher } from "../CellMatcher.js";
2
2
 
3
3
  export class CellMatcherBinary extends CellMatcher {
4
4
 
5
- constructor() {
6
- super();
7
-
8
- /**
9
- *
10
- * @type {CellMatcher}
11
- */
12
- this.left = null;
13
- /**
14
- *
15
- * @type {CellMatcher}
16
- */
17
- this.right = null;
18
- }
5
+ /**
6
+ *
7
+ * @type {CellMatcher}
8
+ */
9
+ left = null;
10
+ /**
11
+ *
12
+ * @type {CellMatcher}
13
+ */
14
+ right = null;
19
15
 
20
16
  initialize(grid, seed) {
21
17
  this.left.initialize(grid, seed);
@@ -1,15 +1,12 @@
1
1
  import { CellMatcher } from "../CellMatcher.js";
2
2
 
3
3
  export class CellMatcherDecorator extends CellMatcher {
4
- constructor() {
5
- super();
6
4
 
7
- /**
8
- *
9
- * @type {CellMatcher}
10
- */
11
- this.source = null;
12
- }
5
+ /**
6
+ *
7
+ * @type {CellMatcher}
8
+ */
9
+ source = null;
13
10
 
14
11
  initialize(grid, seed) {
15
12
  this.source.initialize(grid, seed);
@@ -5,23 +5,21 @@ import {
5
5
  } from "../../engine/graphics/texture/sampler/distance/computeUnsignedDistanceField.js";
6
6
 
7
7
  export class AreaMask {
8
- constructor() {
9
- /**
10
- *
11
- * @type {Sampler2D}
12
- */
13
- this.mask = Sampler2D.uint8(1, 1, 1);
14
- /**
15
- *
16
- * @type {Sampler2D}
17
- */
18
- this.distanceField = Sampler2D.uint8(1, 1, 1);
19
- /**
20
- *
21
- * @type {AABB2}
22
- */
23
- this.bounds = new AABB2(0, 0, 0, 0);
24
- }
8
+ /**
9
+ *
10
+ * @type {Sampler2D}
11
+ */
12
+ mask = Sampler2D.uint8(1, 1, 1);
13
+ /**
14
+ *
15
+ * @type {Sampler2D}
16
+ */
17
+ distanceField = Sampler2D.uint8(1, 1, 1);
18
+ /**
19
+ *
20
+ * @type {AABB2}
21
+ */
22
+ bounds = new AABB2(0, 0, 0, 0);
25
23
 
26
24
  /**
27
25
  *