-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Text-layer #804
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
Text-layer #804
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we not adding this style file to deck.gl's repo? we'd like to keep the size of the repo down
46f9819
to
2c1fce5
Compare
@shaojingli The style file has been removed (will also remove the same file from the tagmap example). There are some known issues with style diffing, so set |
2c1fce5
to
c07b1b4
Compare
c07b1b4
to
87500bc
Compare
Hi @shaojingli I've made a few changes in the vertex shader to fix the icon rotation issue (See #834 ). You can feel free to merge it now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great. Once it is landed we should review this, to see if this could be promoted to a core layer.
@@ -0,0 +1,101 @@ | |||
/* eslint-disable max-len */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have an examples/sample-layers
folder, might be a good place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. Actually, it would be nice to have it as a core layer so that for other text-related layer dev (e.g., tagmap) we do not need to duplicate the code.
So here comes a text layer for deck.gl. This version is probably more scalable than the existing label layer implementation as it does not require dynamically generating texture for labels. Instead, it uses a font atlas (small, around 50k) to iteratively render letters of the label. The layer is mainly built upon the icon layer and overrides its vertex shader and calculates the offset of each letter in the string.
Let me know if there is anything I need to adjust before merging.