@galacean/engine-core 1.0.0-beta.13 → 1.0.0-beta.14

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.
@@ -22683,6 +22683,7 @@ var DirtyFlag;
22683
22683
  curKeyframeIndex: 0,
22684
22684
  value: null
22685
22685
  };
22686
+ this.updateMark = 0;
22686
22687
  this.target = target;
22687
22688
  this.type = type;
22688
22689
  this.property = property;
@@ -24156,9 +24157,9 @@ exports.AnimatorLayerBlendingMode = void 0;
24156
24157
  _this = Component.call(this, entity) || this;
24157
24158
  /** Culling mode of this Animator. */ _this.cullingMode = exports.AnimatorCullingMode.None;
24158
24159
  /** The playback speed of the Animator, 1.0 is normal playback speed. */ _this.speed = 1.0;
24160
+ _this._updateMark = 0;
24159
24161
  _this._animatorLayersData = [];
24160
24162
  _this._curveOwnerPool = Object.create(null);
24161
- _this._needRevertCurveOwners = [];
24162
24163
  _this._animationEventHandlerPool = new ClassPool(AnimationEventHandler);
24163
24164
  _this._tempAnimatorStateInfo = {
24164
24165
  layerIndex: -1,
@@ -24186,10 +24187,10 @@ exports.AnimatorLayerBlendingMode = void 0;
24186
24187
  return;
24187
24188
  }
24188
24189
  if (!state.clip) {
24189
- console.warn("The state named " + stateName + " has no AnimationClip data.");
24190
+ Logger.warn("The state named " + stateName + " has no AnimationClip data.");
24190
24191
  return;
24191
24192
  }
24192
- var animatorLayerData = this._getAnimatorLayerData(stateInfo.layerIndex);
24193
+ var animatorLayerData = this._getAnimatorLayerData(playLayerIndex);
24193
24194
  var animatorStateData = this._getAnimatorStateData(stateName, state, animatorLayerData, playLayerIndex);
24194
24195
  this._preparePlay(animatorLayerData, state);
24195
24196
  animatorLayerData.layerState = LayerState.Playing;
@@ -24208,8 +24209,8 @@ exports.AnimatorLayerBlendingMode = void 0;
24208
24209
  if ((_this__controllerUpdateFlag = this._controllerUpdateFlag) == null ? void 0 : _this__controllerUpdateFlag.flag) {
24209
24210
  this._reset();
24210
24211
  }
24211
- var state = this._getAnimatorStateInfo(stateName, layerIndex).state;
24212
- var manuallyTransition = this._getAnimatorLayerData(layerIndex).manuallyTransition;
24212
+ var _this__getAnimatorStateInfo = this._getAnimatorStateInfo(stateName, layerIndex), state = _this__getAnimatorStateInfo.state, playLayerIndex = _this__getAnimatorStateInfo.layerIndex;
24213
+ var manuallyTransition = this._getAnimatorLayerData(playLayerIndex).manuallyTransition;
24213
24214
  manuallyTransition.duration = normalizedTransitionDuration;
24214
24215
  manuallyTransition.offset = normalizedTimeOffset;
24215
24216
  manuallyTransition.destinationState = state;
@@ -24242,7 +24243,7 @@ exports.AnimatorLayerBlendingMode = void 0;
24242
24243
  return;
24243
24244
  }
24244
24245
  deltaTime *= this.speed;
24245
- this._revertCurveOwners();
24246
+ this._updateMark++;
24246
24247
  for(var i1 = 0, n1 = animatorController.layers.length; i1 < n1; i1++){
24247
24248
  var animatorLayerData = this._getAnimatorLayerData(i1);
24248
24249
  if (animatorLayerData.layerState === LayerState.Standby) {
@@ -24290,7 +24291,6 @@ exports.AnimatorLayerBlendingMode = void 0;
24290
24291
  }
24291
24292
  }
24292
24293
  this._animatorLayersData.length = 0;
24293
- this._needRevertCurveOwners.length = 0;
24294
24294
  this._curveOwnerPool = {};
24295
24295
  this._animationEventHandlerPool.resetPool();
