@woosh/meep-engine 2.46.24 → 2.46.26

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
@@ -99863,25 +99863,34 @@ class RepeatBehavior extends AbstractDecoratorBehavior {
99863
99863
 
99864
99864
  RepeatBehavior.typeName = "RepeatBehavior";
99865
99865
 
99866
+ /**
99867
+ * @template CTX
99868
+ * @extends {Behavior<CTX>}
99869
+ */
99866
99870
  class ActionBehavior extends Behavior {
99867
99871
  /**
99868
99872
  *
99869
- * @param {function(timeDelta:number)} action
99870
- * @param {*} [context]
99873
+ * @param {function(timeDelta:number, context:CTX)} func
99874
+ * @param {*} [thisArg] defaults to behavior itself if not specified
99871
99875
  */
99872
- constructor(action, context) {
99876
+ constructor(func, thisArg) {
99873
99877
  super();
99874
99878
 
99875
- assert.typeOf(action, 'function', "action");
99879
+ assert.typeOf(func, 'function', "action");
99876
99880
 
99877
- this.__action = action;
99878
- this.__context = context;
99881
+ this.__action = func;
99882
+
99883
+ if (thisArg === undefined) {
99884
+ this.__context = this;
99885
+ } else {
99886
+ this.__context = thisArg;
99887
+ }
99879
99888
  }
99880
99889
 
99881
99890
  tick(timeDelta) {
99882
99891
 
99883
99892
  try {
99884
- this.__action.call(this.__context, timeDelta);
99893
+ this.__action.call(this.__context, timeDelta, this.context);
99885
99894
 
99886
99895
  return BehaviorStatus.Succeeded;
99887
99896
 
@@ -120311,7 +120320,7 @@ class LightManager {
120311
120320
  */
120312
120321
  this.__visible_bvh_needs_update = true;
120313
120322
 
120314
- window.light_manager = this; // DEBUG
120323
+ // window.light_manager = this; // DEBUG
120315
120324
  }
120316
120325
 
120317
120326
  /**