Skip to content

Commit

Permalink
Website updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ahocevar committed Nov 16, 2023
1 parent 7a93886 commit 6c34b9c
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion dist/en/main/examples/common.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/en/main/examples/common.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/en/main/ol/dist/ol.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/en/main/ol/dist/ol.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/en/main/ol/renderer/webgl/PointsLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class WebGLPointsLayerRenderer extends WebGLLayerRenderer {

if (this.hitDetectionEnabled_) {
this.attributes.push({
name: 'a_hitColor',
name: 'a_prop_hitColor',
size: 4,
type: AttributeType.FLOAT,
});
Expand Down
30 changes: 15 additions & 15 deletions dist/en/main/ol/webgl/ShaderBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,15 +480,15 @@ ${this.uniforms_
.join('\n')}
attribute vec2 a_position;
attribute float a_index;
attribute vec4 a_hitColor;
attribute vec4 a_prop_hitColor;
${this.attributes_
.map(function (attribute) {
return 'attribute ' + attribute + ';';
})
.join('\n')}
varying vec2 v_texCoord;
varying vec2 v_quadCoord;
varying vec4 v_hitColor;
varying vec4 v_prop_hitColor;
varying vec2 v_centerPx;
varying float v_angle;
varying vec2 v_quadSizePx;
Expand Down Expand Up @@ -532,7 +532,7 @@ void main(void) {
float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.p;
float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.q;
v_texCoord = vec2(u, v);
v_hitColor = a_hitColor;
v_prop_hitColor = a_prop_hitColor;
v_angle = angle;
c = cos(-v_angle);
s = sin(-v_angle);
Expand Down Expand Up @@ -562,7 +562,7 @@ ${this.uniforms_
})
.join('\n')}
varying vec2 v_texCoord;
varying vec4 v_hitColor;
varying vec4 v_prop_hitColor;
varying vec2 v_centerPx;
varying float v_angle;
varying vec2 v_quadSizePx;
Expand All @@ -582,7 +582,7 @@ void main(void) {
gl_FragColor = ${this.symbolColorExpression_};
if (u_hitDetection > 0) {
if (gl_FragColor.a < 0.05) { discard; };
gl_FragColor = v_hitColor;
gl_FragColor = v_prop_hitColor;
}
}`;
}
Expand All @@ -609,7 +609,7 @@ attribute vec2 a_segmentEnd;
attribute float a_parameters;
attribute float a_distance;
attribute vec2 a_joinAngles;
attribute vec4 a_hitColor;
attribute vec4 a_prop_hitColor;
${this.attributes_
.map(function (attribute) {
return 'attribute ' + attribute + ';';
Expand All @@ -620,7 +620,7 @@ varying vec2 v_segmentEnd;
varying float v_angleStart;
varying float v_angleEnd;
varying float v_width;
varying vec4 v_hitColor;
varying vec4 v_prop_hitColor;
varying float v_distanceOffsetPx;
${this.varyings_
.map(function (varying) {
Expand Down Expand Up @@ -696,7 +696,7 @@ void main(void) {
v_segmentStart = segmentStartPx;
v_segmentEnd = segmentEndPx;
v_width = lineWidth;
v_hitColor = a_hitColor;
v_prop_hitColor = a_prop_hitColor;
v_distanceOffsetPx = a_distance / u_resolution - (lineOffsetPx * angleTangentSum);
${this.varyings_
.map(function (varying) {
Expand Down Expand Up @@ -727,7 +727,7 @@ varying vec2 v_segmentEnd;
varying float v_angleStart;
varying float v_angleEnd;
varying float v_width;
varying vec4 v_hitColor;
varying vec4 v_prop_hitColor;
varying float v_distanceOffsetPx;
${this.varyings_
.map(function (varying) {
Expand Down Expand Up @@ -856,7 +856,7 @@ void main(void) {
gl_FragColor = color * smoothstep(0., -1., distance);
if (u_hitDetection > 0) {
if (gl_FragColor.a < 0.1) { discard; };
gl_FragColor = v_hitColor;
gl_FragColor = v_prop_hitColor;
}
}`;
}
Expand All @@ -878,13 +878,13 @@ ${this.uniforms_
})
.join('\n')}
attribute vec2 a_position;
attribute vec4 a_hitColor;
attribute vec4 a_prop_hitColor;
${this.attributes_
.map(function (attribute) {
return 'attribute ' + attribute + ';';
})
.join('\n')}
varying vec4 v_hitColor;
varying vec4 v_prop_hitColor;
${this.varyings_
.map(function (varying) {
return 'varying ' + varying.type + ' ' + varying.name + ';';
Expand All @@ -893,7 +893,7 @@ ${this.varyings_
${this.vertexShaderFunctions_.join('\n')}
void main(void) {
gl_Position = u_projectionMatrix * vec4(a_position, u_depth, 1.0);
v_hitColor = a_hitColor;
v_prop_hitColor = a_prop_hitColor;
${this.varyings_
.map(function (varying) {
return ' ' + varying.name + ' = ' + varying.expression + ';';
Expand All @@ -917,7 +917,7 @@ ${this.uniforms_
return 'uniform ' + uniform + ';';
})
.join('\n')}
varying vec4 v_hitColor;
varying vec4 v_prop_hitColor;
${this.varyings_
.map(function (varying) {
return 'varying ' + varying.type + ' ' + varying.name + ';';
Expand Down Expand Up @@ -954,7 +954,7 @@ void main(void) {
gl_FragColor = ${this.fillColorExpression_} * u_globalAlpha;
if (u_hitDetection > 0) {
if (gl_FragColor.a < 0.1) { discard; };
gl_FragColor = v_hitColor;
gl_FragColor = v_prop_hitColor;
}
}`;
}
Expand Down

0 comments on commit 6c34b9c

Please sign in to comment.