/** * Arc the slices span. Omit for a full wheel (index 0 at the top). A partial * `sweep` (e.g. `Math.PI` for a bottom half, `Math.PI / 2` for a quarter) packs * the slices evenly inside `[startAngle, startAngle + sweep]` — the arc/quick-bar * forms. Angles are radians from "up" (−Y), clockwise. */ export interface RadialArc { startAngle?: number; sweep?: number; } /** One wedge of a radial menu — geometry for rendering a slice. Angles are radians from "up" (−Y), clockwise. */ export interface RadialSlice { index: number; /** Angle at the slice's center. */ centerAngle: number; /** Leading edge angle. */ startAngle: number; /** Trailing edge angle. */ endAngle: number; } /** * Divide a ring (or `arc`) into `count` wedges — the geometry a radial/quick * menu (weapon wheel, emote arc, ping bar) renders. A full wheel centers index 0 * at the top; a partial `arc` packs the slices inside its sweep. */ export declare function radialSlices(count: number, arc?: RadialArc): RadialSlice[]; /** Map an angle to a slice index; returns -1 when the angle falls outside a partial `arc`. */ export declare function radialIndexFromAngle(angle: number, count: number, arc?: RadialArc): number; /** Options for {@link radialIndexFromVector}. */ export interface RadialVectorOptions extends RadialArc { /** Minimum vector magnitude to register a selection; shorter vectors return null (the neutral center). Default 0. */ deadZone?: number; } /** * Pick the slice a pointer/stick vector points at. `dx`/`dy` are screen-space * (y down): up is `(0, -1)`. Returns null inside `deadZone` or (for a partial * `arc`) outside the arc, so a centered stick or a click off the arc selects * nothing. * * @capability radial-select map a pointer/stick vector to a radial-menu slice index, with a neutral dead zone and optional arc bounds */ export declare function radialIndexFromVector(dx: number, dy: number, count: number, options?: RadialVectorOptions): number | null; /** Unit-circle position of a slice center (up = `(0, -1)`), scaled by `radius` — where to place a wedge's icon/label. */ export declare function radialSlicePosition(index: number, count: number, radius: number, arc?: RadialArc): { x: number; y: number; };