CesiumGS / CesiumGS/cesium

Support dashed outlines for polygons and other area graphics

Open
#12,437 0 comments 0 reactions 0 assignees View on GitHub
category - vector data type - enhancement
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

### Feature

From the [forum](https://community.cesium.com/t/feature-update-for-dashed-outline/37926)

> I would like to draw dashed outlines when using `PolygonGraphics`, `WallGraphics`, `EllipseGraphics`, and `RectangleGraphics` to draw a shape.
> However, I found that Cesium JS currently does not supoprt this feature. Does Cesium have any plans or roadmaps to add this feature in future.

Polylines [support](https://sandcastle.cesium.com/?src=Polyline%20Dash.html) dashed materials but Polygons and the other mentioned graphics only support setting the outline color and width. I think it's perfectly reasonable to have more feature parity and add options to control the outline material or at least add a dashed option specifically.

@ggetz pointed out it would probably be possible to achieve this through [primitives and custom appearances](https://cesium.com/learn/cesiumjs-learn/cesiumjs-geometry-appearances/) but would require a fair bit of work and shader understanding.

Side note, this is similar to https://github.com/CesiumGS/cesium/issues/6694 in terms of parity between polygon outlines and polylines

Contributor guide

Open the contributing guide

Research direction

Start by comparing the outline handling in PolygonGraphics, WallGraphics, EllipseGraphics, and RectangleGraphics with the dashed material support shown in the Polyline Dash Sandcastle example. Read the linked primitives and custom appearances guidance to understand the required shader work. Done means the named area graphics can render dashed outlines with a documented way to control the outline material or dash behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.