MCPcopy Create free account
hub / github.com/CNCKitchen/stlTexturizer / refreshExclusionOverlay

Function refreshExclusionOverlay

js/main.js:2555–2580  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2553
2554function handleGizmoDrag(axis, deltaDegrees) {
2555 if (!currentGeometry) return;
2556
2557 // Accumulate the angle
2558 rotateAngles[axis] = ((rotateAngles[axis] || 0) + deltaDegrees) % 360;
2559
2560 // Update input fields
2561 rotateXInput.value = Math.round(rotateAngles.x * 100) / 100;
2562 rotateYInput.value = Math.round(rotateAngles.y * 100) / 100;
2563 rotateZInput.value = Math.round(rotateAngles.z * 100) / 100;
2564
2565 // Apply incremental rotation to geometry
2566 applyIncrementalRotation(axis, THREE.MathUtils.degToRad(deltaDegrees));
2567}
2568
2569function applyIncrementalRotation(axis, radians) {
2570 const quat = new THREE.Quaternion();
2571 if (axis === 'x') quat.setFromAxisAngle(new THREE.Vector3(1, 0, 0), radians);
2572 else if (axis === 'y') quat.setFromAxisAngle(new THREE.Vector3(0, 1, 0), radians);
2573 else quat.setFromAxisAngle(new THREE.Vector3(0, 0, 1), radians);
2574
2575 _rotateGeometry(quat);
2576}
2577
2578function applyRotationFromInputs() {
2579 if (!currentGeometry) return;
2580
2581 const targetX = parseFloat(rotateXInput.value) || 0;
2582 const targetY = parseFloat(rotateYInput.value) || 0;
2583 const targetZ = parseFloat(rotateZInput.value) || 0;

Callers 11

populateLanguageSelectorFunction · 0.85
wireEventsFunction · 0.85
setSelectionModeFunction · 0.85
paintAtFunction · 0.85
handlePlaceOnFaceClickFunction · 0.85
_rotateFinalizeFunction · 0.85
refreshPrecisionMeshFunction · 0.85
adoptBakedGeometryFunction · 0.85
resetSettingsToDefaultsFunction · 0.85
_restoreMaskFunction · 0.85

Calls 3

setExclusionOverlayFunction · 0.90
tFunction · 0.90
updateFaceMaskFunction · 0.85

Tested by

no test coverage detected