@woosh/meep-engine 2.47.28 → 2.47.31

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.
package/build/meep.cjs CHANGED
@@ -54200,9 +54200,8 @@ class Vector1 extends Number {
54200
54200
  constructor(x = 0) {
54201
54201
  super();
54202
54202
 
54203
- assert.equal(typeof x, "number", `X must be of type "number", instead was "${typeof x}"`);
54204
-
54205
- assert.ok(!Number.isNaN(x), `X must be a valid number, instead was NaN`);
54203
+ assert.isNumber( x, 'x');
54204
+ assert.notNaN(x, 'x');
54206
54205
 
54207
54206
  this.x = x;
54208
54207
 
@@ -99958,13 +99957,12 @@ const BehaviorStatus = {
99958
99957
  * @template CTX
99959
99958
  */
99960
99959
  class Behavior {
99961
- constructor() {
99962
- /**
99963
- * Any internal state used by the behavior
99964
- * @type {CTX|null}
99965
- */
99966
- this.context = null;
99967
- }
99960
+
99961
+ /**
99962
+ * Any internal state used by the behavior
99963
+ * @type {CTX|null}
99964
+ */
99965
+ context = null;
99968
99966
 
99969
99967
  /**
99970
99968
  * Main update function. Every behavior executes some logic, some behaviors are long-running and some are instantaneous
@@ -120385,7 +120383,8 @@ class LightManager {
120385
120383
  this.__visible_decals.onRemoved.add(this.__handle_visible_decal_removed, this);
120386
120384
 
120387
120385
  /**
120388
- *
120386
+ * Data needs to be re-written into the data texture
120387
+ * Usually set when source lights change
120389
120388
  * @type {boolean}
120390
120389
  * @private
120391
120390
  */
@@ -120401,6 +120400,10 @@ class LightManager {
120401
120400
  // window.light_manager = this; // DEBUG
120402
120401
  }
120403
120402
 
120403
+ requestDataUpdate() {
120404
+ this.__light_data_needs_update = true;
120405
+ }
120406
+
120404
120407
  /**
120405
120408
  * Please set this to false if you have a lot of overlapping decals in the scene
120406
120409
  * Overlapping decals can provide filtering artifacts due to incorrect mipmap level detection by WebGL
@@ -121191,17 +121194,17 @@ class LightManager {
121191
121194
  assert.isNumber(x, 'x');
121192
121195
  assert.isNonNegativeInteger(x, 'x');
121193
121196
  assert.isFiniteNumber(x, 'x');
121194
- assert.greaterThan(x,0,'x must be > 0');
121197
+ assert.greaterThan(x, 0, 'x must be > 0');
121195
121198
 
121196
121199
  assert.isNumber(y, 'y');
121197
121200
  assert.isNonNegativeInteger(y, 'y');
121198
121201
  assert.isFiniteNumber(y, 'y');
121199
- assert.greaterThan(y,0,'y must be > 0');
121202
+ assert.greaterThan(y, 0, 'y must be > 0');
121200
121203
 
121201
121204
  assert.isNumber(z, 'z');
121202
121205
  assert.isNonNegativeInteger(z, 'z');
121203
121206
  assert.isFiniteNumber(z, 'z');
121204
- assert.greaterThan(z,0,'z must be > 0');
121207
+ assert.greaterThan(z, 0, 'z must be > 0');
121205
121208
 
121206
121209
  const r = this.__tiles_resolution;
121207
121210
 
@@ -121230,6 +121233,15 @@ class LightManager {
121230
121233
  );
121231
121234
  }
121232
121235
 
121236
+ /**
121237
+ *
121238
+ * @param {AbstractLight} light
121239
+ * @returns {boolean}
121240
+ */
121241
+ hasLight(light) {
121242
+ return this.#metadata_map.has(light.id);
121243
+ }
121244
+
121233
121245
  /**
121234
121246
  *
121235
121247
  * @param {AbstractLight} light