feat(asset-system): 完善资源加载和场景资源管理 (#289)

- 添加 AudioLoader 支持音频资源加载 (mp3/wav/ogg/m4a/flac/aac)
- EngineIntegration 添加音频资源加载/卸载支持
- EngineIntegration 添加数据(JSON)资源加载/卸载支持
- SceneResourceManager 实现完整的引用计数机制
- SceneResourceManager 实现场景资源卸载,仅卸载无引用的资源
- 添加资源统计和引用计数查询接口
This commit is contained in:
YHH
2025-12-06 14:47:35 +08:00
committed by GitHub
parent 3617f40309
commit 1fb702169e
5 changed files with 618 additions and 15 deletions

View File

@@ -9,6 +9,7 @@ import { TextureLoader } from './TextureLoader';
import { JsonLoader } from './JsonLoader';
import { TextLoader } from './TextLoader';
import { BinaryLoader } from './BinaryLoader';
import { AudioLoader } from './AudioLoader';
/**
* Asset loader factory
@@ -38,6 +39,9 @@ export class AssetLoaderFactory implements IAssetLoaderFactory {
// 二进制加载器 / Binary loader
this._loaders.set(AssetType.Binary, new BinaryLoader());
// 音频加载器 / Audio loader
this._loaders.set(AssetType.Audio, new AudioLoader());
}
/**