@woosh/meep-engine 2.89.4 → 2.90.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 (33) hide show
  1. package/build/meep.cjs +35 -27
  2. package/build/meep.min.js +1 -1
  3. package/build/meep.module.js +35 -27
  4. package/package.json +1 -1
  5. package/src/core/geom/2d/circle/Circle.js +2 -2
  6. package/src/core/geom/2d/circle/circle_compute_circle_intersection.d.ts +14 -0
  7. package/src/core/geom/2d/circle/circle_compute_circle_intersection.d.ts.map +1 -0
  8. package/src/core/geom/2d/circle/circle_compute_circle_intersection.js +64 -0
  9. package/src/core/geom/2d/circle/circle_compute_circle_intersection.spec.d.ts +2 -0
  10. package/src/core/geom/2d/circle/circle_compute_circle_intersection.spec.d.ts.map +1 -0
  11. package/src/core/geom/2d/circle/circle_compute_circle_intersection.spec.js +79 -0
  12. package/src/core/geom/2d/circle/{computeCircleCirclePenetrationDistance.d.ts → circle_compute_circle_penetration.d.ts} +2 -2
  13. package/src/core/geom/2d/circle/circle_compute_circle_penetration.d.ts.map +1 -0
  14. package/src/core/geom/2d/circle/{computeCircleCirclePenetrationDistance.js → circle_compute_circle_penetration.js} +6 -4
  15. package/src/core/geom/2d/circle/{circleIntersectsCircle.d.ts → circle_intersects_circle.d.ts} +2 -2
  16. package/src/core/geom/2d/circle/circle_intersects_circle.d.ts.map +1 -0
  17. package/src/core/geom/2d/circle/{circleIntersectsCircle.js → circle_intersects_circle.js} +1 -1
  18. package/src/core/geom/2d/circle/{circleIntersectsPoint.d.ts → circle_intersects_point.d.ts} +2 -2
  19. package/src/core/geom/2d/circle/circle_intersects_point.d.ts.map +1 -0
  20. package/src/core/geom/2d/circle/{circleIntersectsPoint.js → circle_intersects_point.js} +1 -1
  21. package/src/core/geom/2d/shape/CircleShape.js +4 -4
  22. package/src/core/geom/2d/shape/PointShape.js +2 -2
  23. package/src/engine/graphics/render/forward_plus/LightManager.d.ts.map +1 -1
  24. package/src/engine/graphics/render/forward_plus/LightManager.js +2 -0
  25. package/src/engine/graphics/render/forward_plus/cluster/read_plane_pair.d.ts +1 -1
  26. package/src/engine/graphics/render/forward_plus/cluster/read_plane_pair.js +1 -1
  27. package/src/engine/input/devices/KeyboardDevice.d.ts.map +1 -1
  28. package/src/engine/input/devices/KeyboardDevice.js +7 -1
  29. package/src/generation/markers/MarkerNode.d.ts.map +1 -1
  30. package/src/generation/markers/MarkerNode.js +3 -3
  31. package/src/core/geom/2d/circle/circleIntersectsCircle.d.ts.map +0 -1
  32. package/src/core/geom/2d/circle/circleIntersectsPoint.d.ts.map +0 -1
  33. package/src/core/geom/2d/circle/computeCircleCirclePenetrationDistance.d.ts.map +0 -1
@@ -89892,6 +89892,32 @@ function classifyPassTypeFromObject(object) {
89892
89892
  return RenderPassType.Opaque;
89893
89893
  }
89894
89894
 
89895
+ const KeyboardEvents = {
89896
+ KeyUp: 'keyup',
89897
+ KeyDown: 'keydown'
89898
+ };
89899
+
89900
+ /**
89901
+ * Representation of an input device key
89902
+ */
89903
+ class InputDeviceSwitch {
89904
+ /**
89905
+ * Button press
89906
+ * @type {Signal}
89907
+ */
89908
+ down = new Signal()
89909
+ /**
89910
+ * Button release
89911
+ * @type {Signal}
89912
+ */
89913
+ up = new Signal()
89914
+ /**
89915
+ * is button currently being pressed?
89916
+ * @type {boolean}
89917
+ */
89918
+ is_down = false
89919
+ }
89920
+
89895
89921
  /**
89896
89922
  * Created by Alex on 06/03/2017.
89897
89923
  */
