allow multiple attributes per style-spec property #6262
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This refactor is necessary for #2732 because
*-pattern
properties are cross-faded and require more data to be passed to the shaders – the x,y coordinates of the top-left and bottom-right corners of up to four icons in an image_atlas, and the pixel ratio of the atlas – that can be packed in onevec4
attribute.I added a function that takes a
property
andtype
and returns thePaintVertexArray
constructor for the layout needed for that property/type/expression type. This is where we will be able to add exceptions to the default paint vertex array layouts for properties with multiple attributes.I haven't settled on a good way to extend the
populatePaintArrays
functionality to accommodate special cases yet, but it might make sense to work that out in the follow up PR implementingline-pattern
property functions.Launch Checklist