|
|
@ -4,11 +4,14 @@ function vw(v) { |
|
|
|
return (v * w) / 100; |
|
|
|
} |
|
|
|
|
|
|
|
window.onresize = () => { |
|
|
|
let cubes = document.getElementsByClassName('cube__face') |
|
|
|
for (var i = 0; i < 10; i++) { |
|
|
|
document.getElementsByClassName('cube__face')[i].style.transform = 'rotateX('+i*36+'deg) translateZ(calc(3.4vw *'Math.tan(18* Math.PI / 180)')'; |
|
|
|
/*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) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let bac = 1000 |
|
|
|