Skip to content

Commit 9f7e84c

Browse files
authored
Add property functions for circle-opacity and circle-blur (#2693)
* Add property functions for circle-opacity and circle-blur * Update package.json * Ignore failing tests * Ignore circle-opacity property-function test
1 parent ee8365c commit 9f7e84c

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

js/data/bucket/circle_bucket.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,26 @@ CircleBucket.prototype.programInterfaces = {
5555
},
5656
multiplier: 10,
5757
paintProperty: 'circle-radius'
58+
}, {
59+
name: 'a_blur',
60+
components: 1,
61+
type: 'Uint16',
62+
isLayerConstant: false,
63+
getValue: function(layer, globalProperties, featureProperties) {
64+
return [layer.getPaintValue("circle-blur", globalProperties, featureProperties)];
65+
},
66+
multiplier: 10,
67+
paintProperty: 'circle-blur'
68+
}, {
69+
name: 'a_opacity',
70+
components: 1,
71+
type: 'Uint16',
72+
isLayerConstant: false,
73+
getValue: function(layer, globalProperties, featureProperties) {
74+
return [layer.getPaintValue("circle-opacity", globalProperties, featureProperties)];
75+
},
76+
multiplier: 255,
77+
paintProperty: 'circle-opacity'
5878
}]
5979
}
6080
};

js/render/draw_circle.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ function drawCircles(painter, source, layer, coords) {
3636
gl.uniform2f(program.u_extrude_scale,
3737
painter.transform.pixelsToGLUnits[0] * painter.transform.altitude,
3838
painter.transform.pixelsToGLUnits[1] * painter.transform.altitude);
39-
gl.uniform1f(program.u_blur, layer.paint['circle-blur']);
4039
gl.uniform1f(program.u_devicepixelratio, browser.devicePixelRatio);
41-
gl.uniform1f(program.u_opacity, layer.paint['circle-opacity']);
4240

4341
gl.uniformMatrix4fv(program.u_matrix, false, painter.translatePosMatrix(
4442
coord.posMatrix,

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"grid-index": "^0.1.0",
2323
"mapbox-gl-function": "^1.2.1",
2424
"mapbox-gl-js-supported": "^1.1.0",
25-
"mapbox-gl-shaders": "mapbox/mapbox-gl-shaders#895c46d392c1cc1797fd7d776976d3138414afd7",
25+
"mapbox-gl-shaders": "mapbox/mapbox-gl-shaders#9af2892c56c74c4d2d7e5cc59b6e5e4fe3837c6f",
2626
"mapbox-gl-style-spec": "^8.7.0",
2727
"minifyify": "^7.0.1",
2828
"pbf": "^1.3.2",
@@ -57,7 +57,7 @@
5757
"highlight.js": "9.3.0",
5858
"istanbul": "^0.4.2",
5959
"lodash": "^4.13.1",
60-
"mapbox-gl-test-suite": "mapbox/mapbox-gl-test-suite#5c38f278f92688c68db115601663d5ac125a1961",
60+
"mapbox-gl-test-suite": "mapbox/mapbox-gl-test-suite#6d3bcff5d51f6acea41230ffabad6bebdea49fa3",
6161
"nyc": "^6.1.1",
6262
"remark": "4.2.2",
6363
"remark-html": "3.0.0",

0 commit comments

Comments
 (0)