THREE.js线宽矛盾 [英] THREE.js linewidth contradiction

查看:486
本文介绍了THREE.js线宽矛盾的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 LineBasicMaterial 三个文档中指出据说在Windows系统上,线宽会自动设置为1,并且无法更改.

I noted that at the LineBasicMaterial THREE documentation is said that on Windows systems the linewidth is set-up automatically to 1 and cannot be changed.

另一方面,我们有一个来自threejs.org的非常酷的示例,使用了相同的三个版本(r68)在使用Windows系统的情况下,当鼠标悬停在场景中的某一行上时,线宽会从1更改为5,从5更改为1.

On the other hand we have a very cool example from threejs.org using the same THREE version (r68) where using a Windows system the linewidth gets modified from 1 to 5 and from 5 to 1 when the mouse overs one of the lines on the scene.

所以,我的问题是,可以修改此参数吗?怎么做?我尝试简单地将material.linewidth设置为其他数字,但是没有效果.

So, my question is, can this parameter be modified? How to do it? I tried with simply set the material.linewidth to a different number but it had no effect.

推荐答案

您链接的示例使用了支持的CanvasRenderer(而不是WebGLRenderer). WebGLRenderer但是必须依赖WebGL实现提供的内容.

The example you linked uses the CanvasRenderer (not the WebGLRenderer) which does support lineWidth. WebGLRenderer however has to rely on what the WebGL implementation provides.

在Windows上,Chrome和Firefox均默认使用ANGLE(DirectX顶部的某些层),该不支持lineWidth.但是,可以将Windows上的Firefox切换为OpenGL,然后(取决于视频卡驱动程序)支持lineWidth .

On Windows, both Chrome and Firefox default to using ANGLE (some layer on top of DirectX) which does not support lineWidth. Firefox on Windows can however be switched to OpenGL, and then (depending on the video card drivers) lineWidth may be supported.

(Chrome浏览器有一个命令行选项可将其切换为OpenGL模式,但这不再是受支持的或功能性的配置,它仅在启动时挂起,您无需费心尝试).

(Chrome has a command line option to switch it to OpenGL mode, but that's no longer a supported or functional configuration, it just hangs on startup ... you don't need to bother trying).

这篇关于THREE.js线宽矛盾的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