/** * Copyright (c) 2019-2026 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose * @author Adam Midlik * @author Gianluca Tomasello */ import { ParamDefinition as PD } from '../../../mol-util/param-definition.js'; import { ValueCell } from '../../../mol-util/index.js'; import { GeometryUtils } from '../geometry.js'; import { Sphere3D } from '../../../mol-math/geometry.js'; import { TextureImage } from '../../../mol-gl/renderable/util.js'; import { GroupMapping } from '../../util.js'; type TextAttachment = ('bottom-left' | 'bottom-center' | 'bottom-right' | 'middle-left' | 'middle-center' | 'middle-right' | 'top-left' | 'top-center' | 'top-right'); /** Text */ export interface Text { readonly kind: 'text'; /** Number of characters in the text */ charCount: number; /** Font Atlas */ readonly fontTexture: ValueCell>; /** Center buffer as array of xyz values wrapped in a value cell */ readonly centerBuffer: ValueCell; /** Mapping buffer as array of xy values wrapped in a value cell */ readonly mappingBuffer: ValueCell; /** Depth buffer as array of z values wrapped in a value cell */ readonly depthBuffer: ValueCell; /** Index buffer as array of center index triplets wrapped in a value cell */ readonly indexBuffer: ValueCell; /** Group buffer as array of group ids for each vertex wrapped in a value cell */ readonly groupBuffer: ValueCell; /** Texture coordinates buffer as array of uv values wrapped in a value cell */ readonly tcoordBuffer: ValueCell; /** Bounding sphere of the text */ readonly boundingSphere: Sphere3D; /** Maps group ids to text indices */ readonly groupMapping: GroupMapping; setBoundingSphere(boundingSphere: Sphere3D): void; hasBoundingSphere(): boolean; } export declare namespace Text { function create(fontTexture: TextureImage, centers: Float32Array, mappings: Float32Array, depths: Float32Array, indices: Uint32Array, groups: Float32Array, tcoords: Float32Array, charCount: number, text?: Text): Text; function createEmpty(text?: Text): Text; const Params: { sizeFactor: PD.Numeric; borderWidth: PD.Numeric; borderColor: PD.Color; offsetX: PD.Numeric; offsetY: PD.Numeric; offsetZ: PD.Numeric; background: PD.BooleanParam; backgroundMargin: PD.Numeric; backgroundColor: PD.Color; backgroundOpacity: PD.Numeric; tether: PD.BooleanParam; tetherLength: PD.Numeric; tetherBaseWidth: PD.Numeric; attachment: PD.Select; fontFamily: PD.Select; fontQuality: PD.Select; fontStyle: PD.Select; fontVariant: PD.Select; fontWeight: PD.Select; alpha: PD.Numeric; quality: PD.Select<"auto" | "medium" | "high" | "low" | "custom" | "highest" | "higher" | "lower" | "lowest">; material: PD.Group>; clip: PD.Group[]; }>>; emissive: PD.Numeric; density: PD.Numeric; instanceGranularity: PD.BooleanParam; lod: PD.Vec3; cellSize: PD.Numeric; batchSize: PD.Numeric; }; type Params = typeof Params; const Utils: GeometryUtils; } export {};