Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

高德地图:3D模式下,渲染很卡顿 #63

Closed
justwiner opened this issue May 19, 2020 · 3 comments
Closed

高德地图:3D模式下,渲染很卡顿 #63

justwiner opened this issue May 19, 2020 · 3 comments

Comments

@justwiner
Copy link

高德地图版本: 1.4.15
amap-wind版本: 1.0.0-alpha.6
wind-core版本:1.0.0-alpha.6

数据是使用的demo中的数据:https://sakitam-fdd.github.io/wind-layer/data/wind.json

地图在2D模式下,渲染位置正常,且不卡顿,但是在3D模式下,渲染就很卡,地图的相关操作也卡,例如放大缩小、拖动等。

这个在DEMO中好像也有问题: https://github.com/sakitam-fdd/wind-layer/blob/master/examples/amap.html

这个是什么原因导致的呢?

@sakitam-fdd
Copy link
Owner

@justwiner 卡顿的原因可能有两个:

  1. wind-core 目前默认使用实时坐标转换来绘制粒子路径,每一帧可能绘制几千个坐标,这个在高德和百度地图上转换效率特别慢。
  2. 有可能和高德地图的CanvasLayer绘制性能有关

@justwiner
Copy link
Author

@justwiner 卡顿的原因可能有两个:

  1. wind-core 目前默认使用实时坐标转换来绘制粒子路径,每一帧可能绘制几千个坐标,这个在高德和百度地图上转换效率特别慢。
  2. 有可能和高德地图的CanvasLayer绘制性能有关

2D和3D的绘制性能差距这么大吗, 都是用的canvasLayer,2D其实挺流畅的, 2333,如果能在3D下流畅渲染,地图可视化就舒服了。

感谢解答

@sakitam-fdd
Copy link
Owner

@justwiner 高德地图优化了一版 amap-wind@1.0.0-alpha.9,这个不使用它内置canvasLayer,但是感觉性能提升不是太大,主要瓶颈还是在坐标转换这了,后面会尝试一下webgl 方式看看效果

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants