Skip to content
pixi-silk
GitHub repository
Interface

InspectorBinding

import type { InspectorBinding } from 'pixi-silk/ui/inspector';

Where an inspector reads and writes values. read returns one value per edited object, so a multi-selection shows mixed values. Write your own to edit a store, or use bindObjects and bindSignals.

Methods#

read()#

read(key: string): readonly unknown[];

The values of key, one per edited object. Empty when nothing is edited.

Parameters#

ParameterType
keystring

Returns#

readonly unknown[]


subscribe()?#

optional subscribe(fn: () => void): () => void;

Calls fn when values change outside the inspector. Returns the unsubscribe function.

Parameters#

ParameterType
fn() => void

Returns#

() => void


write()#

write(key: string, values: readonly unknown[]): void;

Writes one value per edited object, in the order read returned them.

Parameters#

ParameterType
keystring
valuesreadonly unknown[]

Returns#

void