@galacean/engine-core 1.1.0-beta.15 → 1.1.0-beta.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.
- package/dist/main.js +26 -18
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +26 -18
- package/dist/module.js +26 -18
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
package/dist/main.js
CHANGED
|
@@ -24492,9 +24492,7 @@ var DirtyFlag;
|
|
|
24492
24492
|
this.property = property;
|
|
24493
24493
|
this.component = target.getComponent(type);
|
|
24494
24494
|
this.cureType = cureType;
|
|
24495
|
-
|
|
24496
|
-
// @todo: Temp solution with blendShape bug when multi SkinnedMeshRenderer in a entity. we need to run setTargetValue to solve it.
|
|
24497
|
-
this._isCopyMode = cureType._isCopyMode && !isBlendShape;
|
|
24495
|
+
this._isBlendShape = _instanceof(this.component, SkinnedMeshRenderer);
|
|
24498
24496
|
var assemblerType = AnimationCurveOwner.getAssemblerType(type, property);
|
|
24499
24497
|
this._assembler = new assemblerType();
|
|
24500
24498
|
this._assembler.initialize(this);
|
|
@@ -24526,7 +24524,7 @@ var DirtyFlag;
|
|
|
24526
24524
|
this._assembler.setTargetValue(this.defaultValue);
|
|
24527
24525
|
};
|
|
24528
24526
|
_proto.getEvaluateValue = function getEvaluateValue(out) {
|
|
24529
|
-
if (this._isCopyMode) {
|
|
24527
|
+
if (this.cureType._isCopyMode) {
|
|
24530
24528
|
this.cureType._setValue(this.baseEvaluateData.value, out);
|
|
24531
24529
|
return out;
|
|
24532
24530
|
} else {
|
|
@@ -24534,14 +24532,14 @@ var DirtyFlag;
|
|
|
24534
24532
|
}
|
|
24535
24533
|
};
|
|
24536
24534
|
_proto.saveDefaultValue = function saveDefaultValue() {
|
|
24537
|
-
if (this._isCopyMode) {
|
|
24535
|
+
if (this.cureType._isCopyMode) {
|
|
24538
24536
|
this.cureType._setValue(this.referenceTargetValue, this.defaultValue);
|
|
24539
24537
|
} else {
|
|
24540
24538
|
this.defaultValue = this._assembler.getTargetValue();
|
|
24541
24539
|
}
|
|
24542
24540
|
};
|
|
24543
24541
|
_proto.saveFixedPoseValue = function saveFixedPoseValue() {
|
|
24544
|
-
if (this._isCopyMode) {
|
|
24542
|
+
if (this.cureType._isCopyMode) {
|
|
24545
24543
|
this.cureType._setValue(this.referenceTargetValue, this.fixedPoseValue);
|
|
24546
24544
|
} else {
|
|
24547
24545
|
this.fixedPoseValue = this._assembler.getTargetValue();
|
|
@@ -24550,40 +24548,50 @@ var DirtyFlag;
|
|
|
24550
24548
|
_proto.applyValue = function applyValue(value, weight, additive) {
|
|
24551
24549
|
var cureType = this.cureType;
|
|
24552
24550
|
if (additive) {
|
|
24553
|
-
|
|
24554
|
-
|
|
24551
|
+
var assembler = this._assembler;
|
|
24552
|
+
if (cureType._isCopyMode) {
|
|
24553
|
+
var additiveValue = cureType._additiveValue(value, weight, this.referenceTargetValue);
|
|
24554
|
+
// @todo: Temp solution with blendShape bug when multi SkinnedMeshRenderer in a entity. we need to run setTargetValue to solve it.
|
|
24555
|
+
if (this._isBlendShape) {
|
|
24556
|
+
assembler.setTargetValue(additiveValue);
|
|
24557
|
+
}
|
|
24555
24558
|
} else {
|
|
24556
|
-
var assembler = this._assembler;
|
|
24557
24559
|
var originValue = assembler.getTargetValue();
|
|
24558
|
-
var
|
|
24559
|
-
assembler.setTargetValue(
|
|
24560
|
+
var additiveValue1 = cureType._additiveValue(value, weight, originValue);
|
|
24561
|
+
assembler.setTargetValue(additiveValue1);
|
|
24560
24562
|
}
|
|
24561
24563
|
} else {
|
|
24562
24564
|
if (weight === 1.0) {
|
|
24563
|
-
if (
|
|
24565
|
+
if (cureType._isCopyMode) {
|
|
24564
24566
|
cureType._setValue(value, this.referenceTargetValue);
|
|
24567
|
+
// @todo: Temp solution with blendShape bug when multi SkinnedMeshRenderer in a entity. we need to run setTargetValue to solve it.
|
|
24568
|
+
if (this._isBlendShape) {
|
|
24569
|
+
this._assembler.setTargetValue(this.referenceTargetValue);
|
|
24570
|
+
}
|
|
24565
24571
|
} else {
|
|
24566
24572
|
this._assembler.setTargetValue(value);
|
|
24567
24573
|
}
|
|
24568
24574
|
} else {
|
|
24569
|
-
if (
|
|
24575
|
+
if (cureType._isCopyMode) {
|
|
24570
24576
|
var targetValue = this.referenceTargetValue;
|
|
24571
24577
|
cureType._lerpValue(targetValue, value, weight, targetValue);
|
|
24578
|
+
// @todo: Temp solution with blendShape bug when multi SkinnedMeshRenderer in a entity. we need to run setTargetValue to solve it.
|
|
24579
|
+
if (this._isBlendShape) {
|
|
24580
|
+
this._assembler.setTargetValue(targetValue);
|
|
24581
|
+
}
|
|
24572
24582
|
} else {
|
|
24573
24583
|
var originValue1 = this._assembler.getTargetValue();
|
|
24574
|
-
|
|
24575
|
-
var lerpValue = cureType._lerpValue(originValue1, value, weight, originValue1);
|
|
24584
|
+
var lerpValue = cureType._lerpValue(originValue1, value, weight);
|
|
24576
24585
|
this._assembler.setTargetValue(lerpValue);
|
|
24577
24586
|
}
|
|
24578
24587
|
}
|
|
24579
24588
|
}
|
|
24580
24589
|
};
|
|
24581
24590
|
_proto._lerpValue = function _lerpValue(srcValue, destValue, crossWeight) {
|
|
24582
|
-
if (this._isCopyMode) {
|
|
24591
|
+
if (this.cureType._isCopyMode) {
|
|
24583
24592
|
return this.cureType._lerpValue(srcValue, destValue, crossWeight, this.baseEvaluateData.value);
|
|
24584
24593
|
} else {
|
|
24585
|
-
|
|
24586
|
-
this.baseEvaluateData.value = this.cureType._lerpValue(srcValue, destValue, crossWeight, this.baseEvaluateData.value);
|
|
24594
|
+
this.baseEvaluateData.value = this.cureType._lerpValue(srcValue, destValue, crossWeight);
|
|
24587
24595
|
return this.baseEvaluateData.value;
|
|
24588
24596
|
}
|
|
24589
24597
|
};
|