🚀 Auto-deploy: melhoria no snap e medição AR em 24/05/2026 14:10:16
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Eye, Grid3X3, Ruler, Trash2, Camera, LayoutGrid, Palette, Box, Move3D, Undo2, MousePointerClick, EyeOff, Focus, Download } from 'lucide-react';
|
||||
import { Eye, Grid3X3, Ruler, Trash2, Camera, LayoutGrid, Palette, Box, Move3D, Undo2, MousePointerClick, EyeOff, Focus, Download, Footprints, Compass, Map } from 'lucide-react';
|
||||
import { Slider } from '@/components/ui/slider';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
|
||||
@@ -44,6 +44,9 @@ export function ViewerControls() {
|
||||
selectionMode, setSelectionMode,
|
||||
selectedElementKeys, hiddenElementKeys, isolatedElementKeys,
|
||||
hideSelectedElements, isolateSelectedElements, showAllElements, clearElementSelection,
|
||||
desktopCameraMode, setDesktopCameraMode,
|
||||
xrEnvironment, setXrEnvironment,
|
||||
xrScaleMode, setXrScaleMode,
|
||||
} = useModelStore();
|
||||
const activeModel = models.find(m => m.id === activeModelId);
|
||||
const hasSelection = selectedElementKeys.size > 0;
|
||||
@@ -290,6 +293,74 @@ export function ViewerControls() {
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Seletor de Câmera (Orbit vs Walk) */}
|
||||
<Button
|
||||
variant={desktopCameraMode === 'walk' ? 'default' : 'outline'}
|
||||
size="sm"
|
||||
className="gap-2 h-9"
|
||||
onClick={() => {
|
||||
const next = desktopCameraMode === 'orbit' ? 'walk' : 'orbit';
|
||||
setDesktopCameraMode(next);
|
||||
if (next === 'walk') {
|
||||
toast.info("Passeio 3D Ativo: clique no visualizador para prender o mouse. WASD = andar, Q/E = subir/descer, ESC = soltar mouse.");
|
||||
}
|
||||
}}
|
||||
title="Alternar entre câmera orbital e passeio em primeira pessoa"
|
||||
>
|
||||
{desktopCameraMode === 'walk' ? <Footprints className="h-3.5 w-3.5" /> : <Compass className="h-3.5 w-3.5" />}
|
||||
<span className="font-mono text-xs">
|
||||
{desktopCameraMode === 'walk' ? 'Passeio 3D' : 'Câmera'}
|
||||
</span>
|
||||
</Button>
|
||||
|
||||
{/* Seletor de Cenário 2D */}
|
||||
<Popover>
|
||||
<PopoverTrigger asChild>
|
||||
<Button variant="outline" size="sm" className="gap-2 h-9" title="Alterar cenário de fundo do visualizador">
|
||||
<Map className="h-3.5 w-3.5" />
|
||||
<span className="font-mono text-xs">
|
||||
{xrEnvironment === 'passthrough' ? 'Estúdio' : xrEnvironment === 'office' ? 'Escritório' : 'Campo Aberto'}
|
||||
</span>
|
||||
</Button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className="w-56 space-y-2" side="top" align="start">
|
||||
<div className="flex flex-col gap-1.5">
|
||||
<span className="font-mono text-[10px] font-semibold text-muted-foreground uppercase tracking-wider mb-1">
|
||||
Cenário de Fundo
|
||||
</span>
|
||||
<Button
|
||||
variant={xrEnvironment === 'passthrough' ? 'default' : 'ghost'}
|
||||
size="sm"
|
||||
className="justify-start font-mono text-xs h-8"
|
||||
onClick={() => setXrEnvironment('passthrough')}
|
||||
>
|
||||
🌌 Estúdio (Padrão)
|
||||
</Button>
|
||||
<Button
|
||||
variant={xrEnvironment === 'office' ? 'default' : 'ghost'}
|
||||
size="sm"
|
||||
className="justify-start font-mono text-xs h-8"
|
||||
onClick={() => {
|
||||
setXrEnvironment('office');
|
||||
setXrScaleMode('tabletop');
|
||||
}}
|
||||
>
|
||||
🏢 Escritório (VR Mesa)
|
||||
</Button>
|
||||
<Button
|
||||
variant={xrEnvironment === 'field' ? 'default' : 'ghost'}
|
||||
size="sm"
|
||||
className="justify-start font-mono text-xs h-8"
|
||||
onClick={() => {
|
||||
setXrEnvironment('field');
|
||||
setXrScaleMode('realscale');
|
||||
}}
|
||||
>
|
||||
🌳 Campo Aberto (VR Grama)
|
||||
</Button>
|
||||
</div>
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
|
||||
{/* Screenshot */}
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user