ecomfe / zrender

A lightweight graphic library providing 2d draw for Apache ECharts
https://ecomfe.github.io/zrender-doc/public/
BSD 3-Clause "New" or "Revised" License
6.05k stars 1.56k forks source link

多段曲线是否已经不支持 Catmull-Rom spline 插值算法了? #900

Closed FourLeafTec closed 2 years ago

FourLeafTec commented 2 years ago

实测无论是Polyline还是Polygon,smooth属性设置为spline都就不进行绘制了

并且在仓库中搜索smoothSpline方法也并未被任何代码使用

现在是不是不支持Catmull-Rom spline 插值算法了?

pissang commented 2 years ago

https://github.com/ecomfe/zrender/blob/master/src/graphic/helper/smoothSpline.ts

代码还在,但是 Polyline 和 Polygon 移除了 spline 的平滑方法,可以在外部调用后作为 points 传入

FourLeafTec commented 2 years ago

了解了,跟我想的一样