Skip to content

feat(terrain): add Water Mask toggle to terrain settings - #2373

Open
ZTongci wants to merge 4 commits into
mainfrom
feat/terrain-water-mask-toggle
Open

feat(terrain): add Water Mask toggle to terrain settings#2373
ZTongci wants to merge 4 commits into
mainfrom
feat/terrain-water-mask-toggle

Conversation

@ZTongci

@ZTongci ZTongci commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a Water Mask on/off switch in the Editor terrain settings panel, directly below the terrain enable toggle
  • Toggle is visible only when terrain is enabled (`availableIf: terrain = true`)
  • Defaults to `false` — existing scenes without the field set will have water mask disabled; users can enable it from the UI

Changes

  • `server/pkg/builtin/manifest.yml` / `manifest_ja.yml`: new `terrainWaterMask` bool field in both terrain schema groups
  • `web/src/app/types/sceneProperty.ts`: `terrainWaterMask?: boolean` added to `TerrainProperty`
  • `web/src/app/utils/convert-object.ts`: maps `terrain.terrainWaterMask` → `terrain.waterMask` (passed to `@reearth/core`)
  • `web/package.json`: bumps `@reearth/core` to `0.0.7-alpha.79`

Core dependency

reearth/core#164 — `feat(terrain): add configurable waterMask prop`
Published as `@reearth/[email protected]`.

2026-08-07.20.36.47.mov

Adds a Water Mask on/off switch in the Editor terrain settings panel,
directly below the terrain enable toggle. Defaults to true (preserves
current behavior). Requires @reearth/core with waterMask support.

- manifest.yml / manifest_ja.yml: new terrainWaterMask bool field in
  both terrain schema groups, with availableIf: terrain=true on the
  main group
- sceneProperty.ts: terrainWaterMask?: boolean in TerrainProperty
- convert-object.ts: terrain.terrainWaterMask → terrain.waterMask

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Copilot AI lite review requested due to automatic review settings August 7, 2026 02:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Water Mask boolean scene property to terrain settings and wires it through the web viewer-property conversion so it can be consumed by @reearth/core.

Changes:

  • Adds terrainWaterMask as a boolean field in the built-in terrain property schemas (EN/JA manifests).
  • Extends the frontend SceneProperty typing with terrainWaterMask?: boolean.
  • Maps terrain.terrainWaterMaskterrain.waterMask in the scene→viewer property conversion mapping.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
server/pkg/builtin/manifest.yml Adds the terrainWaterMask field to terrain schema groups (cesium-beta + cesium).
server/pkg/builtin/manifest_ja.yml Adds Japanese title/description entries for terrainWaterMask.
web/src/app/types/sceneProperty.ts Adds terrainWaterMask?: boolean to TerrainProperty.
web/src/app/utils/convert-object.ts Maps backend scene property terrainWaterMask to viewer property terrain.waterMask.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread server/pkg/builtin/manifest.yml Outdated
Comment thread web/src/app/utils/convert-object.ts
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

🚀 Cloud Run Preview Deployed

🔗 Click here to open the preview in a new tab

ZTongci and others added 3 commits August 7, 2026 11:45
Matches the core-side default change: off by default so existing projects
are not visually affected on upgrade. Users enable it explicitly.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…hema

The cesium-beta schema group already had availableIf: terrain=true on
terrainWaterMask, but the legacy cesium schema group was missing it.
This caused the Water Mask toggle to appear even when terrain is disabled.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants