import { DataTexture } from 'three'; import { PickCacheInvalidator, IndexSet } from '../../utilities'; import { NodeAppearance } from './NodeAppearance'; import { NodeAppearanceProvider } from './NodeAppearanceProvider'; export declare class NodeAppearanceTextureBuilder { private _defaultAppearance; private readonly _styleProvider; private readonly _pickCacheInvalidator; private readonly _handleStylesChangedListener; private _needsUpdate; private readonly _allTreeIndices; private readonly _overrideColorDefaultAppearanceRgba; private readonly _overrideColorPerTreeIndexTexture; private readonly _regularNodesTreeIndices; private readonly _ghostedNodesTreeIndices; private readonly _infrontNodesTreeIndices; private readonly _visibleNodesTreeIndices; constructor(treeIndexCount: number, styleProvider: NodeAppearanceProvider, pickCacheInvalidator: PickCacheInvalidator); getDefaultAppearance(): NodeAppearance; /** * Sets the default style and invalidates the builder. Note that this causes a full * recomputation of values the next time {@link NodeAppearanceTextureBuilder.build} is called, * so using this might be expensive. * @param appearance New style that is applied to all 'unstyled' elements. */ setDefaultAppearance(appearance: NodeAppearance): void; get regularNodeTreeIndices(): IndexSet; get ghostedNodeTreeIndices(): IndexSet; get infrontNodeTreeIndices(): IndexSet; get visibleNodeTreeIndices(): IndexSet; get needsUpdate(): boolean; /** * A texture holding at least one element per node with color override * and style information. RGB is used to store color, A is used to store * style toggles, with the following bit layout: * - 0 : visible bit - when set the node is visible * - 1 : in front bit - when set the node is rendered in front of other objects * - 2 : ghosted bit - when set the node is rendered 'ghosted' * - 3 : unused * - 4 : unused * - 5-7: outline color - outline toggle and color ({@see OutlineColor}). * Note that in-front and ghost information also is available from * the {@see inFrontTreeIndices} and {@see ghostedTreeIndices} collections. */ get overrideColorPerTreeIndexTexture(): DataTexture; dispose(): void; build(): void; /** The sets that decide whether a node can be picked: hidden nodes are not visible, ghosted nodes are not drawn. */ private snapshotPickableSets; private populateTexture; private populateNodeSets; private applyStyleToNodes; private handleStylesChanged; }