refactor: 音频系统

This commit is contained in:
AncTe committed 2026-03-17 19:34:30 +08:00
1 parent 191ba8d1db
commit ee54148558
29 files changed
+2170 -1273

No files matched your search

+2
View File
@@ -5,3 +5,5 @@ export function create() {
}
export * from './material';
export * from './ins';
+8
View File
@@ -0,0 +1,8 @@
import { BGMPlayer, MotaAudioContext, SoundPlayer } from '@motajs/audio';
/** 游戏全局音频上下文 */
export const audioContext = new MotaAudioContext();
/** 音效播放器 */
export const soundPlayer = new SoundPlayer(audioContext);
/** 音乐播放器 */
export const bgmPlayer = new BGMPlayer(audioContext);