Skip to content

Commit 43899b9

Browse files
committed
Website updates
1 parent 65dda08 commit 43899b9

File tree

6 files changed

+9
-14
lines changed

6 files changed

+9
-14
lines changed

dist/en/main/examples/common.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/examples/common.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/dist/ol.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/dist/ol.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/layer/Heatmap.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/layer/Heatmap.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -333,20 +333,15 @@ class Heatmap extends BaseVector {
333333
weightExpression = expressionToGlsl(context, clampedWeight, NumberType);
334334
}
335335

336+
const blurSlopeExpr = `(${radiusCompiled} / max(1., ${blurCompiled}))`;
337+
336338
builder
337-
.addFragmentShaderFunction(
338-
`float getBlurSlope() {
339-
float blur = max(1., ${blurCompiled});
340-
float radius = ${radiusCompiled};
341-
return radius / blur;
342-
}`,
343-
)
344339
.setSymbolSizeExpression(`vec2(${radiusCompiled} + ${blurCompiled}) * 2.`)
345340
.setSymbolColorExpression(
346-
`vec4(smoothstep(0., 1., (1. - length(coordsPx * 2. / v_quadSizePx)) * getBlurSlope()) * ${weightExpression})`,
341+
`vec4(smoothstep(0., 1., (1. - length(coordsPx * 2. / v_quadSizePx)) * ${blurSlopeExpr}) * ${weightExpression})`,
347342
)
348343
.setStrokeColorExpression(
349-
`vec4(smoothstep(0., 1., (1. - length(currentRadiusPx * 2. / v_width)) * getBlurSlope()) * ${weightExpression})`,
344+
`vec4(smoothstep(0., 1., (1. - length(currentRadiusPx * 2. / v_width)) * ${blurSlopeExpr}) * ${weightExpression})`,
350345
)
351346
.setStrokeWidthExpression(`(${radiusCompiled} + ${blurCompiled}) * 2.`)
352347
.setFillColorExpression(`vec4(${weightExpression})`);

0 commit comments

Comments
 (0)