小编Mar*_*ary的帖子

如何获取three.js LineSegments仅渲染可见线

我正在尝试让Three.js仅渲染FrontSide几何轮廓。我想要实现的是尽可能接近此外观:

在此处输入图片说明

随着BoxGeomtry我接近我想要的东西,但是LineSegments在上使用CylinderGeometry了垂直线,这很有意义。您能想到我只能绘制“可见”轮廓的方法吗?

带有LineSegments的圆柱体

这是我到目前为止尝试过的:

let coloredMaterial = new THREE.MeshBasicMaterial({
  color: 0xFFD033,
  polygonOffset: true,
  polygonOffsetFactor: 1,
  polygonOffsetUnits: 1
});

let brick = new THREE.Mesh(geometry, coloredMaterial);

let edges = new THREE.EdgesGeometry(brick.geometry);
var outline = new THREE.LineSegments(edges, new THREE.LineBasicMaterial({
  color: 0x1B3740,
  linewidth: 1.5
}));

let knobGeometry = new THREE.CylinderGeometry(7, 7, 7, 20);
let knob = new THREE.Mesh(knobGeometry, coloredMaterial);

let knobOutline = new THREE.LineSegments(
  new THREE.EdgesGeometry(knob.geometry),
  new THREE.LineBasicMaterial({
    color: 0x1B3740,
    linewidth: 1.5
  })
);
Run Code Online (Sandbox Code Playgroud)

three.js

3
推荐指数
1
解决办法
139
查看次数

蓝牙LE配置文件,用于读取测量数据

在过去的几个小时里,我读了很多关于蓝牙LE的内容,但我真的不明白配置文件是如何工作的.我想把iPhone和自制设备配对BTLE.设备应通过蓝牙发送测量的温度值,湿度或其他值,iPhone应读取该数据.

我阅读了BTLE规范中的不同配置文件(甚至是关于心脏测量),但是在阅读CO排放时如何进行?

非常感谢!

问候,玛丽

iphone bluetooth ios core-bluetooth bluetooth-lowenergy

2
推荐指数
1
解决办法
2756
查看次数