|
@ -1,10 +1,4 @@ |
|
|
|
|
|
for (let i = 0; i < 10; i++) { |
|
|
function vw(v) { |
|
|
|
|
|
var w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0); |
|
|
|
|
|
return (v * w) / 100; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < 0; i++) { |
|
|
|
|
|
console.log(i); |
|
|
console.log(i); |
|
|
for (var j = 0; j < 3; j++) { |
|
|
for (var j = 0; j < 3; j++) { |
|
|
console.log(j); |
|
|
console.log(j); |
|
@ -13,9 +7,6 @@ for (let i = 0; i < 0; i++) { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let bac = 1000 |
|
|
let bac = 1000 |
|
|
let joueur = 100 |
|
|
let joueur = 100 |
|
|
let mise |
|
|
let mise |
|
@ -89,14 +80,6 @@ function rotate(rouleau, angle){ |
|
|
rouleau.style.transform = 'rotate3d(1,0,0,'+i+'deg)'; |
|
|
rouleau.style.transform = 'rotate3d(1,0,0,'+i+'deg)'; |
|
|
} |
|
|
} |
|
|
}, 5); |
|
|
}, 5); |
|
|
// let i = 1;
|
|
|
|
|
|
// let interval = setInterval(() => {
|
|
|
|
|
|
// if(i >= angle) {
|
|
|
|
|
|
// clearInterval(interval); rouleau.style.transform = "rotate3d(1, 0, 0, "+angle+"deg)"
|
|
|
|
|
|
// }
|
|
|
|
|
|
// rouleau.style.transform = "rotate3d(1, 0, 0, "+i+"deg)"
|
|
|
|
|
|
// i += 5
|
|
|
|
|
|
// }, 1)
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function tirage(){ |
|
|
function tirage(){ |
|
@ -105,17 +88,3 @@ function tirage(){ |
|
|
rotate(document.getElementsByClassName("cube")[2], Math.floor(Math.random() * 15)*360+nbAlea()) |
|
|
rotate(document.getElementsByClassName("cube")[2], Math.floor(Math.random() * 15)*360+nbAlea()) |
|
|
} |
|
|
} |
|
|
tirage() |
|
|
tirage() |
|
|
|
|
|
|
|
|
function vw(v) { |
|
|
|
|
|
var w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0); |
|
|
|
|
|
return (v * w) / 100; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
window.onresize = () => { |
|
|
|
|
|
let cubes = document.getElementsByClassName('cube__face') |
|
|
|
|
|
for (var i = 0; i < 10; i++) { |
|
|
|
|
|
/*window.getComputedStyle(cubes[i])*/cubes[i].style.transform = |
|
|
|
|
|
'rotateX('+i*36+'deg) translateZ('+vw(3.4)*Math.tan(18 * Math.PI / 180)+')'; |
|
|
|
|
|
console.log(window.getComputedStyle(cubes[i]).transform) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|