@woosh/meep-engine 2.114.0 → 2.116.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 (153) hide show
  1. package/build/meep.cjs +236 -197
  2. package/build/meep.min.js +1 -1
  3. package/build/meep.module.js +236 -197
  4. package/editor/ecs/component/editors/Sampler2DEditor.js +3 -3
  5. package/editor/view/ecs/HierarchicalEntityListView.js +2 -2
  6. package/package.json +1 -1
  7. package/src/core/binary/clz32.d.ts +7 -0
  8. package/src/core/binary/clz32.d.ts.map +1 -0
  9. package/src/core/binary/clz32.js +37 -0
  10. package/src/core/binary/is_data_url.d.ts.map +1 -1
  11. package/src/core/binary/is_data_url.js +1 -0
  12. package/src/core/binary/makeArrayBuffer.d.ts.map +1 -1
  13. package/src/core/binary/makeArrayBuffer.js +1 -0
  14. package/src/core/binary/msb_32.d.ts +7 -1
  15. package/src/core/binary/msb_32.d.ts.map +1 -1
  16. package/src/core/binary/msb_32.js +3 -12
  17. package/src/core/collection/RingBuffer.d.ts +1 -1
  18. package/src/core/collection/RingBuffer.js +1 -1
  19. package/src/core/{primitives/array/compareArrays.d.ts → collection/array/array_compare.d.ts} +2 -2
  20. package/src/core/collection/array/array_compare.d.ts.map +1 -0
  21. package/src/core/{primitives/array/compareArrays.js → collection/array/array_compare.js} +5 -1
  22. package/src/core/collection/array/{arrayIndexByEquality.d.ts → array_index_by_equality.d.ts} +2 -2
  23. package/src/core/collection/array/array_index_by_equality.d.ts.map +1 -0
  24. package/src/core/collection/array/{arrayIndexByEquality.js → array_index_by_equality.js} +1 -1
  25. package/src/core/collection/array/array_pick_best_element.d.ts.map +1 -0
  26. package/src/core/collection/array/{arrayPickBestElement.js → array_pick_best_element.js} +2 -2
  27. package/src/core/collection/array/array_pick_best_elements.d.ts +8 -0
  28. package/src/core/collection/array/array_pick_best_elements.d.ts.map +1 -0
  29. package/src/core/collection/array/{arrayPickBestElements.js → array_pick_best_elements.js} +1 -1
  30. package/src/core/collection/array/{arraySetDiff.d.ts → array_set_diff.d.ts} +3 -3
  31. package/src/core/collection/array/array_set_diff.d.ts.map +1 -0
  32. package/src/core/collection/array/{arraySetDiff.js → array_set_diff.js} +4 -4
  33. package/src/core/collection/array/{arraySetSortingDiff.d.ts → array_set_diff_sorting.d.ts} +2 -2
  34. package/src/core/collection/array/array_set_diff_sorting.d.ts.map +1 -0
  35. package/src/core/collection/array/{arraySetSortingDiff.js → array_set_diff_sorting.js} +1 -1
  36. package/src/core/collection/array/combine_hash.js +1 -1
  37. package/src/core/{primitives → collection}/array/computeIntegerArrayHash.d.ts.map +1 -1
  38. package/src/core/{primitives → collection}/array/computeStridedArrayHash.d.ts.map +1 -1
  39. package/src/core/{primitives → collection}/array/computeStridedIntegerArrayHash.d.ts.map +1 -1
  40. package/src/core/collection/array/randomMultipleFromArray.d.ts +6 -6
  41. package/src/core/collection/array/randomMultipleFromArray.d.ts.map +1 -1
  42. package/src/core/collection/array/randomMultipleFromArray.js +5 -5
  43. package/src/core/collection/array/typed/sparse_typed_array_hash.js +1 -1
  44. package/src/core/collection/array/typed/typedArrayConstructorByInstance.d.ts.map +1 -0
  45. package/src/core/collection/list/FilteredListProjection.d.ts.map +1 -1
  46. package/src/core/collection/list/FilteredListProjection.js +2 -2
  47. package/src/core/collection/list/List.js +4 -4
  48. package/src/core/geom/2d/Rectangle.d.ts.map +1 -1
  49. package/src/core/geom/2d/Rectangle.js +18 -5
  50. package/src/core/geom/2d/aabb/aabb2_overlap_exists.d.ts.map +1 -1
  51. package/src/core/geom/2d/aabb/aabb2_overlap_exists.js +4 -1
  52. package/src/core/geom/2d/convex-hull/fixed_convex_hull_humus.d.ts +3 -3
  53. package/src/core/geom/2d/convex-hull/fixed_convex_hull_humus.d.ts.map +1 -1
  54. package/src/core/geom/2d/convex-hull/fixed_convex_hull_humus.js +11 -4
  55. package/src/core/geom/2d/convex-hull/fixed_convex_hull_relaxation.js +2 -2
  56. package/src/core/geom/2d/convex-hull/orientation3_array.js +2 -2
  57. package/src/core/geom/2d/intersect_ray_2d.d.ts.map +1 -1
  58. package/src/core/geom/2d/intersect_ray_2d.js +5 -5
  59. package/src/core/geom/2d/{compute_triangle_area_2d.d.ts → triangle2d_compute_area.d.ts} +2 -2
  60. package/src/core/geom/2d/triangle2d_compute_area.d.ts.map +1 -0
  61. package/src/core/geom/2d/{compute_triangle_area_2d.js → triangle2d_compute_area.js} +1 -1
  62. package/src/core/geom/2d/triangle2d_contains_point.d.ts +14 -0
  63. package/src/core/geom/2d/triangle2d_contains_point.d.ts.map +1 -0
  64. package/src/core/geom/2d/triangle2d_contains_point.js +39 -0
  65. package/src/core/geom/2d/triangle2d_get_barycentric.d.ts +2 -2
  66. package/src/core/geom/2d/triangle2d_get_barycentric.d.ts.map +1 -1
  67. package/src/core/geom/2d/triangle2d_get_barycentric.js +1 -1
  68. package/src/core/geom/3d/topology/expandConnectivityByLocality.js +2 -2
  69. package/src/core/geom/Vector2.d.ts.map +1 -1
  70. package/src/core/geom/Vector2.js +2 -2
  71. package/src/core/math/bessel_3.d.ts +1 -1
  72. package/src/core/math/bessel_3.js +1 -1
  73. package/src/core/math/computeWholeDivisorLow.d.ts +1 -1
  74. package/src/core/math/computeWholeDivisorLow.d.ts.map +1 -1
  75. package/src/core/math/computeWholeDivisorLow.js +8 -5
  76. package/src/core/math/interval/separation1D.d.ts.map +1 -0
  77. package/src/core/math/{separation1D.js → interval/separation1D.js} +3 -3
  78. package/src/core/math/solveQuadratic.d.ts.map +1 -1
  79. package/src/core/math/solveQuadratic.js +10 -0
  80. package/src/core/model/object/compareValues.js +5 -5
  81. package/src/engine/EntityCreator.d.ts +11 -11
  82. package/src/engine/EntityCreator.d.ts.map +1 -1
  83. package/src/engine/EntityCreator.js +2 -4
  84. package/src/engine/ecs/EntityComponentDataset.js +3 -3
  85. package/src/engine/ecs/grid/HeightMap2NormalMap.js +2 -2
  86. package/src/engine/ecs/grid/NormalMap2AOMap.js +3 -3
  87. package/src/engine/graphics/ecs/mesh/SkeletonUtils.js +2 -2
  88. package/src/engine/graphics/impostors/octahedral/util/build_cutout_from_atlas_by_alpha.d.ts +2 -2
  89. package/src/engine/graphics/impostors/octahedral/util/build_cutout_from_atlas_by_alpha.d.ts.map +1 -1
  90. package/src/engine/graphics/impostors/octahedral/util/build_cutout_from_atlas_by_alpha.js +5 -55
  91. package/src/engine/graphics/impostors/octahedral/util/sampler2d_build_cutout.d.ts +9 -0
  92. package/src/engine/graphics/impostors/octahedral/util/sampler2d_build_cutout.d.ts.map +1 -0
  93. package/src/engine/graphics/impostors/octahedral/util/sampler2d_build_cutout.js +64 -0
  94. package/src/engine/graphics/sh3/path_tracer/material/MaterialConverter.js +2 -2
  95. package/src/engine/graphics/texture/sampler/Sampler2D.d.ts.map +1 -1
  96. package/src/engine/graphics/texture/sampler/Sampler2D.js +4 -2
  97. package/src/engine/graphics/texture/sampler/filter/kaiser_bessel_window.js +1 -1
  98. package/src/engine/graphics/texture/sampler/filter/sampler2d_scale_down_generic.js +1 -1
  99. package/src/engine/graphics/texture/sampler/sampler2d_multiply_vector.d.ts +8 -0
  100. package/src/engine/graphics/texture/sampler/sampler2d_multiply_vector.d.ts.map +1 -0
  101. package/src/engine/graphics/texture/sampler/{sampler_multiply_vector.js → sampler2d_multiply_vector.js} +1 -1
  102. package/src/engine/graphics/texture/sampler/sampler2d_to_float32_texture.d.ts +8 -0
  103. package/src/engine/graphics/texture/sampler/sampler2d_to_float32_texture.d.ts.map +1 -0
  104. package/src/engine/graphics/texture/sampler/{sampler2DToFloat32Texture.js → sampler2d_to_float32_texture.js} +2 -2
  105. package/src/engine/graphics/texture/sampler/util/drawSamplerHTML.d.ts.map +1 -1
  106. package/src/engine/graphics/texture/sampler/util/drawSamplerHTML.js +3 -1
  107. package/src/engine/grid/obstacle/GridObstacle.d.ts.map +1 -1
  108. package/src/engine/grid/obstacle/GridObstacle.js +1 -1
  109. package/src/engine/physics/computeInterceptPoint.js +20 -6
  110. package/src/engine/physics/mls-mpm/MLS_MPM.d.ts.map +1 -1
  111. package/src/engine/physics/mls-mpm/MLS_MPM.js +14 -17
  112. package/src/engine/platform/WebEnginePlatform.d.ts.map +1 -1
  113. package/src/engine/platform/WebEnginePlatform.js +4 -4
  114. package/src/engine/save/GameStateLoader.js +2 -2
  115. package/src/engine/ui/cursor/CursorCoalescence.d.ts.map +1 -1
  116. package/src/engine/ui/cursor/CursorCoalescence.js +2 -2
  117. package/src/view/elements/radial/RadialMenu.js +2 -2
  118. package/src/core/UUID.d.ts +0 -6
  119. package/src/core/UUID.d.ts.map +0 -1
  120. package/src/core/UUID.js +0 -21
  121. package/src/core/collection/array/arrayIndexByEquality.d.ts.map +0 -1
  122. package/src/core/collection/array/arrayPickBestElement.d.ts.map +0 -1
  123. package/src/core/collection/array/arrayPickBestElements.d.ts +0 -8
  124. package/src/core/collection/array/arrayPickBestElements.d.ts.map +0 -1
  125. package/src/core/collection/array/arraySetDiff.d.ts.map +0 -1
  126. package/src/core/collection/array/arraySetSortingDiff.d.ts.map +0 -1
  127. package/src/core/geom/2d/compute_triangle_area_2d.d.ts.map +0 -1
  128. package/src/core/geom/2d/convex-hull/orientation3.d.ts +0 -12
  129. package/src/core/geom/2d/convex-hull/orientation3.d.ts.map +0 -1
  130. package/src/core/geom/2d/convex-hull/orientation3.js +0 -489
  131. package/src/core/geom/2d/convex-hull/orientation3_v2.d.ts +0 -9
  132. package/src/core/geom/2d/convex-hull/orientation3_v2.d.ts.map +0 -1
  133. package/src/core/geom/2d/convex-hull/orientation3_v2.js +0 -12
  134. package/src/core/math/separation1D.d.ts.map +0 -1
  135. package/src/core/primitives/array/compareArrays.d.ts.map +0 -1
  136. package/src/engine/graphics/texture/sampler/sampler2DToFloat32Texture.d.ts +0 -8
  137. package/src/engine/graphics/texture/sampler/sampler2DToFloat32Texture.d.ts.map +0 -1
  138. package/src/engine/graphics/texture/sampler/sampler_multiply_vector.d.ts +0 -8
  139. package/src/engine/graphics/texture/sampler/sampler_multiply_vector.d.ts.map +0 -1
  140. package/src/engine/graphics/texture/sampler/typedArrayConstructorByInstance.d.ts.map +0 -1
  141. package/src/engine/save/storage/InMemoryLocalStorage.d.ts +0 -6
  142. package/src/engine/save/storage/InMemoryLocalStorage.d.ts.map +0 -1
  143. package/src/engine/save/storage/InMemoryLocalStorage.js +0 -13
  144. /package/src/core/collection/array/{arrayPickBestElement.d.ts → array_pick_best_element.d.ts} +0 -0
  145. /package/src/core/{primitives → collection}/array/computeIntegerArrayHash.d.ts +0 -0
  146. /package/src/core/{primitives → collection}/array/computeIntegerArrayHash.js +0 -0
  147. /package/src/core/{primitives → collection}/array/computeStridedArrayHash.d.ts +0 -0
  148. /package/src/core/{primitives → collection}/array/computeStridedArrayHash.js +0 -0
  149. /package/src/core/{primitives → collection}/array/computeStridedIntegerArrayHash.d.ts +0 -0
  150. /package/src/core/{primitives → collection}/array/computeStridedIntegerArrayHash.js +0 -0
  151. /package/src/{engine/graphics/texture/sampler → core/collection/array/typed}/typedArrayConstructorByInstance.d.ts +0 -0
  152. /package/src/{engine/graphics/texture/sampler → core/collection/array/typed}/typedArrayConstructorByInstance.js +0 -0
  153. /package/src/core/math/{separation1D.d.ts → interval/separation1D.d.ts} +0 -0
