41 lines
744 B
Vue
41 lines
744 B
Vue
|
<!--
|
||
|
<template>
|
||
|
<div class="beat" v-for="i in divisioni" :key="i">
|
||
|
<div class="subdivision" :style="background-color: colore">{{randomColore()}}</div>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
name: 'beat',
|
||
|
data() {
|
||
|
colore: "#333333",
|
||
|
tono: "332", // mHz
|
||
|
durata: "1", // s
|
||
|
divisioni: "2e" + random(1,8) / 2
|
||
|
},
|
||
|
components: {
|
||
|
},
|
||
|
methods: {
|
||
|
randomColore: function(){
|
||
|
var generatedColor = "red";
|
||
|
this.colore = generatedColor;
|
||
|
}
|
||
|
},
|
||
|
}}
|
||
|
</script>
|
||
|
|
||
|
<style>
|
||
|
.beat{
|
||
|
flex: 1 1 auto;
|
||
|
width: 100%;
|
||
|
height: 100%;
|
||
|
border:1pt solid #333333;
|
||
|
}
|
||
|
|
||
|
.active{
|
||
|
background-color:black;
|
||
|
}
|
||
|
</style>
|
||
|
-->
|