@pmndrs/uikit
Version:
Build performant 3D user interfaces with Three.js and yoga.
41 lines (40 loc) • 3.18 kB
TypeScript
import { YogaProperties } from '../flex/node.js';
import { ScrollbarProperties } from '../scroll.js';
import { WithAllAliases } from '../properties/alias.js';
import { PanelProperties } from '../panel/instanced-panel.js';
import { TransformProperties } from '../transform.js';
import { AllOptionalProperties, WithClasses, WithReactive } from '../properties/default.js';
import { ZIndexProperties } from '../order.js';
import { Signal } from '@preact/signals-core';
import { VisibilityProperties, WithConditionals } from './utils.js';
import { Listeners } from '../listeners.js';
import { ParentContext } from '../context.js';
import { Mesh, Object3D } from 'three';
import { PointerEventsProperties, RenderProperties, ShadowProperties } from '../panel/index.js';
import { EventHandlers, ThreeEventMap } from '../events.js';
export type InheritableCustomContainerProperties = WithClasses<WithConditionals<WithAllAliases<WithReactive<YogaProperties & PanelProperties & ZIndexProperties & TransformProperties & ScrollbarProperties & ShadowProperties & VisibilityProperties & RenderProperties & PointerEventsProperties>>>>;
export type CustomContainerProperties<EM extends ThreeEventMap = ThreeEventMap> = InheritableCustomContainerProperties & Listeners & EventHandlers<EM>;
export declare function createCustomContainerState<EM extends ThreeEventMap = ThreeEventMap>(parentCtx: ParentContext, style: Signal<CustomContainerProperties<EM> | undefined>, properties: Signal<CustomContainerProperties<EM> | undefined>, defaultProperties: Signal<AllOptionalProperties | undefined>): {
node: Signal<import("../internals.js").FlexNode | undefined>;
size: Signal<import("three").Vector2Tuple | undefined>;
relativeCenter: Signal<import("three").Vector2Tuple | undefined>;
borderInset: Signal<import("../internals.js").Inset | undefined>;
overflow: Signal<import("yoga-layout/load").Overflow>;
displayed: Signal<boolean>;
scrollable: Signal<[boolean, boolean]>;
paddingInset: Signal<import("../internals.js").Inset | undefined>;
maxScrollPosition: Signal<[(number | undefined)?, (number | undefined)?]>;
} & {
hoveredSignal: Signal<number[]>;
activeSignal: Signal<number[]>;
mergedProperties: import("@preact/signals-core").ReadonlySignal<import("../internals.js").MergedProperties>;
transformMatrix: Signal<import("three").Matrix4 | undefined>;
globalMatrix: Signal<import("three").Matrix4 | undefined>;
isClipped: Signal<boolean>;
isVisible: import("@preact/signals-core").ReadonlySignal<boolean>;
orderInfo: Signal<import("../order.js").OrderInfo | undefined>;
handlers: import("@preact/signals-core").ReadonlySignal<EventHandlers>;
ancestorsHaveListeners: import("@preact/signals-core").ReadonlySignal<boolean>;
root: import("../context.js").RootContext;
};
export declare function setupCustomContainer<EM extends ThreeEventMap = ThreeEventMap>(state: ReturnType<typeof createCustomContainerState>, parentCtx: ParentContext, style: Signal<CustomContainerProperties<EM> | undefined>, properties: Signal<CustomContainerProperties<EM> | undefined>, object: Object3D, mesh: Mesh, abortSignal: AbortSignal): void;