@@ -0,0 +1,64 @@
1
+ import { array_copy } from "../../../../../core/collection/array/array_copy.js";
2
+ import { compute_polygon_area_2d } from "../../../../../core/geom/2d/compute_polygon_area_2d.js";
3
+ import { convex_hull_jarvis_2d } from "../../../../../core/geom/2d/convex-hull/convex_hull_jarvis_2d.js";
4
+ import { fixed_convex_hull_relaxation } from "../../../../../core/geom/2d/convex-hull/fixed_convex_hull_relaxation.js";
5
+ import {
6
+ make_edge_condition_channel_threshold
7
+ } from "../../../texture/sampler/search/make_edge_condition_channel_threshold.js";
8
+ import { sampler2d_find_pixels } from "../../../texture/sampler/search/sampler2d_find_pixels.js";
9
+
10
+ /**
11
+ *
12
+ * @param {Sampler2D} accumulator
13
+ * @param {number} vertex_limit
14
+ * @param {number} frame_size
15
+ * @returns {Float32Array}
16
+ */
17
+ export function sampler2d_build_cutout(accumulator, vertex_limit, frame_size) {
18
+ const edge_pixels = sampler2d_find_pixels(accumulator, make_edge_condition_channel_threshold(0, 5));
19
+
20
+ // filtered pixels
21
+ const filtered_edge_pixels = [];
22
+
23
+ const half_pixel = 0.5;
24
+
25
+ for (let i = 0; i < edge_pixels.length; i += 2) {
26
+ const x = edge_pixels[i];
27
+ const y = edge_pixels[i + 1];
28
+
29
+ filtered_edge_pixels.push(x - half_pixel, y - half_pixel);
30
+ filtered_edge_pixels.push(x + half_pixel, y - half_pixel);
31
+ filtered_edge_pixels.push(x + half_pixel, y + half_pixel);
32
+ filtered_edge_pixels.push(x - half_pixel, y + half_pixel);
33
+ }
34
+
35
+ const hull_point_indices = convex_hull_jarvis_2d(filtered_edge_pixels, filtered_edge_pixels.length / 2);
36
+
37
+ const hull_points = [];
38
+
39
+ for (let i = 0; i < hull_point_indices.length; i++) {
40
+ const hpi = hull_point_indices[i];
41
+
42
+ array_copy(filtered_edge_pixels, hpi * 2, hull_points, i * 2, 2);
43
+ }
44
+
45
+ const cutout_points = new Float32Array(vertex_limit * 2);
46
+
47
+ fixed_convex_hull_relaxation(cutout_points, 0, vertex_limit, hull_points, hull_point_indices.length);
48
+
49
+ const area = compute_polygon_area_2d(cutout_points, vertex_limit);
50
+
51
+ console.log(`Cutout area: ${area}`);
52
+
53
+ if (area >= 0.99 && vertex_limit >= 4) {
54
+ // default back to aligned quad, produced result is a degradation
55
+ return new Float32Array([
56
+ 0, 0,
57
+ accumulator.width, 0,
58
+ accumulator.width, accumulator.height,
59
+ 0, accumulator.height
60
+ ]);
61
+ }
62
+
63
+ return cutout_points;
64
+ }
@@ -1,6 +1,6 @@
1
1
  import { Color } from "three";