@@ -89998,32 +90024,6 @@ const KeyCodes = {
89998
90024
  'back_quote': 223
89999
90025
  };
90000
90026
 
90001
- const KeyboardEvents = {
90002
- KeyUp: 'keyup',
90003
- KeyDown: 'keydown'
90004
- };
90005
-
90006
- /**
90007
- * Representation of an input device key
90008
- */
90009
- class InputDeviceSwitch {
90010
- /**
90011
- * Button press
90012
- * @type {Signal}
90013
- */
90014
- down = new Signal()
90015
- /**
90016
- * Button release
90017
- * @type {Signal}
90018
- */
90019
- up = new Signal()
90020
- /**
90021
- * is button currently being pressed?
90022
- * @type {boolean}
90023
- */
90024
- is_down = false
90025
- }
90026
-
90027
90027
  /**
90028
90028
  * Created by Alex on 06/03/2017.
90029
90029
  */
@@ -90125,6 +90125,12 @@ class KeyboardDevice {
90125
90125
  * @private
90126
90126
  */
90127
90127
  #handlerKeyDown = (event) => {
90128
+ if (event.repeat) {
90129
+ // ignore automatic repetition
90130
+ // see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat
90131
+ return;
90132
+ }
90133
+
90128
90134
  this.on.down.send1(event);
90129
90135
 
90130
90136
  //hook up dispatch handler for individual keys
@@ -108672,7 +108678,7 @@ function compute_cluster_planes_from_points(result, points, x_slices, y_slices,
108672
108678
  }
108673
108679
 
108674
108680
  /**
108675
- * Read out a pair of planes from an numeric array
108681
+ * Read out a pair of planes from a numeric array
108676
108682
  * @param {number[]|Float32Array} source
108677
108683
  * @param {number} source_offset
108678
108684
  * @param {number[]|Float64Array|Float32Array} destination
@@ -110111,6 +110117,7 @@ class LightManager {
110111
110117
 
110112
110118
  const tile_data_offset = tile_index * 4;
110113
110119
 
110120
+ //assign lights
110114
110121
  lookup_address_offset += assign_cluster(
110115
110122
  tile_data_offset,
110116
110123
  bvh_lights,
@@ -110120,6 +110127,7 @@ class LightManager {
110120
110127
  light_source_data
110121
110128
  );
110122
110129
 
110130
+ // assign decals
110123
110131
  const decal_count = assign_cluster(
110124
110132
  tile_data_offset + 2,
110125
110133
  bvh_decals,
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "description": "Fully featured ECS game engine written in JavaScript",
6
6
  "type": "module",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.89.4",
8
+ "version": "2.90.0",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -1,4 +1,4 @@
1
- import { circleIntersectsCircle } from "./circleIntersectsCircle.js";
1
+ import { circle_intersects_circle } from "./circle_intersects_circle.js";
2
2
 
3
3
  /**
4
4
  * A circle or a 2-dimensional sphere. Represented as a position (x,y) and radius (r)
@@ -59,7 +59,7 @@ Circle.prototype.overlaps = function (other) {
59
59
  const y1 = other.y;
60
60
  const r1 = other.r;
61
61
 
62
- return circleIntersectsCircle(x0, y0, r0, x1, y1, r1);
62
+ return circle_intersects_circle(x0, y0, r0, x1, y1, r1);
63
63
  };
64
64
 
65
65
  /**
@@ -0,0 +1,14 @@
1
+ /**
2
+ *
3
+ * @param {number[]} result
4
+ * @param {number} result_offset
5
+ * @param {number} a_center_x
6
+ * @param {number} a_center_y
7
+ * @param {number} a_radius
8
+ * @param {number} b_center_x
9
+ * @param {number} b_center_y
10
+ * @param {number} b_radius
11
+ * @returns {boolean} if intersection exists, false otherwise
12
+ */
13
+ export function circle_compute_circle_intersection(result: number[], result_offset: number, a_center_x: number, a_center_y: number, a_radius: number, b_center_x: number, b_center_y: number, b_radius: number): boolean;
14
+ //# sourceMappingURL=circle_compute_circle_intersection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"circle_compute_circle_intersection.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/2d/circle/circle_compute_circle_intersection.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,2DAVW,MAAM,EAAE,iBACR,MAAM,cACN,MAAM,cACN,MAAM,YACN,MAAM,cACN,MAAM,cACN,MAAM,YACN,MAAM,GACJ,OAAO,CAqDnB"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ *
3
+ * @param {number[]} result
4
+ * @param {number} result_offset
5
+ * @param {number} a_center_x
6
+ * @param {number} a_center_y
7
+ * @param {number} a_radius
8
+ * @param {number} b_center_x
9
+ * @param {number} b_center_y
10
+ * @param {number} b_radius
11
+ * @returns {boolean} if intersection exists, false otherwise
12
+ */
13
+ export function circle_compute_circle_intersection(
14
+ result,
15
+ result_offset,
16
+ a_center_x, a_center_y, a_radius,
17
+ b_center_x, b_center_y, b_radius
18
+ ) {
19
+
20
+ // see https://math.stackexchange.com/a/1033561
21
+
22
+ const abx = a_center_x - b_center_x;
23
+ const aby = a_center_y - b_center_y;
24
+
25
+ const d2 = abx * abx + aby * aby;
26
+
27
+ if (d2 === 0) {
28
+ // centers are at the same coordinate, no intersection possible except for full overlap
29
+ // Continuing would lead to division by 0, so we treat this as no-intersection
30
+ return false;
31
+ }
32
+
33
+ const d = Math.sqrt(d2);
34
+
35
+ if (d > a_radius + b_radius) {
36
+ // no intersection
37
+ return false;
38
+ }
39
+
40
+ if (d < Math.abs(a_radius - b_radius)) {
41
+ // one circle is fully within another
42
+ return false;
43
+ }
44
+
45
+ const a_radius2 = a_radius * a_radius;
46
+ const l = (a_radius2 - b_radius * b_radius + d * d) / (2 * d);
47
+ const h = Math.sqrt(a_radius2 - l * l)
48
+
49
+ const l_d = l / d;
50
+ const h_d = h / d;
51
+
52
+ const bax = b_center_x - a_center_x;
53
+ const bay = b_center_y - a_center_y;
54
+
55
+ // compute first root
56
+ result[result_offset] = l_d * bax + h_d * bay + a_center_x;
57
+ result[result_offset + 1] = l_d * bay - h_d * bax + a_center_y;
58
+
59
+ // second root
60
+ result[result_offset + 2] = l_d * bax - h_d * bay + a_center_x;
61
+ result[result_offset + 3] = l_d * bay + h_d * bax + a_center_y;
62
+
63
+ return true;
64
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=circle_compute_circle_intersection.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"circle_compute_circle_intersection.spec.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/2d/circle/circle_compute_circle_intersection.spec.js"],"names":[],"mappings":""}
@@ -0,0 +1,79 @@
1
+ import { circle_compute_circle_intersection } from "./circle_compute_circle_intersection.js";
2
+
3
+ test("non-intersecting point circles", () => {
4
+ expect(
5
+ circle_compute_circle_intersection(
6
+ [], 0,
7
+ 0, 0, 0,
8
+ 1, 0, 0
9
+ )
10
+ ).toBe(false);
11
+
12
+ expect(
13
+ circle_compute_circle_intersection(
14
+ [], 0,
15
+ 1, 0, 0,
16
+ 0, 0, 0
17
+ )
18
+ ).toBe(false);
19
+
20
+ expect(
21
+ circle_compute_circle_intersection(
22
+ [], 0,
23
+ 0, 1, 0,
24
+ 0, 0, 0
25
+ )
26
+ ).toBe(false);
27
+
28
+ expect(
29
+ circle_compute_circle_intersection(
30
+ [], 0,
31
+ 0, 0, 0,
32
+ 0, 1, 0
33
+ )
34
+ ).toBe(false);
35
+ });
36
+
37
+ test("circle inside circle", () => {
38
+
39
+
40
+ expect(
41
+ circle_compute_circle_intersection(
42
+ [], 0,
43
+ 2, 3, 5,
44
+ 3, 4, 11
45
+ )
46
+ ).toBe(false);
47
+
48
+
49
+ });
50
+
51
+ test("touching case", () => {
52
+
53
+ const result = [];
54
+
55
+ expect(
56
+ circle_compute_circle_intersection(
57
+ result, 0,
58
+ 1, 3, 5,
59
+ 7, 3, 1
60
+ )
61
+ ).toBe(true);
62
+
63
+ expect(result).toEqual([6, 3, 6, 3]);
64
+ });
65
+
66
+ test("2 intersection points", () => {
67
+
68
+ const result = [];
69
+
70
+ expect(
71
+ circle_compute_circle_intersection(
72
+ result, 0,
73
+ -0.5, 0, 1,
74
+ 0.5, 0, 1
75
+ )
76
+ ).toBe(true);
77
+
78
+ expect(result).toEqual([0, -0.5 * Math.sqrt(3), 0, +0.5 * Math.sqrt(3)]);
79
+ });
@@ -8,5 +8,5 @@
8
8
  * @param {number} br Radius of second circle
