本文介绍了使用 THREE.LineBasicMaterial 的线条粗细的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用下面的代码在我的 Three.js 场景中创建数百行
I am using the code below to create hundreds of lines in my three.js scene
edgeGeometry[i] = new THREE.Geometry();
edgeGeometry[i].vertices[0] = v(x1,y1,z1);
edgeGeometry[i].vertices[1] = v(x2,y2,z2);
edgesMat[i] = new THREE.LineBasicMaterial({
color: 0x6699FF, linewidth: 1, fog:true});
edge[i] = new THREE.Line(edgeGeometry[i], edgesMat[i]);
edge[i].type = THREE.Lines;
scene2.add(edge[i]);
它工作得很好,但是当我将线宽"的值更改为更大或更小的值时,我看不到场景中的任何差异.
我应该如何更改线条的粗细?有什么想法吗?
谢谢,迪米特里斯
It works just fine, but when i change the value of "linewidth" to a bigger OR smaller value, i see NO difference in the scene.
How should i change the thickness of the lines? Any ideas?
Thanks, Dimitris
推荐答案
您使用的是 Windows 吗?
我记得这在 Windows 上不起作用,因为它没有在 ANGLE 中实现.
Are you using Windows?
I remember this not working on Windows because it wasn't implemented in ANGLE.
这篇关于使用 THREE.LineBasicMaterial 的线条粗细的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
更多推荐
[db:关键词]
发布评论