2
2
  import { convertTexture2Sampler2D } from "../../../texture/sampler/convertTexture2Sampler2D.js";
3
- import { sampler_multiply_vector } from "../../../texture/sampler/sampler_multiply_vector.js";
3
+ import { sampler2d_multiply_vector } from "../../../texture/sampler/sampler2d_multiply_vector.js";
4
4
  import { iterate_three_material_textures } from "../../../three/material/iterate_three_material_textures.js";
5
5
  import { StandardMaterial } from "./StandardMaterial.js";
6
6
  import { StandardTexture } from "./StandardTexture.js";
@@ -94,7 +94,7 @@ export class MaterialConverter {
94
94
 
95
95
  tinted_diffuse.sampler = tinted_diffuse.sampler.clone();
96
96
 
97
- sampler_multiply_vector(tinted_diffuse.sampler, result.diffuse.sampler, material.color.toArray());
97
+ sampler2d_multiply_vector(tinted_diffuse.sampler, result.diffuse.sampler, material.color.toArray());
98
98
 
99
99
  result.diffuse = tinted_diffuse;
100
100
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Sampler2D.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/sampler/Sampler2D.js"],"names":[],"mappings":"AAiBA;;;;GAIG;AACH;IAk8BI;;;;;;OAMG;IACH,6DAFY,SAAS,CAKpB;IAED;;;;;;OAMG;IACH,sDAFY,SAAS,CAKpB;IAED;;;;;;OAMG;IACH,uDAFY,SAAS,CAKpB;IAED;;;;;;OAMG;IACH,uDAFY,SAAS,CAKpB;IAED;;;;;;OAMG;IACH,qDAFY,SAAS,CAKpB;IAED;;;;;;OAMG;IACH,sDAFY,SAAS,CAKpB;IAED;;;;;;OAMG;IACH,sDAFY,SAAS,CAKpB;IAED;;;;;;OAMG;IACH,wDAFY,SAAS,CAKpB;IAED;;;;;;OAMG;IACH,wDAFY,SAAS,CAKpB;IA3iCD;;;;;;;OAOG;IACH,mBANW,UAAU,MAAM,CAAC,GAAC,MAAM,EAAE,GAAC,iBAAiB,GAAC,UAAU,GAAC,WAAW,GAAC,WAAW,GAAC,SAAS,GAAC,UAAU,GAAC,UAAU,GAAC,YAAY,GAAC,YAAY,aACzI,MAAM,UACN,MAAM,WACN,MAAM,EAmDhB;IA7BG;;;OAGG;IACH,cAAkB;IAElB;;;OAGG;IACH,eAAoB;IAEpB;;;OAGG;IACH,iBAAwB;IAExB;;;OAGG;IACH,MAFU,MAA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;IAED;;;;;;OAMG;IACH,eALW,MAAM,KACN,MAAM,WACN,MAAM,GACJ,MAAM,CAalB;IAED;;;;;OAKG;IACH,QAJW,MAAM,KACN,MAAM,UACN,MAAM,EAAE,QAalB;IAED;;;;;OAKG;IACH,SAJW,MAAM,KACN,MAAM,QACN,MAAM,EAAE,GAAC,UAAU,MAAM,CAAC,QAapC;IAED;;;;;;OAMG;IACH,UALW,MAAM,KACN,MAAM,WACN,2BAAuB,OAajC;IAED;;;;;OAKG;IACH,eAJW,MAAM,KACN,MAAM,GACJ,MAAM,CAIlB;IAED;;;;OAIG;IACH,mBAHW,MAAM,yBAUhB;IAED;;;;;;;;;OASG;IACH,aARW,SAAS,qHAoDnB;IAGD;;;;;;;OAOG;IACH,oEA8BC;IAED;;;;OAIG;IACH,2BAHW,MAAM,SACN,MAAM,QAYhB;IAED;;;;;;;OAOG;IACH,iEAFW,aAAc,QAqCxB;IAED;;;;;;OAMG;IACH,gBALW,MAAM,KACN,MAAM,WACN,MAAM,SACN,MAAM,QAqBhB;IAED;;;;;OAKG;IACH,OAJW,MAAM,KACN,MAAM,SACN,MAAM,EAAE,GAAC,YAAY,QAe/B;IAED;;;;;;;OAOG;IACH,wBALW,MAAM,WACN,MAAM,UACN,MAAM,sBAyBhB;IAED;;;;;OAKG;IACH,UAJW,MAAM,KACN,MAAM,iBACN,OAAO,QAyDjB;IAED;;;OAGG;IACH,mBAFY,MAAM,CAYjB;IAED;;;;OAIG;IACH,cAHW,SAAS,GACR,OAAO,CAYlB;IAED;;;OAGG;IACH,QAFY,MAAM,CAYjB;IAGD;;OAEG;IACH,SAFa,SAAS,CAerB;IAED;;;;;;MAUC;IAED;;;;;;aAwBC;IAgHL;;;OAGG;IACH,sBAFU,OAAO,CAEc;CAN9B;;kBAUS,MAAM"}
1
+ {"version":3,"file":"Sampler2D.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/sampler/Sampler2D.js"],"names":[],"mappings":"AAmBA;;;;GAIG;AACH;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QAYhB;IAED;;;;;;;OAOG;IACH,iEAFW,aAAc,QAqCxB;IAED;;;;;;OAMG;IACH,gBALW,MAAM,KACN,MAAM,WACN,MAAM,SACN,MAAM,QAqBhB;IAED;;;;;OAKG;IACH,OAJW,MAAM,KACN,MAAM,SACN,MAAM,EAAE,GAAC,YAAY,QAe/B;IAED;;;;;;;OAOG;IACH,wBALW,MAAM,WACN,MAAM,UACN,MAAM,sBAyBhB;IAED;;;;;OAKG;IACH,UAJW,MAAM,KACN,MAAM,iBACN,OAAO,QAyDjB;IAED;;;OAGG;IACH,mBAFY,MAAM,CAYjB;IAED;;;;OAIG;IACH,cAHW,SAAS,GACR,OAAO,CAYlB;IAED;;;OAGG;IACH,QAFY,MAAM,CAYjB;IAGD;;OAEG;IACH,SAFa,SAAS,CAerB;IAED;;;;;;MAUC;IAED;;;;;;aAwBC;IAgHL;;;OAGG;IACH,sBAFU,OAAO,CAEc;CAN9B;;kBAUS,MAAM"}
@@ -3,17 +3,19 @@ import { Base64 } from "../../../../core/binary/Base64.js";
3
3
  import {
4
4
  compute_typed_array_constructor_from_data_type
5
5
  } from "../../../../core/binary/type/DataType2TypedArrayConstructorMapping.js";
