javascript - Babylon JS - 如何制作透明背景

标签 javascript babylonjs

我有一个使用 Babylon JS 运行的在线项目,我需要删除灰色和白色背景(Babylon JS 默认具有),并使 Canvas 完全透明。

我需要查看 Canvas 后面的内容,但我不能...

:(

它是如何完成的,编辑 .js 还是直接从我自己的 html 代码?

访问我的项目 here

还有 .js here

谢谢!

最佳答案

你好,你应该可以打电话:

scene.autoClear = false

其他选项:

scene.clearColor = new BABYLON.Color4(0, 0, 0, 0);

关于javascript - Babylon JS - 如何制作透明背景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54564223/

相关文章:

javascript - 使用 d3.js 计算 CSV 文件的行数

javascript - 在 QML 中动态创建 ListModel

javascript - 在使用 bootstrap 4 扩展另一个时,我需要帮助折叠一个

javascript - Babylon.js 放置一个垂直于点击表面的平面

javascript - 如何选择一个网格而不是在 BabylonJS 中单击的所有网格

javascript - JSON 请求不起作用 : Cross origin request not supported on file://URL

javascript - 当div中有很多新内容时如何滚动y

javascript - 如何在 Babylon.js 中为形状着色?

javascript - 无法为盒子设置纹理(html5/js/babylon.js)

javascript - Babylon.js 和 Ember : Ember addon with prototype extensions disabled within an app with prototype extensions enabled?