|
|
@ -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)+')'; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|