Repository navigation
[Feature] Adopt UntoldEngine's gizmo system instead of the editor's own copy - #206
Merged
Merged
Conversation
…wn copy 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
Companion to untoldengine/UntoldEngine#1431 (merged), which extracted the editor's translate/rotate/scale gizmo into the engine as public API. This PR switches the editor to consume the engine's version instead of maintaining a parallel copy.
Systems/GizmoSystem.swift,GizmoGroup.swift,GizmoPalette.swift, andEditor/Viewport/TransformSpace.swift— all now engine-owned.EditorGizmoSnapProvider(GizmoSnapProvider),EditorRepresentationHandlesGizmoProvider(GizmoHandleOverrideProvider),GizmoToolBridge(TransformTool→GizmoMode, re-adds theEditorRepresentationHandles.selectside effect the engine'screateGizmo(mode:)deliberately dropped).TransformSpace+Editor.swiftadds the title/help UI copy the editor needs onto the engine'sTransformSpaceenum.EditorViewportSettings/EditorController/EditorGlobalsnow read/write the engine's gizmo globals directly instead of their own shadow copies.EditorRenderingSystem/EditorRenderPasses/EditorRenderPipeLinesno longer duplicate the gizmo render pass/pipeline — call into the engine'sregisterGizmoPipeline()/RenderPasses.gizmoExecution, keeping only the editor's own play/edit-mode gating.Package.swiftrepointed toUntoldEngine'sdevelopbranch (was a local path dependency during development).GizmoEngineAdaptersTests.swiftfor the new adapter types.Test plan
swift buildpasses against the realdevelopbranch dependencyswift test— 1258 tests, 0 failures, 1 pre-existing skip