🚀 Auto-deploy: melhoria no snap e medição AR em 24/05/2026 13:01:22

This commit is contained in:
2026-05-24 13:01:22 +00:00
parent 377346893e
commit b16158656a
4 changed files with 17 additions and 4 deletions
+12 -3
View File
@@ -20,6 +20,16 @@ const WIRE_COLORS = [
{ label: 'Branco', value: '#e2e8f0' }, { label: 'Branco', value: '#e2e8f0' },
]; ];
const colorClassMap: Record<string, string> = {
'#8899aa': 'bg-[#8899aa]',
'#ef4444': 'bg-red-500',
'#22c55e': 'bg-green-500',
'#3b82f6': 'bg-blue-500',
'#eab308': 'bg-yellow-500',
'#f97316': 'bg-orange-500',
'#e2e8f0': 'bg-slate-200',
};
export function ViewerControls() { export function ViewerControls() {
const { const {
opacity, setOpacity, renderMode, setRenderMode, opacity, setOpacity, renderMode, setRenderMode,
@@ -128,7 +138,7 @@ export function ViewerControls() {
<PopoverTrigger asChild> <PopoverTrigger asChild>
<Button variant="outline" size="sm" className="gap-2 h-9"> <Button variant="outline" size="sm" className="gap-2 h-9">
<Palette className="h-3.5 w-3.5" /> <Palette className="h-3.5 w-3.5" />
<div className="h-3 w-3 rounded-full border border-muted-foreground/30" style={{ backgroundColor: wireframeColor }} /> <div className={`h-3 w-3 rounded-full border border-muted-foreground/30 ${colorClassMap[wireframeColor] || 'bg-[#8899aa]'}`} />
</Button> </Button>
</PopoverTrigger> </PopoverTrigger>
<PopoverContent className="w-56 space-y-3" side="top" align="start"> <PopoverContent className="w-56 space-y-3" side="top" align="start">
@@ -138,8 +148,7 @@ export function ViewerControls() {
{WIRE_COLORS.map((c) => ( {WIRE_COLORS.map((c) => (
<button <button
key={c.value} key={c.value}
className={`h-6 w-6 rounded-full border-2 transition-all ${wireframeColor === c.value ? 'border-primary scale-110' : 'border-muted-foreground/30'}`} className={`h-6 w-6 rounded-full border-2 transition-all ${colorClassMap[c.value] || 'bg-[#8899aa]'} ${wireframeColor === c.value ? 'border-primary scale-110' : 'border-muted-foreground/30'}`}
style={{ backgroundColor: c.value }}
onClick={() => setWireframeColor(c.value)} onClick={() => setWireframeColor(c.value)}
title={c.label} title={c.label}
/> />
+1 -1
View File
@@ -1415,7 +1415,7 @@ export function ModelViewerCanvas({ url }: ModelViewerProps) {
)} )}
{/* Compartilhar botões ocultos para WebRTC e HUD de fora */} {/* Compartilhar botões ocultos para WebRTC e HUD de fora */}
<div style={{ display: 'none' }}> <div className="hidden">
<ShareButton <ShareButton
onHandleChange={(h) => setLiveCode(h?.code ?? null)} onHandleChange={(h) => setLiveCode(h?.code ?? null)}
onViewerCountChange={setLiveViewers} onViewerCountChange={setLiveViewers}
+2
View File
@@ -204,6 +204,8 @@ const Index = () => {
type="file" type="file"
accept={ACCEPTED_EXTENSIONS} accept={ACCEPTED_EXTENSIONS}
className="hidden" className="hidden"
title="Importar arquivo de modelo 3D"
aria-label="Importar arquivo de modelo 3D"
onChange={handleFileUpload} /> onChange={handleFileUpload} />
+2
View File
@@ -110,6 +110,8 @@ const Viewer = () => {
type="file" type="file"
accept={ACCEPTED_EXTENSIONS} accept={ACCEPTED_EXTENSIONS}
className="hidden" className="hidden"
title="Adicionar arquivo de modelo 3D"
aria-label="Adicionar arquivo de modelo 3D"
onChange={handleFileUpload} onChange={handleFileUpload}
/> />