Commit 8544477f authored by Chunchi Che's avatar Chunchi Che

make animation faster

parent 5f2cff6b
Pipeline #28154 passed with stages
in 11 minutes and 30 seconds
...@@ -18,6 +18,9 @@ export const focus = async (props: { card: CardType; api: SpringApi }) => { ...@@ -18,6 +18,9 @@ export const focus = async (props: { card: CardType; api: SpringApi }) => {
ry: 0, ry: 0,
// rz: 0, // rz: 0,
z: current.z + 50, z: current.z + 50,
config: {
duration: 200,
},
}); });
await asyncStart(api)(current); await asyncStart(api)(current);
} else { } else {
......
...@@ -107,7 +107,7 @@ export const moveToGround: MoveFunc = async (props) => { ...@@ -107,7 +107,7 @@ export const moveToGround: MoveFunc = async (props) => {
ry, ry,
rz, rz,
config: { config: {
tension: 250, tension: 350,
clamp: true, clamp: true,
easing: easings.easeOutSine, easing: easings.easeOutSine,
}, },
...@@ -121,7 +121,7 @@ export const moveToGround: MoveFunc = async (props) => { ...@@ -121,7 +121,7 @@ export const moveToGround: MoveFunc = async (props) => {
zIndex: is_overlay ? 1 : 3, zIndex: is_overlay ? 1 : 3,
config: { config: {
easing: easings.easeInQuad, easing: easings.easeInQuad,
duration: 200, duration: 100,
clamp: true, clamp: true,
}, },
}); });
......
...@@ -55,5 +55,9 @@ export const moveToHand: MoveFunc = async (props) => { ...@@ -55,5 +55,9 @@ export const moveToHand: MoveFunc = async (props) => {
height: HAND_CARD_HEIGHT, height: HAND_CARD_HEIGHT,
zIndex: sequence, zIndex: sequence,
// rx: -PLANE_ROTATE_X, // rx: -PLANE_ROTATE_X,
config: {
duration: 200,
clamp: true,
},
}); });
}; };
...@@ -42,7 +42,8 @@ export const moveToOutside: MoveFunc = async (props) => { ...@@ -42,7 +42,8 @@ export const moveToOutside: MoveFunc = async (props) => {
subZ: 100, subZ: 100,
zIndex: sequence, zIndex: sequence,
config: { config: {
tension: 140, tension: 350,
clamp: true,
}, },
}); });
api.set({ subZ: 0 }); api.set({ subZ: 0 });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment