Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions product/src/lottery/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,6 @@ function selectCard(duration = 600) {
.easing(TWEEN.Easing.Exponential.InOut)
.start();

object.element.classList.add("prize");
tag++;
});

Expand All @@ -550,7 +549,10 @@ function selectCard(duration = 600) {
.onUpdate(render)
.start()
.onComplete(() => {
// 动画结束后可以操作
// 动画结束后统一添加特效,避免每个卡片反转都触发一次导致卡顿
selectedCardIndex.forEach((cardIndex) => {
threeDCards[cardIndex].element.classList.add("prize");
});
setLotteryStatus();
});
}
Expand Down
Loading