Class: TrailLines

Glodon.CIMCube.Animation.LineEffect. TrailLines

轨迹线特效

new TrailLines(viewer, opt)

轨迹线特效
Parameters:
Name Type Description
viewer Glodon.CIMCube CIMCube实例
opt Object 轨迹线特效参数
Properties
Name Type Argument Default Description
pathList Array 线的数据;
lineType number 连线效果类型 0:实线|2:虚线
lineColor Color 线的颜色
lineWidth Number <optional>
1 线的宽度
duration Number <optional>
1 动态线的场合,动画时长
clampToGround Boolean <optional>
false 动态线是否贴地
imageUrl String 线的图片效果;默认为渐进色图片
startTime Number <optional>
0 开始时间,小于duration;
repeat Boolean <optional>
true 是否循环
lineLengthLimit Number 线段长度限制(米),默认为无限制,超过限制,自动切割;根据效果需求调整,通常300左右即可
nearDistanceDisplay Number <optional>
0 特效近点可视范围(米)
farDistanceDisplay Number 特效远点可视范围(米),默认为没有限制 虚线专有属性:
gapColor Color gap颜色,默认透明
dashLength number <optional>
64 虚线长度 箭头图片:
arrowImageUrl String 箭头的图片url
arrowLength Number <optional>
3 箭头长度;相邻像素在屏幕空间上的距离差值,GPU在像素化的基本单位
arrowWidth Number <optional>
3 箭头宽度,箭头宽度为线的X倍

Methods


deletePath()

删除路径。

dispose()

释放资源

hide()

隐藏

setPathData(pathList)

设置路径数据。
Parameters:
Name Type Description
pathList Array 路径列表。

show()

显示

updateEntityShow()

更新实体显隐。

updateMyOption(opt)

更新参数。
Parameters:
Name Type Description
opt Object 参数。
Properties
Name Type Argument Default Description
lineType number 线类型。
clampToGround Boolean 是否贴地。
lineWidth Number <optional>
线宽。
lineLengthLimit Number 线长限制。
nearDistanceDisplay Number <optional>
0 近距离显示。
farDistanceDisplay Number 远距离显示。
lineColor Color 线颜色。
imageUrl String 图片地址。
duration Number <optional>
时长。
dashLength number 虚线长度。
gapColor Color 间隔颜色。
repeat Boolean <optional>
重复。
startTime Number <optional>
开始时间。
arrowImageUrl String 箭头图片地址。
arrowLength Number 箭头长度。
arrowWidth Number 箭头宽度。

updateVisibleDistance(isChange)

更新可见距离。
Parameters:
Name Type Description
isChange Boolean 是否变化。