visgl / visgl/deck.gl

[Feat] support setting opacity of fill and stroke independently in H3 hexagon layer

Open
#7,450 5 comments 0 reactions 1 assignee View on GitHub

@Pessimistress is already working on this.

Since Nov 23, 2022.

feature
Dominant language
TypeScript
Stars
14.6k
Forks
2.3k
Avg merge
2d 9h
Merged PRs (30d)
42

Description

Target Use Case

We are not able to customize H3 layer to apply opacity to stroke and fill independently. Because H3 layer renders column layer which is not a composite layer. Opacity is applied as a uniform.

H3 layer - opacity is applied to both stroke and fill
Screen Shot 2022-11-23 at 10 51 16 AM

With the geojson layer. We can apply opacity to the stroke layer independently by passing _subLayerProps

        _subLayerProps: {
          ...(featureTypes.polygon ? {'polygons-stroke': {opacity: 0.5}} : {}),
          ...(featureTypes.line ? {linestrings: {opacity: 0.5}} : {})
        }
Screen Shot 2022-11-23 at 10 49 57 AM
Proposal

Honestly. I am not sure what would be a good solution here that doesn't affect performance. If we renders a composite layer just for the stroke then we will be passing the same buffer twice. If we use the hi definition prop which renders a geojson layer instead, it also hurts performance.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.