Spaces:
Running
Running
v53: index + app-extra version update
Browse files- app-extra.js +2 -34
app-extra.js
CHANGED
|
@@ -1,34 +1,2 @@
|
|
| 1 |
-
// app-extra.js
|
| 2 |
-
(function(){
|
| 3 |
-
function waitReady(cb){const ck=()=>{if(window.__appReady)cb();else setTimeout(ck,200)};ck()}
|
| 4 |
-
waitReady(()=>{
|
| 5 |
-
const domeInput=document.getElementById('dome-input');
|
| 6 |
-
if(domeInput){domeInput.addEventListener('change',async e=>{
|
| 7 |
-
if(!e.target.files.length)return;
|
| 8 |
-
window.__showLoading(true,"ドーム展開中...");
|
| 9 |
-
await window.__processFiles(e.target.files,'dome');
|
| 10 |
-
let pmx=window.__findFileInMap('.pmx','dome')||window.__findFileInMap('.pmd','dome');
|
| 11 |
-
if(pmx){document.getElementById('dome-label').classList.add('ready');window.__loadPmx(pmx,'dome')}
|
| 12 |
-
else{window.__showLoading(false);window.__updateStatus("ドームPMXがありません♡")}
|
| 13 |
-
})}
|
| 14 |
-
['x','y','z'].forEach(axis=>{
|
| 15 |
-
const sl=document.getElementById('main-light-'+axis);
|
| 16 |
-
const vl=document.getElementById('main-light-'+axis+'-val');
|
| 17 |
-
if(!sl||!vl)return;
|
| 18 |
-
sl.addEventListener('input',()=>{const v=parseFloat(sl.value);vl.textContent=v;if(window.__mainLight)window.__mainLight.position[axis]=v})
|
| 19 |
-
});
|
| 20 |
-
['x','y','z'].forEach(axis=>{
|
| 21 |
-
const sl=document.getElementById('sub-light-'+axis);
|
| 22 |
-
const vl=document.getElementById('sub-light-'+axis+'-val');
|
| 23 |
-
if(!sl||!vl)return;
|
| 24 |
-
sl.addEventListener('input',()=>{const v=parseFloat(sl.value);vl.textContent=v;if(window.__subLight)window.__subLight.position[axis]=v})
|
| 25 |
-
});
|
| 26 |
-
const mc=document.getElementById('main-light-color');
|
| 27 |
-
if(mc)mc.addEventListener('input',()=>{if(window.__mainLight)window.__mainLight.color.set(mc.value)});
|
| 28 |
-
const sc=document.getElementById('sub-light-color');
|
| 29 |
-
if(sc)sc.addEventListener('input',()=>{if(window.__subLight)window.__subLight.color.set(sc.value)});
|
| 30 |
-
const ac=document.getElementById('amb-light-color');
|
| 31 |
-
if(ac)ac.addEventListener('input',()=>{if(window.__ambLight)window.__ambLight.color.set(ac.value)});
|
| 32 |
-
window.__dbg('[v52]初期化完了','info');
|
| 33 |
-
});
|
| 34 |
-
})();
|
|
|
|
| 1 |
+
// app-extra.js v53
|
| 2 |
+
(function(){function waitReady(cb){const ck=()=>{if(window.__appReady)cb();else setTimeout(ck,200)};ck()}waitReady(()=>{const domeInput=document.getElementById('dome-input');if(domeInput){domeInput.addEventListener('change',async e=>{if(!e.target.files.length)return;window.__showLoading(true,"ドーム展開中...");await window.__processFiles(e.target.files,'dome');let pmx=window.__findFileInMap('.pmx','dome')||window.__findFileInMap('.pmd','dome');if(pmx){document.getElementById('dome-label').classList.add('ready');window.__loadPmx(pmx,'dome')}else{window.__showLoading(false);window.__updateStatus("ドームPMXがありません♡")}})}['x','y','z'].forEach(axis=>{const sl=document.getElementById('main-light-'+axis);const vl=document.getElementById('main-light-'+axis+'-val');if(!sl||!vl)return;sl.addEventListener('input',()=>{const v=parseFloat(sl.value);vl.textContent=v;if(window.__mainLight)window.__mainLight.position[axis]=v})});['x','y','z'].forEach(axis=>{const sl=document.getElementById('sub-light-'+axis);const vl=document.getElementById('sub-light-'+axis+'-val');if(!sl||!vl)return;sl.addEventListener('input',()=>{const v=parseFloat(sl.value);vl.textContent=v;if(window.__subLight)window.__subLight.position[axis]=v})});const mc=document.getElementById('main-light-color');if(mc)mc.addEventListener('input',()=>{if(window.__mainLight)window.__mainLight.color.set(mc.value)});const sc=document.getElementById('sub-light-color');if(sc)sc.addEventListener('input',()=>{if(window.__subLight)window.__subLight.color.set(sc.value)});const ac=document.getElementById('amb-light-color');if(ac)ac.addEventListener('input',()=>{if(window.__ambLight)window.__ambLight.color.set(ac.value)});window.__dbg('[v53]初期化完了','info')})})();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|