🚀 Auto-deploy: melhoria no snap e medição AR em 30/05/2026 10:56:12
This commit is contained in:
@@ -11,11 +11,11 @@ function loadCameraMode(): 'ortho' | 'persp' {
|
||||
try {
|
||||
const raw = localStorage.getItem(CAMERA_MODE_KEY);
|
||||
if (raw === 'persp' || raw === 'ortho') return raw;
|
||||
} catch {}
|
||||
} catch (e) { /* ignore */ }
|
||||
return 'ortho';
|
||||
}
|
||||
function saveCameraMode(m: 'ortho' | 'persp') {
|
||||
try { localStorage.setItem(CAMERA_MODE_KEY, m); } catch {}
|
||||
try { localStorage.setItem(CAMERA_MODE_KEY, m); } catch (e) { /* ignore */ }
|
||||
}
|
||||
|
||||
export interface XRFeatureFlags {
|
||||
@@ -38,11 +38,11 @@ function loadXRFeatures(): XRFeatureFlags {
|
||||
try {
|
||||
const raw = localStorage.getItem(XRFEAT_KEY);
|
||||
if (raw) return { ...DEFAULT_XR_FEATURES, ...JSON.parse(raw) };
|
||||
} catch {}
|
||||
} catch (e) { /* ignore */ }
|
||||
return { ...DEFAULT_XR_FEATURES };
|
||||
}
|
||||
function saveXRFeatures(f: XRFeatureFlags) {
|
||||
try { localStorage.setItem(XRFEAT_KEY, JSON.stringify(f)); } catch {}
|
||||
try { localStorage.setItem(XRFEAT_KEY, JSON.stringify(f)); } catch (e) { /* ignore */ }
|
||||
}
|
||||
|
||||
interface StoredPlacement { fineTuning: FineTuning; calibrationQuat?: [number, number, number, number] | null; }
|
||||
@@ -50,7 +50,7 @@ function loadPlacements(): Record<string, StoredPlacement> {
|
||||
try {
|
||||
const raw = localStorage.getItem(PLACEMENT_KEY);
|
||||
if (raw) return JSON.parse(raw);
|
||||
} catch {}
|
||||
} catch (e) { /* ignore */ }
|
||||
return {};
|
||||
}
|
||||
function savePlacement(fileName: string, fineTuning: FineTuning, calibrationQuat?: [number, number, number, number] | null) {
|
||||
@@ -62,7 +62,7 @@ function savePlacement(fileName: string, fineTuning: FineTuning, calibrationQuat
|
||||
calibrationQuat: calibrationQuat === undefined ? prev.calibrationQuat ?? null : calibrationQuat,
|
||||
};
|
||||
localStorage.setItem(PLACEMENT_KEY, JSON.stringify(all));
|
||||
} catch {}
|
||||
} catch (e) { /* ignore */ }
|
||||
}
|
||||
|
||||
// ── Visibility (selection-based hide/isolate) persistence ────────────
|
||||
@@ -72,7 +72,7 @@ function loadVisibilityMap(): Record<string, StoredVisibility> {
|
||||
try {
|
||||
const raw = localStorage.getItem(VISIBILITY_KEY);
|
||||
if (raw) return JSON.parse(raw);
|
||||
} catch {}
|
||||
} catch (e) { /* ignore */ }
|
||||
return {};
|
||||
}
|
||||
function saveVisibility(fileName: string, hidden: Set<string>, isolated: Set<string> | null) {
|
||||
@@ -80,7 +80,7 @@ function saveVisibility(fileName: string, hidden: Set<string>, isolated: Set<str
|
||||
const all = loadVisibilityMap();
|
||||
all[fileName] = { hidden: [...hidden], isolated: isolated ? [...isolated] : null };
|
||||
localStorage.setItem(VISIBILITY_KEY, JSON.stringify(all));
|
||||
} catch {}
|
||||
} catch (e) { /* ignore */ }
|
||||
}
|
||||
function loadVisibility(fileName: string): { hidden: Set<string>; isolated: Set<string> | null } {
|
||||
const v = loadVisibilityMap()[fileName];
|
||||
|
||||
Reference in New Issue
Block a user