🚀 Auto-deploy: melhoria no snap e medição AR em 20/07/2026 21:28:40
This commit is contained in:
@@ -375,38 +375,7 @@ const QuestCubeLab = () => {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{/* 3 ControlCards */}
|
||||
<section className="mt-6 grid grid-cols-1 gap-4 md:grid-cols-3">
|
||||
<ControlCard
|
||||
icon={<Box className="h-4 w-4 text-cyan-300" />}
|
||||
title="Translação (stick esq)"
|
||||
value={`X: ${cubePos.x.toFixed(2)} · Z: ${cubePos.z.toFixed(2)}`}
|
||||
onUp={() => setCubePos((p) => ({ ...p, z: p.z - 0.1 }))}
|
||||
onDown={() => setCubePos((p) => ({ ...p, z: p.z + 0.1 }))}
|
||||
onLeft={() => setCubePos((p) => ({ ...p, x: p.x - 0.1 }))}
|
||||
onRight={() => setCubePos((p) => ({ ...p, x: p.x + 0.1 }))}
|
||||
disabled={locked}
|
||||
/>
|
||||
<ControlCard
|
||||
icon={<Gamepad2 className="h-4 w-4 text-violet-300" />}
|
||||
title="Rotação (stick dir)"
|
||||
value={`Yaw: ${((cubeRot.y * 180) / Math.PI).toFixed(0)}°`}
|
||||
onUp={() => setCubeRot((r) => ({ ...r, x: r.x + 0.1 }))}
|
||||
onDown={() => setCubeRot((r) => ({ ...r, x: r.x - 0.1 }))}
|
||||
onLeft={() => setCubeRot((r) => ({ ...r, y: r.y - 0.1 }))}
|
||||
onRight={() => setCubeRot((r) => ({ ...r, y: r.y + 0.1 }))}
|
||||
/>
|
||||
<ControlCard
|
||||
icon={<Maximize2Inline />}
|
||||
title="Escala (LT/RT)"
|
||||
value={`${cubeScale.toFixed(2)}x`}
|
||||
onUp={() => setCubeScale((s) => Math.min(3, +(s + 0.1).toFixed(2)))}
|
||||
onDown={() => setCubeScale((s) => Math.max(0.2, +(s - 0.1).toFixed(2)))}
|
||||
onLeft={() => setCubeScale((s) => Math.max(0.2, +(s - 0.1).toFixed(2)))}
|
||||
onRight={() => setCubeScale((s) => Math.min(3, +(s + 0.1).toFixed(2)))}
|
||||
disabled={locked}
|
||||
/>
|
||||
</section>
|
||||
|
||||
|
||||
<section className="mt-8 rounded-lg border border-slate-800 bg-slate-900/30 p-6">
|
||||
<h2 className="mb-4 font-mono text-xs uppercase tracking-[0.2em] text-slate-400">
|
||||
@@ -457,64 +426,6 @@ const Phase = ({ n, status, title }: { n: string; status?: "done" | "active"; ti
|
||||
</li>
|
||||
);
|
||||
|
||||
const ControlCard = ({
|
||||
icon,
|
||||
title,
|
||||
value,
|
||||
onUp,
|
||||
onDown,
|
||||
onLeft,
|
||||
onRight,
|
||||
disabled,
|
||||
}: {
|
||||
icon: React.ReactNode;
|
||||
title: string;
|
||||
value: string;
|
||||
onUp: () => void;
|
||||
onDown: () => void;
|
||||
onLeft: () => void;
|
||||
onRight: () => void;
|
||||
disabled?: boolean;
|
||||
}) => (
|
||||
<div className={`rounded-lg border border-slate-800 bg-slate-900/60 p-4 ${disabled ? "opacity-50" : ""}`}>
|
||||
<div className="mb-3 flex items-center gap-2">
|
||||
{icon}
|
||||
<span className="text-sm font-medium text-slate-200">{title}</span>
|
||||
</div>
|
||||
<div className="mb-3 font-mono text-xs text-slate-400">{value}</div>
|
||||
<div className="grid grid-cols-3 gap-1">
|
||||
<div />
|
||||
<button
|
||||
onClick={onUp}
|
||||
disabled={disabled}
|
||||
className="rounded border border-slate-700 bg-slate-950 py-1.5 text-xs hover:border-slate-500 disabled:cursor-not-allowed"
|
||||
>
|
||||
▲
|
||||
</button>
|
||||
<div />
|
||||
<button
|
||||
onClick={onLeft}
|
||||
disabled={disabled}
|
||||
className="rounded border border-slate-700 bg-slate-950 py-1.5 text-xs hover:border-slate-500 disabled:cursor-not-allowed"
|
||||
>
|
||||
◀
|
||||
</button>
|
||||
<button
|
||||
onClick={onDown}
|
||||
disabled={disabled}
|
||||
className="rounded border border-slate-700 bg-slate-950 py-1.5 text-xs hover:border-slate-500 disabled:cursor-not-allowed"
|
||||
>
|
||||
▼
|
||||
</button>
|
||||
<button
|
||||
onClick={onRight}
|
||||
disabled={disabled}
|
||||
className="rounded border border-slate-700 bg-slate-950 py-1.5 text-xs hover:border-slate-500 disabled:cursor-not-allowed"
|
||||
>
|
||||
▶
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
|
||||
export default QuestCubeLab;
|
||||
|
||||
Reference in New Issue
Block a user