feat:添加孙中山场景
This commit is contained in:
1 parent
bf4a98bf9f
commit
cad38e43df
55 files changed
+1704
-44
No files matched your search
@@ -0,0 +1,23 @@
|
||||
import { flyToAnimationManager } from "./FlyToAnimationManager";
|
||||
import type { FlyToAnimationOptions } from "./FlyToAnimationManager";
|
||||
|
||||
/**
|
||||
* 飞行动画函数
|
||||
* 将一个元素从起始位置飞向目标元素
|
||||
*
|
||||
* @example
|
||||
* ```tsx
|
||||
* const fromRef = useRef<HTMLDivElement>(null);
|
||||
* const toRef = useRef<HTMLDivElement>(null);
|
||||
*
|
||||
* flyToAnimation({
|
||||
* fromRef,
|
||||
* toRef,
|
||||
* targetPosition: "center",
|
||||
* onComplete: () => console.log("动画完成"),
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
export const flyToAnimation = (options: FlyToAnimationOptions) => {
|
||||
flyToAnimationManager.flyTo(options);
|
||||
};
|
||||
Reference in new issue
Block a user