RouteLine
小于 1 分钟
RouteLine
路线,继承自LineBase
对象,拥有一切Thing
属性及方法。
构造器
new VT.RouteLine({
// 点位数组 [[x, y, z], [x, y, z]...]
points: [],
// 几何造型
geometry: {
// 线宽
width: 0.1,
// 交叉半径
cornerRadius: 0.1,
// 交叉分段
cornerSplit: 10,
// 箭头
arrow: false,
},
// 材质参数
// 材质类型为 THREE.MeshStandardMaterial
material: {
// 是否采用世界单位,如果采用世界单位,linewidth单位为米
worldUnits: true,
},
})
属性成员
type
- 类型:
{String}
物体类型RouteLine
, 不可改
isRouteLine
- 类型:
{Boolean}
是否为RouteLine,不可更改,默认为true
needPoints
- 类型:
{Boolean}
是否需要控制点,不可更改,默认为true
line
- 类型:
{THREE.Line}
线对象
length
- 类型:
{Number}
线长度
points
- 类型:
{Array}
点位数组
方法
updatePoints
更新点位置
- updatePoints(points)
- 类型:
{Function}
- 参数:
- points
{Array}
点位置 [[x, y, z], [x, y, z]...]
- points
- 返回:无