🚀 Auto-deploy: melhoria no snap e medição AR em 24/05/2026 01:33:36
This commit is contained in:
@@ -3,6 +3,7 @@ import { ArrowLeft, Glasses, Box, Ruler, FileText, Upload, Loader2 } from "lucid
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { useModelStore } from "@/stores/useModelStore";
|
||||
import { ModelViewerCanvas } from "@/components/three/ModelViewer";
|
||||
import { xrStore } from "@/lib/xrStore";
|
||||
import { ViewerControls } from "@/components/ViewerControls";
|
||||
import { InspectionChecklist } from "@/components/InspectionChecklist";
|
||||
import { FineTuningControls } from "@/components/FineTuningControls";
|
||||
@@ -92,11 +93,12 @@ const Viewer = () => {
|
||||
if (!model) return null;
|
||||
|
||||
const handleEnterXR = async () => {
|
||||
if (!xrSupported) {
|
||||
toast.error("WebXR não é suportado neste navegador. Use o navegador do Meta Quest 3.");
|
||||
return;
|
||||
try {
|
||||
await xrStore.enterAR();
|
||||
} catch (e) {
|
||||
console.error('[XR] Falha ao entrar no AR:', e);
|
||||
toast.error("Não foi possível iniciar a sessão AR. Certifique-se de que está usando um dispositivo compatível (como Meta Quest 3).");
|
||||
}
|
||||
navigate("/xr");
|
||||
};
|
||||
|
||||
const canAddMore = models.length < maxModels;
|
||||
@@ -129,7 +131,7 @@ const Viewer = () => {
|
||||
<ShareButton />
|
||||
<Button className="gap-2 glow-primary" disabled={!xrSupported} onClick={handleEnterXR}>
|
||||
<Glasses className="h-4 w-4" />
|
||||
Entrar em Modo XR
|
||||
Iniciar AR
|
||||
</Button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
Reference in New Issue
Block a user