9
9
  * @returns {number} positive value means that there is penetration, negative means that circles are separated
10
10
  */
11
- export function computeCircleCirclePenetrationDistance(ax: number, ay: number, ar: number, bx: number, by: number, br: number): number;
12
- //# sourceMappingURL=computeCircleCirclePenetrationDistance.d.ts.map
11
+ export function circle_compute_circle_penetration(ax: number, ay: number, ar: number, bx: number, by: number, br: number): number;
12
+ //# sourceMappingURL=circle_compute_circle_penetration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"circle_compute_circle_penetration.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/2d/circle/circle_compute_circle_penetration.js"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,sDARW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,GACJ,MAAM,CAuBlB"}
@@ -8,7 +8,11 @@
8
8
  * @param {number} br Radius of second circle
9
9
  * @returns {number} positive value means that there is penetration, negative means that circles are separated
10
10
  */
11
- export function computeCircleCirclePenetrationDistance(ax, ay, ar, bx, by, br) {
11
+ export function circle_compute_circle_penetration(
12
+ ax, ay, ar,
13
+ bx, by, br
14
+ ) {
15
+
12
16
  const dx = bx - ax;
13
17
  const dy = by - ax;
14
18
 
@@ -24,7 +28,5 @@ export function computeCircleCirclePenetrationDistance(ax, ay, ar, bx, by, br) {
24
28
  */
25
29
  const minSeparation = ar + br;
26
30
 
27
- const result = minSeparation - distance;
28
-
29
- return result;
31
+ return minSeparation - distance;
30
32
  }
@@ -8,5 +8,5 @@
8
8
  * @param {number} r1 Radius is second circle
9
9
  * @returns {boolean}
10
10
  */
11
- export function circleIntersectsCircle(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): boolean;
12
- //# sourceMappingURL=circleIntersectsCircle.d.ts.map
11
+ export function circle_intersects_circle(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): boolean;
12
+ //# sourceMappingURL=circle_intersects_circle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"circle_intersects_circle.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/2d/circle/circle_intersects_circle.js"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,6CARW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,GACJ,OAAO,CAQnB"}
@@ -10,7 +10,7 @@ import { v2_distance } from "../../vec2/v2_distance.js";
10
10
  * @param {number} r1 Radius is second circle
11
11
  * @returns {boolean}
12
12
  */
13
- export function circleIntersectsCircle(x0, y0, r0, x1, y1, r1) {
13
+ export function circle_intersects_circle(x0, y0, r0, x1, y1, r1) {
14
14
  const minSeparation = r0 + r1;
15
15
 
16
16
  const distance = v2_distance(x0, y0, x1, y1);
@@ -7,5 +7,5 @@
7
7
  * @param {number} py Point coordinate Y
8
8
  * @returns {boolean}
9
9
  */
10
- export function circleIntersectsPoint(cx: number, cy: number, cr: number, px: number, py: number): boolean;
11
- //# sourceMappingURL=circleIntersectsPoint.d.ts.map
10
+ export function circle_intersects_point(cx: number, cy: number, cr: number, px: number, py: number): boolean;
11
+ //# sourceMappingURL=circle_intersects_point.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"circle_intersects_point.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/2d/circle/circle_intersects_point.js"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,4CAPW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,GACJ,OAAO,CAMnB"}
@@ -9,7 +9,7 @@ import { v2_distance } from "../../vec2/v2_distance.js";
9
9
  * @param {number} py Point coordinate Y
10
10
  * @returns {boolean}
11
11
  */
12
- export function circleIntersectsPoint(cx, cy, cr, px, py) {
12
+ export function circle_intersects_point(cx, cy, cr, px, py) {
13
13
  const distance = v2_distance(cx, cx, px, py);
14
14
 
15
15
  return distance < cr;
@@ -1,5 +1,5 @@
1
- import { circleIntersectsCircle } from "../circle/circleIntersectsCircle.js";
2
- import { circleIntersectsPoint } from "../circle/circleIntersectsPoint.js";
1
+ import { circle_intersects_circle } from "../circle/circle_intersects_circle.js";
2
+ import { circle_intersects_point } from "../circle/circle_intersects_point.js";
3
3
  import { AbstractShape } from "./AbstractShape.js";
4
4
 
5
5
  export class CircleShape extends AbstractShape {
@@ -52,11 +52,11 @@ export class CircleShape extends AbstractShape {
52
52
  }
53
53
 
54
54
  intersectsPoint(x, y) {
55
- return circleIntersectsPoint(this.x, this.y, this.radius, x, y);
55
+ return circle_intersects_point(this.x, this.y, this.radius, x, y);
56
56
  }
57
57
 
58
58
  intersectsCircle(x, y, radius) {
59
- return circleIntersectsCircle(x, y, radius, this.x, this.y, this.radius);
59
+ return circle_intersects_circle(x, y, radius, this.x, this.y, this.radius);
60
60
  }
61
61
  }
62
62
 
@@ -1,4 +1,4 @@
1
- import { circleIntersectsPoint } from "../circle/circleIntersectsPoint.js";
1
+ import { circle_intersects_point } from "../circle/circle_intersects_point.js";
2
2
  import { AbstractShape } from "./AbstractShape.js";
3
3
 
4
4
  export class PointShape extends AbstractShape {
@@ -23,7 +23,7 @@ export class PointShape extends AbstractShape {
23
23
  }
24
24
 
25
25
  intersectsCircle(x, y, radius) {
26
- return circleIntersectsPoint(x, y, radius, this.x, this.y);
26
+ return circle_intersects_point(x, y, radius, this.x, this.y);
27
27
  }
28
28
  }
29
29
 
@@ -1 +1 @@
1
- {"version":3,"file":"LightManager.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/forward_plus/LightManager.js"],"names":[],"mappings":"AAqIA;IAiBQ;;;;OAIG;IACH,2BAAgD;IAEhD,oCAAoC;IACpC,yCAA4C;IAE5C;;;;;;;;OAQG;IACH,0BAKC;IAYD;;;;;OAKG;IACH,+BAAoD;IAMpD;;;;;OAKG;IACH,8BAAmD;IAMnD;;;;OAIG;IACH,uCAAiF;IAUjF;;;;;OAKG;IACH,+BAEE;IAEF;;;;OAIG;IACH,iCAA8E;IAE9E;;;;OAIG;IACH,2BAAmC;IAEnC;;;;;OAKG;IACH,kCAAoE;IACpE;;;;;OAKG;IACH,kCAAoE;IAEpE;;;;OAIG;IACH,gCAAiC;IAEjC;;;;OAIG;IACH,6BAAiD;IACjD;;;;OAIG;IACH,6BAAiD;IAEjD;;;;OAIG;IACH,uBAAmC;IAEnC;;;;OAIG;IACH,8BAAiD;IAEjD;;;;OAIG;IACH,4BAA+C;IAG/C;;;;OAIG;IACH,yBAA2C;IAE3C;;;;OAIG;IACH,iCAAmD;IAUnD;;;;;OAKG;IACH,kCAAqC;IAErC;;;;OAIG;IACH,mCAAsC;IAK1C,0BAEC;IAED;;;;;;OAMG;IACH,0CAQC;IAED;;;OAGG;IACH,uCAEC;IAED,qCAQC;IAED;;;;;;OAMG;IACH,4CAgBC;IAED,iCAIC;IAED,gCA6BC;IAED;;;;;OAKG;IACH,6BAEC;IAED;;;OAGG;IACH,oBAFa,WAAW,CAIvB;IAED;;;OAGG;IACH,kBAFa,WAAW,CAIvB;IAED;;OAEG;IACH,sBAFa,aAAa,CAIzB;IAED;;OAEG;IACH,wBAFa,WAAW,CAIvB;IAED;;;OAGG;IACH,iBAFa,SAAS,OAAO,CAAC,CAI7B;IAED;;;OAGG;IACH,yCAKC;IAED;;;;OAIG;IACH,qCAyBC;IAED;;;;OAIG;IACH,uCA8BC;IAED;;;;OAIG;IACH,qCAMC;IAED;;;;OAIG;IACH,uCAKC;IAED;;;;;OAKG;IACH,4CAJW,mBAAmB,GACjB,MAAM,CAalB;IAED;;;;;;OAMG;IACH,+BAgCC;IAED;;;OAGG;IACH,6BAoBC;IAED,6BAYC;IAGD;;;;OAIG;IACH,6BAMC;IAED,mCA0EC;IAED,mCAgFC;IAED;;;OAGG;IACH,oCAiJC;IAED;;;OAGG;IACH,uCAUC;IAED;;;OAGG;IACH,oCAOC;IAED;;;OAGG;IACH,uCAWC;IAED;;;OAGG;IACH,mBAFW,SAAO,MAAM,iBAAiB,QAmDxC;IAED,gBAKC;IAED;;;;;OAKG;IACH,wBAJW,MAAM,KACN,MAAM,KACN,MAAM,QA2ChB;IAED;;;;OAIG;IACH,gCAFa,OAAO,CAInB;IAED;;;OAGG;IACH,qCAMC;IAED;;;;OAIG;IACH,mCAFa,OAAO,CAiBnB;;CACJ;4BAxrCM,OAAO;8BAAP,OAAO;oBAmBM,kCAAkC;oCAiBlB,0BAA0B"}
1
+ {"version":3,"file":"LightManager.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/render/forward_plus/LightManager.js"],"names":[],"mappings":"AAqIA;IAiBQ;;;;OAIG;IACH,2BAAgD;IAEhD,oCAAoC;IACpC,yCAA4C;IAE5C;;;;;;;;OAQG;IACH,0BAKC;IAYD;;;;;OAKG;IACH,+BAAoD;IAMpD;;;;;OAKG;IACH,8BAAmD;IAMnD;;;;OAIG;IACH,uCAAiF;IAUjF;;;;;OAKG;IACH,+BAEE;IAEF;;;;OAIG;IACH,iCAA8E;IAE9E;;;;OAIG;IACH,2BAAmC;IAEnC;;;;;OAKG;IACH,kCAAoE;IACpE;;;;;OAKG;IACH,kCAAoE;IAEpE;;;;OAIG;IACH,gCAAiC;IAEjC;;;;OAIG;IACH,6BAAiD;IACjD;;;;OAIG;IACH,6BAAiD;IAEjD;;;;OAIG;IACH,uBAAmC;IAEnC;;;;OAIG;IACH,8BAAiD;IAEjD;;;;OAIG;IACH,4BAA+C;IAG/C;;;;OAIG;IACH,yBAA2C;IAE3C;;;;OAIG;IACH,iCAAmD;IAUnD;;;;;OAKG;IACH,kCAAqC;IAErC;;;;OAIG;IACH,mCAAsC;IAK1C,0BAEC;IAED;;;;;;OAMG;IACH,0CAQC;IAED;;;OAGG;IACH,uCAEC;IAED,qCAQC;IAED;;;;;;OAMG;IACH,4CAgBC;IAED,iCAIC;IAED,gCA6BC;IAED;;;;;OAKG;IACH,6BAEC;IAED;;;OAGG;IACH,oBAFa,WAAW,CAIvB;IAED;;;OAGG;IACH,kBAFa,WAAW,CAIvB;IAED;;OAEG;IACH,sBAFa,aAAa,CAIzB;IAED;;OAEG;IACH,wBAFa,WAAW,CAIvB;IAED;;;OAGG;IACH,iBAFa,SAAS,OAAO,CAAC,CAI7B;IAED;;;OAGG;IACH,yCAKC;IAED;;;;OAIG;IACH,qCAyBC;IAED;;;;OAIG;IACH,uCA8BC;IAED;;;;OAIG;IACH,qCAMC;IAED;;;;OAIG;IACH,uCAKC;IAED;;;;;OAKG;IACH,4CAJW,mBAAmB,GACjB,MAAM,CAalB;IAED;;;;;;OAMG;IACH,+BAgCC;IAED;;;OAGG;IACH,6BAoBC;IAED,6BAYC;IAGD;;;;OAIG;IACH,6BAMC;IAED,mCA0EC;IAED,mCAgFC;IAED;;;OAGG;IACH,oCAmJC;IAED;;;OAGG;IACH,uCAUC;IAED;;;OAGG;IACH,oCAOC;IAED;;;OAGG;IACH,uCAWC;IAED;;;OAGG;IACH,mBAFW,SAAO,MAAM,iBAAiB,QAmDxC;IAED,gBAKC;IAED;;;;;OAKG;IACH,wBAJW,MAAM,KACN,MAAM,KACN,MAAM,QA2ChB;IAED;;;;OAIG;IACH,gCAFa,OAAO,CAInB;IAED;;;OAGG;IACH,qCAMC;IAED;;;;OAIG;IACH,mCAFa,OAAO,CAiBnB;;CACJ;4BA1rCM,OAAO;8BAAP,OAAO;oBAmBM,kCAAkC;oCAiBlB,0BAA0B"}
@@ -958,6 +958,7 @@ export class LightManager {
958
958
 
959
959
  const tile_data_offset = tile_index * 4;
960
960
 
961
+ //assign lights
961
962
  lookup_address_offset += assign_cluster(
962
963
  tile_data_offset,
963
964
  bvh_lights,
@@ -967,6 +968,7 @@ export class LightManager {
967
968
  light_source_data
968
969
  );
969
970
 
971
+ // assign decals
970
972
  const decal_count = assign_cluster(
971
973
  tile_data_offset + 2,
972
974
  bvh_decals,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Read out a pair of planes from an numeric array
2
+ * Read out a pair of planes from a numeric array
3
3
  * @param {number[]|Float32Array} source
4
4
  * @param {number} source_offset
5
5
  * @param {number[]|Float64Array|Float32Array} destination
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Read out a pair of planes from an numeric array
2
+ * Read out a pair of planes from a numeric array
3
3
  * @param {number[]|Float32Array} source
4
4
  * @param {number} source_offset
5
5
  * @param {number[]|Float64Array|Float32Array} destination
@@ -1 +1 @@
1
- {"version":3,"file":"KeyboardDevice.d.ts","sourceRoot":"","sources":["../../../../../src/engine/input/devices/KeyboardDevice.js"],"names":[],"mappings":";AAkDA;IAgBI;;;OAGG;IACH,wBAFW,WAAW,GAAC,OAAO,EA+B7B;IA/CD;;OAEG;IACH;;;MAGE;IAEF;;;OAGG;IACH,mBAAU;IAkBN;;;OAGG;IACH,YAFU,WAAW,CAEO;IAyDhC,cAGC;IAED,aAGC;;CACJ;mBApJkB,uCAAuC"}
1
+ {"version":3,"file":"KeyboardDevice.d.ts","sourceRoot":"","sources":["../../../../../src/engine/input/devices/KeyboardDevice.js"],"names":[],"mappings":";AAkDA;IAgBI;;;OAGG;IACH,wBAFW,WAAW,GAAC,OAAO,EA+B7B;IA/CD;;OAEG;IACH;;;MAGE;IAEF;;;OAGG;IACH,mBAAU;IAkBN;;;OAGG;IACH,YAFU,WAAW,CAEO;IA+DhC,cAGC;IAED,aAGC;;CACJ;mBA1JkB,uCAAuC"}
@@ -3,9 +3,9 @@
3
3
  */
4
4
 
5
5
  import Signal from "../../../core/events/signal/Signal.js";
6
- import { KeyCodes } from './KeyCodes.js';
7
6
  import { KeyboardEvents } from "./events/KeyboardEvents.js";
8
7
  import { InputDeviceSwitch } from "./InputDeviceSwitch.js";
8
+ import { KeyCodes } from './KeyCodes.js';
9
9
 
10
10
  /**
11
11
  *
@@ -105,6 +105,12 @@ class KeyboardDevice {
105
105
  * @private
106
106
  */
107
107
  #handlerKeyDown = (event) => {
108
+ if (event.repeat) {
109
+ // ignore automatic repetition
110
+ // see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat
111
+ return;
112
+ }
113
+
108
114
  this.on.down.send1(event);
109
115
 
110
116
  //hook up dispatch handler for individual keys
@@ -1 +1 @@
1
- {"version":3,"file":"MarkerNode.d.ts","sourceRoot":"","sources":["../../../../src/generation/markers/MarkerNode.js"],"names":[],"mappings":"AAKA;IAEI;;;OAGG;IACH,UAFU,MAAM,CAEH;IAEb;;;OAGG;IACH,aAAY;IAEZ;;;OAGG;IACH,MAFU,QAAQ,CAER;IAEV;;;OAGG;IACH,UAFU,OAAO,CAEQ;IAEzB;;;OAGG;IACH,WAFU,SAAS,CAES;IAE5B;;;;OAIG;IACH,MAFU,MAAM,CAEP;IAET;;;OAGG;IACH,gBAAgB;IAGhB;;;;OAIG;IACH,YAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;OAIG;IACH,iBAHW,MAAM,EAAE,GACN,OAAO,CAanB;IAED;;;OAGG;IACH,SAFa,UAAU,CAQtB;IAED;;;OAGG;IACH,YAFW,UAAU,QAcpB;IAED;;;;OAIG;IACH,gBAHW,UAAU,GACR,OAAO,CAOnB;IAIL;;;OAGG;IACH,uBAFU,OAAO,CAEgB;CANhC;oBAxHmB,4BAA4B;0BACtB,yCAAyC"}
1
+ {"version":3,"file":"MarkerNode.d.ts","sourceRoot":"","sources":["../../../../src/generation/markers/MarkerNode.js"],"names":[],"mappings":"AAKA;IAEI;;;OAGG;IACH,UAFU,MAAM,CAEH;IAEb;;;OAGG;IACH,aAAY;IAEZ;;;OAGG;IACH,MAFU,QAAQ,CAER;IAEV;;;OAGG;IACH,UAFU,OAAO,CAEQ;IAEzB;;;OAGG;IACH,WAFU,SAAS,CAES;IAE5B;;;;OAIG;IACH,MAFU,MAAM,CAEP;IAET;;;OAGG;IACH,gBAAgB;IAGhB;;;;OAIG;IACH,YAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;OAIG;IACH,iBAHW,MAAM,EAAE,GACN,OAAO,CAanB;IAED;;;OAGG;IACH,SAFa,UAAU,CAQtB;IAED;;;OAGG;IACH,YAFW,UAAU,QAcpB;IAED;;;;OAIG;IACH,gBAHW,UAAU,GACR,OAAO,CAOnB;IAIL;;;OAGG;IACH,uBAFU,OAAO,CAEgB;CANhC;oBAtHmB,4BAA4B;0BACtB,yCAAyC"}
@@ -1,7 +1,7 @@
1
+ import { array_copy_entire } from "../../core/collection/array/array_copy_entire.js";
2
+ import { circle_intersects_circle } from "../../core/geom/2d/circle/circle_intersects_circle.js";
1
3
  import Vector2 from "../../core/geom/Vector2.js";
2
4
  import { Transform } from "../../engine/ecs/transform/Transform.js";
3
- import { circleIntersectsCircle } from "../../core/geom/2d/circle/circleIntersectsCircle.js";
4
- import { array_copy_entire } from "../../core/collection/array/array_copy_entire.js";
5
5
 
6
6
  export class MarkerNode {
7
7
 
@@ -115,7 +115,7 @@ export class MarkerNode {
115
115
  const p0 = this.transform.position;
116
116
  const p1 = other.transform.position;
117
117
 
118
- return circleIntersectsCircle(p0.x, p0.y, this.size, p1.x, p1.y, other.size);
118
+ return circle_intersects_circle(p0.x, p0.y, this.size, p1.x, p1.y, other.size);
119
119
  }
120
120
 
121
121
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"circleIntersectsCircle.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/2d/circle/circleIntersectsCircle.js"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,2CARW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,GACJ,OAAO,CAQnB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"circleIntersectsPoint.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/2d/circle/circleIntersectsPoint.js"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,0CAPW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,GACJ,OAAO,CAMnB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"computeCircleCirclePenetrationDistance.d.ts","sourceRoot":"","sources":["../../../../../../src/core/geom/2d/circle/computeCircleCirclePenetrationDistance.js"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,2DARW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,GACJ,MAAM,CAqBlB"}