Updated message, patterns, vibrate method in model.

This commit is contained in:
Eugene Serb 2022-08-05 13:03:37 +03:00
parent 8408684473
commit 96d192cbfe
10 changed files with 39 additions and 38 deletions

View File

@ -5,7 +5,7 @@
"icon": "😌",
"pattern": [
{
"startDelay": 100,
"startDelay": 200,
"duration": 100,
"weakMagnitude": 1.0,
"strongMagnitude": 0.0
@ -18,7 +18,7 @@
"icon": "😉",
"pattern": [
{
"startDelay": 100,
"startDelay": 200,
"duration": 100,
"weakMagnitude": 0.0,
"strongMagnitude": 1.0
@ -31,13 +31,13 @@
"icon": "🤨",
"pattern": [
{
"startDelay": 100,
"startDelay": 200,
"duration": 100,
"weakMagnitude": 1.0,
"strongMagnitude": 0.0
},
{
"startDelay": 100,
"startDelay": 200,
"duration": 100,
"weakMagnitude": 0.0,
"strongMagnitude": 1.0
@ -50,7 +50,7 @@
"icon": "🙃",
"pattern": [
{
"startDelay": 100,
"startDelay": 200,
"duration": 100,
"weakMagnitude": 1.0,
"strongMagnitude": 1.0
@ -63,7 +63,7 @@
"icon": "🙂",
"pattern": [
{
"startDelay": 100,
"startDelay": 200,
"duration": 250,
"weakMagnitude": 1.0,
"strongMagnitude": 0.0
@ -76,7 +76,7 @@
"icon": "😇",
"pattern": [
{
"startDelay": 100,
"startDelay": 200,
"duration": 250,
"weakMagnitude": 0.0,
"strongMagnitude": 1.0
@ -89,13 +89,13 @@
"icon": "🤤",
"pattern": [
{
"startDelay": 100,
"startDelay": 200,
"duration": 250,
"weakMagnitude": 1.0,
"strongMagnitude": 0.0
},
{
"startDelay": 100,
"startDelay": 200,
"duration": 250,
"weakMagnitude": 0.0,
"strongMagnitude": 1.0
@ -108,7 +108,7 @@
"icon": "😊",
"pattern": [
{
"startDelay": 100,
"startDelay": 200,
"duration": 250,
"weakMagnitude": 1.0,
"strongMagnitude": 1.0
@ -121,7 +121,7 @@
"icon": "😋",
"pattern": [
{
"startDelay": 100,
"startDelay": 200,
"duration": 500,
"weakMagnitude": 1.0,
"strongMagnitude": 0.0
@ -147,13 +147,13 @@
"icon": "😝",
"pattern": [
{
"startDelay": 100,
"startDelay": 200,
"duration": 500,
"weakMagnitude": 1.0,
"strongMagnitude": 0.0
},
{
"startDelay": 100,
"startDelay": 200,
"duration": 500,
"weakMagnitude": 0.0,
"strongMagnitude": 1.0
@ -166,7 +166,7 @@
"icon": "🤪",
"pattern": [
{
"startDelay": 100,
"startDelay": 200,
"duration": 500,
"weakMagnitude": 1.0,
"strongMagnitude": 1.0

View File

@ -15,4 +15,4 @@
webvisor: true
});</script><style>[v-cloak] {
display: none;
}</style><script defer="defer" src="/js/chunk-vendors.5d0a04f4.js"></script><script defer="defer" src="/js/app.c9621bc7.js"></script><link href="/css/app.a72a8a93.css" rel="stylesheet"></head><body><header class="header"><div class="header-wrapper container"><div class="logo-wrapper"><span class="logo-wrapper__logo" translate="no">Wavelovers</span></div><nav class="menu-wrapper"><ul class="navigation"><li class="navigation__item"><a href="/" target="_self" class="navigation__link">Home</a></li><li class="navigation__item"><a href="/faq.html" target="_self" class="navigation__link">FAQ</a></li><li class="navigation__item"><a href="/about.html" target="_self" class="navigation__link">About</a></li><li class="navigation__item"><a href="/donate.html" target="_self" class="navigation__link">Donate</a></li></ul></nav></div></header><main class="page container"><h1 class="visually-hidden">Wavelovers</h1><div id="app" v-cloak></div></main><footer class="footer"><div class="footer-wrapper container"><div class="annotation"><span class="annotation__text">© 2022 Wavelovers. Content licensed under </span><a href="https://wavelovers.ru/LICENSE.md" target="_blank">GNU General Public License v3.0</a><br><span class="annotation__text">This site is open source. </span><a href="https://github.com/eugene-serb/wavelovers/" target="_blank">Improve this page.</a></div><div class="annotation created-by"><span class="annotation__text">Created by</span><a href="https://eugene-serb.github.io/" target="_blank" translate="no">Eugene Serb</a></div></div></footer><noscript>You need to enable JavaScript to run this app.</noscript><noscript><div><img src="https://mc.yandex.ru/watch/89252711" style="position:absolute; left:-9999px;" alt=""/></div></noscript></body></html>
}</style><script defer="defer" src="/js/chunk-vendors.5d0a04f4.js"></script><script defer="defer" src="/js/app.b405c25e.js"></script><link href="/css/app.a72a8a93.css" rel="stylesheet"></head><body><header class="header"><div class="header-wrapper container"><div class="logo-wrapper"><span class="logo-wrapper__logo" translate="no">Wavelovers</span></div><nav class="menu-wrapper"><ul class="navigation"><li class="navigation__item"><a href="/" target="_self" class="navigation__link">Home</a></li><li class="navigation__item"><a href="/faq.html" target="_self" class="navigation__link">FAQ</a></li><li class="navigation__item"><a href="/about.html" target="_self" class="navigation__link">About</a></li><li class="navigation__item"><a href="/donate.html" target="_self" class="navigation__link">Donate</a></li></ul></nav></div></header><main class="page container"><h1 class="visually-hidden">Wavelovers</h1><div id="app" v-cloak></div></main><footer class="footer"><div class="footer-wrapper container"><div class="annotation"><span class="annotation__text">© 2022 Wavelovers. Content licensed under </span><a href="https://wavelovers.ru/LICENSE.md" target="_blank">GNU General Public License v3.0</a><br><span class="annotation__text">This site is open source. </span><a href="https://github.com/eugene-serb/wavelovers/" target="_blank">Improve this page.</a></div><div class="annotation created-by"><span class="annotation__text">Created by</span><a href="https://eugene-serb.github.io/" target="_blank" translate="no">Eugene Serb</a></div></div></footer><noscript>You need to enable JavaScript to run this app.</noscript><noscript><div><img src="https://mc.yandex.ru/watch/89252711" style="position:absolute; left:-9999px;" alt=""/></div></noscript></body></html>

2
docs/js/app.b405c25e.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@
"icon": "😌",
"pattern": [
{
"startDelay": 100,
"startDelay": 200,
"duration": 100,
"weakMagnitude": 1.0,
"strongMagnitude": 0.0
@ -18,7 +18,7 @@
"icon": "😉",
"pattern": [
{
"startDelay": 100,
"startDelay": 200,
"duration": 100,
"weakMagnitude": 0.0,
"strongMagnitude": 1.0
@ -31,13 +31,13 @@
"icon": "🤨",
"pattern": [
{
"startDelay": 100,
"startDelay": 200,
"duration": 100,
"weakMagnitude": 1.0,
"strongMagnitude": 0.0
},
{
"startDelay": 100,
"startDelay": 200,
"duration": 100,
"weakMagnitude": 0.0,
"strongMagnitude": 1.0
@ -50,7 +50,7 @@
"icon": "🙃",
"pattern": [
{
"startDelay": 100,
"startDelay": 200,
"duration": 100,
"weakMagnitude": 1.0,
"strongMagnitude": 1.0
@ -63,7 +63,7 @@
"icon": "🙂",
"pattern": [
{
"startDelay": 100,
"startDelay": 200,
"duration": 250,
"weakMagnitude": 1.0,
"strongMagnitude": 0.0
@ -76,7 +76,7 @@
"icon": "😇",
"pattern": [
{
"startDelay": 100,
"startDelay": 200,
"duration": 250,
"weakMagnitude": 0.0,
"strongMagnitude": 1.0
@ -89,13 +89,13 @@
"icon": "🤤",
"pattern": [
{
"startDelay": 100,
"startDelay": 200,
"duration": 250,
"weakMagnitude": 1.0,
"strongMagnitude": 0.0
},
{
"startDelay": 100,
"startDelay": 200,
"duration": 250,
"weakMagnitude": 0.0,
"strongMagnitude": 1.0
@ -108,7 +108,7 @@
"icon": "😊",
"pattern": [
{
"startDelay": 100,
"startDelay": 200,
"duration": 250,
"weakMagnitude": 1.0,
"strongMagnitude": 1.0
@ -121,7 +121,7 @@
"icon": "😋",
"pattern": [
{
"startDelay": 100,
"startDelay": 200,
"duration": 500,
"weakMagnitude": 1.0,
"strongMagnitude": 0.0
@ -147,13 +147,13 @@
"icon": "😝",
"pattern": [
{
"startDelay": 100,
"startDelay": 200,
"duration": 500,
"weakMagnitude": 1.0,
"strongMagnitude": 0.0
},
{
"startDelay": 100,
"startDelay": 200,
"duration": 500,
"weakMagnitude": 0.0,
"strongMagnitude": 1.0
@ -166,7 +166,7 @@
"icon": "🤪",
"pattern": [
{
"startDelay": 100,
"startDelay": 200,
"duration": 500,
"weakMagnitude": 1.0,
"strongMagnitude": 1.0

View File

@ -1,4 +1,4 @@
<template>
<template>
<div class="wavelovers">
<PatternList v-if="patterns.length > 0"
:patterns="patterns"
@ -8,7 +8,7 @@
<MessageItem v-else>Loading...</MessageItem>
<GamepadList v-if="gamepads.length > 0"
:gamepads="gamepads" />
<MessageItem v-else>Press any gamepad's button or connect new gamepad.</MessageItem>
<MessageItem v-else>Press any gamepad button or connect a new gamepad to vibrate.</MessageItem>
</div>
</template>

View File

@ -1,4 +1,5 @@
import { createApp } from 'vue'
import App from './App.vue'
import { createApp } from 'vue';
import App from './App.vue';
createApp(App).mount('#app');
createApp(App).mount('#app')

View File

@ -35,7 +35,7 @@ class Vibrator implements IVibrator {
for (let i = 0; i < this.pattern.length; i++) {
if (this.isVibrating === true) {
this.unit.vibrationActuator.playEffect('dual-rumble', this.pattern[i]);
await this.sleep(this.pattern[i].startDelay + this.pattern[i].duration + 100);
await this.sleep(this.pattern[i].startDelay + this.pattern[i].duration);
} else {
return;
}