24296
24296
  if (this._controllerUpdateFlag) {
@@ -24332,8 +24332,8 @@ exports.AnimatorLayerBlendingMode = void 0;
24332
24332
  _proto._saveAnimatorStateData = function _saveAnimatorStateData(animatorState, animatorStateData, animatorLayerData, layerIndex) {
24333
24333
  var _this = this, entity = _this.entity, curveOwnerPool = _this._curveOwnerPool;
24334
24334
  var curveLayerOwner = animatorStateData.curveLayerOwner;
24335
- var layerCurveOwnerPool = animatorLayerData.curveOwnerPool;
24336
24335
  var _animatorState_clip = animatorState.clip, curves = _animatorState_clip._curveBindings;
24336
+ var layerCurveOwnerPool = animatorLayerData.curveOwnerPool;
24337
24337
  for(var i = curves.length - 1; i >= 0; i--){
24338
24338
  var curve = curves[i];
24339
24339
  var targetEntity = curve.relativePath === "" ? entity : entity.findByPath(curve.relativePath);
@@ -24341,29 +24341,16 @@ exports.AnimatorLayerBlendingMode = void 0;
24341
24341
  var _curveOwnerPool, _instanceId, _propertyOwners, _property, _layerCurveOwnerPool, _instanceId1, _layerPropertyOwners, _property1;
24342
24342
  var property = curve.property;
24343
24343
  var instanceId = targetEntity.instanceId;
24344
- var needRevert = false;
24345
- var baseAnimatorLayerData = this._animatorLayersData[0];
24346
- var baseLayerCurveOwnerPool = baseAnimatorLayerData.curveOwnerPool;
24347
- if (this.animatorController.layers[layerIndex].blendingMode === exports.AnimatorLayerBlendingMode.Additive && layerIndex > 0 && !(baseLayerCurveOwnerPool[instanceId] && baseLayerCurveOwnerPool[instanceId][property])) {
24348
- needRevert = true;
24349
- }
24350
24344
  // Get owner
24351
24345
  var propertyOwners = (_curveOwnerPool = curveOwnerPool)[_instanceId = instanceId] || (_curveOwnerPool[_instanceId] = Object.create(null));
24352
24346
  var owner = (_propertyOwners = propertyOwners)[_property = property] || (_propertyOwners[_property] = curve._createCurveOwner(targetEntity));
24353
- //@todo: There is performance waste here, which will be handled together with organizing AnimatorStateData later. The logic is changing from runtime to initialization.
24354
- if (needRevert) {
24355
- this._needRevertCurveOwners.push(owner);
24356
- } else {
24357
- var index = this._needRevertCurveOwners.indexOf(owner);
24358
- index > -1 && this._needRevertCurveOwners.splice(index, 1);
24359
- }
24360
24347
  // Get layer owner
24361
24348
  var layerPropertyOwners = (_layerCurveOwnerPool = layerCurveOwnerPool)[_instanceId1 = instanceId] || (_layerCurveOwnerPool[_instanceId1] = Object.create(null));
24362
24349
  var layerOwner = (_layerPropertyOwners = layerPropertyOwners)[_property1 = property] || (_layerPropertyOwners[_property1] = curve._createCurveLayerOwner(owner));
24363
24350
  curveLayerOwner[i] = layerOwner;
24364
24351
  } else {
24365
24352
  curveLayerOwner[i] = null;
24366
- console.warn("The entity don't have the child entity which path is " + curve.relativePath + ".");
24353
+ Logger.warn("The entity don't have the child entity which path is " + curve.relativePath + ".");
24367
24354
  }
24368
24355
  }
24369
24356
  };
@@ -24489,6 +24476,7 @@ exports.AnimatorLayerBlendingMode = void 0;
24489
24476
  if (!owner) continue;
24490
24477
  var curve = curveBindings[i].curve;
