luojigou-board-v2.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827
  1. <template>
  2. <view class="luojigou-board-v2" :style="{width: widget.boardWidth + 'px', height: widget.boardHeight + 'px'}">
  3. <canvas canvas-id='canvasId' id="canvasId" style="width: 111px;height: 584px;position: fixed;left: -2000px;" ref="canvasDom" ></canvas>
  4. <view class="board" >
  5. <view class="process" >
  6. <view class="count" >{{process + 1}}</view>
  7. <view class="symbol" >/</view>
  8. <view>6</view>
  9. </view>
  10. <view class="button-list" >
  11. <view class="button" :style="{opacity: index < process ? 0.4 : 1 }" v-for="(item, index) in buttonListCpd" :key="item" >
  12. <image class="icon" :src="staticImg[item]" alt="" />
  13. <image v-if="index < process" class="right-icon" :src="staticImg.rightIcon" alt="" />
  14. </view>
  15. </view>
  16. <view class="question-card" >
  17. <view :class="questionCardAni" >
  18. <image class="ques-item-url" :src="quesCard.current" />
  19. </view>
  20. <view class="ques-card-next" >
  21. <image class="ques-item-url" :src="quesCard.next" />
  22. </view>
  23. <view :class="questionAni" @click="previewCard" >
  24. <image class="card" :src="props.card.board.quesUrl" alt="" />
  25. <image class="open-icon" v-if="aniState" :src="staticImg.openIcon" />
  26. </view>
  27. </view>
  28. </view>
  29. <view class="answer" >
  30. <!-- :key="keyCount" -->
  31. <view class="answer-list" >
  32. <view
  33. class="answer-item"
  34. v-for="(item, index) in ansList"
  35. :key="item.id"
  36. :style="{top: item.top + 'px', left: item.left + 'px'}"
  37. :animation="aniListRef[index]"
  38. @click="selectAnswer(item)"
  39. >
  40. <image class="ans-img" :src="item.url" />
  41. <view :class="ansResultClass" v-if="item.select" >
  42. <image :src="ans === 1 ? staticImg.success : staticImg.wrong" />
  43. </view>
  44. <image class="hand" v-if="tipState && item.isAns" :src="staticImg.hand" />
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. <view class="opra-container" >
  50. <view class="read" :style="{opacity: !readState ? 0 : 1}" id="lottie-dom-read" @click="stopReadQuestion" > </view>
  51. <image class="read" v-if="!readState" @click="readQuestion" :src="staticImg.read" />
  52. <image class="tip" @click="openTip" :src="staticImg.tip" />
  53. </view>
  54. <view class="lottie-dom" id="lottie-dom-wrong"></view>
  55. <view class="lottie-dom" id="lottie-dom-success"></view>
  56. <view class="preview-card" v-if="previewState" @click="previewCard" >
  57. <image :src="props.card.board.quesUrl" />
  58. </view>
  59. </template>
  60. <script setup lang="ts" >
  61. import { useStaticImg,useScheduler, useSchedulerOnce, useAudioMange } from '@/hooks'
  62. import { computed, ref, nextTick, watch, onMounted, getCurrentInstance } from 'vue';
  63. import { useCalcQuantityV2Store } from '@/store/gameTool';
  64. import ao from '@/audio/ao.mp3'
  65. import successMp3 from '@/audio/success.mp3'
  66. import wrongMp3 from '@/audio/wrong.mp3'
  67. import timeoutMp3 from '@/audio/timeout.mp3'
  68. import lottie from 'lottie-web'
  69. import { onHide, onShow } from '@dcloudio/uni-app';
  70. interface IProps {
  71. card: {
  72. board: API.BoardV2,
  73. cardAble: string
  74. cardDesc: string
  75. cardName: string
  76. cardType: number
  77. audio: string
  78. }
  79. }
  80. interface AnsList {
  81. top: number,
  82. left: number,
  83. url: string,
  84. isAns: boolean,
  85. select: boolean
  86. id: string
  87. }
  88. const {
  89. proxy: { $forceUpdate },
  90. }: any = getCurrentInstance();
  91. const { windowWidth, windowHeight } = uni.getSystemInfoSync()
  92. const isPad = windowHeight / windowWidth > 0.6
  93. const posValue = isPad ? 180 : 125
  94. const ansListData: AnsList[] = [
  95. {top: 0, left: 0, url: '', isAns: false, select: false, id: '0' },
  96. {top: 0, left: posValue, url: '', isAns: false, select: false, id: '1'},
  97. {top: posValue, left: 0, url: '', isAns: false, select: false, id: '2'},
  98. {top: posValue, left: posValue, url: '', isAns: false, select: false, id: '3'}
  99. ]
  100. const props = defineProps<IProps>()
  101. const staticImg = useStaticImg()
  102. const audioMange = useAudioMange()
  103. const luojigouBoardV2Dom = ref()
  104. const calcQuantityV2Store = useCalcQuantityV2Store()
  105. const process = ref(0)
  106. const buttonList = ['red', 'green', 'blue', 'orange', 'purple', 'yellow']
  107. const buttonListCpd = computed(() => buttonList.slice(0, process.value + 1))
  108. const keyCount = ref(0)
  109. const canvasDom = ref()
  110. const ans = ref(0) // 0 未选择 1 正确 2 错误
  111. const ansList = ref<AnsList[]>(JSON.parse(JSON.stringify(ansListData)))
  112. const answerPictureList = ref<string[]>([])
  113. const tipState = ref<boolean>(false)
  114. const questionAni = ref(['ques-url'])
  115. const ansResultClass = ref(['result'])
  116. const questionCardAni = ref(['ques-card-current'])
  117. const aniState = ref(false)
  118. const previewState = ref(false)
  119. const widget = { boardWidth: 581 / (812 / windowWidth), boardHeight: 398 / (812 / windowWidth)}
  120. const emits = defineEmits(['loadingStart', 'loadingEnd', 'gameover'])
  121. const readState = ref(false)
  122. const stopReadQuestion = () => {
  123. readState.value = false
  124. audioMange.destroy()
  125. }
  126. const readQuestion = () => {
  127. audioMange.play(props.card.audio)
  128. readState.value = true
  129. audioMange.onplayend(() => {
  130. lottieReadRef.value.stop()
  131. readState.value = false
  132. })
  133. lottieReadRef.value.play()
  134. }
  135. const ansPictureRandom = () => {
  136. const r: number[] = []
  137. const arr = [0, 1, 2, 3, 4, 5]
  138. const count = 3
  139. const ansIndex = props.card.board.list[process.value].ansIndex
  140. const randomArr = arr.filter( item => item !== ansIndex )
  141. for (let i = 0; i < count; i++) {
  142. const randomCount = randomArr[ Math.floor(Math.random() * 5)]
  143. if (r.includes(randomCount)) {
  144. i--
  145. } else {
  146. r.push(randomCount)
  147. ansList.value[i].url = answerPictureList.value[randomCount]
  148. ansList.value[i].isAns = false
  149. }
  150. }
  151. const rc = Math.floor(Math.random() * 4)
  152. ansList.value[3].url = ansList.value[rc].url
  153. ansList.value[3].isAns = false
  154. ansList.value[rc].url = answerPictureList.value[ansIndex]
  155. ansList.value[rc].isAns = true
  156. console.log( ansList.value[rc].url);
  157. $forceUpdate()
  158. }
  159. const reset = () => {
  160. ansResultClass.value = ['result']
  161. useSchedulerOnce(() => {
  162. emits('gameover', process.value, () => {
  163. ansList.value.forEach( item => item.id = Math.random().toString(16).slice(2) )
  164. questionCardAni.value.push('ques-card-ani')
  165. useSchedulerOnce(() => {
  166. process.value++
  167. useSchedulerOnce(() => {
  168. questionCardAni.value.pop()
  169. }, 1000)
  170. }, 1000)
  171. useSchedulerOnce(() => {
  172. ansPictureRandom()
  173. }, 1000)
  174. })
  175. }, 1200)
  176. }
  177. const clearTimeRef = ref()
  178. const selectAnswer = (record: {isAns: boolean, select: boolean}) => {
  179. // 关闭一些状态
  180. readState.value = false
  181. tipState.value = false
  182. ansList.value.forEach( item => item.select = false)
  183. if (ansResultClass.value.length === 2) ansResultClass.value.pop()
  184. record.select = true
  185. lottieReadRef.value.stop()
  186. clearTimeRef.value && clearTimeRef.value()
  187. // 关闭一些状态
  188. if (record.isAns) {
  189. emits('loadingStart')
  190. ansResultClass.value.push('success')
  191. ans.value = 1
  192. lottieSuccessRef.value.play()
  193. if (calcQuantityV2Store.wrongCount <= 1) {
  194. audioMange.play(successMp3)
  195. } else {
  196. audioMange.play(wrongMp3)
  197. }
  198. clearTimeRef.value = useSchedulerOnce(() => {
  199. reset()
  200. record.select = false
  201. ans.value = 0
  202. }, 1000)
  203. } else {
  204. ansResultClass.value.push('wrong')
  205. ans.value = 2
  206. audioMange.play(ao)
  207. calcQuantityV2Store.wrongCount++
  208. clearTimeRef.value = useSchedulerOnce(() => {
  209. record.select = false
  210. ansResultClass.value.pop()
  211. ans.value = 0
  212. }, 2000)
  213. lottieWrongRef.value.stop()
  214. lottieWrongRef.value.play()
  215. }
  216. calcQuantityV2Store.totalCount++
  217. }
  218. const quesCard = computed(() => {
  219. if (props.card.board.list && process.value <= 6) {
  220. return {
  221. current: props.card.board.list[process.value].quesImg,
  222. next: process.value === 6 ? '' : props.card.board.list[process.value].quesImg,
  223. }
  224. }
  225. return {
  226. current: '',
  227. next: ''
  228. }
  229. })
  230. watch(
  231. () => props.card.board.ansUrl,
  232. async () => {
  233. console.log('card.board.quesUrl:', props.card.board.ansUrl);
  234. if ( props.card.board.quesUrl) {
  235. nextTick(async () => {
  236. await croppingPicture(props.card.board.ansUrl)
  237. nextTick(() => {
  238. ansPictureRandom()
  239. readQuestion()
  240. questionAni.value.push('question-card-ani')
  241. useSchedulerOnce(() => {
  242. questionAni.value.push('question-card-small')
  243. aniState.value = true
  244. }, 1700)
  245. })
  246. })
  247. }
  248. },
  249. {
  250. deep: true,
  251. // immediate: true
  252. }
  253. )
  254. // 预览题卡
  255. const previewCard = () => previewState.value = !previewState.value
  256. const openTip = () => {
  257. console.log('tipState.value = true');
  258. tipState.value = true
  259. }
  260. const aniListRef = ref()
  261. // 动画列表
  262. const aniList = () => {
  263. const a1 = uni.createAnimation({duration: 300, timingFunction: 'ease'})
  264. const a2 = uni.createAnimation({duration: 300, timingFunction: 'ease'})
  265. const a3 = uni.createAnimation({duration: 300, timingFunction: 'ease'})
  266. const a4 = uni.createAnimation({duration: 300, timingFunction: 'ease'})
  267. return [
  268. a1.top(60).left(60).step({delay: 0}).top(0).left(0).step({delay: 300}).export(),
  269. a2.top(60).left(60).step({delay: 0}).top(0).left(posValue).step({delay: 300}).export(),
  270. a3.top(60).left(60).step({delay: 0}).top(posValue).left(0).step({delay: 300}).export(),
  271. a4.top(60).left(60).step({delay: 0}).top(posValue).left(posValue).step({delay: 300}).export(),
  272. ]
  273. }
  274. aniListRef.value = aniList()
  275. // 切割答案的图片
  276. const croppingPicture = (img: string) => {
  277. return new Promise((resolve) => {
  278. const ctx = uni.createCanvasContext('canvasId')
  279. const imgae = new Image()
  280. imgae.src = img
  281. imgae.onload = () => {
  282. console.log(imgae.width, imgae.height);
  283. // const imgPng = img.endsWith('jpeg') ? img.replace('jpeg', 'png') : img
  284. // console.log('imgPng:', imgPng);
  285. uni.downloadFile({
  286. url: img,
  287. header: {
  288. "Content-Type": "application/x-www-form-urlencoded",
  289. "Content-Disposition": 'attachment;filename=',
  290. },
  291. success(result) {
  292. nextTick(() => {
  293. console.log('会出错嘛:', result);
  294. //
  295. // canvasDom.value.width = imgae.width / 4
  296. // canvasDom.value.height = imgae.height / 4
  297. // ctx.drawImage(result.tempFilePath, 0, 0, 222, imgae.height / 2)
  298. ctx.drawImage(result.tempFilePath, 0, 0, imgae.width / 8, imgae.height / 8)
  299. ctx.draw(false, () => {
  300. useSchedulerOnce(() => {
  301. for (let i = 0; i < 6; i++) {
  302. uni.canvasToTempFilePath({
  303. x: 0,
  304. y: 184 * i / 4 + 12 * i / 4,
  305. width: 222 / 4,
  306. height: 184 / 4,
  307. canvasId: 'canvasId',
  308. success: function(res) {
  309. answerPictureList.value.push(res.tempFilePath)
  310. resolve(true)
  311. },
  312. fail(result) {
  313. console.log('canvasToTempFilePath:', result);
  314. },
  315. complete(result) {
  316. console.log('complete--->canvasToTempFilePath:', result);
  317. },
  318. })
  319. }
  320. }, 5)
  321. })
  322. })
  323. },
  324. fail(result) {
  325. console.log('downloadFile:', result);
  326. },
  327. })
  328. }
  329. })
  330. }
  331. const lottieWrongRef = ref()
  332. const lottieSuccessRef = ref()
  333. const lottieReadRef = ref()
  334. // lottie-web
  335. const initLottieWeb = () => {
  336. lottieWrongRef.value = lottie.loadAnimation({
  337. container: document.getElementById('lottie-dom-wrong'),
  338. renderer: 'svg',
  339. loop: false,
  340. autoplay: false,
  341. path: 'https://luojigou-game-res.luojigou.vip/lottie-wrong.json',
  342. })
  343. lottieWrongRef.value.onComplete = function () {lottieWrongRef.value.stop() }
  344. lottieSuccessRef.value = lottie.loadAnimation({
  345. container: document.getElementById('lottie-dom-success'),
  346. renderer: 'svg',
  347. loop: false,
  348. autoplay: false,
  349. path: 'https://luojigou-game-res.luojigou.vip/lottie-success-1.json'
  350. })
  351. lottieSuccessRef.value.onComplete = function () {lottieSuccessRef.value.stop() }
  352. lottieReadRef.value = lottie.loadAnimation({
  353. container: document.getElementById('lottie-dom-read'),
  354. renderer: 'svg',
  355. loop: true,
  356. autoplay: false,
  357. path: 'https://luojigou-game-res.luojigou.vip/trump.json'
  358. })
  359. lottieReadRef.value.stop()
  360. }
  361. onMounted(() => {
  362. initLottieWeb()
  363. })
  364. const stx = useScheduler(() => audioMange.play(timeoutMp3), 15000)
  365. stx.start()
  366. document.body.addEventListener('click', () => {
  367. stx.stop()
  368. stx.start()
  369. })
  370. onShow(() => {
  371. audioMange.setVolume(1)
  372. })
  373. onHide(() => {
  374. audioMange.setVolume(0)
  375. })
  376. // window['stopScheduler'] = () => {
  377. // audioMange.setVolume(0)
  378. // }
  379. // window['playScheduler'] = () => {
  380. // audioMange.setVolume(1)
  381. // }
  382. </script>
  383. <style lang="less" scoped >
  384. .luojigou-board-v2 {
  385. position: relative;
  386. .board {
  387. width: 60%;
  388. height: 100%;
  389. background: url('@/assets/GameViewV2/board.png') no-repeat top left;
  390. background-size: 100%;
  391. position: relative;
  392. top: 10%;
  393. .process {
  394. width: 10.5%;
  395. height: 16.33%;
  396. background: #FFC047;
  397. position: absolute;
  398. top: 16.33%;
  399. left: -10.5%;
  400. z-index: 2;
  401. // font-size: 90%;
  402. font-family: PingFang SC-Semibold, PingFang SC;
  403. font-weight: 400;
  404. color: #FFFFFF;
  405. white-space: normal;
  406. display: flex;
  407. justify-content: center;
  408. align-items: center;
  409. border-top-left-radius: 14rpx;
  410. border-bottom-left-radius: 14rpx;
  411. vertical-align: bottom;
  412. .count {
  413. font-size: 130%;
  414. font-weight: 600;
  415. vertical-align: bottom;
  416. margin-bottom: 6%;
  417. }
  418. .symbol {
  419. margin-bottom: 6%;
  420. }
  421. view {
  422. display: inline-block;
  423. line-height: 24px;
  424. vertical-align: bottom;
  425. }
  426. }
  427. .button-list {
  428. width: 20%;
  429. height: 60%;
  430. position: absolute;
  431. top: 6%;
  432. right: -6%;
  433. .button {
  434. width: 55%;
  435. height: 16%;
  436. margin-bottom: 17%;
  437. display: flex;
  438. justify-content: center;
  439. align-items: center;
  440. position: relative;
  441. .icon {
  442. width: 100%;
  443. height: 100%;
  444. display: block;
  445. }
  446. .right-icon {
  447. width: 60%;
  448. height: 60%;
  449. position: absolute;
  450. top: 50%;
  451. left: 50%;
  452. transform: translate(-50%, -50%);
  453. }
  454. }
  455. }
  456. .question-card {
  457. width: 78%;
  458. height: 72%;
  459. position: absolute;
  460. top: 6%;
  461. left: 4%;
  462. // background-color: #fff;
  463. border-radius: 6%;
  464. z-index: 11;
  465. .ques-card-current {
  466. width: 100%;
  467. height: 100%;
  468. background-color: #fff;
  469. border-radius: 6%;
  470. position: absolute;
  471. top: 50%;
  472. left: 50%;
  473. transform: translate(-50%, -50%);
  474. z-index: 11;
  475. transform-origin: 50% 50%;
  476. .ques-item-url {
  477. width: 76%;
  478. height: 79%;
  479. display: block;
  480. position: absolute;
  481. top: 50%;
  482. left: 50%;
  483. transform: translate(-50%, -50%);
  484. z-index: 1;
  485. border-radius: 6%;
  486. }
  487. }
  488. .ques-card-ani {
  489. animation: ques-card-current-ani 0.9s;
  490. }
  491. @keyframes ques-card-current-ani {
  492. 0% {
  493. rotate: 0deg;
  494. left: 50%;
  495. opacity: 1;
  496. }
  497. 33% {
  498. rotate: 4deg;
  499. left: 50%;
  500. opacity: 1;
  501. }
  502. 66% {
  503. rotate: 0deg;
  504. left: 50%;
  505. opacity: 1;
  506. }
  507. 100% {
  508. opacity: 0;
  509. left: 20%;
  510. }
  511. }
  512. .ques-card-next {
  513. width: 100%;
  514. height: 100%;
  515. background-color: #fff;
  516. border-radius: 6%;
  517. .ques-item-url {
  518. width: 76%;
  519. height: 79%;
  520. display: block;
  521. position: absolute;
  522. top: 50%;
  523. left: 50%;
  524. transform: translate(-50%, -50%);
  525. z-index: 1;
  526. border-radius: 6%;
  527. }
  528. }
  529. .ques-url {
  530. width: 100%;
  531. height: 100%;
  532. display: block;
  533. position: absolute;
  534. top: 0%;
  535. left: 0%;
  536. z-index: 22;
  537. transform-origin: 96% 4%;
  538. border-radius: 6%;
  539. display: flex;
  540. justify-content: center;
  541. align-items: center;
  542. background-color: #fff;
  543. .card {
  544. width: 58%;
  545. height: 100%;
  546. border-radius: 6%;
  547. object-fit: contain;
  548. }
  549. .open-icon {
  550. width: 30%;
  551. height: 30%;
  552. position: absolute;
  553. bottom: 2vw;
  554. right: 8vw;
  555. }
  556. }
  557. }
  558. .question-card-ani {
  559. animation: card-ani 1s ease 0.9s;
  560. }
  561. .question-card-small {
  562. transform: scale(32%) translateX(20%);
  563. background-color: transparent !important;
  564. .card {
  565. border: 2px solid #D0D0D0;
  566. }
  567. }
  568. }
  569. .answer {
  570. width: 45%;
  571. height: 60%;
  572. position: absolute;
  573. top: 50%;
  574. left: 66%;
  575. transform: translateY(-50%);
  576. .answer-list {
  577. display: grid;
  578. grid-template-columns: 11vw 6vw 11vw;
  579. grid-template-rows: 11vw 6vw 11vw;
  580. // width: 34%;
  581. // height: 37%;
  582. .answer-item {
  583. width: 11vw;
  584. height: 11vw;
  585. background-color: #fff;
  586. box-shadow: 0px 0px 1vw 0px #FFC04C;
  587. border-radius: 16%;
  588. border: 0.5vw solid rgba(255, 192, 76, 0.2);
  589. position: absolute;
  590. box-sizing: border-box;
  591. // overflow: hidden;
  592. .ans-img {
  593. width: 100%;
  594. height: 100%;
  595. border-radius: 16%;
  596. object-fit: cover;
  597. }
  598. .hand {
  599. width: 6vw;
  600. height: 6vw;
  601. position: absolute;
  602. top: 50%;
  603. left: 50%;
  604. animation: hand-ani 1s infinite;
  605. }
  606. .result {
  607. width: 100%;
  608. height: 100%;
  609. position: absolute;
  610. top: 50%;
  611. left: 50%;
  612. transform: translate(-50%, -50%);
  613. display: flex;
  614. justify-content: center;
  615. align-items: center;
  616. border-radius: 16%;
  617. image {
  618. width: 37.5%;
  619. height: 37.5%;
  620. display: block;
  621. }
  622. }
  623. .success {
  624. background: rgba(34,193,52,0.5);
  625. border: 0.5vw solid #22C134;
  626. }
  627. .wrong {
  628. background: rgba(234,71,71,0.5);
  629. border: 0.5vw solid #EA4747;
  630. }
  631. }
  632. }
  633. }
  634. }
  635. .opra-container {
  636. position: fixed;
  637. right: 3vw;
  638. bottom: 3vw;
  639. display: flex;
  640. flex-direction: column;
  641. .read {
  642. width: 5.5vw;
  643. height: 5.5vw;
  644. position: absolute;
  645. bottom: 6.5vw;
  646. }
  647. image {
  648. width: 5.5vw;
  649. height: 5.5vw;
  650. margin-top: 2vw;
  651. }
  652. }
  653. .lottie-dom {
  654. width: 24vw;
  655. height: 24vw;
  656. position: fixed;
  657. left: 0;
  658. bottom: 0;
  659. z-index: 120;
  660. }
  661. .preview-card {
  662. width: 100vw;
  663. height: 100vh;
  664. background-color: rgba(0, 0, 0, 0.6);
  665. position: fixed;
  666. top: 0;
  667. left: 0;
  668. z-index: 11;
  669. display: flex;
  670. justify-content: center;
  671. align-items: center;
  672. image {
  673. width: 58vh;
  674. height: 100vh;
  675. }
  676. }
  677. @keyframes hand-ani {
  678. 0% {
  679. transform: translate(0vw, 0vw)
  680. };
  681. 50% {
  682. transform: translate(2vw, 2vw)
  683. };
  684. 100% {
  685. transform: translate(0vw, 0vw)
  686. }
  687. }
  688. @keyframes card-ani {
  689. 0% {
  690. transform: scale(100%);
  691. };
  692. 78% {
  693. transform: scale(100%);
  694. background-color: #fff;
  695. };
  696. 80% {
  697. background-color: transparent;
  698. };
  699. 100% {
  700. transform: scale(32%) translateX(20%);
  701. background-color: transparent;
  702. }
  703. }
  704. </style>