Changes
Co-authored-by: Reifonas <211114984+Reifonas@users.noreply.github.com>
This commit is contained in:
@@ -297,6 +297,19 @@ export function XRHud({ freeMove, onToggleFreeMove, placementMode = false, onTog
|
|||||||
</Button>
|
</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
|
<Button
|
||||||
variant={freeMove ? 'default' : 'outline'}
|
variant={freeMove ? 'default' : 'outline'}
|
||||||
size="sm" className="h-8 gap-1.5 text-[10px] font-mono"
|
size="sm" className="h-8 gap-1.5 text-[10px] font-mono"
|
||||||
|
|||||||
@@ -117,6 +117,7 @@ function GLBModel({ url }: { url: string }) {
|
|||||||
const rotXRad = (fineTuning.rotX * Math.PI) / 180;
|
const rotXRad = (fineTuning.rotX * Math.PI) / 180;
|
||||||
const rotYRad = (fineTuning.rotY * Math.PI) / 180;
|
const rotYRad = (fineTuning.rotY * Math.PI) / 180;
|
||||||
const rotZRad = (fineTuning.rotZ * Math.PI) / 180;
|
const rotZRad = (fineTuning.rotZ * Math.PI) / 180;
|
||||||
|
const s = fineTuning.scale ?? 1;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<group
|
<group
|
||||||
@@ -127,6 +128,7 @@ function GLBModel({ url }: { url: string }) {
|
|||||||
-modelInfo.center.z + fineTuning.posZ,
|
-modelInfo.center.z + fineTuning.posZ,
|
||||||
]}
|
]}
|
||||||
rotation={[rotXRad, rotYRad, rotZRad]}
|
rotation={[rotXRad, rotYRad, rotZRad]}
|
||||||
|
scale={[s, s, s]}
|
||||||
>
|
>
|
||||||
<primitive object={scene} />
|
<primitive object={scene} />
|
||||||
</group>
|
</group>
|
||||||
|
|||||||
Reference in New Issue
Block a user