24491
24478
  if (curve.keys.length) {
24479
+ this._checkRevertOwner(owner, additive);
24492
24480
  var value = owner.evaluateValue(curve, clipTime, additive);
24493
24481
  aniUpdate && owner.applyValue(value, weight, additive);
24494
24482
  finished && layerOwner.saveFinalValue();
@@ -24534,6 +24522,7 @@ exports.AnimatorLayerBlendingMode = void 0;
24534
24522
  if (!owner) continue;
24535
24523
  var srcCurveIndex = layerOwner.crossSrcCurveIndex;
24536
24524
  var destCurveIndex = layerOwner.crossDestCurveIndex;
24525
+ this._checkRevertOwner(owner, additive);
24537
24526
  var value = owner.evaluateCrossFadeValue(srcCurveIndex >= 0 ? srcCurves[srcCurveIndex].curve : null, destCurveIndex >= 0 ? destCurves[destCurveIndex].curve : null, srcClipTime, destClipTime, crossWeight, additive);
24538
24527
  aniUpdate && owner.applyValue(value, weight, additive);
24539
24528
  finished && layerOwner.saveFinalValue();
@@ -24580,6 +24569,7 @@ exports.AnimatorLayerBlendingMode = void 0;
24580
24569
  var owner = layerOwner == null ? void 0 : layerOwner.curveOwner;
24581
24570
  if (!owner) continue;
24582
24571
  var curveIndex = layerOwner.crossDestCurveIndex;
24572
+ this._checkRevertOwner(owner, additive);
24583
24573
  var value = layerOwner.curveOwner.crossFadeFromPoseAndApplyValue(curveIndex >= 0 ? curveBindings[curveIndex].curve : null, destClipTime, crossWeight, additive);
24584
24574
  aniUpdate && owner.applyValue(value, weight, additive);
24585
24575
  finished && layerOwner.saveFinalValue();
@@ -24606,6 +24596,7 @@ exports.AnimatorLayerBlendingMode = void 0;
24606
24596
  var layerOwner = curveLayerOwner[i];
24607
24597
  var owner = layerOwner == null ? void 0 : layerOwner.curveOwner;
24608
24598
  if (!owner) continue;
24599
+ this._checkRevertOwner(owner, additive);
24609
24600
  owner.applyValue(layerOwner.finalValue, weight, additive);
24610
24601
  }
24611
24602
  };
@@ -24631,16 +24622,14 @@ exports.AnimatorLayerBlendingMode = void 0;
24631
24622
  var curveLayerOwner = srcPlayData.stateData.curveLayerOwner;
24632
24623
  for(var i = curveLayerOwner.length - 1; i >= 0; i--){
24633
24624
  var _curveLayerOwner_i;
24634
- var owner = (_curveLayerOwner_i = curveLayerOwner[i]) == null ? void 0 : _curveLayerOwner_i.curveOwner;
24635
- owner.revertDefaultValue();
24625
+ (_curveLayerOwner_i = curveLayerOwner[i]) == null ? void 0 : _curveLayerOwner_i.curveOwner.revertDefaultValue();
24636
24626
  }
24637
24627
  }
24638
24628
  } else {
24639
24629
  // layerState is CrossFading, FixedCrossFading, Standby, Finished
24640
24630
  var crossLayerOwnerCollection = layerData.crossLayerOwnerCollection;
24641
24631
  for(var i1 = crossLayerOwnerCollection.length - 1; i1 >= 0; i1--){
24642
- var owner1 = crossLayerOwnerCollection[i1].curveOwner;
24643
- owner1.revertDefaultValue();
24632
+ crossLayerOwnerCollection[i1].curveOwner.revertDefaultValue();
24644
24633
  }
24645
24634
  }
24646
24635
  };
@@ -24663,7 +24652,7 @@ exports.AnimatorLayerBlendingMode = void 0;
24663
24652
  return;
24664
24653
  }
24665
24654
  if (!crossState.clip) {
24666
- console.warn("The state named " + name + " has no AnimationClip data.");
24655
+ Logger.warn("The state named " + name + " has no AnimationClip data.");
24667
24656
  return;
24668
24657
  }
24669
24658
  var animatorLayerData = this._getAnimatorLayerData(playLayerIndex);
@@ -24675,12 +24664,12 @@ exports.AnimatorLayerBlendingMode = void 0;
24675
24664
  destPlayData.reset(crossState, animatorStateData, offset);
