@woosh/meep-engine 2.89.5 → 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.
@@ -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.5",
8
+ "version": "2.90.0",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -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;;;;;OAK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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