我想改变线条的宽度和不透明度,我的代码如下:
var geometry_link = new THREE.Geometry();
geometry_link.vertices.push(
new THREE.Vector3(item[0].x *1,item[0].y *1,item[0].z),
new THREE.Vector3(item[1].x *1,item[1].y *1,item[1].z)
);
geometry_link.colors.push(
new THREE.Color(0x000000),
new THREE.Color(0xffffff)
);
var line = new THREE.Line(geometry_link, new THREE.LineBasicMaterial({
vertexColors: true,
linewidth: 8,
transparent: true,
opacity: 0.1
})
Run Code Online (Sandbox Code Playgroud)
但它不起作用,无论是线宽还是不透明度。我发现了类似的问题,说linewidth在windows上不起作用,那是5年前的事了,现在怎么样?谢谢你的想法
three.js ×1