MeasureOptions
import type { MeasureOptions } from 'pixi-silk/ui/measure';
Options of Measure.
Properties#
| Property | Type | Description | Defined in |
|---|---|---|---|
color? | string | number | Colour of the redlines, the target outline and the distance labels. Default 0xf24822. | ui/measure.ts:35 |
fontSize? | number | Label font size in pixels. Default 11. | ui/measure.ts:43 |
format? | (value: number) => string | Turns a distance into a label. Default rounds to one decimal and drops a trailing .0. | ui/measure.ts:41 |
label? | LabelFactory | Builds the label text. Default a PixiJS Text at resolution 3. Pass silkLabel() from pixi-silk/text to draw labels as SDF text instead. | ui/measure.ts:48 |
outline? | boolean | Outlines the second target of Measure.between in the redline colour. Default true. | ui/measure.ts:50 |
sizeColor? | string | number | Colour of the size badge. Default 0x0a84ff. | ui/measure.ts:37 |
space? | Container<ContainerChild> | The space distances are measured in, usually the camera’s world. A gap of 24 reads “24” at any zoom, while the lines keep their screen size. Default the measure’s parent. | ui/measure.ts:33 |
textColor? | string | number | Label text colour. Default white. | ui/measure.ts:39 |
ticker? | Ticker | null | Ticker that runs the animations and follows moving targets. Default Ticker.shared. With null, call Measure.tick yourself. | ui/measure.ts:55 |