diff --git a/src/config.js b/src/config.js new file mode 100644 index 0000000..e82a17e --- /dev/null +++ b/src/config.js @@ -0,0 +1 @@ +export const default_map = 'chroma' diff --git a/src/stores/settings.js b/src/stores/settings.js index 68f3778..764151b 100644 --- a/src/stores/settings.js +++ b/src/stores/settings.js @@ -1,5 +1,7 @@ import { sessionStore } from 'svelte-storages' +import { default_map } from 'src/config' + /** * - `lx`: left x of complex plane * - `rx`: right x of complex plane @@ -12,6 +14,6 @@ export const draw = sessionStore('draw-settings', { }) export const settings = sessionStore('settings', { - palette: 'default', + palette: default_map, show_settings: true, }) diff --git a/src/utils/maps.js b/src/utils/maps.js index 7cf2d83..9952fc6 100644 --- a/src/utils/maps.js +++ b/src/utils/maps.js @@ -1,7 +1,7 @@ // palettes is from Fractint // mirror: https://github.com/jhol/fractint/blob/master/maps -const DEFAULT_MAP = 'default' +import { default_map } from 'src/config' export const MAPS = { altern: { name: 'altern' }, @@ -34,7 +34,7 @@ export const MAPS = { export async function load_palette(name) { if (MAPS[name] === undefined) { - name = DEFAULT_MAP + name = default_map } const response = await fetch( import.meta.env.BASE_URL + 'maps/' + name + '.map'