(global, presetName)
| 10 | //========// |
| 11 | const PRESET = {}; |
| 12 | export const loadPresetName = (global, presetName) => { |
| 13 | const preset = PRESET[presetName]; |
| 14 | if (preset === undefined) { |
| 15 | throw new Error(`Could not find preset: '${presetName}'`); |
| 16 | } |
| 17 | return loadPreset(global, preset); |
| 18 | }; |
| 19 | |
| 20 | export const loadPreset = (global, preset) => { |
| 21 | const { colours } = global; |