24676
24665
  switch(layerState){
24677
24666
  case LayerState.Standby:
24667
+ case LayerState.Finished:
24678
24668
  animatorLayerData.layerState = LayerState.FixedCrossFading;
24679
24669
  this._clearCrossData(animatorLayerData);
24680
24670
  this._prepareStandbyCrossFading(animatorLayerData);
24681
24671
  break;
24682
24672
  case LayerState.Playing:
24683
- case LayerState.Finished:
24684
24673
  animatorLayerData.layerState = LayerState.CrossFading;
24685
24674
  this._clearCrossData(animatorLayerData);
24686
24675
  this._prepareCrossFading(animatorLayerData);
@@ -24777,11 +24766,11 @@ exports.AnimatorLayerBlendingMode = void 0;
24777
24766
  }
24778
24767
  }
24779
24768
  };
24780
- _proto._revertCurveOwners = function _revertCurveOwners() {
24781
- var curveOwners = this._needRevertCurveOwners;
24782
- for(var i = 0, n = curveOwners.length; i < n; ++i){
24783
- curveOwners[i].revertDefaultValue();
24769
+ _proto._checkRevertOwner = function _checkRevertOwner(owner, additive) {
24770
+ if (additive && owner.updateMark !== this._updateMark) {
24771
+ owner.revertDefaultValue();
24784
24772
  }
24773
+ owner.updateMark = this._updateMark;
24785
24774
  };
24786
24775
  _create_class(Animator, [
24787
24776
  {
@@ -24811,13 +24800,13 @@ __decorate([
24811
24800
  ], Animator.prototype, "_controllerUpdateFlag", void 0);
24812
24801
  __decorate([
24813
24802
  ignoreClone
24814
- ], Animator.prototype, "_animatorLayersData", void 0);
24803
+ ], Animator.prototype, "_updateMark", void 0);
24815
24804
  __decorate([
24816
24805
  ignoreClone
24817
- ], Animator.prototype, "_curveOwnerPool", void 0);
24806
+ ], Animator.prototype, "_animatorLayersData", void 0);
24818
24807
  __decorate([
24819
24808
  ignoreClone
24820
- ], Animator.prototype, "_needRevertCurveOwners", void 0);
24809
+ ], Animator.prototype, "_curveOwnerPool", void 0);
24821
24810
  __decorate([
24822
24811
  ignoreClone
24823
24812
  ], Animator.prototype, "_animationEventHandlerPool", void 0);
package/dist/module.js CHANGED
@@ -22678,6 +22678,7 @@ var DirtyFlag;
22678
22678
  curKeyframeIndex: 0,
22679
22679
  value: null
22680
22680
  };
22681
+ this.updateMark = 0;
22681
22682
  this.target = target;
22682
22683
  this.type = type;
22683
22684
  this.property = property;
@@ -24151,9 +24152,9 @@ var AnimatorLayerBlendingMode;
24151
24152
  _this = Component.call(this, entity) || this;
24152
24153
  /** Culling mode of this Animator. */ _this.cullingMode = AnimatorCullingMode.None;
24153
24154
  /** The playback speed of the Animator, 1.0 is normal playback speed. */ _this.speed = 1.0;
24155
+ _this._updateMark = 0;
24154
24156
  _this._animatorLayersData = [];
24155
24157
  _this._curveOwnerPool = Object.create(null);
24156
- _this._needRevertCurveOwners = [];
24157
24158
  _this._animationEventHandlerPool = new ClassPool(AnimationEventHandler);
24158
24159
  _this._tempAnimatorStateInfo = {
24159
24160
  layerIndex: -1,
@@ -24181,10 +24182,10 @@ var AnimatorLayerBlendingMode;
24181
24182
  return;
24182
24183
  }
24183
24184
  if (!state.clip) {
24184
- console.warn("The state named " + stateName + " has no AnimationClip data.");
24185
+ Logger.warn("The state named " + stateName + " has no AnimationClip data.");
24185
24186
  return;
24186
24187
  }
24187
- var animatorLayerData = this._getAnimatorLayerData(stateInfo.layerIndex);
24188
+ var animatorLayerData = this._getAnimatorLayerData(playLayerIndex);
24188
24189
  var animatorStateData = this._getAnimatorStateData(stateName, state, animatorLayerData, playLayerIndex);
24189
24190
  this._preparePlay(animatorLayerData, state);
