CesiumGS / CesiumGS/cesium

Implement `wireframeFill` from `BENTLEY_materials_planar_fill`

Open
#13,620 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

The [`BENTLEY_materials_planar_fill`](https://github.com/CesiumGS/glTF/tree/vendor-extensions/extensions/2.0/Vendor/BENTLEY_materials_planar_fill) glTF extension (partial reference implementation in #13178) defines a `wireframeFill` property that controls whether a planar polygon's interior fill is displayed in a wireframe view mode:

| Value | Name | Description |
|:------|:-----|:------------|
| `0` | NONE | The fill is never drawn in wireframe view. |
| `1` | ALWAYS | The fill is always drawn in wireframe view. |
| `2` | TOGGLE | The fill is drawn only if the user or application has enabled toggleable fill display. |

## Proposed solution

A proper wireframe view mode has been added to CesiumJS (#13192), so we should implement `wireframeFill` support (likely in `MaterialPipelineStage`) to control fill visibility in that mode.

Code referencing this issue:
- `packages/engine/Source/Scene/Model/MaterialPipelineStage.js` (`processPlanarFill`)
- `packages/engine/Source/Scene/GltfLoader.js` (`loadPlanarFill`)
- `packages/engine/Source/Scene/ModelComponents.js` (`PlanarFill.wireframeFill`)

Partially blocks completion of #12890.

Contributor guide

Open the contributing guide

Research direction

Start with processPlanarFill in packages/engine/Source/Scene/Model/MaterialPipelineStage.js, then trace loadPlanarFill in GltfLoader.js and PlanarFill.wireframeFill in ModelComponents.js. Read the BENTLEY_materials_planar_fill reference and the wireframe view work from #13192. Done means the 0, 1, and 2 values control planar fill visibility correctly in wireframe mode.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.