Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for RGB color format #3338

Merged
merged 4 commits into from
Jul 12, 2019
Merged

Add support for RGB color format #3338

merged 4 commits into from
Jul 12, 2019

Conversation

Pessimistress
Copy link
Collaborator

For #3197

There is a small save on resources, but this is most useful when using external buffers.

Change List

  • Add colorFormat prop
  • Fix positionFormat support in PolygonLayer
  • Documentation


Setting it to `'RGB'` will make the layer ignore the alpha channel and assume `a: 255`.

Default `'RGBA'`.
Copy link
Contributor

Choose a reason for hiding this comment

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

3D tiles also have rgb565 color format. Do you think it could also be provided in deck.gl?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, that cannot be done without changing attribute generation.

@coveralls
Copy link

coveralls commented Jul 11, 2019

Coverage Status

Coverage increased (+0.007%) to 82.202% when pulling 4defecb on x/rgb-color into 6aeb983 on master.


Default `'XYZ'`.

##### `colorFormat` (String, optional)
Copy link
Contributor

@tsherif tsherif Jul 11, 2019

Choose a reason for hiding this comment

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

It might simplify things to make these numbers, e.g. positionDimensions and colorChannels. Then setting the size would just be size: this.props.colorChannels (with a default of 4). Also leaves the door open for passing fewer components (if that might ever be useful?).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Unfortunately positionFormat has been a public API since v6. I can change the usage to size: this.props.colorFormat.length though.

@Pessimistress Pessimistress merged commit ea0e58d into master Jul 12, 2019
@Pessimistress Pessimistress deleted the x/rgb-color branch July 12, 2019 02:37
ajduberstein pushed a commit that referenced this pull request Aug 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants