UNPKG

@pmndrs/uikit

Version:

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

41 lines (40 loc) 1.86 kB
import { Signal } from '@preact/signals-core'; import { Matrix4, Vector2Tuple } from 'three'; import { Bucket } from '../../allocation/sorted-buckets.js'; import { ClippingRect } from '../../clipping.js'; import { Inset } from '../../flex/node.js'; import { Properties } from '../../properties/index.js'; import { ColorRepresentation } from '../../utils.js'; import { PanelMaterialConfig } from '../material/config.js'; import type { InstancedPanelGroup } from './group.js'; import type { LengthValue, NumberOrPercentageValue } from '../../properties/values.js'; export type PanelProperties = { borderTopLeftRadius?: LengthValue; borderTopRightRadius?: LengthValue; borderBottomLeftRadius?: LengthValue; borderBottomRightRadius?: LengthValue; opacity?: NumberOrPercentageValue; backgroundColor?: ColorRepresentation; borderColor?: ColorRepresentation; borderBend?: NumberOrPercentageValue; }; export declare class InstancedPanel { private readonly group; private readonly minorIndex; private readonly matrix; private readonly size; private readonly borderInset; private readonly clippingRect; readonly materialConfig: PanelMaterialConfig; private indexInBucket?; private bucket?; private insertedIntoGroup; private active; private abortController?; constructor(properties: Properties, group: InstancedPanelGroup, minorIndex: number, matrix: Signal<Matrix4 | undefined>, size: Signal<Vector2Tuple | undefined>, borderInset: Signal<Inset | undefined>, clippingRect: Signal<ClippingRect | undefined> | undefined, isVisible: Signal<boolean>, materialConfig: PanelMaterialConfig, abortSignal: AbortSignal); setIndexInBucket(index: number): void; private getIndexInBuffer; activate(bucket: Bucket<unknown>, index: number): void; private requestShow; private hide; }