/** * Copyright (c) 2019-2026 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose */ import { ValueCell } from '../../../mol-util/index.js'; import { GeometryUtils } from '../geometry.js'; import { ParamDefinition as PD } from '../../../mol-util/param-definition.js'; import { TextureImage } from '../../../mol-gl/renderable/util.js'; import { Sphere3D } from '../../../mol-math/geometry.js'; import { Color } from '../../../mol-util/color/index.js'; import { GroupMapping } from '../../util.js'; import { Vec2 } from '../../../mol-math/linear-algebra.js'; export interface Spheres { readonly kind: 'spheres'; /** Number of spheres */ sphereCount: number; /** Center buffer as array of xyz values wrapped in a value cell */ readonly centerBuffer: ValueCell; /** Group buffer as array of group ids for each vertex wrapped in a value cell */ readonly groupBuffer: ValueCell; /** Bounding sphere of the spheres */ readonly boundingSphere: Sphere3D; /** Maps group ids to sphere indices */ readonly groupMapping: GroupMapping; setBoundingSphere(boundingSphere: Sphere3D): void; hasBoundingSphere(): boolean; shaderData: Spheres.ShaderData; } export declare namespace Spheres { export interface ShaderData { readonly positionGroup: ValueCell>; readonly texDim: ValueCell; readonly lodLevels: ValueCell; readonly sizeFactor: ValueCell; update(props?: { lodLevels: LodLevels; sizeFactor: number; }): void; } export function create(centers: Float32Array, groups: Float32Array, sphereCount: number, spheres?: Spheres): Spheres; export function createEmpty(spheres?: Spheres): Spheres; type LodLevels = { minDistance: number; maxDistance: number; overlap: number; stride: number; scaleBias: number; }[]; type LodLevelsValue = [minDistance: number, maxDistance: number, overlap: number, count: number, scale: number, stride: number, scaleBias: number][]; export const Params: { sizeFactor: PD.Numeric; doubleSided: PD.BooleanParam; ignoreLight: PD.BooleanParam; celShaded: PD.BooleanParam; xrayShaded: PD.Select; transparentBackfaces: PD.Select<"off" | "on" | "opaque">; solidInterior: PD.BooleanParam; clipPrimitive: PD.BooleanParam; approximate: PD.BooleanParam; alphaThickness: PD.Numeric; bumpFrequency: PD.Numeric; bumpAmplitude: PD.Numeric; interior: PD.Group; substanceStrength: number; }>>; lodLevels: PD.ObjectList>; 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; }; export type Params = typeof Params; export const Utils: GeometryUtils; export {}; }