Skip to content

说明

线测量。点击 scene 中的 mesh,绘制测量结果。默认绘制长度。

示例

开/关

编码

ts
const measure = new MeasureLine({ scene });
measure.start();

// 停止测量
measure.stop();

// 隐藏测量数据
measure.setVisible(false);

// 清除测量
measure.clear();

// 销毁测量
measure.dispose();

参数

MeasurePointOptions

参数类型必填默认值说明
sceneBABYLON.Scene场景
format(length: number) => string(length: number) => length.toFixed(2) + "m"测量数据格式化
styleobject测量样式

MeasurePointOptions.style

参数类型必填默认值说明
colorstringwhite文字颜色
sizenumber14文字大小
lineColorstringred线颜色