/** * Type + parameter schema for the planet-shaders library. * * Each parameter is a {@link ParamDef} carrying its **type, range and * default** — the schema needed to drive shader uniforms and to back * a control panel. Display strings (labels, group names, select-option * names, type icons) are deliberately absent: they are i18n / UI * concerns owned by the caller. A reference dictionary lives in the * playground (`playground/src/lib/paramLabels.ts`). * * Numeric `min/max/step` come from `shaderRanges.ts` (single source of * truth across shader code, schema and tests). */ /** * Shader-side body-type identifier. Same string set as * `BodyConfig['type']` — the two types are kept structurally distinct so * the shader catalogue can evolve independently from the public config * surface (e.g. add a render-only `'preview'` type without touching * `BodyConfig`). */ export type LibBodyType = 'rocky' | 'gaseous' | 'metallic' | 'star'; /** * Definition of a single shader parameter — either a numeric slider * (`min/max/step`), a colour picker (`type: 'color'`) or an enum select * (`type: 'select'` + `optionCount`). Display strings (`label`, option * names) are NOT carried by the schema; callers map `paramKey` to a * label of their choosing. */ export interface ParamDef { /** * Editor widget hint: * - `'color'` → hex picker (default is `'#rrggbb'`) * - `'select'` → enum dropdown (default is the index, requires `optionCount`) * - `'toggle'` → checkbox storing `0` or `1`. The shader uniform stays a * float so it can multiply into a layer expression with * no GLSL branching cost. * - omitted → numeric slider (`default` is a number, `min`/`max`/`step` * drive the bounds) */ type?: 'color' | 'select' | 'toggle'; min?: number; max?: number; step?: number; default: number | string | number[]; /** * Number of valid options for a `type: 'select'` parameter. The shader * receives the selected index in `[0, optionCount - 1]`. Caller-side * UIs map each index to a display string (see playground's * `SELECT_OPTION_LABELS`). */ optionCount?: number; } /** * Full shader-parameter catalogue keyed by body type. Each body type maps * to a flat record of `paramName → {@link ParamDef}`. Authoritative * schema for any external control panel. */ export type BodyParamsMap = Record>; /** * Shader parameter catalogue for every supported body type. The * structure mirrors {@link BodyParamsMap}; it is the single source of * truth for default values and UI bounds across the library. */ export declare const BODY_PARAMS: BodyParamsMap; /** * Returns a `{ key: defaultValue }` map for every parameter of a planet type. */ export declare function getDefaultParams(type: LibBodyType): Record; //# sourceMappingURL=params.d.ts.map