mirror of https://gitee.com/antv-l7/antv-l7
Merge branch 'fix-renderPass' into 'master'
fix(renderTarget): 修复了threeJS更新版本后引发的renderPass渲染问题 threeJs版本更新后,对于renderTarget的使用应为: ``` renderer.setRenderTarget( target ); renderer.render( scene, camera ); //渲染到屏幕 renderer.setRenderTarget (null); ``` 但是不知为何,这样挂载renderTarget的效果是错误的,具体原因还没看。 heatmap和其他layer无法混用的问题,目前采用这种方式解决: ``` renderer.render(scene,camera,target,true); renderer.setRenderTarget(null); ``` See merge request !14
This commit is contained in:
commit
c4fed7bd23
|
@ -43,6 +43,14 @@ scene.on('loaded', () => {
|
|||
}
|
||||
})
|
||||
.render();
|
||||
/*scene.PointLayer({
|
||||
zIndex: 2
|
||||
})
|
||||
.source(data)
|
||||
.shape('2d:circle')
|
||||
.size(2) // weight映射通道
|
||||
.color('red')
|
||||
.render();*/
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ export default class HeatMapLayer extends Layer {
|
|||
|
||||
afterRender() {
|
||||
if (this.shapeType !== 'grid' && this.shapeType !== 'hexagon') {
|
||||
updateIntensityPass(this);
|
||||
// updateIntensityPass(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue