Replaces the theme; partial objects are merged over the default.
import { setTheme, theme } from '@datamoc/mw_games/two-d/ui';setTheme({ color: { ...theme().color, textHighlight: 0x66ff66 } });console.log(theme().color.textHighlight); // 0x66ff66console.log(theme().padding); // 8 - everything else stays at the default Copy
import { setTheme, theme } from '@datamoc/mw_games/two-d/ui';setTheme({ color: { ...theme().color, textHighlight: 0x66ff66 } });console.log(theme().color.textHighlight); // 0x66ff66console.log(theme().padding); // 8 - everything else stays at the default
Replaces the theme; partial objects are merged over the default.