/** * Copyright (c) 2019-2026 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose * @author Cai Huiyu */ import { ValueCell } from '../../../mol-util/index.js'; import { Sphere3D } from '../../../mol-math/geometry.js'; import { ParamDefinition as PD } from '../../../mol-util/param-definition.js'; import { GeometryUtils } from '../geometry.js'; import { Color } from '../../../mol-util/color/index.js'; import { Texture } from '../../../mol-gl/webgl/texture.js'; import { Vec2 } from '../../../mol-math/linear-algebra.js'; import { WebGLContext } from '../../../mol-gl/webgl/context.js'; export interface TextureMesh { readonly kind: 'texture-mesh'; /** Number of vertices in the texture-mesh */ vertexCount: number; /** Number of groups in the texture-mesh */ groupCount: number; readonly geoTextureDim: ValueCell; readonly vertexTexture: ValueCell; readonly groupTexture: ValueCell; readonly normalTexture: ValueCell; readonly varyingGroup: ValueCell; readonly doubleBuffer: TextureMesh.DoubleBuffer; readonly boundingSphere: Sphere3D; readonly meta: { webgl?: WebGLContext; /** Called to restore when a webgl context is lost */ reset?: () => void; [k: string]: unknown; }; } export declare namespace TextureMesh { class DoubleBuffer { private index; private textures; get(): { vertex: Texture; group: Texture; normal: Texture; } | undefined; set(vertex: Texture, group: Texture, normal: Texture): void; destroy(): void; } function create(vertexCount: number, groupCount: number, vertexTexture: Texture, groupTexture: Texture, normalTexture: Texture, boundingSphere: Sphere3D, textureMesh?: TextureMesh): TextureMesh; function createEmpty(textureMesh?: TextureMesh): TextureMesh; const Params: { doubleSided: PD.BooleanParam; flipSided: PD.BooleanParam; flatShaded: PD.BooleanParam; ignoreLight: PD.BooleanParam; celShaded: PD.BooleanParam; xrayShaded: PD.Select; transparentBackfaces: PD.Select<"off" | "on" | "opaque">; bumpFrequency: PD.Numeric; bumpAmplitude: PD.Numeric; interior: PD.Group; substanceStrength: number; }>>; 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; }