import { Animation, AnimationOptions } from "./Animation"; export declare class AnimationAPI { /** * 创建一个动画实例 [animation](https://open.kuaishou.com/docs/develop/api-next/ui/animation/Animation/Animation) 。调用实例的方法来描述动画。最后通过动画实例的 `export` 方法导出动画数据传递给组件的 animation 属性。 * @param options * @returns * @alpha * @example * ```javascript * Page({ * data: { * animationData: {}, * }, * onShow: function () { * const animation = ks.createAnimation({ * duration: 1000, * timingFunction: 'ease', * }); * * this.animation = animation; * * animation.scale(2, 2).rotate(45).step(); * * this.setData({ * animationData: animation.export(), * }); * * setTimeout(() => { * animation.translate(30, 30).step(); * this.setData({ * animationData: animation.export(), * }); * }, 1000); * }, * rotateAndScale: function () { * // 旋转同时放大 * this.animation.rotate(45).scale(2, 2).step(); * this.setData({ * animationData: this.animation.export(), * }); * }, * rotateThenScale: function () { * // 先旋转后放大 * this.animation.rotate(45).step(); * this.animation.scale(2, 2).step(); * this.setData({ * animationData: this.animation.export(), * }); * }, * rotateAndScaleThenTranslate: function () { * // 先旋转同时放大,然后平移 * this.animation.rotate(45).scale(2, 2).step(); * this.animation.translate(100, 100).step({ duration: 1000 }); * this.setData({ * animationData: this.animation.export(), * }); * }, * }); * * ``` * */ createAnimation(options?: AnimationOptions): Animation; }