/** * Copyright (c) 2026 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose */ import { ParamDefinition as PD } from '../../mol-util/param-definition.js'; import { Visual, VisualContext } from '../visual.js'; import { ParticleList } from '../../mol-model/particles/particle-list.js'; import { Geometry, GeometryUtils } from '../../mol-geo/geometry/geometry.js'; import { LocationIterator } from '../../mol-geo/util/location-iterator.js'; import { Theme } from '../../mol-theme/theme.js'; import { TransformData } from '../../mol-geo/geometry/transform-data.js'; import { PickingId } from '../../mol-geo/geometry/picking.js'; import { Loci } from '../../mol-model/loci.js'; import { Interval } from '../../mol-data/int.js'; import { VisualUpdateState } from '../util.js'; import { Sphere3D } from '../../mol-math/geometry/primitives/sphere3d.js'; import { WebGLContext } from '../../mol-gl/webgl/context.js'; export declare const ParticleParams: { 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.Select; renderMerged: PD.Select; lod: PD.Vec3; cellSize: PD.Numeric; batchSize: PD.Numeric; }; export type ParticleParams = typeof ParticleParams; export type ParticleKey = { particles: ParticleList; }; export interface ParticleVisual

extends Visual { } export declare function createParticleTransform(particles: ParticleList, invariantBoundingSphere: Sphere3D, cellSize: number, batchSize: number, transformData?: TransformData): TransformData; interface ParticleVisualBuilder

{ defaultProps: PD.Values

; createGeometry(ctx: VisualContext, particles: ParticleList, theme: Theme, props: PD.Values

, geometry?: G): Promise | G; createLocationIterator(particles: ParticleList, geometry: G): LocationIterator; getLoci(pickingId: PickingId, particles: ParticleList, props: PD.Values

, id: number, geometry: G): Loci; eachLocation(loci: Loci, particles: ParticleList, props: PD.Values

, apply: (interval: Interval) => boolean, geometry: G): boolean; /** * Note: a new `ParticleList` reference does not automatically trigger `createGeometry`. * If `createGeometry` builds geometry from per-particle data directly (e.g. baked * positions), set `state.createGeometry = true` here when `newParticles !== currentParticles`. * Otherwise (e.g. geometry is an instanced template), leave it to the base * implementation to only refresh the transform/color/size. */ setUpdateState(state: VisualUpdateState, newParticles: ParticleList, currentParticles: ParticleList, newProps: PD.Values

, currentProps: PD.Values

, newTheme: Theme, currentTheme: Theme): void; /** Optional hook to override the theme before geometry creation and color/size updates. */ overrideTheme?: (theme: Theme, props: PD.Values

) => Theme; mustRecreate?: (particleKey: ParticleKey, props: PD.Values

, webgl?: WebGLContext) => boolean; dispose?: (geometry: G) => void; } interface ParticleVisualGeometryBuilder

extends ParticleVisualBuilder { geometryUtils: GeometryUtils; } export declare function ParticleVisual>(builder: ParticleVisualGeometryBuilder, materialId: number): ParticleVisual

; export {};