summaryrefslogtreecommitdiff
path: root/scripts/generate-style-code.js
Commit message (Collapse)AuthorAgeFilesLines
* Enable 'circle-sort-key' layout propertyAndrew Hay Kurtz2020-04-141-3/+0
|
* Make location indicator bearing a paint propertyGali Nelle2020-04-081-0/+7
| | | | | | This change introduces a new property type, Rotation, that uses a custom interpolator, and that is currently applied to all style properties named "bearing", with a period attribute.
* Add LocationIndicatorLayerGali Nelle2020-04-081-2/+2
| | | | | New key is "G" in mbgl-glfw, cycling between no puck, centered in the viewport and positioned in Tokyo.
* [core] Enable 'line-sort-key' and 'fill-sort-key' layout properties (#15839)Andrew Hay Kurtz2019-12-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Generate style code for 'line-sort-key' and 'symbol-sort-key' - Add new layout properties to FillLayer::Impl, FillBucket, and FillLayerFactory - Fix consistency of paint and layout properties type alias usage in FillBucket, LineBucket - Add optional feature sorting to fill and line Layout creation - Enable node render tests for fill-sort-key and line-sort-key - Fix FillBucket test construction - Prefer emplace_back to push_back for PatternFeature container - Fix buggy static_cast for PatternFeature indices - Maintain sort of features as they are created - Switch pattern layout features container to list from vector for better insert performance - Fix formatting expected by sanity check - Use subclass PatternLayoutSorted to work around lack of template functions - Fix to retain source order for features with equivalent sort keys during sorting - [core] Fix clang-format - [core] Address review comments - [core] Pass inserting strategy class at compile time - [core] Use sorted strategy only if sort key is defined in layout - [core] Update style generator - [core] Merge PatternLayout and PatternLayoutSorted classes - Use static methods for inserter strategies - Merge PatternLayout and PatternLayoutSorted classes
* [core] Implement image expression (#15877)Alexander Shalamov2019-11-111-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [core] Bump gl-js version * [core] Implement image expression * [core] Use new image expression * [core] Coerce image expression to / from string * [core] Serialize evaluated image * [core] Pass available images to layout * [core] Pass images to evaluation context * [core] Set available flag value based on image availability * [core] Allow image coercion to boolean to indicate image availability * [core] Coalesce image expression * [core] Add image expression to next build system * [core] Align serialization format and evaluated type with gl-js * [core] Add images to expression evaluation method * [core] Add support for Image expression to expression test runner * [core] Unskip image expression tests * [core] Update unit tests * [core] Use image expression in annotation manager * [core] Add string to ImageExpression conversion * [core] Add image expression to expression dsl * [core] Convert tokens for implicitly created Image literal * [core] Fix clang format * [core] Split generated style code lines that are over 120 characters * [core] Add unit test for image expression equality * [core] Add image property expression evaluation unit test * [core] Unskip image expression render test * [core] Skip 'in' expression tests * [core] Ignore fill-pattern/update-feature-state render test * [core] Rename Image::serialize to Image::toValue
* [core] map image type to string until we have a dedicated implementationKonstantin Käfer2019-10-141-0/+3
|
* [tests] Bump GL JS to run render test for #15139Thiago Marcos P. Santos2019-07-191-0/+5
| | | | https://github.com/mapbox/mapbox-gl-js/pull/8510
* [build] change style code generator to sort properties alphabeticallyKonstantin Käfer2019-05-021-0/+14
| | | | JSON keys in our style specification don't have a defined order. This change sorts them alphabetically so that we can rely on the order remaining them same across code generation runs.
* [build] change special casing for LineFloorWidth in shader generationKonstantin Käfer2019-05-021-3/+17
|
* [core] Enable 'text-radial-offset' propertyMikhail Pozdnyakov2019-03-291-0/+4
|
* [core] Enable text-variable-anchor propertyMikhail Pozdnyakov2019-03-291-1/+1
|
* [core] remove a_/u_ prefix from attribute/uniform typesKonstantin Käfer2019-03-201-1/+1
|
* [core] Add possibility of overriding paint properties inside format ↵Alexander Shalamov2019-03-131-0/+25
| | | | | | | | | | | | | | | | | | expression #14062 * [core] Add format override expression and formatted section to evaluation context * [core] Add textColor to TaggedString's formatted section * [core] Add FormatSectionOverrides and introduce overridable properties * [core] Populate symbol layer paint properties for text sections * [core] Add benchmark for style that uses text-color override * [core] Add unit test for FormatOverrideExpression * [core] Add unit test for FormatSectionOverrides
* [core] remove special casing in code genKonstantin Käfer2019-03-011-1/+1
|
* [core] Initial implementation of 'format' expressionChris Loer2018-10-151-0/+1
|
* [core] Implement CrossFadedDataDrivenProperty to add support for feature ↵Molly Lloyd2018-08-311-15/+22
| | | | expressions in `*-pattern` properties
* [core] Add `line-gradient` propertyMikhail Pozdnyakov2018-08-231-1/+1
| | | | | | | | Porting of https://github.com/mapbox/mapbox-gl-js/pull/6303 See the link above for the description of the feature and its limitations). Based on patch from @lbud (Lauren Budorick).
* [core, test] Bump GL JS pin to bring gl-native back in sync with gl-js.Chris Loer2018-08-211-0/+2
| | | | | Requires changing `generate-style-code` to treat 'formatted' as being the same as 'string' until gl-native gets 'formatted' support with https://github.com/mapbox/mapbox-gl-native/pull/12624. To make nitpick happy, PropertyFunction.java uses the latest "text-field" description from v8.json. It's technically correct, just kind of pointless since the "If a plain `string` is provided" clause will always be true.
* [core] Eliminate setProperty & co.John Firebaugh2018-08-131-3/+0
|
* [core] Merge DataDrivenPropertyValue into PropertyValue (#12513)John Firebaugh2018-07-311-3/+0
|
* Rename `HeatmapColorPropertyValue` to `ColorRampPropertyValue`Mikhail Pozdnyakov2018-07-051-1/+1
| | | | | | | | Based on patch from @lbud (Lauren Budorick). Give `HeatmapColorPropertyValue` a more generic name, since the same value type will be used for both `heatmap-color` and `line-gradient` properties.
* [core] Rework spec function/expression taxonomyLauren Budorick2018-05-141-20/+22
| | | Ports https://github.com/mapbox/mapbox-gl-js/pull/6521, updating codegen scripts to parse new expression taxonomy.
* [core, ios, macos, android, node] Heatmap layer (#11046)Vladimir Agafonkin2018-02-151-0/+2
| | | | | Co-Authored-By: Konstantin Käfer <mail@kkaefer.com> Co-Authored-By: Anand Thakker <anandthakker@users.noreply.github.com> Co-Authored-By: Minh Nguyễn <1ec5@users.noreply.github.com>
* [build] Always use style-code's writeIfModified to unify file updatesKonstantin Käfer2018-01-241-0/+1
|
* [build] Add temporary modifications to style spec + shadersKonstantin Käfer2018-01-241-1/+1
| | | | This ensures that the generated code matches what is checked in. Remove those temporary modifications once we add the features to master.
* [build] Special case heatmap-color so it doesn't crash `make style-code`John Firebaugh2018-01-101-0/+4
|
* Replace compile-time polymorphism with runtime polymorphism in the ↵John Firebaugh2017-10-231-2/+2
| | | | conversion system
* Implement icon-anchor propertyLauren Budorick2017-08-281-0/+3
|
* [core] add DataDrivenPaintProperty uniform template class to generation ↵Lauren Budorick2017-06-161-4/+5
| | | | script (#9297)
* [core] generated accessor methods on lightIvo van Dongen2017-05-081-1/+22
|
* [core] Implement data-driven styling for ↵Anand Thakker2017-02-281-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | {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
* [core] Update gl-js; fix $id filters with GeoJSON sourceJohn Firebaugh2017-02-081-1/+1
|
* [core] Add support for data-driven stylingJohn Firebaugh2017-02-021-5/+40
|
* [build] Use style-spec from gl-js monorepoJohn Firebaugh2017-02-011-1/+1
|
* [core] Implement circle-stroke propertiesJohn Firebaugh2016-12-091-9/+11
| | | | Also includes stubs for fill-extrusion layer, because most of the code was auto-generated.
* [build] don't rewrite style code for every buildKonstantin Käfer2016-11-091-17/+10
| | | | | | revert of 93166aef482ea5835d87231f88d369449398ccdf On Android, we always rewrote the style code files, which lead to gratuitous recompiles
* [core] move gl::Context to Backend and refactor ViewKonstantin Käfer2016-10-251-1/+1
|
* update style generation code for new style spec enum values docs (#6508)Justin R. Miller2016-09-301-1/+1
| | | | | | 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.
* [core] Add static getters for property default values (#6124)John Firebaugh2016-08-231-1/+15
|
* [core] make code generator produce GL-compatible colorsKonstantin Käfer2016-07-071-1/+8
| | | | this makes sure colors are premultiplied and the RGB values are in the 0..1 range rather than in the 0..255 range.
* [core, node] Implement bindings for addLayerJohn Firebaugh2016-06-241-2/+2
|
* Color class (#5361)Young Hahn2016-06-151-1/+1
| | | | | | * Color class * Switch to list initialization
* [node] Partial implementation of runtime styling API for node bindingsJohn Firebaugh2016-06-131-6/+11
|
* [core] Extract code templates to individual .ejs filesJohn Firebaugh2016-06-131-275/+4
|
* text-pitch-alignment (#5288)Young Hahn2016-06-101-3/+7
| | | | | | | | | | | | * 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
* [core] Revert line-round-limit default to 1 (#5260)John Firebaugh2016-06-061-0/+5
| | | Refs #5258, #5234.
* [core] Rationalize naming for style-related codeJohn Firebaugh2016-06-021-15/+25
|
* [core] Add Filter accessorsJohn Firebaugh2016-06-021-0/+14
|
* [core] Introduce PropertyValue<T>John Firebaugh2016-06-021-15/+17
| | | | PropertyValue<T> represents the three possible types of style property value: undefined, constant, or function.
* [core] Runtime style layer APIJohn Firebaugh2016-06-021-0/+346