Commit d7656ed2 authored by timel's avatar timel

fix: 动画的细微调整

parent b1e82d94
...@@ -22,6 +22,6 @@ declare global { ...@@ -22,6 +22,6 @@ declare global {
color: ( color: (
color: string, color: string,
backgroundColor?: string backgroundColor?: string
) => (...args: any[]) => void; ) => (...args: Parameters<console.log>) => void;
} }
} }
...@@ -160,12 +160,7 @@ export default async (move: MsgMove) => { ...@@ -160,12 +160,7 @@ export default async (move: MsgMove) => {
await eventbus.call(Task.Move, target.uuid); await eventbus.call(Task.Move, target.uuid);
// 如果from或者to是手卡,那么需要刷新除了这张卡之外,这个玩家的所有手卡 // 如果from或者to是手卡,那么需要刷新除了这张卡之外,这个玩家的所有手卡
if ([from.zone, to.zone].includes(HAND)) { if ([from.zone, to.zone].includes(HAND)) {
// for (const card of cardStore.at(HAND, target.location.controller)) { await Promise.all(
// if (card.uuid !== target.uuid) {
// await eventbus.call(Task.Move, card.uuid);
// }
// }
Promise.all(
cardStore cardStore
.at(HAND, target.location.controller) .at(HAND, target.location.controller)
.filter((c) => c.uuid !== target.uuid) .filter((c) => c.uuid !== target.uuid)
......
...@@ -17,7 +17,12 @@ export const focus = async (props: { card: CardType; api: SpringApi }) => { ...@@ -17,7 +17,12 @@ export const focus = async (props: { card: CardType; api: SpringApi }) => {
ry: 0, ry: 0,
rz: 0, rz: 0,
}); });
await asyncStart(api)({ y: current.y, ry: current.ry, rz: current.rz }); await asyncStart(api)({
y: current.y,
ry: current.ry,
rz: current.rz,
z: current.z,
});
} else { } else {
await asyncStart(api)({ await asyncStart(api)({
focusScale: 1.5, focusScale: 1.5,
......
...@@ -49,8 +49,7 @@ export const moveToHand = async (props: { card: CardType; api: SpringApi }) => { ...@@ -49,8 +49,7 @@ export const moveToHand = async (props: { card: CardType; api: SpringApi }) => {
const _rz = (angle * 180) / Math.PI; const _rz = (angle * 180) / Math.PI;
// FIXME: 这里加上await会导致有些手卡会卡住不动,为什么呢? await asyncStart(api)({
asyncStart(api)({
x: isMe(controller) ? x : -x, x: isMe(controller) ? x : -x,
y: isMe(controller) ? y : -y, y: isMe(controller) ? y : -y,
z: 15, z: 15,
......
...@@ -65,7 +65,7 @@ export const matConfig = { ...@@ -65,7 +65,7 @@ export const matConfig = {
unit: UNIT.PX, unit: UNIT.PX,
}, },
HAND_CARD_HEIGHT: { HAND_CARD_HEIGHT: {
value: 140, value: 110,
unit: UNIT.PX, unit: UNIT.PX,
}, },
DECK_OFFSET_X: { DECK_OFFSET_X: {
......
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