24190
24191
  animatorLayerData.layerState = LayerState.Playing;
@@ -24203,8 +24204,8 @@ var AnimatorLayerBlendingMode;
24203
24204
  if ((_this__controllerUpdateFlag = this._controllerUpdateFlag) == null ? void 0 : _this__controllerUpdateFlag.flag) {
24204
24205
  this._reset();
24205
24206
  }
24206
- var state = this._getAnimatorStateInfo(stateName, layerIndex).state;
24207
- var manuallyTransition = this._getAnimatorLayerData(layerIndex).manuallyTransition;
24207
+ var _this__getAnimatorStateInfo = this._getAnimatorStateInfo(stateName, layerIndex), state = _this__getAnimatorStateInfo.state, playLayerIndex = _this__getAnimatorStateInfo.layerIndex;
24208
+ var manuallyTransition = this._getAnimatorLayerData(playLayerIndex).manuallyTransition;
24208
24209
  manuallyTransition.duration = normalizedTransitionDuration;
24209
24210
  manuallyTransition.offset = normalizedTimeOffset;
24210
24211
  manuallyTransition.destinationState = state;
@@ -24237,7 +24238,7 @@ var AnimatorLayerBlendingMode;
24237
24238
  return;
24238
24239
  }
24239
24240
  deltaTime *= this.speed;
24240
- this._revertCurveOwners();
24241
+ this._updateMark++;
24241
24242
  for(var i1 = 0, n1 = animatorController.layers.length; i1 < n1; i1++){
24242
24243
  var animatorLayerData = this._getAnimatorLayerData(i1);
24243
24244
  if (animatorLayerData.layerState === LayerState.Standby) {
@@ -24285,7 +24286,6 @@ var AnimatorLayerBlendingMode;
24285
24286
  }
24286
24287
  }
24287
24288
  this._animatorLayersData.length = 0;
24288
- this._needRevertCurveOwners.length = 0;
24289
24289
  this._curveOwnerPool = {};
24290
24290
  this._animationEventHandlerPool.resetPool();
24291
24291
  if (this._controllerUpdateFlag) {
@@ -24327,8 +24327,8 @@ var AnimatorLayerBlendingMode;
24327
24327
  _proto._saveAnimatorStateData = function _saveAnimatorStateData(animatorState, animatorStateData, animatorLayerData, layerIndex) {
24328
24328
  var _this = this, entity = _this.entity, curveOwnerPool = _this._curveOwnerPool;
24329
24329
  var curveLayerOwner = animatorStateData.curveLayerOwner;
24330
- var layerCurveOwnerPool = animatorLayerData.curveOwnerPool;
24331
24330
  var _animatorState_clip = animatorState.clip, curves = _animatorState_clip._curveBindings;
24331
+ var layerCurveOwnerPool = animatorLayerData.curveOwnerPool;
24332
24332
  for(var i = curves.length - 1; i >= 0; i--){
24333
24333
  var curve = curves[i];
24334
24334
  var targetEntity = curve.relativePath === "" ? entity : entity.findByPath(curve.relativePath);
@@ -24336,29 +24336,16 @@ var AnimatorLayerBlendingMode;
24336
24336
  var _curveOwnerPool, _instanceId, _propertyOwners, _property, _layerCurveOwnerPool, _instanceId1, _layerPropertyOwners, _property1;
24337
24337
  var property = curve.property;
24338
24338
  var instanceId = targetEntity.instanceId;
24339
- var needRevert = false;
24340
- var baseAnimatorLayerData = this._animatorLayersData[0];
24341
- var baseLayerCurveOwnerPool = baseAnimatorLayerData.curveOwnerPool;
24342
- if (this.animatorController.layers[layerIndex].blendingMode === AnimatorLayerBlendingMode.Additive && layerIndex > 0 && !(baseLayerCurveOwnerPool[instanceId] && baseLayerCurveOwnerPool[instanceId][property])) {
24343
- needRevert = true;
24344
- }
24345
24339
  // Get owner
24346
24340
  var propertyOwners = (_curveOwnerPool = curveOwnerPool)[_instanceId = instanceId] || (_curveOwnerPool[_instanceId] = Object.create(null));
24347
24341
  var owner = (_propertyOwners = propertyOwners)[_property = property] || (_propertyOwners[_property] = curve._createCurveOwner(targetEntity));
24348
- //@todo: There is performance waste here, which will be handled together with organizing AnimatorStateData later. The logic is changing from runtime to initialization.
24349
- if (needRevert) {
24350
- this._needRevertCurveOwners.push(owner);
24351
- } else {
24352
- var index = this._needRevertCurveOwners.indexOf(owner);
24353
- index > -1 && this._needRevertCurveOwners.splice(index, 1);
24354
- }
24355
24342
  // Get layer owner
24356
24343
  var layerPropertyOwners = (_layerCurveOwnerPool = layerCurveOwnerPool)[_instanceId1 = instanceId] || (_layerCurveOwnerPool[_instanceId1] = Object.create(null));
24357
24344
  var layerOwner = (_layerPropertyOwners = layerPropertyOwners)[_property1 = property] || (_layerPropertyOwners[_property1] = curve._createCurveLayerOwner(owner));
24358
24345
  curveLayerOwner[i] = layerOwner;
24359
24346
  } else {
24360
24347
  curveLayerOwner[i] = null;
24361
- console.warn("The entity don't have the child entity which path is " + curve.relativePath + ".");
24348
+ Logger.warn("The entity don't have the child entity which path is " + curve.relativePath + ".");
24362
24349
  }
24363
24350
  }
24364
24351
  };