6
+ import { computeStridedIntegerArrayHash } from "../../../../core/collection/array/computeStridedIntegerArrayHash.js";
6
7
  import {
7
8
  compute_binary_data_type_from_typed_array
8
9
  } from "../../../../core/collection/array/typed/compute_binary_data_type_from_typed_array.js";
9
10
  import { is_typed_array_equals } from "../../../../core/collection/array/typed/is_typed_array_equals.js";
11
+ import {
12
+ typedArrayConstructorByInstance
13
+ } from "../../../../core/collection/array/typed/typedArrayConstructorByInstance.js";
10
14
  import { clamp } from "../../../../core/math/clamp.js";
11
15
  import { lerp } from "../../../../core/math/lerp.js";
12
16
  import { max2 } from "../../../../core/math/max2.js";
13
17
  import { min2 } from "../../../../core/math/min2.js";
14
18
  import { interpolate_bicubic } from "../../../../core/math/spline/interpolate_bicubic.js";
15
- import { computeStridedIntegerArrayHash } from "../../../../core/primitives/array/computeStridedIntegerArrayHash.js";
16
- import { typedArrayConstructorByInstance } from "./typedArrayConstructorByInstance.js";
17
19
 
18
20
  /**
19
21
  * Data Texture class, providing an abstraction around 2d numerical arrays, mostly for sampling purposes
@@ -19,4 +19,4 @@ export function kaiser_bessel_window(x) {
19
19
  return bessel_3(PI3 * t) * INV_BESSEL_3_PI_3;
20
20
  }
21
21
 
22
- kaiser_bessel_window.support = 2;
22
+ kaiser_bessel_window.support = 1;
@@ -31,7 +31,7 @@ export function sampler2d_scale_down_generic(
31
31
  const ratio_x = source_width / d_w;
32
32
  const ratio_y = source_height / d_h;
33
33
 
34
- const rcp_ratio_y = 2 / ratio_x;
34
+ const rcp_ratio_y = 2 / ratio_y;
35
35
  const rcp_ratio_x = 2 / ratio_x;
36
36
 
37
37
 
@@ -0,0 +1,8 @@
1
+ /**
2
+ *
3
+ * @param {Sampler2D} output
4
+ * @param {Sampler2D} input
5
+ * @param {number[]} vector
6
+ */
7
+ export function sampler2d_multiply_vector(output: Sampler2D, input: Sampler2D, vector: number[]): void;
8
+ //# sourceMappingURL=sampler2d_multiply_vector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sampler2d_multiply_vector.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/sampler/sampler2d_multiply_vector.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,uFAFW,MAAM,EAAE,QAkBlB"}
@@ -4,7 +4,7 @@
4
4
  * @param {Sampler2D} input
