From a2e00e382b0dbb4b2708bc36cbf4e32ef74d18a2 Mon Sep 17 00:00:00 2001 From: "mipha.ly" Date: Sat, 16 Mar 2019 20:00:32 +0800 Subject: [PATCH] =?UTF-8?q?fix(renderTarget):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=BA=86threeJS=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC=E5=90=8E?= =?UTF-8?q?=E5=BC=95=E5=8F=91=E7=9A=84renderPass=E6=B8=B2=E6=9F=93?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demos/heatmap.html | 8 ++++++++ src/core/engine/renderpass.js | 2 ++ src/layer/heatmapLayer.js | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/demos/heatmap.html b/demos/heatmap.html index 62a929564f..b1be148909 100644 --- a/demos/heatmap.html +++ b/demos/heatmap.html @@ -43,6 +43,14 @@ scene.on('loaded', () => { } }) .render(); + /*scene.PointLayer({ + zIndex: 2 + }) + .source(data) + .shape('2d:circle') + .size(2) // weight映射通道 + .color('red') + .render();*/ }); }); diff --git a/src/core/engine/renderpass.js b/src/core/engine/renderpass.js index b39cb5de07..f6d3f0c0df 100644 --- a/src/core/engine/renderpass.js +++ b/src/core/engine/renderpass.js @@ -36,8 +36,10 @@ export default class RenderPass { } render() { + this.renderer.setClearColor(this.clearColor, this.clearAlpha); this.renderer.render(this.scene, this.camera, this.pass, true); + this.renderer.setRenderTarget(null); this.renderer.setClearColor(this.originClearColor, this.originClearAlpha); } } diff --git a/src/layer/heatmapLayer.js b/src/layer/heatmapLayer.js index 0a6931bfb2..4b4cc6e82b 100644 --- a/src/layer/heatmapLayer.js +++ b/src/layer/heatmapLayer.js @@ -58,7 +58,7 @@ export default class HeatMapLayer extends Layer { afterRender() { if (this.shapeType !== 'grid' && this.shapeType !== 'hexagon') { - updateIntensityPass(this); + // updateIntensityPass(this); } }