@galacean/engine-physics-physx 0.9.15 → 0.9.16

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.
@@ -22735,7 +22735,7 @@ exports.AnimatorLayerBlendingMode = void 0;
22735
22735
  console.warn("The state named " + stateName + " has no AnimationClip data.");
22736
22736
  return;
22737
22737
  }
22738
- var animatorLayerData = this._getAnimatorLayerData(stateInfo.layerIndex);
22738
+ var animatorLayerData = this._getAnimatorLayerData(playLayerIndex);
22739
22739
  var animatorStateData = this._getAnimatorStateData(stateName, state, animatorLayerData, playLayerIndex);
22740
22740
  this._preparePlay(animatorLayerData, state);
22741
22741
  animatorLayerData.layerState = LayerState.Playing;
@@ -22754,8 +22754,8 @@ exports.AnimatorLayerBlendingMode = void 0;
22754
22754
  if ((_this__controllerUpdateFlag = this._controllerUpdateFlag) == null ? void 0 : _this__controllerUpdateFlag.flag) {
22755
22755
  this._reset();
22756
22756
  }
22757
- var state = this._getAnimatorStateInfo(stateName, layerIndex).state;
22758
- var manuallyTransition = this._getAnimatorLayerData(layerIndex).manuallyTransition;
22757
+ var _this__getAnimatorStateInfo = this._getAnimatorStateInfo(stateName, layerIndex), state = _this__getAnimatorStateInfo.state, playLayerIndex = _this__getAnimatorStateInfo.layerIndex;
22758
+ var manuallyTransition = this._getAnimatorLayerData(playLayerIndex).manuallyTransition;
22759
22759
  manuallyTransition.duration = normalizedTransitionDuration;
22760
22760
  manuallyTransition.offset = normalizedTimeOffset;
22761
22761
  manuallyTransition.destinationState = state;
@@ -22880,8 +22880,11 @@ exports.AnimatorLayerBlendingMode = void 0;
22880
22880
  _proto._saveAnimatorStateData = function _saveAnimatorStateData(animatorState, animatorStateData, animatorLayerData, layerIndex) {
22881
22881
  var _this = this, entity = _this.entity, curveOwnerPool = _this._curveOwnerPool;
22882
22882
  var curveLayerOwner = animatorStateData.curveLayerOwner;
22883
- var layerCurveOwnerPool = animatorLayerData.curveOwnerPool;
22884
22883
  var _animatorState_clip = animatorState.clip, curves = _animatorState_clip._curveBindings;
22884
+ if (layerIndex === 0) {
22885
+ animatorLayerData.curveOwnerPool = Object.create(null);
22886
+ }
22887
+ var layerCurveOwnerPool = animatorLayerData.curveOwnerPool;
22885
22888
  for(var i = curves.length - 1; i >= 0; i--){
22886
22889
  var curve = curves[i];
22887
22890
  var targetEntity = curve.relativePath === "" ? entity : entity.findByPath(curve.relativePath);
@@ -22914,6 +22917,24 @@ exports.AnimatorLayerBlendingMode = void 0;
22914
22917
  console.warn("The entity don't have the child entity which path is " + curve.relativePath + ".");
22915
22918
  }
22916
22919
  }
22920
+ if (layerIndex === 0) {
22921
+ this._needRevertCurveOwners.length = 0;
22922
+ for(var i1 = 1, n = this._animatorLayersData.length; i1 < n; ++i1){
22923
+ var layerData = this._animatorLayersData[i1];
22924
+ var playingCurveOwnerPool = layerData.curveOwnerPool;
22925
+ for(var instanceId1 in playingCurveOwnerPool){
22926
+ for(var property1 in playingCurveOwnerPool[instanceId1]){
22927
+ var layerOwner1 = playingCurveOwnerPool[instanceId1][property1];
22928
+ if (this.animatorController.layers[i1].blendingMode === exports.AnimatorLayerBlendingMode.Additive) {
22929
+ var baseLayerCurveOwnerPool1 = this._animatorLayersData[0].curveOwnerPool;
22930
+ if (!(baseLayerCurveOwnerPool1[instanceId1] && baseLayerCurveOwnerPool1[instanceId1][property1])) {
22931
+ this._needRevertCurveOwners.push(layerOwner1.curveOwner);
22932
+ }
22933
+ }
22934
+ }
22935
+ }
22936
+ }
22937
+ }
22917
22938
  };
22918
22939
  _proto._saveAnimatorEventHandlers = function _saveAnimatorEventHandlers(state, animatorStateData) {
22919
22940
  var eventHandlerPool = this._animationEventHandlerPool;
@@ -23179,16 +23200,14 @@ exports.AnimatorLayerBlendingMode = void 0;
23179
23200
  var curveLayerOwner = srcPlayData.stateData.curveLayerOwner;
23180
23201
  for(var i = curveLayerOwner.length - 1; i >= 0; i--){
23181
23202
  var _curveLayerOwner_i;
23182
- var owner = (_curveLayerOwner_i = curveLayerOwner[i]) == null ? void 0 : _curveLayerOwner_i.curveOwner;
23183
- owner.revertDefaultValue();
23203
+ (_curveLayerOwner_i = curveLayerOwner[i]) == null ? void 0 : _curveLayerOwner_i.curveOwner.revertDefaultValue();
23184
23204
  }
23185
23205
  }
23186
23206
  } else {
23187
23207
  // layerState is CrossFading, FixedCrossFading, Standby, Finished
23188
23208
  var crossLayerOwnerCollection = layerData.crossLayerOwnerCollection;
23189
23209
  for(var i1 = crossLayerOwnerCollection.length - 1; i1 >= 0; i1--){
23190
- var owner1 = crossLayerOwnerCollection[i1].curveOwner;
23191
- owner1.revertDefaultValue();
23210
+ crossLayerOwnerCollection[i1].curveOwner.revertDefaultValue();
23192
23211
  }
23193
23212
  }
23194
23213
  };
@@ -36260,7 +36279,7 @@ function _interopNamespace(e) {
36260
36279
  }
36261
36280
  var CoreObjects__namespace = /*#__PURE__*/ _interopNamespace(CoreObjects);
36262
36281
  //@ts-ignore
36263
- var version = "0.9.15";
36282
+ var version = "0.9.16";
36264
36283
  console.log("Galacean engine version: " + version);
36265
36284
  for(var key in CoreObjects__namespace){
36266
36285
  CoreObjects.Loader.registerClass(key, CoreObjects__namespace[key]);