Skip to content

Conversation

rivulet-zhang
Copy link

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.

Copy link

@howtimeflies0 howtimeflies0 left a 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

@rivulet-zhang
Copy link
Author

@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 preventStyleDiffing to be true for now.

@rivulet-zhang
Copy link
Author

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.

Copy link
Collaborator

@ibgreen ibgreen left a 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 */
Copy link
Collaborator

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.

Copy link
Author

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.

@howtimeflies0 howtimeflies0 merged commit db3010e into visgl:master Aug 9, 2017
@rivulet-zhang rivulet-zhang deleted the text-layer branch August 10, 2017 00:52
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.

3 participants