/** * Copyright (c) 2019-2026 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author David Sehnal * @author Alexander Rose */ import { StateObject, StateTransformer } from '../../mol-state/index.js'; import { ParamDefinition as PD } from '../../mol-util/param-definition.js'; import { PluginStateAnimation } from './model.js'; export declare const TrajectoryAnimationParams: { mode: PD.Mapped, "loop"> | PD.NamedParams, "palindrome"> | PD.NamedParams, "once">>; duration: PD.Mapped, "fixed"> | PD.NamedParams, "sequential"> | PD.NamedParams, "computed">>; }; export type TrajectoryAnimationParams = PD.ValuesFor; export interface TrajectoryAnimationState { palindromeDirections?: { [id: string]: -1 | 1 | undefined; }; } export interface TrajectoryAnimationOptions { name: string; display: { name: string; }; /** Transformer of the state cells that hold the current per-frame index (e.g. `ModelFromTrajectory`) */ transformer: A; /** Ancestor state object type that holds the trajectory data (e.g. `PluginStateObject.Molecule.Trajectory`) */ trajectoryType: TTraj; /** Reason shown when there is no trajectory with more than one frame to animate */ noTrajectoryReason: string; /** Number of frames available in the trajectory data */ getFrameCount: (data: StateObject.From['data']) => number; /** Reads the current frame index from the params of a `transformer` cell */ getFrameIndex: (params: StateTransformer.Params) => number; /** Builds the params patch that sets a new frame index on a `transformer` cell */ setFrameIndex: (frameIndex: number) => Partial>; } /** * Creates an animation that steps through the frames of one or more trajectories * (e.g. structure models or particle lists) according to the shared * `TrajectoryAnimationParams` (mode + duration). */ export declare function createTrajectoryAnimation(options: TrajectoryAnimationOptions): PluginStateAnimation;