import { AnimationAction, AnimationClip, AnimationMixer, Audio, AudioListener, Object3D } from "three"; import { Context } from "../../engine/engine_setup.js"; import { AudioSource } from "../AudioSource.js"; import type { PlayableDirector } from "./PlayableDirector.js"; import { SignalReceiver } from "./SignalAsset.js"; import * as Models from "./TimelineModels.js"; /** * A TrackHandler is responsible for evaluating a specific type of timeline track. * A timeline track can be an animation track, audio track, signal track, control track etc and is controlled by a {@link PlayableDirector}. */ export declare abstract class TimelineTrackHandler { director: PlayableDirector; track: Models.TrackModel; get muted(): boolean; set muted(val: boolean); forEachClip(backwards?: boolean): IterableIterator; onEnable?(): any; onDisable?(): any; onDestroy?(): any; abstract evaluate(time: number): any; onMuteChanged?(): any; onPauseChanged?(): any; /** invoked when PlayableDirectory playmode state changes (paused, playing, stopped) */ onStateChanged?(isPlaying: boolean): any; getClipTime(time: number, model: Models.ClipModel): number; getClipTimeNormalized(time: number, model: Models.ClipModel): number; evaluateWeight(time: number, index: number, models: Array, isActive?: boolean): number; } export declare class TimelineAnimationTrack extends TimelineTrackHandler { /** @internal */ models: Array; /** @internal */ trackOffset?: Models.TrackOffset; /** The object that is being animated. */ target?: Object3D; /** The AnimationMixer, should be shared with the animator if an animator is bound */ mixer?: AnimationMixer; clips: Array; actions: Array; /** * You can use the weight to blend the timeline animation tracks with multiple animation tracks on the same object. * @default 1 */ weight: number; /** holds data/info about clips differences */ private _actionOffsets; private _didBind; private _animator; onDisable(): void; onDestroy(): void; onStateChanged(): void; createHooks(clipModel: Models.AnimationClipModel, clip: any): void; bind(): void; private ensureTrackOffsets; private _useclipOffsets; private _totalOffsetPosition; private _totalOffsetRotation; private _totalOffsetPosition2; private _totalOffsetRotation2; private _summedPos; private _tempPos; private _summedRot; private _tempRot; private _clipRotQuat; evaluate(time: number): void; private createRotationInterpolant; private createPositionInterpolant; } declare type AudioClipModel = Models.ClipModel & { _didTriggerPlay: boolean; }; /** * Handles audio playback for a timeline audio track. * * **Runtime mutation:** The track model is read fresh every frame during `evaluate()`. * You can mutate `track.volume`, `clip.start`, `clip.end`, `clip.asset.volume` etc. * at any time — changes take effect on the next frame without rebuilding the timeline. * * **Audio stopping:** Audio clips are automatically stopped when: * - Timeline time moves outside a clip's `[start, end]` range (e.g. jumping or normal playback advancing past a clip) * - The track is muted (via `muted = true`) * - The director is stopped (`director.stop()`) * - The director is paused (`director.pause()`) * - The director is disabled or destroyed */ export declare class TimelineAudioTrack extends TimelineTrackHandler { models: Array; listener: AudioListener; audio: Array