5
5
  * @param {number[]} vector
6
6
  */
7
- export function sampler_multiply_vector(output, input, vector) {
7
+ export function sampler2d_multiply_vector(output, input, vector) {
8
8
 
9
9
  const pixel_count = input.width * input.height;
10
10
  const item_size = input.itemSize;
@@ -0,0 +1,8 @@
1
+ /**
2
+ *
3
+ * @param {Sampler2D} sampler
4
+ * @returns {DataTexture}
5
+ */
6
+ export function sampler2d_to_float32_texture(sampler: Sampler2D): DataTexture;
7
+ import { DataTexture } from "three";
8
+ //# sourceMappingURL=sampler2d_to_float32_texture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sampler2d_to_float32_texture.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/texture/sampler/sampler2d_to_float32_texture.js"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,kEAFa,WAAW,CA2BvB;4BApCwF,OAAO"}
@@ -1,15 +1,15 @@
1
1
  import { ClampToEdgeWrapping, DataTexture, FloatType, LinearFilter, NearestFilter } from "three";
2
2
  import { assert } from "../../../../core/assert.js";
3
+ import { BinaryDataType } from "../../../../core/binary/type/BinaryDataType.js";
3
4
  import { channelCountToThreeTextureFormat } from "../channelCountToThreeTextureFormat.js";
4
5
  import { computeThreeTextureInternalFormatFromDataType } from "../computeThreeTextureInternalFormatFromDataType.js";
5
- import { BinaryDataType } from "../../../../core/binary/type/BinaryDataType.js";
6
6
 
7
7
  /**
8
8
  *
9
9
  * @param {Sampler2D} sampler
10
10
  * @returns {DataTexture}
11
11
  */
12
- export function sampler2DtoFloat32Texture(sampler) {
12
+ export function sampler2d_to_float32_texture(sampler) {
13
13
  assert.ok(sampler.data instanceof Float32Array);
14
14
 
15
15
  const width = sampler.width;
@@ -1 +1 @@
1
- {"version":3,"file":"drawSamplerHTML.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/sampler/util/drawSamplerHTML.js"],"names":[],"mappings":"AAKA;;;;;;;;;GASG;AACH,4CARW,WAAW,WACX,SAAS,KACT,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,QACN,MAAM,QA6BhB;0BAzCyB,iBAAiB"}
1
+ {"version":3,"file":"drawSamplerHTML.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/texture/sampler/util/drawSamplerHTML.js"],"names":[],"mappings":"AAOA;;;;;;;;;GASG;AACH,4CARW,WAAW,WACX,SAAS,KACT,MAAM,KACN,MAAM,SACN,MAAM,UACN,MAAM,QACN,MAAM,QA6BhB;0BAxCyB,iBAAiB"}
@@ -1,7 +1,9 @@
1
+ import {
2
+ typedArrayConstructorByInstance
3
+ } from "../../../../../core/collection/array/typed/typedArrayConstructorByInstance.js";
1
4
  import { sampler2d_scale } from "../resize/sampler2d_scale.js";
2
5
  import { Sampler2D } from "../Sampler2D.js";
3
6
  import sampler2d_to_html_canvas from "../sampler2d_to_html_canvas.js";
4
- import { typedArrayConstructorByInstance } from "../typedArrayConstructorByInstance.js";
5
7
 
6
8
  /**
7
9
  *
@@ -1 +1 @@
1
- {"version":3,"file":"GridObstacle.d.ts","sourceRoot":"","sources":["../../../../../src/engine/grid/obstacle/GridObstacle.js"],"names":[],"mappings":";AAMA;IA0NI,sCAMC;IA/ND,eAAW;IAEX;;;OAGG;IACH,eAFU,OAAO,CAEQ;IAEzB;;;;OAIG;IACH,UAHW,MAAM,KACN,MAAM,QAiChB;IAED;;;;;;OAMG;IACH,sBALW,MAAM,WACN,MAAM,qCAmChB;IAED;;;;;OAKG;IACH,aAJW,MAAM,KACN,MAAM,GACJ,MAAM,CAWlB;IAED;;;;;OAKG;IACH,cAJW,MAAM,KACN,MAAM,SACN,MAAM,QAShB;IAED;;;;;OAKG;IACH,iBAJW,MAAM,KACN,MAAM,GACJ,OAAO,CAYnB;IAED;;;;;;OAMG;IACH,mBALW,MAAM,KACN,MAAM,iBACN,MAAM,EAAE,GACN,OAAO,CAoDnB;IAED;;;MAKC;IAED;;;aAaC;IAUD;;;OAGG;IACH,QAFa,MAAM,CAOlB;IAED;;;;OAIG;IACH,cAHW,YAAY,GACV,OAAO,CAQnB;CACJ;;;;oBA5PmB,+BAA+B"}
1
+ {"version":3,"file":"GridObstacle.d.ts","sourceRoot":"","sources":["../../../../../src/engine/grid/obstacle/GridObstacle.js"],"names":[],"mappings":";AAMA;IA0NI,sCAMC;IA/ND,eAAW;IAEX;;;OAGG;IACH,eAFU,OAAO,CAEQ;IAEzB;;;;OAIG;IACH,UAHW,MAAM,KACN,MAAM,QAiChB;IAED;;;;;;OAMG;IACH,sBALW,MAAM,WACN,MAAM,qCAmChB;IAED;;;;;OAKG;IACH,aAJW,MAAM,KACN,MAAM,GACJ,MAAM,CAWlB;IAED;;;;;OAKG;IACH,cAJW,MAAM,KACN,MAAM,SACN,MAAM,QAShB;IAED;;;;;OAKG;IACH,iBAJW,MAAM,KACN,MAAM,GACJ,OAAO,CAYnB;IAED;;;;;;OAMG;IACH,mBALW,MAAM,KACN,MAAM,iBACN,MAAM,EAAE,GACN,OAAO,CAoDnB;IAED;;;MAKC;IAED;;;aAaC;IAUD;;;OAGG;IACH,QAFa,MAAM,CAOlB;IAED;;;;OAIG;IACH,cAHW,YAAY,GACV,OAAO,CAQnB;CACJ;;;;oBA3PmB,+BAA+B"}
@@ -1,8 +1,8 @@
1
1
  import { assert } from "../../../core/assert.js";
2
2
  import { combine_hash } from "../../../core/collection/array/combine_hash.js";
3
+ import { computeIntegerArrayHash } from "../../../core/collection/array/computeIntegerArrayHash.js";
3
4
  import { isArrayEqualStrict } from "../../../core/collection/array/isArrayEqualStrict.js";
4
5
  import Vector2 from '../../../core/geom/Vector2.js';
5
- import { computeIntegerArrayHash } from "../../../core/primitives/array/computeIntegerArrayHash.js";
6
6
 
7
7
  class GridObstacle {
8
8
  data = [1];
@@ -2,13 +2,14 @@ import { v3_dot } from "../../core/geom/vec3/v3_dot.js";
2
2
  import { solveQuadratic } from "../../core/math/solveQuadratic.js";
3
3
 
4
4
  /**
5
- *
5
+ * Given position of the source point, and target moving at a constant velocity, compute intercept.
6
+ * Simple example would be {@link target} being enemy running, and {@link source} being position of our archer, given that the arrow speed is {@link sourceSpeed}, where should the archer aim at in order to hit the moving target?
6
7
  * @param {Vector3} result
7
8
  * @param {Vector3} source
8
9
  * @param {Vector3} target
9
10
  * @param {Vector3} targetVelocity
10
11
  * @param {number} sourceSpeed
11
- * @return {boolean}
12
+ * @return {boolean} true iff there is at least oen real solution
12
13
  */
13
14
  function computeInterceptPoint(result, source, target, targetVelocity, sourceSpeed) {
14
15
  const d_ts_x = target.x - source.x;
@@ -30,15 +31,28 @@ function computeInterceptPoint(result, source, target, targetVelocity, sourceSpe
30
31
 
31
32
  // Find smallest positive solution
32
33
  if (root_count > 0) {
33
- const t0 = ts[0], t1 = ts[1];
34
- let t = Math.min(t0, t1);
35
- if (t < 0) t = Math.max(t0, t1);
34
+ const root_0 = ts[0];
35
+ const root_1 = ts[1];
36
+
37
+ let t = Math.min(root_0, root_1);
38
+
39
+ if (t < 0) {
40
+ // one of the roots is negative, which would produce imaginary solution, so let's try to pick the other one
41
+ t = Math.max(root_0, root_1);
42
+ }
36
43
 
37
44
  if (t > 0) {
38
- result.copy(targetVelocity).multiplyScalar(t).add(target);
45
+
46
+ result.copy(targetVelocity);
47
+ result.multiplyScalar(t);
48
+ result.add(target);
49
+
39
50
  return true;
51
+
40
52
  }
41
53
 
54
+ // if we got to this point, that means that both roots are imaginary, so there is no real solution
55
+
42
56
  }
43
57
  return false;
44
58
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MLS_MPM.d.ts","sourceRoot":"","sources":["../../../../../src/engine/physics/mls-mpm/MLS_MPM.js"],"names":[],"mappings":"AA2HA;IAGQ,iBAAmB;IAGnB;;;;;OAKG;IACH,MAFU,YAAY,CAEiB;IAI3C;;;OAGG;IACH,YAFW,MAAM,QAwVhB;IAED,0CAeC;CACJ"}
1
+ {"version":3,"file":"MLS_MPM.d.ts","sourceRoot":"","sources":["../../../../../src/engine/physics/mls-mpm/MLS_MPM.js"],"names":[],"mappings":"AAwHA;IAGQ,iBAAmB;IAGnB;;;;;OAKG;IACH,MAFU,YAAY,CAEiB;IAI3C;;;OAGG;IACH,YAFW,MAAM,QAwVhB;IAED,0CAeC;CACJ"}
@@ -1,10 +1,10 @@
1
- import { clamp } from "../../../core/math/clamp.js";
2
- import { m2_multiply } from "../../../core/geom/mat2/m2_multiply.js";
3
- import { m2_multiply_transposed } from "../../../core/geom/mat2/m2_multiply_transposed.js";
1
+ import { m2_add } from "../../../core/geom/mat2/m2_add.js";
4
2
  import { m2_determinant } from "../../../core/geom/mat2/m2_determinant.js";
3
+ import { m2_multiply } from "../../../core/geom/mat2/m2_multiply.js";
5
4
  import { m2_multiply_scalar } from "../../../core/geom/mat2/m2_multiply_scalar.js";
6
- import { m2_add } from "../../../core/geom/mat2/m2_add.js";
5
+ import { m2_multiply_transposed } from "../../../core/geom/mat2/m2_multiply_transposed.js";
7
6
  import { m2_sub_transposed } from "../../../core/geom/mat2/m2_sub_transposed.js";
7
+ import { clamp } from "../../../core/math/clamp.js";
8
8
 
9
9
 
10
10
  /**
@@ -14,22 +14,16 @@ import { m2_sub_transposed } from "../../../core/geom/mat2/m2_sub_transposed.js"
14
14
  * @param {number[]} m
15
15
  */
16
16
  function polar_decomp(R, S, m) {
17
- const x = m[0] + m[3];
18
- const y = m[2] - m[1];
19
-
20
- const scale = 1.0 / Math.sqrt(x * x + y * y);
21
-
22
- const c = x * scale;
23
- const s = y * scale;
24
-
25
- R[0] = c;
26
- R[1] = s;
27
- R[2] = -s;
28
- R[3] = c;
17
+ polar_decomp_noS(R, m);
29
18
 
30
19
  m2_multiply(S, m, R);
31
20
  }
32
21
 
22
+ /**
23
+ *
24
+ * @param {number[]} R
25
+ * @param {number[]} m
26
+ */
33
27
  function polar_decomp_noS(R, m) { // transposed as in taichi
34
28
  const x = m[0] + m[3];
35
29
  const y = m[2] - m[1];
@@ -119,7 +113,10 @@ function svd(U, S, V, sig, m) { // transposed as in taichi
119
113
 
120
114
  const dimensions = 2;
121
115
 
122
- const m2_indentity = [1, 0, 0, 1];
116
+ const m2_indentity = [
117
+ 1, 0,
118
+ 0, 1
119
+ ];
123
120
 
124
121
  export class MLS_MPMSolver {
125
122
  constructor() {
@@ -1 +1 @@
1
- {"version":3,"file":"WebEnginePlatform.d.ts","sourceRoot":"","sources":["../../../../src/engine/platform/WebEnginePlatform.js"],"names":[],"mappings":"AAMA;IACI;;OAiBC;IAZG;;;OAGG;IACH,SAFU,OAAO,CAE6C;IAG9D;;;OAGG;IACH,cAFU,yBAAyB,CAE4B;IAGnE,sBAEC;IAED,mDAEC;IAED,2CA+DC;CACJ;+BAlG8B,qBAAqB;0CAEV,sDAAsD"}
1
+ {"version":3,"file":"WebEnginePlatform.d.ts","sourceRoot":"","sources":["../../../../src/engine/platform/WebEnginePlatform.js"],"names":[],"mappings":"AAMA;IACI;;OAiBC;IAZG;;;OAGG;IACH,SAFU,OAAO,CAE6C;IAG9D;;;OAGG;IACH,cAFU,yBAAyB,CAE4B;IAGnE,sBAEC;IAED,mDAEC;IAED,2CA+DC;CACJ;+BA/F8B,qBAAqB;0CAFV,sDAAsD"}
@@ -1,7 +1,7 @@
1
- import { EnginePlatform } from "./EnginePlatform.js";
2
- import { IndexedDBStorage } from "../save/storage/IndexedDBStorage.js";
1
+ import { array_pick_best_element } from "../../core/collection/array/array_pick_best_element.js";
3
2
  import { StorageAchievementGateway } from "../achievements/gateway/StorageAchievementGateway.js";
4
- import { arrayPickBestElement } from "../../core/collection/array/arrayPickBestElement.js";
3
+ import { IndexedDBStorage } from "../save/storage/IndexedDBStorage.js";
4
+ import { EnginePlatform } from "./EnginePlatform.js";
5
5
  import { getURLHash } from "./GetURLHash.js";
6
6
 
7
7
  export class WebEnginePlatform extends EnginePlatform {
@@ -76,7 +76,7 @@ export class WebEnginePlatform extends EnginePlatform {
76
76
  };
77
77
  });
78
78
 
79
- const best = arrayPickBestElement(scoredKeys, o => o.score);
79
+ const best = array_pick_best_element(scoredKeys, o => o.score);
80
80
 
81
81
  if (best.score === 0) {
82
82
  return 'en-gb';
@@ -1,5 +1,5 @@
1
1
  import { GameSaveStateMetadata } from "../../../../view/game/save/GameSaveStateMetadata.js";
2
- import { arrayPickBestElement } from "../../core/collection/array/arrayPickBestElement.js";
2
+ import { array_pick_best_element } from "../../core/collection/array/array_pick_best_element.js";
3
3
  import { EnginePlugin } from "../plugin/EnginePlugin.js";
4
4
 
5
5
  class GameStateLoader extends EnginePlugin {
@@ -98,7 +98,7 @@ class GameStateLoader extends EnginePlugin {
98
98
  });
99
99
 
100
100
  //find most recent
101
- const mostRecent = arrayPickBestElement(matches, m => m.timestamp);
101
+ const mostRecent = array_pick_best_element(matches, m => m.timestamp);
102
102
 
103
103
 
104
104
  if (mostRecent === undefined) {
@@ -1 +1 @@
1
- {"version":3,"file":"CursorCoalescence.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ui/cursor/CursorCoalescence.js"],"names":[],"mappings":"AAGA;IAGQ;;;OAGG;IACH,kBAFU,UAAU,EAAE,CAOrB;IAED,eAAiB;IAGrB;;;OAGG;IACH,0BAFW,UAAU,EAAE,QAItB;IAED,cAEC;IAED;;;OAGG;IACH,YAFW,UAAU,QAMpB;IAED;;OAEG;IACH,OAFa,UAAU,CAKtB;CACJ;2BAjD0B,iBAAiB"}
1
+ {"version":3,"file":"CursorCoalescence.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ui/cursor/CursorCoalescence.js"],"names":[],"mappings":"AAGA;IAGQ;;;OAGG;IACH,kBAFU,UAAU,EAAE,CAOrB;IAED,eAAiB;IAGrB;;;OAGG;IACH,0BAFW,UAAU,EAAE,QAItB;IAED,cAEC;IAED;;;OAGG;IACH,YAFW,UAAU,QAMpB;IAED;;OAEG;IACH,OAFa,UAAU,CAKtB;CACJ;2BAhD0B,iBAAiB"}
@@ -1,5 +1,5 @@
1
+ import { array_pick_best_element } from "../../../core/collection/array/array_pick_best_element.js";
1
2
  import { CursorType } from "./CursorType.js";
2
- import { arrayPickBestElement } from "../../../core/collection/array/arrayPickBestElement.js";
3
3
 
4
4
  export class CursorCoalescence {
5
5
  constructor() {
@@ -45,6 +45,6 @@ export class CursorCoalescence {
45
45
  */
46
46
  get() {
47
47
  //pick best
48
- return arrayPickBestElement(this.cursors, c => this.cursorPriorities.indexOf(c));
48
+ return array_pick_best_element(this.cursors, c => this.cursorPriorities.indexOf(c));
49
49
  }
50
50
  }
@@ -1,4 +1,4 @@
1
- import { arraySetDiff } from "../../../core/collection/array/arraySetDiff.js";
1
+ import { array_set_diff } from "../../../core/collection/array/array_set_diff.js";
2
2
  import List from "../../../core/collection/list/List.js";
3
3
  import Vector2 from "../../../core/geom/Vector2.js";
4
4
  import SVG from "../../SVG.js";
@@ -366,7 +366,7 @@ class RadialMenu extends View {
366
366
  }
367
367
  }
368
368
 
369
- const diff = arraySetDiff(this.selected.asArray(), selected);
369
+ const diff = array_set_diff(this.selected.asArray(), selected);
370
370
 
371
371
  const removals = diff.uniqueA;
372
372
  const additions = diff.uniqueB;
@@ -1,6 +0,0 @@
1
- /**
2
- * @deprecated
3
- */
4
- export default class UUID {
5
- static generate(): string
6
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"UUID.d.ts","sourceRoot":"","sources":["../../../src/core/UUID.js"],"names":[],"mappings":";;;;AAEA;;;;;GAKG;AACH,yBAFa,MAAM,CAIlB"}
package/src/core/UUID.js DELETED
@@ -1,21 +0,0 @@
1
- import { UUID } from "../engine/ecs/guid/UUID.js";
2
-
3
- /**
4
- * Generates a variant 4 fully random UUID in string format
5
- * @deprecated
6
- * NOTE: Prefer to use UUID component class instead as that implementation is more robust and has better entropy when it comes to randomness
7
- * @returns {string}
8
- */
9
- function uuid() {
10
- return UUID.string();
11
- }
12
-
13
- /**
14
- * @deprecated
15
- */
16
- export default {
17
- /**
18
- * @deprecated
19
- */
20
- generate: uuid
21
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"arrayIndexByEquality.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/array/arrayIndexByEquality.js"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,8EAFa,MAAM,CAclB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"arrayPickBestElement.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/array/arrayPickBestElement.js"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,2EAkCC"}
@@ -1,8 +0,0 @@
1
- /**
2
- * @template T
3
- * @param {T[]} array
4
- * @param {function(el:T, index:number):number} scoreFunction
5
- * @returns {T[]}
6
- */
7
- export function arrayPickBestElements<T>(array: T[], scoreFunction: any): T[];
8
- //# sourceMappingURL=arrayPickBestElements.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"arrayPickBestElements.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/array/arrayPickBestElements.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,8EA0CC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"arraySetDiff.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/array/arraySetDiff.js"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AACH;;;;EAoCC;6BAhD4B,gCAAgC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"arraySetSortingDiff.d.ts","sourceRoot":"","sources":["../../../../../src/core/collection/array/arraySetSortingDiff.js"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH;;;;EAsDC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"compute_triangle_area_2d.d.ts","sourceRoot":"","sources":["../../../../../src/core/geom/2d/compute_triangle_area_2d.js"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,6CARW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,GACJ,MAAM,CAclB"}
@@ -1,12 +0,0 @@
1
- /**
2
- *
3
- * @param {number} ax
4
- * @param {number} ay
5
- * @param {number} bx
6
- * @param {number} by
7
- * @param {number} cx
8
- * @param {number} cy
9
- * @returns {number}
10
- */
11
- export function orientation3(ax: number, ay: number, bx: number, by: number, cx: number, cy: number): number;
12
- //# sourceMappingURL=orientation3.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"orientation3.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/2d/convex-hull/orientation3.js"],"names":[],"mappings":"AA+bA;;;;;;;;;GASG;AACH,iCARW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,GACJ,MAAM,CAiClB"}