@genart-api/core
Version:
Platform-independent extensible API for browser-based generative art
35 lines (34 loc) • 2.59 kB
TypeScript
import type { BaseParam, BigIntParam, BinaryParam, ChoiceParam, ColorParam, DateParam, DateTimeParam, ImageParam, NumListParam, Param, RampParam, RangeParam, StringListParam, TextParam, TimeParam, ToggleParam, VectorParam, WeightedChoiceParam, XYParam } from "../api.js";
export declare const PARAM_DEFAULTS: Partial<Param<any>>;
export declare const bigint: (spec: BaseParam<BigIntParam, "min" | "max"> & Partial<Pick<BigIntParam, "min" | "max">>) => BigIntParam;
export declare const binary: (spec: BaseParam<BinaryParam, "minLength" | "maxLength" | "randomize"> & Partial<Pick<BinaryParam, "minLength" | "maxLength">>) => BinaryParam;
export declare const choice: <T extends string>(spec: BaseParam<ChoiceParam<T>>) => ChoiceParam<T>;
export declare const color: (spec: BaseParam<ColorParam>) => ColorParam;
export declare const date: (spec: BaseParam<DateParam, "default"> & {
default: Date | string;
}) => DateParam;
export declare const datetime: (spec: BaseParam<DateTimeParam, "default"> & {
default: Date | string;
}) => DateTimeParam;
export declare const image: (spec: BaseParam<ImageParam, "randomize">) => ImageParam;
export declare const numlist: (spec: BaseParam<NumListParam, "minLength" | "maxLength"> & Partial<Pick<NumListParam, "minLength" | "maxLength">>) => NumListParam;
export declare const ramp: (spec: BaseParam<RampParam, "stops" | "default"> & {
stops?: [number, number][];
}) => RampParam;
export declare const range: (spec: BaseParam<RangeParam, "min" | "max" | "step"> & Partial<Pick<RangeParam, "min" | "max" | "step">>) => RangeParam;
export declare const strlist: <T extends string>(spec: BaseParam<StringListParam<T>, "minLength" | "maxLength"> & Partial<Pick<StringListParam<T>, "minLength" | "maxLength">>) => StringListParam<T>;
export declare const text: (spec: BaseParam<TextParam, "minLength" | "maxLength"> & Partial<Pick<TextParam, "minLength" | "maxLength">> & {
default: string;
}) => TextParam;
export declare const time: (spec: BaseParam<TimeParam, "default"> & {
default?: [number, number, number] | string;
}) => TimeParam;
export declare const toggle: (spec: BaseParam<ToggleParam>) => ToggleParam;
export declare const vector: (spec: BaseParam<VectorParam, "min" | "max" | "step" | "labels"> & {
min?: number | number[];
max?: number | number[];
step?: number | number[];
labels?: string[];
}) => VectorParam;
export declare const weighted: <T extends string>(spec: BaseParam<WeightedChoiceParam<T>, "total">) => WeightedChoiceParam<T>;
export declare const xy: (spec: BaseParam<XYParam>) => XYParam;