mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 17:43:47 +00:00
feat(backgrounds): add starfield background with depth projection
This commit is contained in:
@@ -20,6 +20,7 @@ const backgroundImports: Record<Exclude<BackgroundType, 'none'>, () => Promise<u
|
||||
ripple: () => import('./background-ripple'),
|
||||
fireflies: () => import('./fireflies'),
|
||||
snowfall: () => import('./snowfall'),
|
||||
starfield: () => import('./starfield'),
|
||||
};
|
||||
|
||||
/** Prefetch the JS chunk for a background type (call early to avoid lazy-load delay) */
|
||||
@@ -51,6 +52,7 @@ export const backgroundComponents: Record<
|
||||
ripple: lazy(() => import('./background-ripple')),
|
||||
fireflies: lazy(() => import('./fireflies')),
|
||||
snowfall: lazy(() => import('./snowfall')),
|
||||
starfield: lazy(() => import('./starfield')),
|
||||
};
|
||||
|
||||
// Registry of all background definitions with settings for the editor
|
||||
@@ -654,4 +656,31 @@ export const backgroundRegistry: BackgroundDefinition[] = [
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: 'starfield',
|
||||
labelKey: 'admin.backgrounds.starfield',
|
||||
descriptionKey: 'admin.backgrounds.starfieldDesc',
|
||||
category: 'canvas',
|
||||
settings: [
|
||||
{ key: 'color', label: 'admin.backgrounds.starColor', type: 'color', default: '#ffffff' },
|
||||
{
|
||||
key: 'starCount',
|
||||
label: 'admin.backgrounds.particles',
|
||||
type: 'number',
|
||||
min: 50,
|
||||
max: 800,
|
||||
step: 25,
|
||||
default: 200,
|
||||
},
|
||||
{
|
||||
key: 'speed',
|
||||
label: 'admin.backgrounds.speed',
|
||||
type: 'number',
|
||||
min: 0.1,
|
||||
max: 5,
|
||||
step: 0.1,
|
||||
default: 1,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user