Skip to content

Latest commit

 

History

History
170 lines (93 loc) · 3.71 KB

File metadata and controls

170 lines (93 loc) · 3.71 KB

solid-knobs / ContinuousRange

Interface: ContinuousRange

The most common type of range that is used for continuous numerical values (e.g. frequency, volume, etc).

Table of contents

Properties

Properties

type

type: Continuous

The type of a ContinuousRange is always RangeType.Continuous.

Defined in

range/range.ts:27


start

start: number

The start value of the range.

Defined in

range/range.ts:32


end

end: number

The end value of the range.

Defined in

range/range.ts:37


bipolar

Optional bipolar: boolean

Whether the range is a bipolar one.

Defined in

range/range.ts:42


stringToValue

Optional stringToValue: (value: number, unit: string) => number

Type declaration

▸ (value, unit): number

A function for converting a value with a certain unit to a value in the range.

Parameters
Name Type
value number
unit string
Returns

number

Defined in

range/range.ts:47


valueToString

Optional valueToString: (value: number) => string

Type declaration

▸ (value): string

A function for formatting a value of this range as a string.

Parameters
Name Type
value number
Returns

string

Defined in

range/range.ts:52


scale

Optional scale: { type: Exponential ; exp: number } | { type: Logarithmic } | { type: Linear }

The scaling of the range defines how the value is controlled in a UI. The default is Scale.Linear.

Defined in

range/range.ts:57


snap

Optional snap: number | number[]

The values to which the user-interface control should snap. Note! Always provide these values from smallest to largest.

Defined in

range/range.ts:70


step

Optional step: number

The step between values. If you want a range that allows only integer values, set this to 1.

Defined in

range/range.ts:75


snapMargin

Optional snapMargin: number

How far away a value has to be from a snap point for it to snap.

Defined in

range/range.ts:80