Browse Source

yahou

master
alexandre.aboulin 3 years ago
parent
commit
a6349dddc8
  1. 11
      app.js
  2. 2
      master.css

11
app.js

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

2
master.css

@ -19,7 +19,7 @@
position: relative; position: relative;
transform-style: preserve-3d; transform-style: preserve-3d;
/* transform: translateZ(-100px); */ /* transform: translateZ(-100px); */
transition: transform 1s; /*transition: transform 1s;*/
} }
.cube__face { .cube__face {

Loading…
Cancel
Save