var FormeSelect = ["rond"]; var ListeCouleur = ["colorbase","colorcarre","colorone","colortwo","colorthree"] var ListeClassForme = ["rond","carre","triangle","croix","losange","penta","hexa","hocto"] //3 modes : 0 = couleurs // 1 = formes // 2 = personnaliser les cartes var mode = 0; var valRange; function settingOpen(){ var elements = document.getElementsByClassName("pcr-button"); for (var i = 0; i < elements.length; i++) { elements[i].classList.add(ListeClassForme[i]); } } function ableCache(formName){ cacheName = "cache"+formName; const pos = FormeSelect.indexOf(formName); if (pos > -1) { FormeSelect.splice(pos, 1); } document.getElementById(cacheName).style.display = "block"; } function disableCache(formName){ if (FormeSelect.length < 4) { cacheName = "cache"+formName; document.getElementById(cacheName).style.display = "none"; FormeSelect.push(formName); console.log(FormeSelect.length); } } function changeContour(value){ var newvalue = value * 0.055 + 1; document.documentElement.style.setProperty('--z', newvalue+'vw'); var valcard = value * 0.013 + 1; document.documentElement.style.setProperty('--n', valcard+'vw'); //document.documentElement.style.setProperty('--n', newvalue+'vw'); //document.getElementById("SettingName").innerHTML = newvalue; } function getVarColor(color){ var getvar = color; getvar = getvar.substring(6,getvar.length-1); return getvar; } function varColorToHex(color){ hex = getComputedStyle(document.documentElement).getPropertyValue(color); hex = hex.substring(1,hex.length); return hex; }