@@ -24484,6 +24471,7 @@ var AnimatorLayerBlendingMode;
24484
24471
  if (!owner) continue;
24485
24472
  var curve = curveBindings[i].curve;
24486
24473
  if (curve.keys.length) {
24474
+ this._checkRevertOwner(owner, additive);
24487
24475
  var value = owner.evaluateValue(curve, clipTime, additive);
24488
24476
  aniUpdate && owner.applyValue(value, weight, additive);
24489
24477
  finished && layerOwner.saveFinalValue();
@@ -24529,6 +24517,7 @@ var AnimatorLayerBlendingMode;
24529
24517
  if (!owner) continue;
24530
24518
  var srcCurveIndex = layerOwner.crossSrcCurveIndex;
24531
24519
  var destCurveIndex = layerOwner.crossDestCurveIndex;
24520
+ this._checkRevertOwner(owner, additive);
24532
24521
  var value = owner.evaluateCrossFadeValue(srcCurveIndex >= 0 ? srcCurves[srcCurveIndex].curve : null, destCurveIndex >= 0 ? destCurves[destCurveIndex].curve : null, srcClipTime, destClipTime, crossWeight, additive);
24533
24522
  aniUpdate && owner.applyValue(value, weight, additive);
24534
24523
  finished && layerOwner.saveFinalValue();
@@ -24575,6 +24564,7 @@ var AnimatorLayerBlendingMode;
24575
24564
  var owner = layerOwner == null ? void 0 : layerOwner.curveOwner;
24576
24565
  if (!owner) continue;
24577
24566
  var curveIndex = layerOwner.crossDestCurveIndex;
24567
+ this._checkRevertOwner(owner, additive);
24578
24568
  var value = layerOwner.curveOwner.crossFadeFromPoseAndApplyValue(curveIndex >= 0 ? curveBindings[curveIndex].curve : null, destClipTime, crossWeight, additive);
24579
24569
  aniUpdate && owner.applyValue(value, weight, additive);
24580
24570
  finished && layerOwner.saveFinalValue();
@@ -24601,6 +24591,7 @@ var AnimatorLayerBlendingMode;
24601
24591
  var layerOwner = curveLayerOwner[i];
24602
24592
  var owner = layerOwner == null ? void 0 : layerOwner.curveOwner;
24603
24593
  if (!owner) continue;
24594
+ this._checkRevertOwner(owner, additive);
24604
24595
  owner.applyValue(layerOwner.finalValue, weight, additive);
24605
24596
  }
24606
24597
  };
@@ -24626,16 +24617,14 @@ var AnimatorLayerBlendingMode;
24626
24617
  var curveLayerOwner = srcPlayData.stateData.curveLayerOwner;
