Align scene origin axis visibility handling - #855
Open
bofeng-song wants to merge 1 commit into
Open
Conversation
bofeng-song
force-pushed
the
fix/scene-origin-axis-creator-parity
branch
from
August 13, 2026 10:12
f21c92f to
ad883a4
Compare
knoxHuang
approved these changes
Aug 13, 2026
star-e
approved these changes
Aug 13, 2026
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.
Releated issue: https://zentao.sud.center/index.php?m=bug&f=view&bugID=863
Summary
Problem
After switching the scene editor to 2D mode, creating a new scene, and then switching back to 3D, the scene origin axes could render incorrectly. In some cases the 2D green axis leaked into the 3D view; in another case only one 3D origin axis appeared until the mouse wheel triggered another grid update.
Root Cause
CameraService.initFromConfig()restored bothoriginAxis2DandoriginAxis3Dat the same time. This differs from Creator, where each camera controller restores its own origin-axis configuration during controller initialization. In CLI, both controllers coexist and configuration restoration is asynchronous, so applying both axis configs fromCameraServicecould activate the inactive controller's axis nodes.The 3D controller also skipped origin-axis data updates when the axis node was inactive. During a 2D to 3D switch,
showGrid(true)updates grid data before the 3D origin-axis nodes are reactivated, so one axis could stay stale until another camera update occurred.Changes
CameraController2DandCameraController3D.CameraServicefrom applyingoriginAxis2DandoriginAxis3Dduring initial gizmo config restore.Verification
npm run test -- --runTestsByPath src/core/scene/test/camera-view-mode-config.test.ts src/core/scene/test/scene-configs.test.ts --runInBandnpx tsc -b --pretty falsenpm run build:static-web