WIP: Port terrain editor from cocos-creator with authoring API and fixes - #900
Draft
doommm wants to merge 7 commits into
Draft
WIP: Port terrain editor from cocos-creator with authoring API and fixes#900doommm wants to merge 7 commits into
doommm wants to merge 7 commits into
Conversation
- Publish explicit Terrain snapshots, session controls, and block reads.\n- Invalidate stale Terrain state across Scene lifecycle changes.
- expose target-safe Manage and layer mutations with atomic Undo - publish the Terrain authoring API with regression coverage
Keep extension importer names compatible while preserving built-in completions.
doommm
force-pushed
the
codex/terrain-editor
branch
from
September 1, 2026 07:23
94349f6 to
f7adb93
Compare
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.
This pull request primarily updates type definitions and interfaces to improve type safety, extensibility, and support for terrain editing features in the Cocos CLI types package. The most significant changes are the enhancement of asset handler type definitions, introduction of comprehensive terrain-related interfaces, and improvements to the gizmo and service manager interfaces.
Asset Handler Types:
ASSET_HANDLER_TYPESfrom a mutable string array to areadonlytuple of string literals, ensuring better type inference and safety for asset handler types. (src/core/assets/@types/interface.ts[1]packages/cocos-cli-types/__tests__/__snapshots__/dts-snapshot.test.ts.snap[2] [3] [4] [5]AssetHandlerTypeto allow both the defined literals and any string, improving extensibility for custom asset handler types. (packages/cocos-cli-types/__tests__/__snapshots__/dts-snapshot.test.ts.snap[1] [2] [3]Terrain Editing Support:
packages/cocos-cli-types/__tests__/__snapshots__/dts-snapshot.test.ts.snap[1] [2]Terrainto theIServiceManagerinterface to expose terrain editing services. (packages/cocos-cli-types/__tests__/__snapshots__/dts-snapshot.test.ts.snappackages/cocos-cli-types/tests/snapshots/dts-snapshot.test.ts.snapR6863)src/core/scene/common/index.tssrc/core/scene/common/index.tsR19)Gizmo and Service Improvements:
getComponentGizmomethod to theIGizmoServiceinterface for retrieving gizmo instances by component. (src/core/scene/common/gizmo.ts[1]packages/cocos-cli-types/__tests__/__snapshots__/dts-snapshot.test.ts.snap[2]Testing and Validation:
ASSET_HANDLER_TYPESdeclaration is preserved as a literal tuple and thatAssetHandlerTypematches the intended type signature in the generated.d.tsfile. (packages/cocos-cli-types/__tests__/dts-snapshot.test.tspackages/cocos-cli-types/tests/dts-snapshot.test.tsR41-R60)Miscellaneous:
Terrainimport in the snapshot to support new interfaces. (packages/cocos-cli-types/__tests__/__snapshots__/dts-snapshot.test.ts.snappackages/cocos-cli-types/tests/snapshots/dts-snapshot.test.ts.snapR5416)