Repository navigation
[Feature] Add a public gizmo system for translate/rotate/scale manipulation - #1431
Merged
Merged
Conversation
…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).
3 tasks done
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
UntoldEngineas 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.GizmoHandleComponent,GizmoHitProxyComponent,GizmoCenterComponent) withComponentRegistrycleanup registration.docs/API/UsingGizmoSystem.md: full usage guide, including a troubleshooting section for silent render-extension registration failures.InteractionGameplayDemowired up as a working example integration.Test plan
swift buildpassesswift 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)InteractionGameplayDemoand a separate Gaussian-splat viewer app