mirror of
https://github.com/motajs/template.git
synced 2026-11-02 23:14:34 +08:00
refactor: 音频系统
This commit is contained in:
1 parent
191ba8d1db
commit
ee54148558
29 files changed
+2170
-1273
No files matched your search
@@ -5,3 +5,5 @@ export function create() {
|
||||
}
|
||||
|
||||
export * from './material';
|
||||
|
||||
export * from './ins';
|
||||
@@ -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);
|
||||
Reference in new issue
Block a user