为什么 threejs 应用程序在 mozilla firefox 中不是 运行

Why are threejs apps not running in mozilla firefox

我最近完成了 Linux SUSE 的全新安装,现在 Firefox 不显示 threejs。

我更新了

about:config webgl.force-enabled to true

浏览器控制台给出以下错误信息。

THREE.WebGLRenderer 73 three.min.js:578:133
THREE.WebGLRenderer: Error creating WebGL context. three.min.js:581:370

Error: WebGL: Error during native OpenGL init. three.min.js:581:104
Error: WebGL: WebGL creation failed. three.min.js:581:104
Error: WebGL: Error during native OpenGL init. three.min.js:581:129
Error: WebGL: WebGL creation failed. three.min.js:581:129
Error: WebGL: Error during native OpenGL init. three.min.js:581:189
Error: WebGL: WebGL creation failed. three.min.js:581:189
TypeError: a is null

我想知道我需要做什么才能让我的页面适当地显示 three.js 场景而不破坏我的系统,因为显然我需要页面在所有浏览器上显示。

什么版本的火狐?确保它是 43 或以上......你是否一直在搞设置?要将 Firefox 设置重置为默认设置,请转到 URL

about:support

恢复出厂设置,包括 WebGL 点击

Give Firefox a tune up  --> refresh firefox

...如果您想手动更改 WebGL 相关设置,下面是它给您的屏幕截图...在 URL 中输入:

about:config

然后搜索 webgl 为您提供默认设置列表:

WebGL 确实提供了前沿设置,这些设置 can/do 导致 browsers/graphicsCards 呕吐...所以请尝试 运行 一个简单的 WebGL 站点...让我们知道您是如何获得的在

我在网上找到了一个论坛 post,它让我了解到 gfx.crash-guard.status.glcontext 的存在,这就是崩溃后关闭 WebGL 的原因。如下所示重置它让我再次 运行 而没有触及任何其他设置。

编辑: 我刚刚注意到,在我的 macbook pro 上,当我重新加载about:support 或包含 WebGL 代码的页面(但网页呈现正常并且 Web GL 内容似乎仍然有效)。