Skip to content
pixi-silk
GitHub repository
Interface

RadialMenuOptions

import type { RadialMenuOptions } from 'pixi-silk/ui/radial';

Options of RadialMenu. Distances are design units, scaled per input kind by the profile.

Properties#

PropertyTypeDescriptionDefined in
autoDirection?booleanPartial rings opened near an edge of bounds turn to face the inside. Default true.ui/RadialMenu.ts:97
bounds?| RadialBounds | (() => RadialBounds)Keeps the menu inside this rectangle (parent coordinates).ui/RadialMenu.ts:117
closeOnLeave?booleanClose when the pointer stays outside the falloff area for the profile’s leave delay. Default false: it stays.ui/RadialMenu.ts:111
closeOnSelect?booleanClose after a selection. Default true.ui/RadialMenu.ts:113
corner?numberCorner radius of segments, in units. Default 10.ui/RadialMenu.ts:101
direction?numberDirection the ring faces (radians, 0 = right, -PI/2 = up). On a full ring, where the first item sits. Default up.ui/RadialMenu.ts:95
escapeCloses?booleanEscape closes the menu. Listens on window only while open. Default true.ui/RadialMenu.ts:125
gap?numberGap between segments, in units. Default 4.ui/RadialMenu.ts:99
hub?booleanDraw the centre disc. Turn it off when the menu opens around a button that should stay visible. Default true.ui/RadialMenu.ts:127
iconSize?numberIcon size, in units. Default 26.ui/RadialMenu.ts:109
innerRadius?numberInner radius of the first ring (the hub sits inside). Default 40.ui/RadialMenu.ts:89
itemArc?numberArc length of one sub-item along its ring, in units. Default 58.ui/RadialMenu.ts:107
itemsRadialItem[]Items of the first ring, in order from direction clockwise.ui/RadialMenu.ts:87
onClose?(item: RadialItem | null) => voidThe menu started closing. item is the selection, if any.ui/RadialMenu.ts:133
onSelect?(item: RadialItem, path: readonly RadialItem[]) => voidAn item was picked. path runs from the first ring to the item, the item included.ui/RadialMenu.ts:131
outerRadius?numberOuter radius of the first ring. Default 100.ui/RadialMenu.ts:91
profiles?Partial<Record<InputKind, Partial<InputProfile>>>Per-pointer-kind tuning of dead zone, falloff, scale, tap and hysteresis.ui/RadialMenu.ts:119
ringGap?numberGap between rings, in units. Default 6.ui/RadialMenu.ts:103
ringWidth?numberThickness of sub-rings, in units. Default 46.ui/RadialMenu.ts:105
selectParents?booleanItems with children can be selected too (otherwise they only open their ring). Default false.ui/RadialMenu.ts:115
sweep?numberAngle covered by the first ring: Math.PI * 2 for a full pie, Math.PI for a half. Default full.ui/RadialMenu.ts:93
textStyle?TextStyleOptionsStyle of text labels.ui/RadialMenu.ts:123
theme?Partial<RadialTheme>Colours merged over RADIAL_THEME. Read once, at construction.ui/RadialMenu.ts:121
ticker?Ticker | nullTicker driving the animation. Default Ticker.shared. null for manual RadialMenu.tick.ui/RadialMenu.ts:129