@galacean/engine-core 1.2.0-beta.3 → 1.2.0-beta.4

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright © 2020-2023 Galacean authors
3
+ Copyright (c) 2020 - present Ant Group
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
21
+ THE SOFTWARE.
package/dist/main.js CHANGED
@@ -4940,7 +4940,8 @@ __decorate([
4940
4940
  }
4941
4941
  var shaderInfo = Shader._shaderLab.parseShader(nameOrShaderSource);
4942
4942
  if (shaderMap[shaderInfo.name]) {
4943
- throw 'Shader named "' + shaderInfo.name + '" already exists.';
4943
+ console.error('Shader named "' + shaderInfo.name + '" already exists.');
4944
+ return;
4944
4945
  }
4945
4946
  var subShaderList = shaderInfo.subShaders.map(function(subShaderInfo) {
4946
4947
  var passList = subShaderInfo.passes.map(function(passInfo) {
@@ -4979,7 +4980,8 @@ __decorate([
4979
4980
  return shader;
4980
4981
  } else {
4981
4982
  if (shaderMap[nameOrShaderSource]) {
4982
- throw 'Shader named "' + nameOrShaderSource + '" already exists.';
4983
+ console.error('Shader named "' + nameOrShaderSource + '" already exists.');
4984
+ return;
4983
4985
  }
4984
4986
  if (typeof vertexSourceOrShaderPassesOrSubShaders === "string") {
4985
4987
  var shaderPass = new ShaderPass(vertexSourceOrShaderPassesOrSubShaders, fragmentSource);
@@ -22126,9 +22128,10 @@ __decorate([
22126
22128
  */ _proto._updateShaderData = function _updateShaderData(shaderData) {
22127
22129
  var _this = this, spotLight = _this._spotLights, pointLight = _this._pointLights, directLight = _this._directLights;
22128
22130
  var _this1 = this, spotData = _this1._spotData, pointData = _this1._pointData, directData = _this1._directData;
22129
- var spotLightCount = spotLight.length;
22130
- var pointLightCount = pointLight.length;
22131
- var directLightCount = directLight.length;
22131
+ var maxLight = LightManager._maxLight;
22132
+ var spotLightCount = Math.min(spotLight.length, maxLight);
22133
+ var pointLightCount = Math.min(pointLight.length, maxLight);
22134
+ var directLightCount = Math.min(directLight.length, maxLight);
22132
22135
  for(var i = 0; i < spotLightCount; i++){
22133
22136
  spotLight.get(i)._appendData(i, spotData);
22134
22137
  }
@@ -27234,20 +27237,19 @@ exports.AnimatorLayerBlendingMode = void 0;
27234
27237
  var relativePath = curve.relativePath;
27235
27238
  var targetEntity = curve.relativePath === "" ? entity : entity.findByPath(curve.relativePath);
27236
27239
  if (targetEntity) {
27237
- var _curveOwnerPool, _instanceId, _propertyOwners, _property, _layerCurveOwnerPool, _instanceId1, _layerPropertyOwners, _propertyPath;
27238
- var propertyPath = "" + curve.typeIndex + "." + curve.property;
27240
+ var _curveOwnerPool, _instanceId, _propertyOwners, _property, _layerCurveOwnerPool, _instanceId1, _layerPropertyOwners, _property1;
27239
27241
  var component = curve.typeIndex > 0 ? targetEntity.getComponents(curve.type, AnimationCurveOwner._components)[curve.typeIndex] : targetEntity.getComponent(curve.type);
27240
27242
  if (!component) {
27241
27243
  continue;
27242
27244
  }
27243
27245
  var property = curve.property;
27244
- var instanceId = targetEntity.instanceId;
27246
+ var instanceId = component.instanceId;
27245
27247
  // Get owner
27246
27248
  var propertyOwners = (_curveOwnerPool = curveOwnerPool)[_instanceId = instanceId] || (_curveOwnerPool[_instanceId] = Object.create(null));
27247
27249
  var owner = (_propertyOwners = propertyOwners)[_property = property] || (_propertyOwners[_property] = curve._createCurveOwner(targetEntity, component));
27248
27250
  // Get layer owner
27249
27251
  var layerPropertyOwners = (_layerCurveOwnerPool = layerCurveOwnerPool)[_instanceId1 = instanceId] || (_layerCurveOwnerPool[_instanceId1] = Object.create(null));
27250
- var layerOwner = (_layerPropertyOwners = layerPropertyOwners)[_propertyPath = propertyPath] || (_layerPropertyOwners[_propertyPath] = curve._createCurveLayerOwner(owner));
27252
+ var layerOwner = (_layerPropertyOwners = layerPropertyOwners)[_property1 = property] || (_layerPropertyOwners[_property1] = curve._createCurveLayerOwner(owner));
27251
27253
  if (mask && mask.pathMasks.length) {
27252
27254
  var _mask_getPathMask;
27253
27255
  var _mask_getPathMask_active;