使用 THREE.LineBasicMaterial 的线条粗细

编程入门 行业动态 更新时间:2024-10-25 20:18:40
本文介绍了使用 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:关键词]

本文发布于:2023-03-28 15:59:15,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/733726.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:粗细   线条   LineBasicMaterial

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!