someone-in-the-world's picture
Reduce default GPU duration for High Detail mode from 60s to 30s
106074d
Raw
History Blame Contribute Delete
997 Bytes
() => {
window.__selectedMode = 'fast';
var MODE_GPU_DURATION = { fast: 15, high_detail: 30 };
var MODE_STEPS = { fast: 3, high_detail: 4 };
function applyModeSliderDefault(sliderId, valueMap, mode) {
var val = valueMap[mode];
if (val === undefined) return;
var sl = document.getElementById(sliderId);
var vl = document.getElementById(sliderId + '-val');
if (sl) { sl.value = val; sl.dispatchEvent(new Event('input', {bubbles: true})); }
if (vl) vl.textContent = val;
}
window.__setMode = function(m) {
window.__selectedMode = m;
var fast = document.getElementById('mode-btn-fast');
var hd = document.getElementById('mode-btn-hd');
if (fast) fast.classList.toggle('mode-btn-active', m === 'fast');
if (hd) hd.classList.toggle('mode-btn-active', m === 'high_detail');
applyModeSliderDefault('custom-gpu-duration', MODE_GPU_DURATION, m);
applyModeSliderDefault('custom-steps', MODE_STEPS, m);
};
window.__setMode(window.__selectedMode);
}