@galacean/engine-loader 0.9.6 → 0.9.8

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 CHANGED
@@ -4249,7 +4249,7 @@ var SpriteAtlasLoader = /*#__PURE__*/ function(Loader) {
4249
4249
  var atlasItem = atlasItems[i];
4250
4250
  if (atlasItem.img) {
4251
4251
  chainPromises.push(resourceManager.load({
4252
- url: atlasItem.img,
4252
+ url: GLTFUtil.parseRelativeUrl(item.url, atlasItem.img),
4253
4253
  type: engineCore.AssetType.Texture2D,
4254
4254
  params: {
4255
4255
  format: format,
@@ -4426,6 +4426,30 @@ TextureCubeLoader = __decorate([
4426
4426
  ])
4427
4427
  ], TextureCubeLoader);
4428
4428
 
4429
+ var AnimationClipLoader = /*#__PURE__*/ function(Loader) {
4430
+ _inherits(AnimationClipLoader, Loader);
4431
+ function AnimationClipLoader() {
4432
+ return Loader.apply(this, arguments);
4433
+ }
4434
+ var _proto = AnimationClipLoader.prototype;
4435
+ _proto.load = function load(item, resourceManager) {
4436
+ var _this = this;
4437
+ return new engineCore.AssetPromise(function(resolve, reject) {
4438
+ _this.request(item.url, _extends({}, item, {
4439
+ type: "arraybuffer"
4440
+ })).then(function(data) {
4441
+ return decode(data, resourceManager.engine).then(resolve);
4442
+ }).catch(reject);
4443
+ });
4444
+ };
4445
+ return AnimationClipLoader;
4446
+ }(engineCore.Loader);
4447
+ AnimationClipLoader = __decorate([
4448
+ engineCore.resourceLoader(engineCore.AssetType.AnimationClip, [
4449
+ "ani"
4450
+ ])
4451
+ ], AnimationClipLoader);
4452
+
4429
4453
  var SceneLoader = /*#__PURE__*/ function(Loader) {
4430
4454
  _inherits(SceneLoader, Loader);
4431
4455
  function SceneLoader() {
@@ -4494,6 +4518,14 @@ var SceneLoader = /*#__PURE__*/ function(Loader) {
4494
4518
  if (shadow.shadowDistance != undefined) scene.shadowDistance = shadow.shadowDistance;
4495
4519
  if (shadow.shadowCascades != undefined) scene.shadowCascades = shadow.shadowCascades;
4496
4520
  }
4521
+ var fog = data.scene.fog;
4522
+ if (fog) {
4523
+ if (fog.fogMode != undefined) scene.fogMode = fog.fogMode;
4524
+ if (fog.fogStart != undefined) scene.fogStart = fog.fogStart;
4525
+ if (fog.fogEnd != undefined) scene.fogEnd = fog.fogEnd;
4526
+ if (fog.fogDensity != undefined) scene.fogDensity = fog.fogDensity;
4527
+ if (fog.fogColor != undefined) scene.fogColor.copyFrom(fog.fogColor);
4528
+ }
4497
4529
  return Promise.all([
4498
4530
  ambientLightPromise,
4499
4531
  backgroundPromise