Skip to content

[Feature] Add a public gizmo system for translate/rotate/scale manipulation - #1431

Merged
untoldengine merged 1 commit into
developfrom
add-gizmo
Dec 2, 2026
Merged

untoldengine merged 1 commit into
developfrom
add-gizmo

Conversation

@untoldengine

Copy link
Copy Markdown
Owner

Summary

  • Extracts the Untold Editor's translate/rotate/scale gizmo into UntoldEngine as public API, so any app depending on the engine package gets click-select-drag gizmo support, not just the editor.
  • Systems/GizmoSystem.swift/GizmoGroup.swift/GizmoPalette.swift: gizmo geometry, hit-testing, and drag-to-transform math, with editor-only seams replaced by two injection protocols (GizmoSnapProvider, GizmoHandleOverrideProvider) and new engine globals (gizmoActive, gizmoTargets, gizmoTransformSpace, gizmoHoverMode/Axis, etc).
  • Renderer/GizmoRenderPass.swift: a dedicated, opt-in render pass (GizmoRenderExtension/registerGizmoRenderExtension()) so gizmo handles actually draw, reusing shader/pipeline scaffolding that already existed engine-side but was unused.
  • New components (GizmoHandleComponent, GizmoHitProxyComponent, GizmoCenterComponent) with ComponentRegistry cleanup registration.
  • docs/API/UsingGizmoSystem.md: full usage guide, including a troubleshooting section for silent render-extension registration failures.
  • InteractionGameplayDemo wired up as a working example integration.

Test plan

  • swift build passes
  • swift test --filter UntoldEngineTests — 65 new tests (GizmoSystemTests, GizmoGroupTests, GizmoSpaceTests, GizmoPaletteTests, GizmoRenderPassTests), full suite green aside from one pre-existing unrelated failure (BuildSystemTests.testIOSARGameViewControllerSwiftGeneratedWithExpectedContent, predates this branch)
  • Manually verified end-to-end in the Untold Editor (separate follow-up PR) and two independent apps: InteractionGameplayDemo and a separate Gaussian-splat viewer app

…lation

Extracts the Untold Editor's translate/rotate/scale gizmo into the engine
as public API, so any app depending on UntoldEngine gets click-select-drag
gizmo support, not just the editor.

- Systems/GizmoSystem.swift, GizmoGroup.swift, GizmoPalette.swift: gizmo
  geometry, hit-testing, and drag-to-transform math, with editor-only
  seams replaced by two injection protocols (GizmoSnapProvider,
  GizmoHandleOverrideProvider) and new engine globals (gizmoActive,
  gizmoTargets, gizmoTransformSpace, gizmoHoverMode/Axis, etc).
- Renderer/GizmoRenderPass.swift: a dedicated, opt-in render pass
  (GizmoRenderExtension / registerGizmoRenderExtension()) so gizmo
  handles actually draw, reusing shader/pipeline scaffolding that
  already existed engine-side but was unused.
- New components (GizmoHandleComponent, GizmoHitProxyComponent,
  GizmoCenterComponent) with ComponentRegistry cleanup registration.
- 65 new tests across GizmoSystemTests, GizmoGroupTests, GizmoSpaceTests,
  GizmoPaletteTests, and GizmoRenderPassTests.
- docs/API/UsingGizmoSystem.md: full usage guide, including a
  troubleshooting section for silent render-extension registration
  failures.
- InteractionGameplayDemo wired up as a working example app integration.

Manually verified end-to-end in the Untold Editor and two independent
apps (InteractionGameplayDemo and a separate Gaussian-splat viewer app).
@untoldengine
untoldengine merged commit 855d0d9 into develop Dec 2, 2026
3 of 5 checks passed
@untoldengine
untoldengine deleted the add-gizmo branch December 2, 2026 22:47
untoldengine added a commit to untoldengine/UntoldEditor that referenced this pull request Dec 2, 2026
…wn copy (#206)

Companion change to untoldengine/UntoldEngine#1431, which extracted the
editor's translate/rotate/scale gizmo into the engine as public API.
Switches the editor to consume it instead of maintaining a parallel copy.

- Deleted Systems/GizmoSystem.swift, GizmoGroup.swift, GizmoPalette.swift,
  and Editor/Viewport/TransformSpace.swift — all now engine-owned.
- Added thin adapters bridging editor-only state to the engine's
  injection points: EditorGizmoSnapProvider (GizmoSnapProvider),
  EditorRepresentationHandlesGizmoProvider (GizmoHandleOverrideProvider),
  GizmoToolBridge (TransformTool -> GizmoMode, re-adds the
  EditorRepresentationHandles.select side effect the engine's
  createGizmo(mode:) deliberately dropped).
- TransformSpace+Editor.swift adds the title/help UI copy the editor
  needs onto the engine's TransformSpace enum.
- EditorViewportSettings/EditorController/EditorGlobals now read/write
  the engine's gizmo globals directly instead of their own shadow copies.
- EditorRenderingSystem/EditorRenderPasses/EditorRenderPipeLines no
  longer duplicate the gizmo render pass/pipeline — calls into the
  engine's registerGizmoPipeline()/RenderPasses.gizmoExecution, keeping
  only the editor's own play/edit-mode gating.
- Package.swift repointed to UntoldEngine's develop branch (was a local
  path dependency during development).
- Trimmed/moved gizmo tests that were redundant with the engine's own
  suite; added GizmoEngineAdaptersTests.swift for the new adapter types.

Verified: swift build and swift test both pass (1258 tests, 0 failures,
1 pre-existing skip) against the real develop branch dependency.
Manually tested click-select, drag, rotate, scale, undo/redo, and a
scripted entity's representation-handle drag in the running editor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant