import type { Group } from '@anov/3d-core'; import { AnimationMixer } from '@anov/3d-core'; declare enum EMarkAnimationType { Bounce = "bounce",// 上下弹跳 Pulse = "pulse",// 缩放 Rotate = "rotate",// 旋转 Flash = "flash" } interface AnimationOption { enable: boolean; type: EMarkAnimationType | EMarkAnimationType[]; duration: number; } declare class KeyframeAnimation { private _target; private _duration; private _type; private _enable; private _mixer; private _animations; private _animationClips; constructor(target: Group, options: AnimationOption); /** * 获取动画混合器 */ get mixer(): AnimationMixer; get duration(): number; set duration(value: number); get type(): EMarkAnimationType | EMarkAnimationType[]; set type(value: EMarkAnimationType | EMarkAnimationType[]); get enable(): boolean; /** * 重置所有动画 */ reset(): void; /** * 设置动画 */ private setupAnimations; private getBoxSize; /** * 创建关键帧轨道 */ private createKeyframeTracks; /** * 更新动画 */ update(delta: number): void; /** * 播放动画 */ play(type?: EMarkAnimationType): void; /** * 停止动画 */ stop(type?: EMarkAnimationType): void; /** * 销毁资源 */ destroy(): void; } export { KeyframeAnimation, EMarkAnimationType, AnimationOption };