|
@ -19,18 +19,6 @@ function nbAlea(){ |
|
|
|
|
|
|
|
|
// Anime les rouleaux
|
|
|
// Anime les rouleaux
|
|
|
function rotate(rouleau, angle){ |
|
|
function rotate(rouleau, angle){ |
|
|
<<<<<<< HEAD |
|
|
|
|
|
let i = 0; |
|
|
|
|
|
let interval = setInterval(() => { |
|
|
|
|
|
if (i >= angle){ |
|
|
|
|
|
clearInterval(interval); |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
i += 9; |
|
|
|
|
|
rouleau.style.transform = 'rotate3d(1,0,0,'+i+'deg)'; |
|
|
|
|
|
} |
|
|
|
|
|
}, 5); |
|
|
|
|
|
======= |
|
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
return new Promise((resolve, reject) => { |
|
|
let i = 0; |
|
|
let i = 0; |
|
|
let interval = setInterval(() => { |
|
|
let interval = setInterval(() => { |
|
@ -45,7 +33,6 @@ function rotate(rouleau, angle){ |
|
|
} |
|
|
} |
|
|
}, 5); |
|
|
}, 5); |
|
|
}) |
|
|
}) |
|
|
>>>>>>> ed8a1808293ee88f1efde28836b84c43b34781eb |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -69,18 +56,11 @@ function tirette(){ |
|
|
|
|
|
|
|
|
async function tirage(){ |
|
|
async function tirage(){ |
|
|
let numbers = [nbAlea(), nbAlea(), nbAlea()] |
|
|
let numbers = [nbAlea(), nbAlea(), nbAlea()] |
|
|
<<<<<<< HEAD |
|
|
|
|
|
console.log(numbers); |
|
|
|
|
|
rotate(document.getElementsByClassName("cube")[0], Math.floor(Math.random()*(15-1)+1)*360 - numbers[0]*36); |
|
|
|
|
|
rotate(document.getElementsByClassName("cube")[1], Math.floor(Math.random()*(15-1)+1)*360 - numbers[1]*36); |
|
|
|
|
|
rotate(document.getElementsByClassName("cube")[2], Math.floor(Math.random()*(15-1)+1)*360 - numbers[2]*36); |
|
|
|
|
|
======= |
|
|
|
|
|
await Promise.all([ |
|
|
await Promise.all([ |
|
|
rotate(document.getElementsByClassName("cube")[0], (Math.floor(Math.random()*15)*360) - (numbers[0]*36)), |
|
|
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")[1], (Math.floor(Math.random()*15)*360) - (numbers[1]*36)), |
|
|
rotate(document.getElementsByClassName("cube")[2], (Math.floor(Math.random()*15)*360) - (numbers[2]*36)) |
|
|
rotate(document.getElementsByClassName("cube")[2], (Math.floor(Math.random()*15)*360) - (numbers[2]*36)) |
|
|
]) |
|
|
]) |
|
|
>>>>>>> ed8a1808293ee88f1efde28836b84c43b34781eb |
|
|
|
|
|
return numbers |
|
|
return numbers |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|