import type { AnimationGroup } from "@babylonjs/core/Animations/animationGroup.js"; import { Quaternion, Vector3 } from "@babylonjs/core/Maths/math.vector.js"; import type { ImportedAnimationPlayOptions, ImportedAnimationSelection, ImportedAnimationState, SceneAnimationCancellationReason, SceneAnimationTrackResult } from "@skenora/contracts"; import type { AnimationPropertyOwners } from "./animation-property-owners.js"; export type ImportedAnimationValue = number | Vector3 | Quaternion; export interface ImportedAnimationTargetBinding { readonly key: string; readonly keys: readonly string[]; readonly target: object; readonly property: string; read(): ImportedAnimationValue; write(value: ImportedAnimationValue): void; restore(value: ImportedAnimationValue): void; current(): boolean; } export interface PreparedImportedAnimation { group: AnimationGroup; selection: ImportedAnimationSelection; fps: number; bindings: readonly ImportedAnimationTargetBinding[]; } export interface ManagedImportedAnimationPorts { readonly owners: AnimationPropertyOwners; prepare(group: AnimationGroup): PreparedImportedAnimation; assertWritable(): void; generation(): number; subscribeClock(listener: (deltaMs: number) => void): () => void; report(error: unknown): void; registerTouched?(bindings: readonly ImportedAnimationTargetBinding[]): void; ownsPreviewRestore?: boolean; isManagedGroup?(group: AnimationGroup): boolean; select?(selection: ImportedAnimationSelection): AnimationGroup; } /** Owned by AnimationController. Native groups are paused and sampled by the session clock. */ export declare class ManagedImportedAnimationPlayback { #private; readonly ports: ManagedImportedAnimationPorts; constructor(ports: ManagedImportedAnimationPorts); isManagedGroup(group: AnimationGroup): boolean; /** Shared earliest-pose ledger for optional managed writers. */ trackTouched(bindings: readonly ImportedAnimationTargetBinding[]): void; play(group: AnimationGroup, options?: ImportedAnimationPlayOptions, completed?: () => void): Promise; pause(group: AnimationGroup): boolean; resume(group: AnimationGroup): boolean; seek(group: AnimationGroup, frame: number): ImportedAnimationState; stop(group: AnimationGroup, reason?: SceneAnimationCancellationReason): void; state(selection: ImportedAnimationSelection): ImportedAnimationState | null; configure(group: AnimationGroup, options: { speedRatio?: number; weight?: number; loop?: boolean; }): void; /** Restore each target once, after every managed group has stopped. */ reset(reason?: SceneAnimationCancellationReason, restore?: boolean): void; dispose(): void; } //# sourceMappingURL=managed-imported-animation.d.ts.map