UNPKG

@pmndrs/uikit

Version:

Build performant 3D user interfaces with Three.js and yoga.

24 lines (23 loc) 1.32 kB
import { AllOptionalProperties } from '../properties/default.js'; import { Component } from './utils.js'; import { Signal } from '@preact/signals-core'; import { TextProperties, createTextState } from '../components/text.js'; import { ThreeEventMap } from '../events.js'; export declare class Text<T = {}, EM extends ThreeEventMap = ThreeEventMap> extends Component<T> { private mergedProperties?; private readonly styleSignal; private readonly propertiesSignal; private readonly defaultPropertiesSignal; private readonly textSignal; private readonly parentContextSignal; private readonly unsubscribe; internals: ReturnType<typeof createTextState>; constructor(text?: string | Signal<string> | Array<string | Signal<string>>, properties?: TextProperties<EM>, defaultProperties?: AllOptionalProperties); setText(text: string | Signal<string> | Array<string | Signal<string>>): void; getComputedProperty<K extends keyof TextProperties<EM>>(key: K): TextProperties<EM>[K] | undefined; getStyle(): undefined | Readonly<TextProperties<EM>>; setStyle(style: TextProperties<EM> | undefined, replace?: boolean): void; setProperties(properties: TextProperties<EM> | undefined): void; setDefaultProperties(properties: AllOptionalProperties): void; destroy(): void; }