Toys | Plugin Selection

reorder() // sort: visual → physics → audio (example) this.activePlugins = new Map([...this.activePlugins.entries()] .sort((a,b) => orderMap[a[1].category] - orderMap[b[1].category]));

disable(pluginId) /* remove from maps */

// 2. apply to context in order (order matters!) this.activePlugins.set(plugin.id, plugin); this.reorder(); // sort by category/priority