feat(asset-system): 完善资源加载和场景资源管理 (#289)
- 添加 AudioLoader 支持音频资源加载 (mp3/wav/ogg/m4a/flac/aac) - EngineIntegration 添加音频资源加载/卸载支持 - EngineIntegration 添加数据(JSON)资源加载/卸载支持 - SceneResourceManager 实现完整的引用计数机制 - SceneResourceManager 实现场景资源卸载,仅卸载无引用的资源 - 添加资源统计和引用计数查询接口
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user