import * as Data from '../../data'; import { Observable } from '../../observable'; import { Animation } from '../animation'; import { LayerClip } from '../layerclip'; import { StreamState } from '../stream'; import { ClipTrack } from '../tracks/cliptrack'; import { FunctionTrack } from '../tracks/functiontrack'; import { StreamTrack } from '../tracks/streamtrack'; import { Track } from '../tracks/track'; /** * Represents an animation clip managing a collection of animation tracks within an animation sequence. * Handles adding and clearing tracks, computing property values, and managing streaming content. * Utilizes observables for change notifications and supports identification through optional script names and IDs. * * @param animation The associated Animation instance. * @param length The duration of the clip. * @param scriptName Optional name for script identification. * @param id Optional unique identifier for the clip. */ export declare class Clip { animation: Animation; length: number; readonly scriptName?: string | undefined; readonly id?: string | undefined; /** @internal */ influencedPathsDirty: Observable; /** * Optional default parameters for fading animation properties. */ defaultFadeParameters?: Partial; /** @internal */ _streamTracks: (StreamTrack | ClipTrack | FunctionTrack)[]; private _influencedPaths; private _tracksByPath; private _tracksByPathDirty; private _tracks; /** * Creates an instance of Clip. * @param animation - The associated Animation instance. * @param length - The duration of the clip. * @param scriptName - Optional name for script identification. * @param id - Optional unique identifier for the clip. */ constructor(animation: Animation, length: number, scriptName?: string | undefined, id?: string | undefined); /** * Computes the property value for a given path at a specific time. * * @param t The time at which to compute the property. * @param p The path of the property to compute. * @param valueBefore The initial value of the property before computation. * @param parentWeight Optional weight from the parent track. * @returns The computed property value. */ computePathProperty(t: number, p: string, valueBefore: any, parentWeight?: number): any; /** * Adds a track to the clip and updates the influenced paths. * * @param t The track to be added. */ addTrack(t: Track): void; /** * Clears all tracks from the clip and resets influenced paths. */ clearTracks(): void; private _dirty; /** * Getter for the mapping of tracks by path. * * @returns A map of paths to their respective tracks. */ get tracksByPath(): Map; /** * Getter for the list of paths influenced by the clip's tracks. * * @returns An array of influenced paths. */ get influencedPaths(): string[]; /** * Applies fading parameters to properties by their path. * * @param props A dictionary of paths and their associated fade parameters. */ fadePropertiesByPath(props: { [id: string]: Partial; }): void; /** * Resolves the clip time considering looping and play rate. * * @param t The current time. * @param t0 The start time. * @param s0 The initial state time. * @param rate The rate of play. * @param t1 Optional end time. * @returns The resolved clip time. */ resolveClipTime(t: number, t0: number, s0: number, rate: number, t1?: number): number; /** @internal */ streamPause(isActive: boolean, active: LayerClip | null | undefined): void; /** @internal */ streamSeek(t: number, rate: number, isActive: boolean, active: LayerClip | null | undefined): void; /** @internal */ streamTick(clipState: StreamState, t: number, rate: number, isActive: boolean, active: LayerClip | null | undefined, force?: boolean, stalled?: boolean, parentWeight?: number): void; /** * Determines if any track within the clip is stalled. * * @returns A boolean indicating if the clip is stalled. */ isStalled(): boolean; }