diff --git a/app.js b/app.js index 29d65c4..263f6b2 100644 --- a/app.js +++ b/app.js @@ -43,11 +43,11 @@ function tirette(){ } function tirage(){ - let numbers = [nbAlea()+1, nbAlea()+1, nbAlea()+1] - console.log(numbers) - rotate(document.getElementsByClassName("cube")[0], Math.floor(Math.random() * 15)*360+(numbers[0]-1)*36) - rotate(document.getElementsByClassName("cube")[1], Math.floor(Math.random() * 15)*360+(numbers[1]-1)*36) - rotate(document.getElementsByClassName("cube")[2], Math.floor(Math.random() * 15)*360+(numbers[2]-1)*36) + let numbers = [nbAlea(), nbAlea(), nbAlea()] + console.log(numbers); + rotate(document.getElementsByClassName("cube")[0], (Math.floor(Math.random()*15)*360) - (numbers[0]*36)); + rotate(document.getElementsByClassName("cube")[1], (Math.floor(Math.random()*15)*360) - (numbers[1]*36)); + rotate(document.getElementsByClassName("cube")[2], (Math.floor(Math.random()*15)*360) - (numbers[2]*36)); return numbers } @@ -106,4 +106,4 @@ for (let i = 0; i < 10; i++) { document.getElementsByClassName('cube__face--'+i)[j].style.transform = 'rotateX('+(i*36)+'deg) translateZ(calc(1.6vw /'+Math.tan(18* Math.PI / 180)+')'; } -} \ No newline at end of file +} diff --git a/machine.png b/machine.png index 514b800..4f4d091 100644 Binary files a/machine.png and b/machine.png differ diff --git a/master.css b/master.css index 8cc0ff2..237d524 100644 --- a/master.css +++ b/master.css @@ -1,5 +1,5 @@ body{ - background-color: #001f37; + background-color: #03183a; margin: 0; }