24627
24618
  for(var i = curveLayerOwner.length - 1; i >= 0; i--){
24628
24619
  var _curveLayerOwner_i;
24629
- var owner = (_curveLayerOwner_i = curveLayerOwner[i]) == null ? void 0 : _curveLayerOwner_i.curveOwner;
24630
- owner.revertDefaultValue();
24620
+ (_curveLayerOwner_i = curveLayerOwner[i]) == null ? void 0 : _curveLayerOwner_i.curveOwner.revertDefaultValue();
24631
24621
  }
24632
24622
  }
24633
24623
  } else {
24634
24624
  // layerState is CrossFading, FixedCrossFading, Standby, Finished
24635
24625
  var crossLayerOwnerCollection = layerData.crossLayerOwnerCollection;
24636
24626
  for(var i1 = crossLayerOwnerCollection.length - 1; i1 >= 0; i1--){
24637
- var owner1 = crossLayerOwnerCollection[i1].curveOwner;
24638
- owner1.revertDefaultValue();
24627
+ crossLayerOwnerCollection[i1].curveOwner.revertDefaultValue();
24639
24628
  }
24640
24629
  }
24641
24630
  };
@@ -24658,7 +24647,7 @@ var AnimatorLayerBlendingMode;
24658
24647
  return;
24659
24648
  }
24660
24649
  if (!crossState.clip) {
24661
- console.warn("The state named " + name + " has no AnimationClip data.");
24650
+ Logger.warn("The state named " + name + " has no AnimationClip data.");
24662
24651
  return;
24663
24652
  }
24664
24653
  var animatorLayerData = this._getAnimatorLayerData(playLayerIndex);
@@ -24670,12 +24659,12 @@ var AnimatorLayerBlendingMode;
24670
24659
  destPlayData.reset(crossState, animatorStateData, offset);
24671
24660
  switch(layerState){
24672
24661
  case LayerState.Standby:
24662
+ case LayerState.Finished:
24673
24663
  animatorLayerData.layerState = LayerState.FixedCrossFading;
24674
24664
  this._clearCrossData(animatorLayerData);
24675
24665
  this._prepareStandbyCrossFading(animatorLayerData);
24676
24666
  break;
24677
24667
  case LayerState.Playing:
24678
- case LayerState.Finished:
24679
24668
  animatorLayerData.layerState = LayerState.CrossFading;
24680
24669
  this._clearCrossData(animatorLayerData);
24681
24670
  this._prepareCrossFading(animatorLayerData);
@@ -24772,11 +24761,11 @@ var AnimatorLayerBlendingMode;
24772
24761
  }
24773
24762
  }
24774
24763
  };
24775
- _proto._revertCurveOwners = function _revertCurveOwners() {
24776
- var curveOwners = this._needRevertCurveOwners;
24777
- for(var i = 0, n = curveOwners.length; i < n; ++i){
24778
- curveOwners[i].revertDefaultValue();
24764
+ _proto._checkRevertOwner = function _checkRevertOwner(owner, additive) {
24765
+ if (additive && owner.updateMark !== this._updateMark) {
24766
+ owner.revertDefaultValue();
24779
24767
  }
24768
+ owner.updateMark = this._updateMark;
24780
24769
  };
24781
24770
  _create_class(Animator, [
24782
24771
  {
@@ -24806,13 +24795,13 @@ __decorate([
24806
24795
  ], Animator.prototype, "_controllerUpdateFlag", void 0);
24807
24796
  __decorate([
24808
24797
  ignoreClone
24809
- ], Animator.prototype, "_animatorLayersData", void 0);
24798
+ ], Animator.prototype, "_updateMark", void 0);
24810
24799
  __decorate([
24811
24800
  ignoreClone
24812
- ], Animator.prototype, "_curveOwnerPool", void 0);
24801
+ ], Animator.prototype, "_animatorLayersData", void 0);
24813
24802
  __decorate([
24814
24803
  ignoreClone
24815
- ], Animator.prototype, "_needRevertCurveOwners", void 0);
24804
+ ], Animator.prototype, "_curveOwnerPool", void 0);
24816
24805
  __decorate([
24817
24806
  ignoreClone
24818
24807
  ], Animator.prototype, "_animationEventHandlerPool", void 0);