diff --git a/apps/ai-game-creator-shell/src/view/ui-editor/components/Inspector/Transform/TransformEditor.tsx b/apps/ai-game-creator-shell/src/view/ui-editor/components/Inspector/Transform/TransformEditor.tsx index ba9de6cff..f1cb9dda2 100644 --- a/apps/ai-game-creator-shell/src/view/ui-editor/components/Inspector/Transform/TransformEditor.tsx +++ b/apps/ai-game-creator-shell/src/view/ui-editor/components/Inspector/Transform/TransformEditor.tsx @@ -1,6 +1,7 @@ import { AlertTriangle, ChevronDown, + ChevronUp, Crosshair, LockKeyhole, Maximize2, @@ -170,7 +171,7 @@ function formatValue(value: number): string { if (Object.is(value, -0)) { return '0'; } - return String(Number(value.toFixed(4))); + return String(Number(value.toFixed(2))); } function VectorInputRow({ @@ -234,6 +235,17 @@ function ScalarInput({ setDraft(formatValue(next)); }; + const adjust = (direction: -1 | 1) => { + if (readOnly) { + return; + } + const current = Number(draft); + const base = Number.isFinite(current) ? current : value; + const next = Number((base + direction * step).toFixed(4)); + setDraft(formatValue(next)); + onCommit(next); + }; + return ( ); } @@ -314,7 +351,10 @@ export function TransformEditor({ geometry?.invalid; return ( -
+
@@ -328,17 +368,15 @@ export function TransformEditor({
{readOnly ? ( - + + ) : ( - + + )}
@@ -374,12 +412,12 @@ export function TransformEditor({ {presetOpen ? (
- + Anchor @@ -498,17 +536,6 @@ export function TransformEditor({ ) : null}
-
- - {AXIS_LABELS.map((axis) => ( - - {axis} - - ))} -