FatLine(param)

new FatLine(param)

构造函数
Parameters:
Name Type Description
param object 初始化参数
Properties
Name Type Attributes Default Description
points Array.<Array.<number>> 路径坐标的数组
width number <optional>
1 线宽度(像素)
cornerThreshold number <optional>
0.4 转角系数(详见属性说明)
uvScroll boolean <optional>
false 是否开启贴图流动
uvScrollSpeed Array.<number> <optional>
[1,0] 贴图流动速度
style object <optional>
线样式

Members

cornerThreshold :number

线方向改变的控制转角效果的一个参数 值越小,转角越尖锐,但是值较大时,拐弯处可能会有间断
Default Value:
  • 0.4
Example
// 获取转角系数
const cornerThreshold = this.cornerThreshold;
// 设置转角系数
this.cornerThreshold = 0.8;

width :number

线宽度(像素)
Default Value:
  • 1.0
Example
// 获取宽度
const width = this.width;
// 设置宽度
this.width = 2.0;