boxing-hit.vue 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410
  1. <template>
  2. <view style="width:100%; margin-bottom: 50rpx;">
  3. <!-- 计时器 -->
  4. <view class="hitBoxingTimer flex justify-center">
  5. <boxingCountDown ref="boxingCountDownRef" :show-day="false" :second="showSportTime" color="#9695f7" background-color="#FFFFFF"
  6. border-color="#007AFF" splitorColor="#FFFFFF" />
  7. </view>
  8. <view v-if="mode == 'pkMode'" style="height: 50rpx;"></view>
  9. <view v-else style="height: 20rpx;"></view>
  10. <view style="display: flex; flex-direction: column; justify-content: center;align-items: center;
  11. position: relative; width: 100%;">
  12. <!-- 波动 -->
  13. <view v-if="mode !== 'pkMode'" class="flex justify-around align-center" style="width: 600rpx;height: 100rpx; margin: 20rpx;">
  14. <view style="height: 1rpx;width: 80rpx;background-color: #FFFFFF;"></view>
  15. <view style="display: flex; justify-content: center; align-self: center; height: 100%;">
  16. <view style="display: flex; justify-content: center; align-items: center;">
  17. <view class="wave-d-item " v-for="(item, index) in wave_d_time" :key="index" :class="wave_d_play?'hit-wave':''"
  18. :style="{'--time': item.run * wave_run_ratio,'--delay':item.delay * wave_run_ratio,'height': wave_d_play?item.sHeight+'rpx':'20rpx'}"></view>
  19. </view>
  20. <view style="display: flex; justify-content: center; align-items: center; flex-direction: row-reverse;">
  21. <view class="wave-d-item " v-for="(item, index) in wave_d_time" :key="index" :class="wave_d_play?'hit-wave':''"
  22. :style="{'--time': item.run * wave_run_ratio,'--delay':item.delay * wave_run_ratio,'height': wave_d_play?item.sHeight+'rpx':'20rpx'}"></view>
  23. </view>
  24. </view>
  25. <view style="height: 1rpx;width: 80rpx;background-color: #FFFFFF;"></view>
  26. </view>
  27. <view v-if="mode == 'pkMode'" style="height: 30rpx;"></view>
  28. <!-- 当前拳击力-->
  29. <view v-if="mode == 'pkMode'" class="flex justify-center align-center " style="margin-top: 40rpx; background-color: rgba(255,255,255,0.1); width: 420rpx; height: 90rpx;border-radius: 60rpx;">
  30. <image src="/static/modal/boxing-hit/b.png" style="width: 50rpx; height: 50rpx;" mode="aspectFit"></image>
  31. <view class="hit-current-count">
  32. {{currentHitStrength}}
  33. </view>
  34. </view>
  35. <!-- <view v-else style="position: relative; width: 100%;" :style="{'opacity': hitStrengthOpacity}">
  36. <view style="position: absolute;
  37. left: 0;
  38. top: 0;
  39. bottom: 0;
  40. right: 0;" class="flex justify-center">
  41. <view class="flex justify-center align-center " style="background-color: rgba(0,0,0,0.4); width: 300rpx; height: 90rpx;border-radius: 60rpx;">
  42. <view class="hit-current-count-power">力量</view>
  43. <view class="hit-current-count">
  44. {{currentHitStrength}}
  45. </view>
  46. </view>
  47. </view>
  48. </view> -->
  49. <view v-if="mode == 'pkMode'" style="height: 110rpx;"></view>
  50. <view v-else style="height: 20rpx;"></view>
  51. <!-- 控制按钮 -->
  52. <view class="flex justify-center " :class="mode == 'pkMode'?'big':''" style="margin-top: 40rpx;" @tap="onControlPlay">
  53. <view style="position: relative; width: 260rpx; height: 260rpx;">
  54. <image style="width: 100%; height: 100%;" src="/static/modal/boxing-hit/hit-button-bg.png"></image>
  55. <image class="hit-button-rotate " :class="bRingAnimation?'hit-button-bg-play':'hit-button-bg-paused'" style="position: absolute;top: 10%;left: 10%;bottom: 0;right: 0;width: 80%; height: 80%;"
  56. src="/static/modal/boxing-hit/hit-button-ef.png"></image>
  57. <view style="position: absolute;top: 0;left: 0;bottom: 0;right: 0;width: 100%; height: 100%; display: flex;justify-content: center; align-items: center;">
  58. <image style="width: 50rpx; height: 50rpx; transform: scale(-1,1);" :src="bControlRun?'/static/modal/boxing-hit/hit-pause.png':'/static/modal/boxing-hit/hit-play.png'"></image>
  59. </view>
  60. </view>
  61. </view>
  62. <!-- <view v-if="mode == 'pkMode'" style="height: 160rpx;"></view> -->
  63. <!-- <view style="margin-top: 40rpx;width: 310rpx; height: 90rpx;"></view> -->
  64. <!-- 模式按钮 @tap="onChangeMode"-->
  65. <!-- <view class="flex justify-center " style="margin-top: 40rpx;">
  66. <view style="position: relative; width: 310rpx; height: 90rpx;background-color: #FFFFFF; display: flex;flex-direction: row;justify-content: center;align-items: center; border-radius: 50rpx;">
  67. <image style="width: 45rpx; height: 45rpx;" src="/static/personal/switch.png"></image>
  68. <view style="margin-left: 20rpx;color:#9797FF; font-weight: bold;font-size: 17px;">{{mode=="pkMode"?'健身模式':'PK模式'}}
  69. </view>
  70. </view>
  71. </view> -->
  72. <!-- <view v-if="mode == 'pkMode'" style="height: 20rpx;"></view> -->
  73. <view v-if="mode == 'pkMode'" style="height: 170rpx;"></view>
  74. <!-- <view v-else style="height: 110rpx;"></view> -->
  75. <view v-else style="height: 80rpx;"></view>
  76. <view v-if="mode == 'pkMode'" class="hit-vertical-container" :style="{'top': mode == 'pkMode'?'-120rpx':'-300rpx'}">
  77. <view class="hit-vertical-bar">
  78. <view class="hit-vertical-child" v-for="(item, index) in 25" :key="index">
  79. <view :class="25-aiShowCount>=index+1? 'hit-vertical-active':'hit-vertical-inactive'"></view>
  80. <view :class="index%5 == 0?'':'hit-text-hidden'" class="hit-vertical-text">{{index+1}}</view>
  81. </view>
  82. </view>
  83. <view class="hit-vertical-bar">
  84. <view class="hit-vertical-child" v-for="(item, index) in 25" :key="index">
  85. <view :class="index%5 == 0?'':'hit-text-hidden'" class="hit-vertical-text">{{index+1}}</view>
  86. <view :class="25-myShowCount>=index+1? 'hit-vertical-active':'hit-vertical-inactive'"></view>
  87. </view>
  88. </view>
  89. </view>
  90. <view v-else class="hit-vertical-container" :style="{'top': mode == 'pkMode'?'-120rpx':'-300rpx'}">
  91. <view class="hit-vertical-bar">
  92. <view class="hit-vertical-child" v-for="(item, index) in 25" :key="index">
  93. <view :class="showCount>=index+1? 'hit-vertical-active':'hit-vertical-inactive'"></view>
  94. <view :class="index%5 == 0?'':'hit-text-hidden'" class="hit-vertical-text">{{(index+1)*2}}</view>
  95. </view>
  96. </view>
  97. <view class="hit-vertical-bar">
  98. <view class="hit-vertical-child" v-for="(item, index) in 25" :key="index">
  99. <view :class="index%5 == 0?'':'hit-text-hidden'" class="hit-vertical-text">{{(index+26)*2}}</view>
  100. <view :class="showCount>=index+26? 'hit-vertical-active':'hit-vertical-inactive'"></view>
  101. </view>
  102. </view>
  103. </view>
  104. </view>
  105. <!-- <button style="margin-top: 100rpx;" @tap="onTestHit('left')">击中</button> -->
  106. <!-- 显示数据 -->
  107. <view v-if="mode == 'pkMode'" class="flex justify-around " style="margin: 0rpx 15rpx;">
  108. <view class="boxing-item-bg">
  109. <image src="/static/modal/boxing-hit/f.png" class="boxing-hit-png " mode="aspectFit"></image>
  110. <view class="text-white text-13px" style="margin: 10rpx 0;">最大力量</view>
  111. <view class="hit-count">
  112. {{mode == 'pkMode'?PKMaxStrength:maxStrength}}
  113. </view>
  114. </view>
  115. <view class="boxing-item-bg">
  116. <image src="/static/modal/boxing-hit/b.png" class="boxing-hit-png " mode="aspectFit"></image>
  117. <view class="text-white text-13px" style="margin: 10rpx 0;">平均力量</view>
  118. <view class="hit-count">
  119. {{mode == 'pkMode'?PKAverageStrength:averageStrength}}
  120. </view>
  121. </view>
  122. <view class="boxing-item-bg">
  123. <image src="/static/modal/boxing-hit/e.png" class="boxing-hit-png " mode="aspectFit"></image>
  124. <view class="text-white text-13px" style="margin: 10rpx 0;">平均速度</view>
  125. <view class="hit-count">
  126. {{mode == 'pkMode'?PKAverageSpeed:averageSpeed}}
  127. </view>
  128. </view>
  129. <view class="boxing-item-bg">
  130. <image src="/static/modal/boxing-hit/n.png" class="boxing-hit-png " mode="aspectFit"></image>
  131. <view class="text-white text-13px" style="margin: 10rpx 0;">击打数</view>
  132. <view class="hit-count">
  133. {{mode == 'pkMode'?PKAllShowHitCount:allShowHitCount}}
  134. </view>
  135. </view>
  136. </view>
  137. <view v-else class="flex margin-bottom-sm justify-center align-center">
  138. <view class="flex align-center">
  139. <view class="flex justify-start flex-direction align-center">
  140. <image src="/static/mileageIcon-w.png" class="data-png-26 margin-sm" mode="aspectFit"></image>
  141. <text style="text-align: start; line-height: 24px; font-weight: 400;color: #FFFFFF;">里程</text>
  142. </view>
  143. <view class="flex justify-start flex-direction">
  144. <view style="height: 26px;" class="margin-top-sm margin-bottom-sm">
  145. <view class="cu-progress" style="height: 6rpx; width: 140rpx; border-radius: 45rpx;"></view>
  146. </view>
  147. <text style="text-align: start; line-height: 24px; font-weight: 400;color: #FFFFFF;">{{runMileage}}km</text>
  148. </view>
  149. </view>
  150. <view style="width: 40rpx;"></view>
  151. <view class="flex align-center">
  152. <view class="flex justify-start flex-direction align-center">
  153. <image src="/static/icon-run-normal.png" class="data-png-26 margin-sm" mode="aspectFit"></image>
  154. <text style="text-align: start; line-height: 24px; font-weight: 400; color: #FFFFFF;">速度</text>
  155. </view>
  156. <view class="flex justify-start flex-direction">
  157. <view style="height: 26px;" class="margin-top-sm margin-bottom-sm">
  158. <view class="cu-progress" style="height: 6rpx; width: 140rpx; border-radius: 45rpx;"></view>
  159. </view>
  160. <text style="text-align: start; line-height: 24px; font-weight: 400;color: #FFFFFF;">{{runSpeed}}m/s</text>
  161. </view>
  162. </view>
  163. </view>
  164. </view>
  165. </template>
  166. <script>
  167. import boxingCountDown from '@/components/uni-count-down/uni-count-down.vue'
  168. import hitCharts from '@/components/u-charts/u-charts.js';
  169. import puchConfig from "@/util/util-js/puchConfig.js"
  170. import EquipmentAction from "@/util/util-js/EquipmentAction.js"
  171. export default {
  172. components: {
  173. boxingCountDown
  174. },
  175. props: {
  176. bUpdate: {
  177. type: Boolean,
  178. default: false
  179. },
  180. showTime: {
  181. type: Number,
  182. default: 0
  183. },
  184. //默认是防回弹更新
  185. bRebound: {
  186. type: Boolean,
  187. default: true,
  188. }
  189. },
  190. data() {
  191. return {
  192. mode: 'calorieMode', //pkMode calorieMode
  193. //满格的数值是 25
  194. maxShowCount: 25,
  195. //pk模式下,两边涨的区分,自己和ai
  196. myShowCount: 0,
  197. myPowerCount: 0,
  198. aiShowCount: 0,
  199. aiPowerCount: 0,
  200. //显示的点
  201. showCount: 0,
  202. //记录打击的次数
  203. powerCount: 0,
  204. //当前打击的最大值
  205. powerMaxCount: 0,
  206. xA1: 0,
  207. yA1: 0,
  208. zA1: 0,
  209. xA: 0,
  210. yA: 0,
  211. zA: 0,
  212. xO: 0,
  213. yO: 0,
  214. zO: 0,
  215. mass: 5,
  216. //大概消耗的卡路里
  217. calorie: 0,
  218. //与加速度相关的卡路里
  219. otherCalorie: 0,
  220. //大概消耗的卡路里
  221. PKCalorie: 0,
  222. //与加速度相关的卡路里
  223. PKOtherCalorie: 0,
  224. leftHookUrl: "/static/modal/boxing-post/left-hook.mp3",
  225. rightHookUrl: "/static/modal/boxing-post/right-hook.mp3",
  226. straightHookUrl: "/static/modal/boxing-post/straight-hook.mp3",
  227. hookAudioContext: null,
  228. //新手语音提示
  229. leftTipUrl: "/static/modal/boxing-post/tipLeft.mp3",
  230. rightTipUrl: "/static/modal/boxing-post/tipRight.mp3",
  231. straightTipUrl: "/static/modal/boxing-post/tipStraight.mp3",
  232. greatTipUrl: "/static/modal/boxing-post/tipGreat.mp3",
  233. giveGoTipUrl: "/static/modal/boxing-post/tipGiveItAGo.mp3",
  234. startTraining: "/static/modal/boxing-post/tipStartTraining.mp3",
  235. //击打状态音效
  236. hitUrl: "/static/elect/hit.mp3",
  237. missUrl: "/static/elect/miss.mp3",
  238. //是否在播放
  239. bPlay: false,
  240. //新手
  241. bGuide: false,
  242. //是否是特殊拳击
  243. bGuideEF: false,
  244. //运动时间
  245. showSportTime: this.showTime,
  246. sportTimeInterval: null,
  247. //拳击数据判断对象
  248. EquipmentActionObj: null,
  249. wave_array: [{
  250. wPlay: false
  251. },
  252. {
  253. wPlay: false
  254. },
  255. {
  256. wPlay: false
  257. },
  258. {
  259. wPlay: false
  260. },
  261. ],
  262. wave_run_array: [],
  263. wave_time: [{
  264. run: 0.5,
  265. delay: 3,
  266. height: 20
  267. },
  268. {
  269. run: 1,
  270. delay: 3,
  271. height: 30
  272. },
  273. {
  274. run: 2,
  275. delay: 3,
  276. height: 80
  277. },
  278. {
  279. run: 0.5,
  280. delay: 2,
  281. height: 50
  282. },
  283. {
  284. run: 1,
  285. delay: 2,
  286. height: 35
  287. },
  288. {
  289. run: 2,
  290. delay: 2,
  291. height: 20
  292. }
  293. ],
  294. wave_d_play: false,
  295. wave_d_timeout: null,
  296. wave_run_ratio: 0.4,
  297. wave_d_time: [{
  298. run: 1,
  299. delay: 1.1,
  300. height: 20,
  301. sHeight: 20,
  302. play: false
  303. },
  304. {
  305. run: 1,
  306. delay: 1,
  307. height: 30,
  308. sHeight: 20,
  309. play: true
  310. },
  311. {
  312. run: 1,
  313. delay: 0.9,
  314. height: 15,
  315. sHeight: 20,
  316. play: true
  317. },
  318. {
  319. run: 1,
  320. delay: 0.8,
  321. height: 50,
  322. sHeight: 20,
  323. play: true
  324. },
  325. {
  326. run: 1.3,
  327. delay: 0.7,
  328. height: 35,
  329. sHeight: 20,
  330. play: true
  331. },
  332. {
  333. run: 1.4,
  334. delay: 0.6,
  335. height: 20,
  336. sHeight: 20,
  337. play: true
  338. },
  339. {
  340. run: 1.5,
  341. delay: 0.5,
  342. height: 25,
  343. sHeight: 20,
  344. play: true
  345. },
  346. {
  347. run: 1.6,
  348. delay: 0.4,
  349. height: 40,
  350. sHeight: 20,
  351. play: true
  352. },
  353. {
  354. run: 1.7,
  355. delay: 0.3,
  356. height: 60,
  357. sHeight: 20,
  358. play: true
  359. },
  360. {
  361. run: 1.8,
  362. delay: 0.2,
  363. height: 50,
  364. sHeight: 20,
  365. play: true
  366. },
  367. {
  368. run: 1.9,
  369. delay: 0.1,
  370. height: 80,
  371. sHeight: 20,
  372. play: true
  373. },
  374. {
  375. run: 1.8,
  376. delay: 0,
  377. height: 70,
  378. sHeight: 20,
  379. play: true
  380. }
  381. ],
  382. bControlRun: false,
  383. bRingAnimation: false,
  384. maxStrength: 0,
  385. averageStrength: 0,
  386. allStrength: 0,
  387. averageSpeed: 0,
  388. averageSpeedInterval: null,
  389. tempHitCount: 0,
  390. allTempHitCount: 0,
  391. allShowHitCount: 0,
  392. currentHitStrength: 0,
  393. // testHitInterval: null,
  394. aiHitInterval: null,
  395. //击打时候动画对象
  396. hitStrengthOpacityInterval: null,
  397. hitStrengthOpacity: 0,
  398. //pk 模式下的数据
  399. PKMaxStrength: 0,
  400. PKAverageStrength: 0,
  401. PKAllStrength: 0,
  402. PKAverageSpeed: 0,
  403. PKAverageSpeedInterval: null,
  404. PKTempHitCount: 0,
  405. PKAllTempHitCount: 0,
  406. PKAllShowHitCount: 0,
  407. BLENum: 0,
  408. BLEACX: 0,
  409. BLEACYL: 0,
  410. /** 跑步参数*/
  411. runMileage:0,
  412. runSpeed:0,
  413. runTempCount:0,
  414. runAllTempCount:0,
  415. runAllCount:0,
  416. }
  417. },
  418. watch: {
  419. bUpdate(val) {
  420. },
  421. showTime(val) {
  422. this.showSportTime = val;
  423. }
  424. },
  425. created() {
  426. let _self = this;
  427. _self.hookAudioContext = uni.createInnerAudioContext();
  428. _self.hookAudioContext.autoplay = false;
  429. _self.hookAudioContext.src = _self.straightHookUrl;
  430. _self.hookAudioContext.volume = 0.5;
  431. console.log(" ***** boxing-post created ******");
  432. _self.onBindAcc();
  433. _self.EquipmentActionObj = new EquipmentAction();
  434. _self.EquipmentActionObj.addEventListener("resultantHit", (e) => {
  435. // console.log("acc:",this.xA,this.yA,this.zA);
  436. // console.log("data:", this.xA1, this.yA1, this.zA1);
  437. if (this.mode == "pkMode") {
  438. this._pkHitOnly(e.acc, e.power);
  439. } else {
  440. this._HitOnly(e.acc, e.power);
  441. }
  442. })
  443. if (this.averageSpeedInterval) {
  444. clearInterval(this.averageSpeedInterval);
  445. this.averageSpeedInterval = null;
  446. }
  447. //计算平均速度
  448. this.averageSpeedInterval = setInterval(() => {
  449. if (this.mode == 'PKMode') {
  450. this.PKAverageSpeed = this.PKTempHitCount;
  451. this.PKTempHitCount = 0;
  452. } else {
  453. this.averageSpeed = this.tempHitCount;
  454. this.tempHitCount = 0;
  455. //跑步速度 70cm步长 速度:步长*步数/5秒
  456. this.runSpeed = this.runTempCount * 70 / 100;
  457. this.runTempCount = 0;
  458. }
  459. }, 5000)
  460. },
  461. beforeDestroy() {
  462. console.log(" ***** boxing-post destroyed ******");
  463. this.onUnbindAcc();
  464. // this.onUnbindOri();
  465. let _self = this;
  466. if (_self.hookAudioContext)
  467. _self.hookAudioContext.destroy();
  468. if (_self.sportTimeInterval) {
  469. clearInterval(_self.sportTimeInterval);
  470. _self.sportTimeInterval = null;
  471. }
  472. if (_self.averageSpeedInterval) {
  473. clearInterval(_self.averageSpeedInterval);
  474. _self.averageSpeedInterval = null;
  475. }
  476. // if (_self.testHitInterval) {
  477. // clearInterval(_self.testHitInterval);
  478. // _self.testHitInterval = null;
  479. // }
  480. if (this.aiHitInterval) {
  481. clearInterval(this.aiHitInterval);
  482. this.aiHitInterval = null;
  483. }
  484. },
  485. methods: {
  486. onSetRingAnimation(booleanValue) {
  487. this.bRingAnimation = booleanValue;
  488. },
  489. moveBoxingHandle() {
  490. return;
  491. },
  492. //测试打击
  493. onTestHit(data) {
  494. let _self = this;
  495. let maxPower = Math.floor(Math.random() * 13);
  496. // console.log("maxPower:", maxPower);
  497. if (this.mode == "pkMode") {
  498. this._pkHitOnly(maxPower, maxPower * 10);
  499. } else {
  500. for(let i=0;i<100;i++){
  501. this._HitOnly(maxPower, maxPower * 10);
  502. }
  503. }
  504. },
  505. //平时击打的力量槽动画播放
  506. onPlayPowerAnimation(bGreat) {
  507. if (bGreat) {
  508. this.hookAudioContext.stop();
  509. this.hookAudioContext.src = this.greatTipUrl;
  510. this.hookAudioContext.play();
  511. } else {
  512. this.hookAudioContext.stop();
  513. this.hookAudioContext.src = this.hitUrl;
  514. this.hookAudioContext.play();
  515. }
  516. let _self = this;
  517. if (_self.powerInterval) {
  518. clearInterval(_self.powerInterval);
  519. _self.powerInterval = null;
  520. }
  521. let bAdd = true;
  522. let _oldPowerCount = _self.powerCount;
  523. let _currentMaxCount = _oldPowerCount + 10;
  524. let _duraciotn = 300 / _currentMaxCount;
  525. _self.powerInterval = setInterval(function() {
  526. if (_self.showCount >= _currentMaxCount) {
  527. bAdd = false;
  528. } else if (_self.showCount <= _oldPowerCount && !bAdd) {
  529. _self.showCount = _self.powerCount;
  530. clearInterval(_self.powerInterval);
  531. _self.powerInterval = null;
  532. return;
  533. }
  534. if (bAdd)
  535. _self.showCount++;
  536. else
  537. _self.showCount--;
  538. }, _duraciotn); //300ms/40格
  539. },
  540. //pk模式击打的力量槽动画播放
  541. onPKModePlayPowerAnimation(bGreat) {
  542. if (bGreat) {
  543. this.hookAudioContext.stop();
  544. this.hookAudioContext.src = this.greatTipUrl;
  545. this.hookAudioContext.play();
  546. } else {
  547. this.hookAudioContext.stop();
  548. this.hookAudioContext.src = this.hitUrl;
  549. this.hookAudioContext.play();
  550. }
  551. let _self = this;
  552. _self.myShowCount = _self.myPowerCount;
  553. // if (_self.powerInterval) {
  554. // clearInterval(_self.powerInterval);
  555. // _self.powerInterval = null;
  556. // }
  557. // let bAdd = true;
  558. // let _oldPowerCount = _self.myPowerCount;
  559. // let _currentMaxCount = _oldPowerCount + 10;
  560. // let _duraciotn = 300 / _currentMaxCount;
  561. // _self.powerInterval = setInterval(function() {
  562. // if (_self.myShowCount >= _currentMaxCount) {
  563. // bAdd = false;
  564. // } else if (_self.myShowCount <= _oldPowerCount && !bAdd) {
  565. // _self.myShowCount = _self.myPowerCount;
  566. // clearInterval(_self.powerInterval);
  567. // _self.powerInterval = null;
  568. // return;
  569. // }
  570. // if (bAdd)
  571. // _self.myShowCount++;
  572. // else
  573. // _self.myShowCount--;
  574. // }, _duraciotn); //300ms/40格
  575. },
  576. onBindAcc(globalAcc) {
  577. uni.$on('watchAcceleration', this.updateAcc);
  578. },
  579. onUnbindAcc() {
  580. uni.$off('watchAcceleration', this.updateAcc);
  581. },
  582. onBindOri(globalOri) {
  583. uni.$on('watchOrientation', this.updateOri);
  584. },
  585. onUnbindOri() {
  586. uni.$off('watchOrientation', this.updateOri);
  587. },
  588. updateAcc(acc) {
  589. // console.log("acc:" ,acc.xAxis,acc.yAxis,acc.zAxis);
  590. this.xA = acc.xAxis;
  591. this.yA = acc.yAxis;
  592. this.zA = acc.zAxis;
  593. // return;
  594. if (!this.bUpdate || !this.bPlay) return;
  595. this.EquipmentActionObj.updateAcc({
  596. xA: acc.xAxis,
  597. zA: acc.yAxis,
  598. yA: acc.zAxis,
  599. bLimitRebound: this.bRebound
  600. })
  601. },
  602. //旧的蓝牙模块更新数据
  603. onBLEUpdate(data) {
  604. if (!this.bPlay) return;
  605. if (data.num)
  606. this.BLENum = data.num;
  607. if (data.acx)
  608. this.BLEACX = data.acx;
  609. if (data.acy) {
  610. this.BLEACYL = data.acy;
  611. // let acc = Math.ceil((Math.abs(this.BLEACX) + Math.abs(this.BLEACYL))*0.0005);
  612. let _abs = (Math.abs(this.BLEACX) + Math.abs(this.BLEACYL));
  613. let _ratioAbs = _abs > 65000 ? 1 : _abs / 65000;
  614. // console.log("当前值:",(Math.abs(this.BLEACX) + Math.abs(this.BLEACYL)),acc,this._onReducedBlood(acc),_ratioAbs,Math.ceil(_ratioAbs*30));
  615. let acc = Math.ceil(_ratioAbs * 30);
  616. if (this.mode == "pkMode") {
  617. this._pkHitOnly(acc, acc * 10);
  618. } else {
  619. this._HitOnly(acc, acc * 10);
  620. }
  621. }
  622. },
  623. //hotman 情景下刷新
  624. onBLEHotmanUpdate(data) {
  625. if (!this.bUpdate || !this.bPlay) return;
  626. let {
  627. hit
  628. } = data;
  629. let power = parseInt(hit);
  630. let acc = power * 0.1;
  631. if (this.mode == "pkMode") {
  632. this._pkHitOnly(acc, power);
  633. } else {
  634. this._HitOnly(acc, power);
  635. }
  636. },
  637. //蓝牙更新数据
  638. onBLEHandleUpdate(data) {
  639. if (!this.bUpdate || !this.bPlay) return;
  640. let {
  641. ax,
  642. ay,
  643. az
  644. } = data.acc;
  645. let xA = ax * 9.80665;
  646. let yA = ay * 9.80665;
  647. let zA = az * 9.80665;
  648. this.xA1 = xA;
  649. this.yA1 = yA;
  650. this.zA1 = zA;
  651. // console.log("data:" ,xA,yA,zA);
  652. // updateAcc updateTriaxialAcc
  653. this.EquipmentActionObj.updateTriaxialAcc({
  654. xA: xA,
  655. zA: yA,
  656. yA: zA,
  657. bLimitRebound: true
  658. })
  659. },
  660. updateOri(ori) {
  661. this.xO = ori.beta;
  662. this.zO = ori.alpha;
  663. this.yO = ori.gamma;
  664. },
  665. onControlPlay() {
  666. this._customControlPlay({
  667. bControlRun: this.bControlRun
  668. });
  669. },
  670. onCloseDevices() {
  671. let _self = this;
  672. if (!_self.bPlay) return;
  673. if (_self.sportTimeInterval) {
  674. clearInterval(_self.sportTimeInterval);
  675. _self.sportTimeInterval = null;
  676. }
  677. if (_self.aiHitInterval) {
  678. clearInterval(_self.aiHitInterval);
  679. _self.aiHitInterval = null;
  680. }
  681. _self.bPlay = false;
  682. _self.bControlRun = false;
  683. //如果是新手教程,也直接停掉
  684. _self.bGuide = false;
  685. _self.bGuideEF = false;
  686. if (_self.mode == "pkMode") {
  687. _self.myShowCount = 0;
  688. _self.myPowerCount = 0;
  689. _self.aiShowCount = 0;
  690. _self.aiPowerCount = 0;
  691. }
  692. _self.$emit("closeBoxingControl");
  693. },
  694. onHitPlay(bPlaying) {
  695. if (bPlaying) {
  696. this.bControlRun = bPlaying;
  697. } else {
  698. this.bControlRun = !this.bControlRun;
  699. }
  700. },
  701. _customControlPlay(data) {
  702. let _self = this;
  703. //1.检查是否符合要求,再进行训练
  704. if (data.bControlRun) {
  705. if (_self.sportTimeInterval) {
  706. clearInterval(_self.sportTimeInterval);
  707. _self.sportTimeInterval = null;
  708. }
  709. this.bPlay = false;
  710. // this.$refs.customControlButtons.onPlay();
  711. this.onHitPlay();
  712. //如果是新手教程,也直接停掉
  713. this.bGuide = false;
  714. this.bGuideEF = false;
  715. // if (this.testHitInterval) {
  716. // clearInterval(this.testHitInterval);
  717. // this.testHitInterval = null;
  718. // }
  719. if (this.mode == "pkMode") {
  720. this.myShowCount = 0;
  721. this.myPowerCount = 0;
  722. this.aiShowCount = 0;
  723. this.aiPowerCount = 0;
  724. }
  725. if (this.aiHitInterval) {
  726. clearInterval(this.aiHitInterval);
  727. this.aiHitInterval = null;
  728. }
  729. this.$emit("boxingPostControlPlay", false);
  730. } else {
  731. this.$emit("boxingPostCheck");
  732. }
  733. },
  734. _PKOver(data) {
  735. let _self = this;
  736. //1.检查是否符合要求,再进行训练
  737. if (_self.sportTimeInterval) {
  738. clearInterval(_self.sportTimeInterval);
  739. _self.sportTimeInterval = null;
  740. }
  741. this.bPlay = false;
  742. this.onHitPlay();
  743. //如果是新手教程,也直接停掉
  744. this.bGuide = false;
  745. this.bGuideEF = false;
  746. if (this.aiHitInterval) {
  747. clearInterval(this.aiHitInterval);
  748. this.aiHitInterval = null;
  749. }
  750. },
  751. //新手引导
  752. onGuideBoxingPostPlay() {
  753. console.log("onGuideBoxingPostPlay");
  754. let _self = this;
  755. _self.bPlay = true;
  756. //
  757. _self.bGuide = true;
  758. // 按钮事件
  759. // _self.$refs.customControlButtons.onPlay();
  760. _self.onHitPlay();
  761. },
  762. //训练退出时候,重新信息
  763. onBoxingPostStop() {
  764. },
  765. //调用播放
  766. onBoxingPostPlay(bPlaying) {
  767. let _self = this;
  768. //判断是否是pk模式,如果是pk模式,则用pk模式播放
  769. if (bPlaying) {
  770. _self.bPlay = true;
  771. // 按钮事件
  772. // _self.$refs.customControlButtons.onPlay(true);
  773. _self.onHitPlay(true);
  774. // if (_self.testHitInterval) {
  775. // clearInterval(_self.testHitInterval);
  776. // _self.testHitInterval = null;
  777. // }
  778. // _self.testHitInterval = setInterval(() => {
  779. // this.onTestHit();
  780. // }, 300)
  781. if (_self.sportTimeInterval) {
  782. clearInterval(_self.sportTimeInterval);
  783. _self.sportTimeInterval = null;
  784. }
  785. if (this.mode == 'pkMode') {
  786. if (this.aiHitInterval) {
  787. clearInterval(this.aiHitInterval);
  788. this.aiHitInterval = null;
  789. }
  790. this.aiHitInterval = setInterval(() => {
  791. let _random = Math.floor(Math.random() * 10);
  792. if (_random < 5) {
  793. this.onAiHitEvent();
  794. }
  795. }, 500)
  796. }
  797. //play true 时候,开启时间计算
  798. _self.sportTimeInterval = setInterval(() => {
  799. _self.showSportTime++;
  800. if (_self.showSportTime >= 20 && _self.showSportTime % 20 == 0) {
  801. _self.$emit("updateSportTime", _self.showSportTime);
  802. }
  803. }, 1000)
  804. }
  805. },
  806. //自由模式下的打击
  807. //首页现在尝试用于跑步
  808. _HitOnly(acc, power) {
  809. //动画的高度
  810. let _ratio = acc / 10;
  811. if (_ratio > 1) _ratio = 1;
  812. if (_ratio < 0.5) _ratio = 0.5;
  813. for (let i = 0; i < this.wave_d_time.length; i++) {
  814. this.wave_d_time[i].sHeight = this.wave_d_time[i].height * _ratio;
  815. }
  816. this.onPlayPowerAnimation();
  817. // this.allTempHitCount++;
  818. this.runAllTempCount++;
  819. this.allShowHitCount++;
  820. this.tempHitCount++;
  821. this.runTempCount ++;
  822. this.runAllCount = this.allShowHitCount;
  823. //里面转换千米
  824. //175公分的bai成人一般两步间距du为70厘米,zhi170公分为65厘米,180公分为75厘米。
  825. this.runMileage = this.runAllCount*70 / 100000;
  826. this.currentHitStrength = power;
  827. if (this.maxStrength < power) {
  828. this.maxStrength = power;
  829. }
  830. this.allStrength += power;
  831. this.averageStrength = (this.allStrength / this.allShowHitCount).toFixed(1);
  832. //跑步的卡路里,allTempHiCount
  833. this.calorie = puchConfig.getRunCalorie(this.runAllTempCount);
  834. //击打的加速度添加的卡路里,是额外计算的卡路里
  835. // this.otherCalorie += puchConfig.getAccCalorie(acc);
  836. let _all = this.calorie;// this.calorie.add(this.otherCalorie);
  837. //100 大卡,为一个周期 分50份
  838. //现在显示1格子是2大卡,所以 _all要 除去一半
  839. this.powerCount = parseInt(_all / 2);
  840. if (this.powerCount >= 50) {
  841. console.log("同步卡路里");
  842. console.log("this.calorie:", this.calorie, this.otherCalorie, _all);
  843. this.$emit('updateCalorie', _all);
  844. // this.allTempHitCount = 0;
  845. this.runAllTempCount = 0;
  846. this.powerCount = 0;
  847. // this.otherCalorie = 0;
  848. }
  849. if (!this.wave_d_play) {
  850. if (this.wave_d_timeout) {
  851. clearTimeout(this.wave_d_timeout);
  852. this.wave_d_timeout = null;
  853. }
  854. this.wave_d_play = true;
  855. this.wave_d_timeout = setTimeout(() => {
  856. this.wave_d_play = false;
  857. }, 1000 * this.wave_run_ratio)
  858. }
  859. if (this.hitStrengthOpacityInterval) {
  860. clearTimeout(this.hitStrengthOpacityInterval);
  861. this.hitStrengthOpacityInterval = null;
  862. }
  863. this.hitStrengthOpacity = 1;
  864. this.hitStrengthOpacityInterval = setTimeout(() => {
  865. this.hitStrengthOpacity = 0;
  866. }, 1000)
  867. },
  868. //pk模式下的打击
  869. _pkHitOnly(acc, power) {
  870. this.onPKModePlayPowerAnimation();
  871. this.PKAllTempHitCount++;
  872. this.PKAllShowHitCount++;
  873. this.PKTempHitCount++;
  874. this.currentHitStrength = power;
  875. if (this.PKMaxStrength < power) {
  876. this.PKMaxStrength = power;
  877. }
  878. this.PKAllStrength += power;
  879. this.PKAverageStrength = (this.PKAllStrength / this.PKAllShowHitCount).toFixed(1);
  880. //击打次数一个卡路里,就是基础卡路里
  881. this.PKCalorie = puchConfig.getBoxingCalorie(this.PKAllTempHitCount);
  882. //击打的加速度添加的卡路里,是额外计算的卡路里
  883. // this.PKOtherCalorie += puchConfig.getAccCalorie(acc);
  884. // console.log( puchConfig.getAccCalorie(acc),this.calorie);
  885. let _all = this.PKCalorie; // this.PKCalorie.add(this.PKOtherCalorie);
  886. //10 大卡,为一个周期 分25份
  887. // this.myPowerCount = parseInt(_all * 2.5 * 20);
  888. //中一个小拳头扣一滴血,中一个中拳头去2滴血,中一个大拳头去3滴血。
  889. let _myBloodPoint = this._onReducedBlood(acc);
  890. this.myPowerCount += _myBloodPoint;
  891. //用户打击完成
  892. if (this.myPowerCount >= this.maxShowCount) {
  893. console.log("this.calorie:", this.PKCalorie, this.PKOtherCalorie, _all);
  894. this.$emit('updateCalorie', _all);
  895. this.PKAllTempHitCount = 0;
  896. this.myPowerCount = 0;
  897. this.myShowCount = 0;
  898. this.PKOtherCalorie = 0;
  899. //通知结果
  900. this.$emit('gameOver', {
  901. myWin: true
  902. });
  903. this._PKOver();
  904. this.aiPowerCount = 0;
  905. this.aiShowCount = 0;
  906. }
  907. this.$emit('hitEvent', _myBloodPoint);
  908. },
  909. onAiHitEvent() {
  910. let _acc = Math.ceil(Math.random() * 30);
  911. let _aiBloodPoint = this._onReducedBlood(_acc);
  912. this.aiPowerCount += _aiBloodPoint;
  913. // this.aiPowerCount += 20;
  914. this.$emit('aiHitEvent', _aiBloodPoint);
  915. this.aiShowCount = this.aiPowerCount; // parseInt(this.aiPowerCount / 10);
  916. if (this.aiShowCount >= this.maxShowCount) {
  917. this.$emit('gameOver', {
  918. myWin: false
  919. });
  920. this._PKOver();
  921. this.aiPowerCount = 0;
  922. this.aiShowCount = 0;
  923. this.myPowerCount = 0;
  924. this.myShowCount = 0;
  925. }
  926. },
  927. //根据加速度计算血量
  928. _onReducedBlood(acc) {
  929. let _ratio = acc > 30 ? 1 : acc / 30;
  930. // console.log("_ratio:", _ratio);
  931. if (_ratio > 0.9) {
  932. //大拳头
  933. return 3;
  934. } else if (_ratio > 0.7) {
  935. //中拳头
  936. return 2;
  937. } else {
  938. //小拳头
  939. return 1;
  940. }
  941. },
  942. onChangeMode() {
  943. //todo 切换模式时候,停止当前运行状态
  944. if (this.bControlRun) {
  945. uni.showToast({
  946. title: '先停止,再切换模式',
  947. mask: true,
  948. icon: 'none',
  949. duration: 2000,
  950. })
  951. return;
  952. }
  953. //当前的拳击力设置为0
  954. this.currentHitStrength = 0;
  955. let _name = 'pk模式';
  956. if (this.mode == 'pkMode') {
  957. this.mode = 'calorieMode';
  958. _name = '长跑模式'; //健身模式
  959. } else if (this.mode == 'calorieMode') {
  960. this.mode = 'pkMode';
  961. _name = 'pk模式';
  962. }
  963. let _data = {
  964. mode: this.mode,
  965. name: _name
  966. }
  967. this.$emit('modeEvent', _data);
  968. },
  969. //设置一个切换模式
  970. onSetMode(modeValue) {
  971. console.log("modeValue =====", modeValue);
  972. //todo 切换模式时候,停止当前运行状态
  973. if (this.bControlRun) {
  974. uni.showToast({
  975. title: '先停止,再切换模式',
  976. mask: true,
  977. icon: 'none',
  978. duration: 2000,
  979. })
  980. return;
  981. }
  982. //当前的拳击力设置为0
  983. this.currentHitStrength = 0;
  984. let _name = 'pk模式';
  985. if (modeValue == 'calorieMode') {
  986. this.mode = 'calorieMode';
  987. _name = '长跑模式';
  988. } else if (modeValue == 'pkMode') {
  989. this.mode = 'pkMode';
  990. _name = 'pk模式';
  991. }
  992. let _data = {
  993. mode: this.mode,
  994. name: _name
  995. }
  996. this.$emit('modeEvent', _data);
  997. }
  998. }
  999. }
  1000. </script>
  1001. <style>
  1002. /* Loader Bar */
  1003. .hit-vertical-container {
  1004. position: absolute;
  1005. top: -50rpx;
  1006. left: 0;
  1007. right: 0;
  1008. display: flex;
  1009. justify-content: space-between;
  1010. /* border: 1rpx solid #000000; */
  1011. pointer-events: none;
  1012. }
  1013. .hit-vertical-bar {
  1014. display: flex;
  1015. flex-direction: column-reverse;
  1016. }
  1017. .hit-vertical-child {
  1018. /* position: relative; */
  1019. width: 70rpx;
  1020. height: 20rpx;
  1021. margin: 14rpx 24rpx 0 24rpx;
  1022. display: flex;
  1023. /* align-content: center; */
  1024. justify-content: space-between;
  1025. }
  1026. .hit-vertical-text {
  1027. color: #FFFFFF;
  1028. font-size: 8px;
  1029. }
  1030. .hit-text-hidden {
  1031. visibility: hidden;
  1032. }
  1033. .hit-vertical-active {
  1034. background-color: #FFFFFF;
  1035. width: 30rpx;
  1036. height: 100%;
  1037. }
  1038. .hit-vertical-inactive {
  1039. width: 30rpx;
  1040. height: 100%;
  1041. background: rgba(144, 141, 246, 1);
  1042. }
  1043. .boxing-item-bg {
  1044. border-radius: 15rpx;
  1045. background-color: rgba(255, 255, 255, 0.1);
  1046. display: flex;
  1047. flex-direction: column;
  1048. align-items: center;
  1049. /* width: 160rpx; */
  1050. }
  1051. .hit-count {
  1052. width: 160rpx;
  1053. height: 60rpx;
  1054. font-size: 22px;
  1055. font-weight: bold;
  1056. color: #FFFFFF;
  1057. line-height: 60rpx;
  1058. }
  1059. .hit-current-count-power {
  1060. /* margin: 0 5rpx; */
  1061. font-size: 19px;
  1062. line-height: 60rpx;
  1063. /* font-weight: bold; */
  1064. color: #FFFFFF;
  1065. }
  1066. .hit-current-count {
  1067. /* width: 160rpx; */
  1068. /* height: 100rpx; */
  1069. margin: 0 30rpx;
  1070. font-size: 22px;
  1071. line-height: 60rpx;
  1072. font-weight: bold;
  1073. color: #FFFFFF;
  1074. /* line-height: 22px; */
  1075. }
  1076. #loadbar {
  1077. list-style: none;
  1078. width: 400rpx;
  1079. margin: 0 20rpx;
  1080. }
  1081. #loadbar-child {
  1082. float: left;
  1083. position: relative;
  1084. width: 60rpx;
  1085. height: 10rpx;
  1086. margin-left: 1px;
  1087. background: rgba(255, 255, 255, 0.5);
  1088. }
  1089. #loadbar-child:first-child {
  1090. margin-left: 0;
  1091. }
  1092. .bar {
  1093. background-color: #FFFFFF;
  1094. width: 60rpx;
  1095. height: 10rpx;
  1096. }
  1097. .show-png {
  1098. width: 78rpx;
  1099. height: 78rpx;
  1100. margin: 0 10px;
  1101. }
  1102. .boxing-hit-png {
  1103. margin-top: 40rpx;
  1104. width: 50rpx;
  1105. height: 50rpx;
  1106. transition: transform 0.15s;
  1107. }
  1108. .boxing-change {
  1109. transform: scale(1.58);
  1110. }
  1111. .hitBoxingTimer {
  1112. position: absolute;
  1113. top: -60rpx;
  1114. left: 0;
  1115. right: 0;
  1116. }
  1117. .wave-item {
  1118. width: 8rpx;
  1119. height: 20rpx;
  1120. margin: 5rpx;
  1121. background-color: #FFFFFF;
  1122. border-radius: 10rpx;
  1123. transition: height 0.5s;
  1124. }
  1125. .wave-d-item {
  1126. width: 8rpx;
  1127. height: 20rpx;
  1128. margin: 5rpx;
  1129. background-color: #FFFFFF;
  1130. border-radius: 10rpx;
  1131. transition: height 0.5s;
  1132. }
  1133. .hit-wave {
  1134. animation: hit-d-scale calc(var(--time) * 0.5s) linear calc(var(--delay) * 1s) 1 alternate;
  1135. }
  1136. .wave-play {
  1137. animation-play-state: running;
  1138. }
  1139. .wave-pause {
  1140. animation-play-state: paused;
  1141. }
  1142. @keyframes hit-scale {
  1143. 0% {
  1144. transform: scale(1, 1);
  1145. /* background-color: #999; */
  1146. }
  1147. 100% {
  1148. transform: scale(1, 3);
  1149. /* background-color: #333; */
  1150. }
  1151. }
  1152. @keyframes hit-d-scale {
  1153. 0% {
  1154. transform: scale(1, 1);
  1155. }
  1156. 25% {
  1157. transform: scale(1, 3);
  1158. }
  1159. 50% {
  1160. transform: scale(1, 1);
  1161. }
  1162. 75% {
  1163. transform: scale(1, 3);
  1164. }
  1165. 100% {
  1166. transform: scale(1, 1);
  1167. }
  1168. }
  1169. .hit-button-rotate {
  1170. animation: hit-rotate 2s steps(16, end) infinite;
  1171. }
  1172. .hit-button-bg-play {
  1173. animation-play-state: running;
  1174. }
  1175. .hit-button-bg-paused {
  1176. animation-play-state: paused;
  1177. }
  1178. @keyframes hit-rotate {
  1179. from {
  1180. transform: rotate(0deg);
  1181. }
  1182. to {
  1183. transform: rotate(360deg);
  1184. }
  1185. }
  1186. .big {
  1187. transform: scale(1.2);
  1188. }
  1189. /* .progress-bar-container{
  1190. } */
  1191. </style>