Skip to content
pixi-silk
GitHub repository
Interface

MeasureOptions

import type { MeasureOptions } from 'pixi-silk/ui/measure';

Options of Measure.

Properties#

PropertyTypeDescriptionDefined in
color?string | numberColour of the redlines, the target outline and the distance labels. Default 0xf24822.ui/measure.ts:35
fontSize?numberLabel font size in pixels. Default 11.ui/measure.ts:43
format?(value: number) => stringTurns a distance into a label. Default rounds to one decimal and drops a trailing .0.ui/measure.ts:41
label?LabelFactoryBuilds 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?booleanOutlines the second target of Measure.between in the redline colour. Default true.ui/measure.ts:50
sizeColor?string | numberColour 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 | numberLabel text colour. Default white.ui/measure.ts:39
ticker?Ticker | nullTicker that runs the animations and follows moving targets. Default Ticker.shared. With null, call Measure.tick yourself.ui/measure.ts:55