VectorField
import { VectorField } from 'pixi-silk/ui/inspector';
Two number fields in a row, such as X and Y or W and H, with an optional aspect lock.
Extends#
Constructors#
Constructor#
new VectorField(ctx: FieldContext, options: VectorFieldOptions): VectorField;
Parameters#
| Parameter | Type |
|---|---|
ctx | FieldContext |
options | VectorFieldOptions |
Returns#
VectorField
Overrides#
Properties#
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
axes | readonly | readonly [NumberField, NumberField] | The field of each axis. | ui/panels/fields.ts:850 |
Accessors#
fieldWidth#
Get Signature#
get fieldWidth(): number;
Width of the field box. Default 120 until Field.resize.
Returns
number
Inherited from#
locked#
Get Signature#
get locked(): boolean;
True while the two values keep their ratio.
Returns
boolean
Methods#
destroy()#
destroy(options?: DestroyOptions): void;
Stops the animation. Destroys children unless options says otherwise.
Parameters#
| Parameter | Type |
|---|---|
options? | DestroyOptions |
Returns#
void
Inherited from#
resize()#
resize(width: number, height: number): void;
Sets the size of the field box and redraws.
Parameters#
| Parameter | Type |
|---|---|
width | number |
height | number |
Returns#
void
Inherited from#
setEnabled()#
setEnabled(on: boolean): void;
False dims the field and ignores input, while nothing is edited.
Parameters#
| Parameter | Type |
|---|---|
on | boolean |
Returns#
void
Inherited from#
setLocked()#
setLocked(locked: boolean): void;
Links or unlinks the two values.
Parameters#
| Parameter | Type |
|---|---|
locked | boolean |
Returns#
void
show()#
show(values: readonly unknown[]): void;
Shows the values of the edited objects, one per object. Differing values show as mixed. An empty list disables the field.
Parameters#
| Parameter | Type |
|---|---|
values | readonly unknown[] |
Returns#
void
Overrides#
tick()#
tick(dt: number): boolean;
Advances the motion by dt seconds (only needed with ticker: null). Returns true while moving.
Parameters#
| Parameter | Type |
|---|---|
dt | number |
Returns#
boolean