Co-authored-by: Reifonas <211114984+Reifonas@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-05-09 13:40:13 +00:00
parent abce5376d1
commit 1e57688302
2 changed files with 15 additions and 0 deletions
+13
View File
@@ -297,6 +297,19 @@ export function XRHud({ freeMove, onToggleFreeMove, placementMode = false, onTog
</Button>
)}
{/* Two-hand scale toggle */}
{onToggleAllowScale && (
<Button
variant={allowScale ? 'default' : 'outline'}
size="sm" className="h-8 gap-1.5 text-[10px] font-mono"
onClick={onToggleAllowScale}
title="Permite escalar a peça com gesto de duas mãos (afastando os controles)"
>
<Maximize2 className="h-3.5 w-3.5" />
{allowScale ? 'Escala ON' : 'Escala'}
</Button>
)}
<Button
variant={freeMove ? 'default' : 'outline'}
size="sm" className="h-8 gap-1.5 text-[10px] font-mono"
+2
View File
@@ -117,6 +117,7 @@ function GLBModel({ url }: { url: string }) {
const rotXRad = (fineTuning.rotX * Math.PI) / 180;
const rotYRad = (fineTuning.rotY * Math.PI) / 180;
const rotZRad = (fineTuning.rotZ * Math.PI) / 180;
const s = fineTuning.scale ?? 1;
return (
<group
@@ -127,6 +128,7 @@ function GLBModel({ url }: { url: string }) {
-modelInfo.center.z + fineTuning.posZ,
]}
rotation={[rotXRad, rotYRad, rotZRad]}
scale={[s, s, s]}
>
<primitive object={scene} />
</group>