mg696 commited on
Commit
04ea5e6
·
verified ·
1 Parent(s): e22ef3d

Delete app-extra.js

Browse files
Files changed (1) hide show
  1. app-extra.js +0 -67
app-extra.js DELETED
@@ -1,67 +0,0 @@
1
- // app-extra.js - v44: ライト編集UI + ステージ/ドーム分離ロジック
2
- // 既存のapp.jsのグローバル変数にアクセスするため、index.htmlでapp.jsの後に読み込む
3
-
4
- // ★待機: app.jsのinit完了後に実行
5
- function waitForInit(cb){const check=()=>{if(window.__appReady)cb();else setTimeout(check,100)};check()}
6
-
7
- waitForInit(()=>{
8
- // ===== 7: ステージ/ドーム分離 =====
9
- // 既存のstage-inputはステージ用に残し、新たにdome-inputを追加
10
- const domeInput=document.getElementById('dome-input');
11
- if(domeInput){
12
- domeInput.addEventListener('change',async e=>{
13
- if(!e.target.files.length)return;
14
- window.__showLoading(true,"ドーム展開中...");
15
- await window.__processFiles(e.target.files,'stage');
16
- let pmx=window.__findFileInMap('.pmx','stage')||window.__findFileInMap('.pmd','stage');
17
- if(pmx){document.getElementById('dome-label').classList.add('ready');window.__loadPmx(pmx,'stage')}
18
- else{window.__showLoading(false);window.__updateStatus("ドームPMXがありません♡")}
19
- });
20
- }
21
-
22
- // ===== 1: ライト編集UI =====
23
- const lightEditPanel=document.getElementById('light-edit-panel');
24
- if(lightEditPanel){
25
- // メインライト位置
26
- ['x','y','z'].forEach(axis=>{
27
- const sl=document.getElementById(`main-light-${axis}`);
28
- const vl=document.getElementById(`main-light-${axis}-val`);
29
- if(!sl||!vl)return;
30
- sl.addEventListener('input',()=>{
31
- const v=parseFloat(sl.value);vl.textContent=v;
32
- if(window.__mainLight)window.__mainLight.position[axis]=v;
33
- });
34
- });
35
- // メインライト色
36
- const colorInput=document.getElementById('main-light-color');
37
- if(colorInput){
38
- colorInput.addEventListener('input',()=>{
39
- if(window.__mainLight)window.__mainLight.color.set(colorInput.value);
40
- });
41
- }
42
- // サブライト位置
43
- ['x','y','z'].forEach(axis=>{
44
- const sl=document.getElementById(`sub-light-${axis}`);
45
- const vl=document.getElementById(`sub-light-${axis}-val`);
46
- if(!sl||!vl)return;
47
- sl.addEventListener('input',()=>{
48
- const v=parseFloat(sl.value);vl.textContent=v;
49
- if(window.__subLight)window.__subLight.position[axis]=v;
50
- });
51
- });
52
- // サブライト色
53
- const subColorInput=document.getElementById('sub-light-color');
54
- if(subColorInput){
55
- subColorInput.addEventListener('input',()=>{
56
- if(window.__subLight)window.__subLight.color.set(subColorInput.value);
57
- });
58
- }
59
- // アンビエント色
60
- const ambColorInput=document.getElementById('amb-light-color');
61
- if(ambColorInput){
62
- ambColorInput.addEventListener('input',()=>{
63
- if(window.__ambLight)window.__ambLight.color.set(ambColorInput.value);
64
- });
65
- }
66
- }
67
- });