@galacean/engine-loader 1.1.0-beta.25 → 1.1.0-beta.28

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.
@@ -539,6 +539,8 @@ var ReflectionParser = /*#__PURE__*/ function() {
539
539
  if (position) entity.transform.position.copyFrom(position);
540
540
  if (rotation) entity.transform.rotation.copyFrom(rotation);
541
541
  if (scale) entity.transform.scale.copyFrom(scale);
542
+ var _entityConfig_layer;
543
+ entity.layer = (_entityConfig_layer = entityConfig.layer) != null ? _entityConfig_layer : entity.layer;
542
544
  return entity;
543
545
  });
544
546
  };
@@ -5439,9 +5441,13 @@ var Texture2DLoader = /*#__PURE__*/ function(Loader1) {
5439
5441
  type: "image"
5440
5442
  });
5441
5443
  _this.request(url, requestConfig).then(function(image) {
5442
- var _params, _params1;
5443
- var params = item.params;
5444
- var texture = new miniprogram.Texture2D(resourceManager.engine, image.width, image.height, (_params = params) == null ? void 0 : _params.format, (_params1 = params) == null ? void 0 : _params1.mipmap);
5444
+ var _item_params;
5445
+ var _ref = (_item_params = item.params) != null ? _item_params : {}, format = _ref.format, mipmap = _ref.mipmap, anisoLevel = _ref.anisoLevel, wrapModeU = _ref.wrapModeU, wrapModeV = _ref.wrapModeV, filterMode = _ref.filterMode;
5446
+ var texture = new miniprogram.Texture2D(resourceManager.engine, image.width, image.height, format, mipmap);
5447
+ texture.anisoLevel = anisoLevel != null ? anisoLevel : texture.anisoLevel;
5448
+ texture.filterMode = filterMode != null ? filterMode : texture.filterMode;
5449
+ texture.wrapModeU = wrapModeU != null ? wrapModeU : texture.wrapModeU;
5450
+ texture.wrapModeV = wrapModeV != null ? wrapModeV : texture.wrapModeV;
5445
5451
  texture.setImageSource(image);
5446
5452
  texture.generateMipmaps();
5447
5453
  if (url.indexOf("data:") !== 0) {
@@ -5658,6 +5664,9 @@ var SceneLoader = /*#__PURE__*/ function(Loader1) {
5658
5664
  if (shadow.shadowResolution != undefined) scene.shadowResolution = shadow.shadowResolution;
5659
5665
  if (shadow.shadowDistance != undefined) scene.shadowDistance = shadow.shadowDistance;
5660
5666
  if (shadow.shadowCascades != undefined) scene.shadowCascades = shadow.shadowCascades;
5667
+ var _shadow_shadowTwoCascadeSplits;
5668
+ scene.shadowTwoCascadeSplits = (_shadow_shadowTwoCascadeSplits = shadow.shadowTwoCascadeSplits) != null ? _shadow_shadowTwoCascadeSplits : scene.shadowTwoCascadeSplits;
5669
+ shadow.shadowFourCascadeSplits && scene.shadowFourCascadeSplits.copyFrom(shadow.shadowFourCascadeSplits);
5661
5670
  }
5662
5671
  return Promise.all(promises).then(function() {
5663
5672
  resolve(scene);
package/dist/module.js CHANGED
@@ -534,6 +534,8 @@ var ReflectionParser = /*#__PURE__*/ function() {
534
534
  if (position) entity.transform.position.copyFrom(position);
535
535
  if (rotation) entity.transform.rotation.copyFrom(rotation);
536
536
  if (scale) entity.transform.scale.copyFrom(scale);
537
+ var _entityConfig_layer;
538
+ entity.layer = (_entityConfig_layer = entityConfig.layer) != null ? _entityConfig_layer : entity.layer;
537
539
  return entity;
538
540
  });
539
541
  };
@@ -5434,9 +5436,13 @@ var Texture2DLoader = /*#__PURE__*/ function(Loader1) {
5434
5436
  type: "image"
5435
5437
  });
5436
5438
  _this.request(url, requestConfig).then(function(image) {
5437
- var _params, _params1;
5438
- var params = item.params;
5439
- var texture = new Texture2D(resourceManager.engine, image.width, image.height, (_params = params) == null ? void 0 : _params.format, (_params1 = params) == null ? void 0 : _params1.mipmap);
5439
+ var _item_params;
5440
+ var _ref = (_item_params = item.params) != null ? _item_params : {}, format = _ref.format, mipmap = _ref.mipmap, anisoLevel = _ref.anisoLevel, wrapModeU = _ref.wrapModeU, wrapModeV = _ref.wrapModeV, filterMode = _ref.filterMode;
5441
+ var texture = new Texture2D(resourceManager.engine, image.width, image.height, format, mipmap);
5442
+ texture.anisoLevel = anisoLevel != null ? anisoLevel : texture.anisoLevel;
5443
+ texture.filterMode = filterMode != null ? filterMode : texture.filterMode;
5444
+ texture.wrapModeU = wrapModeU != null ? wrapModeU : texture.wrapModeU;
5445
+ texture.wrapModeV = wrapModeV != null ? wrapModeV : texture.wrapModeV;
5440
5446
  texture.setImageSource(image);
5441
5447
  texture.generateMipmaps();
5442
5448
  if (url.indexOf("data:") !== 0) {
@@ -5653,6 +5659,9 @@ var SceneLoader = /*#__PURE__*/ function(Loader1) {
5653
5659
  if (shadow.shadowResolution != undefined) scene.shadowResolution = shadow.shadowResolution;
5654
5660
  if (shadow.shadowDistance != undefined) scene.shadowDistance = shadow.shadowDistance;
5655
5661
  if (shadow.shadowCascades != undefined) scene.shadowCascades = shadow.shadowCascades;
5662
+ var _shadow_shadowTwoCascadeSplits;
5663
+ scene.shadowTwoCascadeSplits = (_shadow_shadowTwoCascadeSplits = shadow.shadowTwoCascadeSplits) != null ? _shadow_shadowTwoCascadeSplits : scene.shadowTwoCascadeSplits;
5664
+ shadow.shadowFourCascadeSplits && scene.shadowFourCascadeSplits.copyFrom(shadow.shadowFourCascadeSplits);
5656
5665
  }
5657
5666
  return Promise.all(promises).then(function() {
5658
5667
  resolve(scene);