@galacean/engine 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/browser.js CHANGED
@@ -29132,9 +29132,7 @@
29132
29132
  this.property = property;
29133
29133
  this.component = target.getComponent(type);
29134
29134
  this.cureType = cureType;
29135
- var isBlendShape = _instanceof1$2(this.component, SkinnedMeshRenderer);
29136
- // @todo: Temp solution with blendShape bug when multi SkinnedMeshRenderer in a entity. we need to run setTargetValue to solve it.
29137
- this._isCopyMode = cureType._isCopyMode && !isBlendShape;
29135
+ this._isBlendShape = _instanceof1$2(this.component, SkinnedMeshRenderer);
29138
29136
  var assemblerType = AnimationCurveOwner.getAssemblerType(type, property);
29139
29137
  this._assembler = new assemblerType();
29140
29138
  this._assembler.initialize(this);
@@ -29166,7 +29164,7 @@
29166
29164
  this._assembler.setTargetValue(this.defaultValue);
29167
29165
  };
29168
29166
  _proto.getEvaluateValue = function getEvaluateValue(out) {
29169
- if (this._isCopyMode) {
29167
+ if (this.cureType._isCopyMode) {
29170
29168
  this.cureType._setValue(this.baseEvaluateData.value, out);
29171
29169
  return out;
29172
29170
  } else {
@@ -29174,14 +29172,14 @@
29174
29172
  }
29175
29173
  };
29176
29174
  _proto.saveDefaultValue = function saveDefaultValue() {
29177
- if (this._isCopyMode) {
29175
+ if (this.cureType._isCopyMode) {
29178
29176
  this.cureType._setValue(this.referenceTargetValue, this.defaultValue);
29179
29177
  } else {
29180
29178
  this.defaultValue = this._assembler.getTargetValue();
29181
29179
  }
29182
29180
  };
29183
29181
  _proto.saveFixedPoseValue = function saveFixedPoseValue() {
29184
- if (this._isCopyMode) {
29182
+ if (this.cureType._isCopyMode) {
29185
29183
  this.cureType._setValue(this.referenceTargetValue, this.fixedPoseValue);
29186
29184
  } else {
29187
29185
  this.fixedPoseValue = this._assembler.getTargetValue();
@@ -29190,40 +29188,50 @@
29190
29188
  _proto.applyValue = function applyValue(value, weight, additive) {
29191
29189
  var cureType = this.cureType;
29192
29190
  if (additive) {
29193
- if (this._isCopyMode) {
29194
- cureType._additiveValue(value, weight, this.referenceTargetValue);
29191
+ var assembler = this._assembler;
29192
+ if (cureType._isCopyMode) {
29193
+ var additiveValue = cureType._additiveValue(value, weight, this.referenceTargetValue);
29194
+ // @todo: Temp solution with blendShape bug when multi SkinnedMeshRenderer in a entity. we need to run setTargetValue to solve it.
29195
+ if (this._isBlendShape) {
29196
+ assembler.setTargetValue(additiveValue);
29197
+ }
29195
29198
  } else {
29196
- var assembler = this._assembler;
29197
29199
  var originValue = assembler.getTargetValue();
29198
- var additiveValue = cureType._additiveValue(value, weight, originValue);
29199
- assembler.setTargetValue(additiveValue);
29200
+ var additiveValue1 = cureType._additiveValue(value, weight, originValue);
29201
+ assembler.setTargetValue(additiveValue1);
29200
29202
  }
29201
29203
  } else {
29202
29204
  if (weight === 1.0) {
29203
- if (this._isCopyMode) {
29205
+ if (cureType._isCopyMode) {
29204
29206
  cureType._setValue(value, this.referenceTargetValue);
29207
+ // @todo: Temp solution with blendShape bug when multi SkinnedMeshRenderer in a entity. we need to run setTargetValue to solve it.
29208
+ if (this._isBlendShape) {
29209
+ this._assembler.setTargetValue(this.referenceTargetValue);
29210
+ }
29205
29211
  } else {
29206
29212
  this._assembler.setTargetValue(value);
29207
29213
  }
29208
29214
  } else {
29209
- if (this._isCopyMode) {
29215
+ if (cureType._isCopyMode) {
29210
29216
  var targetValue = this.referenceTargetValue;
29211
29217
  cureType._lerpValue(targetValue, value, weight, targetValue);
29218
+ // @todo: Temp solution with blendShape bug when multi SkinnedMeshRenderer in a entity. we need to run setTargetValue to solve it.
29219
+ if (this._isBlendShape) {
29220
+ this._assembler.setTargetValue(targetValue);
29221
+ }
29212
29222
  } else {
29213
29223
  var originValue1 = this._assembler.getTargetValue();
29214
- // @todo: Temp solution in PR: https://github.com/galacean/engine/pull/1840
29215
- var lerpValue = cureType._lerpValue(originValue1, value, weight, originValue1);
29224
+ var lerpValue = cureType._lerpValue(originValue1, value, weight);
29216
29225
  this._assembler.setTargetValue(lerpValue);
29217
29226
  }
29218
29227
  }
29219
29228
  }
29220
29229
  };
29221
29230
  _proto._lerpValue = function _lerpValue(srcValue, destValue, crossWeight) {
29222
- if (this._isCopyMode) {
29231
+ if (this.cureType._isCopyMode) {
29223
29232
  return this.cureType._lerpValue(srcValue, destValue, crossWeight, this.baseEvaluateData.value);
29224
29233
  } else {
29225
- // @todo: Temp solution in PR: https://github.com/galacean/engine/pull/1840
29226
- this.baseEvaluateData.value = this.cureType._lerpValue(srcValue, destValue, crossWeight, this.baseEvaluateData.value);
29234
+ this.baseEvaluateData.value = this.cureType._lerpValue(srcValue, destValue, crossWeight);
29227
29235
  return this.baseEvaluateData.value;
29228
29236
  }
29229
29237
  };
@@ -42768,27 +42776,32 @@
42768
42776
  var promises = [];
42769
42777
  // parse ambient light
42770
42778
  var ambient = data.scene.ambient;
42771
- var useCustomAmbient = ambient.specularMode === "Custom";
42772
- var useSH = ambient.diffuseMode === exports.DiffuseMode.SphericalHarmonics;
42773
- scene.ambientLight.diffuseIntensity = ambient.diffuseIntensity;
42774
- scene.ambientLight.specularIntensity = ambient.specularIntensity;
42775
- scene.ambientLight.diffuseMode = ambient.diffuseMode;
42776
- scene.ambientLight.diffuseSolidColor.copyFrom(ambient.diffuseSolidColor);
42777
- scene.ambientLight.specularTextureDecodeRGBM = true;
42778
- if (useCustomAmbient && ambient.customAmbientLight) {
42779
- promises.push(resourceManager.getResourceByRef(ambient.customAmbientLight).then(function(ambientLight) {
42780
- scene.ambientLight.specularTexture = ambientLight.specularTexture;
42781
- }));
42782
- }
42783
- if (ambient.ambientLight && (!useCustomAmbient || useSH)) {
42784
- promises.push(resourceManager.getResourceByRef(ambient.ambientLight).then(function(ambientLight) {
42785
- if (!useCustomAmbient) {
42786
- scene.ambientLight.specularTexture = ambientLight.specularTexture;
42787
- }
42788
- if (useSH) {
42789
- scene.ambientLight.diffuseSphericalHarmonics = ambientLight.diffuseSphericalHarmonics;
42790
- }
42791
- }));
42779
+ if (ambient) {
42780
+ var useCustomAmbient = ambient.specularMode === "Custom";
42781
+ var useSH = ambient.diffuseMode === exports.DiffuseMode.SphericalHarmonics;
42782
+ scene.ambientLight.diffuseIntensity = ambient.diffuseIntensity;
42783
+ scene.ambientLight.specularIntensity = ambient.specularIntensity;
42784
+ scene.ambientLight.diffuseMode = ambient.diffuseMode;
42785
+ scene.ambientLight.diffuseSolidColor.copyFrom(ambient.diffuseSolidColor);
42786
+ scene.ambientLight.specularTextureDecodeRGBM = true;
42787
+ if (useCustomAmbient && ambient.customAmbientLight) {
42788
+ promises.push(resourceManager.getResourceByRef(ambient.customAmbientLight).then(function(ambientLight) {
42789
+ var _ambientLight;
42790
+ scene.ambientLight.specularTexture = (_ambientLight = ambientLight) == null ? void 0 : _ambientLight.specularTexture;
42791
+ }));
42792
+ }
42793
+ if (ambient.ambientLight && (!useCustomAmbient || useSH)) {
42794
+ promises.push(resourceManager.getResourceByRef(ambient.ambientLight).then(function(ambientLight) {
42795
+ if (!useCustomAmbient) {
42796
+ var _ambientLight;
42797
+ scene.ambientLight.specularTexture = (_ambientLight = ambientLight) == null ? void 0 : _ambientLight.specularTexture;
42798
+ }
42799
+ if (useSH) {
42800
+ var _ambientLight1;
42801
+ scene.ambientLight.diffuseSphericalHarmonics = (_ambientLight1 = ambientLight) == null ? void 0 : _ambientLight1.diffuseSphericalHarmonics;
42802
+ }
42803
+ }));
42804
+ }
42792
42805
  }
42793
42806
  var background = data.scene.background;
42794
42807
  scene.background.mode = background.mode;
@@ -43341,7 +43354,7 @@
43341
43354
  ], GALACEAN_animation_event);
43342
43355
 
43343
43356
  //@ts-ignore
43344
- var version = "1.1.0-beta.15";
43357
+ var version = "1.1.0-beta.16";
43345
43358
  console.log("Galacean engine version: " + version);
43346
43359
  for(var key in CoreObjects){
43347
43360
  Loader.registerClass(key, CoreObjects[key]);