UNPKG

wam-extensions

Version:

Unofficial extensions to the Web Audio Module 2 API

17 lines (16 loc) 393 B
export class PatternExtension { constructor() { this.delegates = new Map(); } setPatternDelegate(pluginId, delegate) { if (delegate) { this.delegates.set(pluginId, delegate); } else { this.delegates.delete(pluginId); } } getPatternViewDelegate(pluginId) { return this.delegates.get(pluginId); } }