stpete2 commited on
Commit
015cd0c
·
verified ·
1 Parent(s): 1568490

Upload preprocess_manual.js

Browse files
Files changed (1) hide show
  1. preprocess_manual.js +35 -0
preprocess_manual.js CHANGED
@@ -2391,6 +2391,41 @@ function setupBoneAssignment(ui, scene, camera, renderer, gvrm, character, filte
2391
  });
2392
  }
2393
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2394
  // ========================================
2395
  // Paint Mode Toggle
2396
  // ========================================
 
2391
  });
2392
  }
2393
 
2394
+ // ========================================
2395
+ // Select Sphere Button 挿入 12/18 15:40
2396
+ // ========================================
2397
+ const selectSphereBtn = document.getElementById('select-sphere-btn');
2398
+ if (selectSphereBtn) {
2399
+ selectSphereBtn.addEventListener('click', () => {
2400
+ if (!selectedTarget) {
2401
+ alert('Please select a target bone or group first');
2402
+ return;
2403
+ }
2404
+
2405
+ selectionMode = 'sphere';
2406
+ selectSphereBtn.style.background = '#4CAF50';
2407
+ selectSphereBtn.textContent = '✓ Sphere Mode Active (Click GS)';
2408
+
2409
+ console.log('[setupBoneAssignment] Sphere selection mode activated');
2410
+ console.log(' Target:', selectedTarget);
2411
+ console.log(' Radius:', selectionRadius, 'm');
2412
+ });
2413
+ }
2414
+
2415
+ // ========================================
2416
+ // Selection Radius Slider
2417
+ // ========================================
2418
+ const selectionRadiusSlider = document.getElementById('selection-radius');
2419
+ const selectionRadiusValue = document.getElementById('selection-radius-value');
2420
+
2421
+ if (selectionRadiusSlider && selectionRadiusValue) {
2422
+ selectionRadiusSlider.addEventListener('input', (e) => {
2423
+ selectionRadius = parseFloat(e.target.value);
2424
+ selectionRadiusValue.textContent = selectionRadius.toFixed(1);
2425
+ });
2426
+ }
2427
+
2428
+
2429
  // ========================================
2430
  // Paint Mode Toggle
2431
  // ========================================