Commit Graph

20 Commits

Author SHA1 Message Date
Anand Thakker
f901e776b3 [core] Implement data-driven styling for {text,icon}-{color,opacity,halo-color,halo-blur,halo-width} (#7939)
* Add symbol dds attributes and adapt style code generation

* Update to mapbox-gl-js/master

* Refactor SymbolFeature as a subclass of GeometryTileFeature

Prepares for enabling DDS on symbol paint properties by allowing the
SymbolFeatures, which we keep around after constructing SymbolLayout,
to be used in evaluating data-driven paint properties later in the
layout process.

* Draft approach for splitting icon/text paint properties

The `Program` types are set up to bind GL attributes to each of the
data-driven paint properties specified in the `PaintProperties` type
provided.  Since `SymbolPaintProperties` specifies both `Text*` and
`Icon*` properties, the symbolIcon, symbolIconSDF, and symbolGlyph
programs each attempt to bind roughly double the number of attributes
that they actually need.

This change addresses this by:
- Adding the more specific `IconPaintProperties` and `TextPaintProperties` types, which are subsets of the full `SymbolPaintProperties`.
- The symbol layer continues to use its `SymbolPaintProperties paint` member to track layer property state, but it provides helpers that construct objects of each the specific `{Icon,Text}PaintProperties::Evaluated` type, for use by the painter.
- The three symbol programs instantiate `Program<>` using the appropriate `{Icon,Text}PaintProperties` type.

* check in generated style code

* Populate paint buffers for symbol DDS properties

* Address first round of review comments

* Refactor VectorTile{Layer,Feature} to explicitly share data

* Update submodule
2017-02-28 19:54:24 -08:00
John Firebaugh
94a3c272ff [core] Update gl-js; fix $id filters with GeoJSON source 2017-02-08 19:07:53 -06:00
John Firebaugh
141e995806 [core] Add support for data-driven styling 2017-02-02 09:44:42 -08:00
John Firebaugh
9c5abc1221 [build] Use style-spec from gl-js monorepo 2017-02-01 08:11:01 -08:00
John Firebaugh
3b2a4216a2 [core] Implement circle-stroke properties
Also includes stubs for fill-extrusion layer, because most of the code was auto-generated.
2016-12-09 09:35:21 -08:00
Konstantin Käfer
2411ec83b1 [build] don't rewrite style code for every build
revert of 93166aef48

On Android, we always rewrote the style code files, which lead to gratuitous recompiles
2016-11-09 11:10:22 +01:00
Konstantin Käfer
a4d259c33f [core] move gl::Context to Backend and refactor View 2016-10-25 13:52:36 -07:00
Justin R. Miller
ee4715a821 update style generation code for new style spec enum values docs (#6508)
Documentation for enum values landed in mapbox/mapbox-gl-style-spec#510. 

This updates Android, iOS, and macOS documentation code gen scripts to capitalize on them.
2016-09-30 15:55:46 -07:00
John Firebaugh
63cce78cf1 [core] Add static getters for property default values (#6124) 2016-08-23 12:49:47 -07:00
Konstantin Käfer
c88b05e110 [core] make code generator produce GL-compatible colors
this makes sure colors are premultiplied and the RGB values are in the 0..1 range rather than in the 0..255 range.
2016-07-07 11:33:42 +02:00
John Firebaugh
16c435b151 [core, node] Implement bindings for addLayer 2016-06-24 09:39:51 -07:00
Young Hahn
24b66bc8cd Color class (#5361)
* Color class

* Switch to list initialization
2016-06-15 11:38:22 -04:00
John Firebaugh
3f5ea169f5 [node] Partial implementation of runtime styling API for node bindings 2016-06-13 17:22:05 -07:00
John Firebaugh
039b05ebb4 [core] Extract code templates to individual .ejs files 2016-06-13 17:22:05 -07:00
Young Hahn
ecd4aa1439 text-pitch-alignment (#5288)
* First pass at port of https://github.com/mapbox/mapbox-gl-js/pull/2668

* RotationAlignmentType => AlignmentType

* Handle undefined default value for text-pitch-alignment and implement inheritance for this value from text-rotation-alignment

* Update dependencies

* Move handling fo undefined default value out of camelize functions
2016-06-10 23:05:15 -04:00
John Firebaugh
47d6903f4e [core] Revert line-round-limit default to 1 (#5260)
Refs #5258, #5234.
2016-06-06 12:45:40 -07:00
John Firebaugh
c902f9098b [core] Rationalize naming for style-related code 2016-06-02 14:51:39 -07:00
John Firebaugh
67ee51360c [core] Add Filter accessors 2016-06-02 14:51:39 -07:00
John Firebaugh
cadc617c76 [core] Introduce PropertyValue<T>
PropertyValue<T> represents the three possible types of style property value: undefined, constant, or function.
2016-06-02 14:51:39 -07:00
John Firebaugh
a43940afb2 [core] Runtime style layer API 2016-06-02 14:51:39 -07:00