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