最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Babylon JS - How can I make the transparent background - Stack Overflow

programmeradmin1浏览0评论

I have an online project running with Babylon JS where I need to remove the gray and white background (which Babylon JS has by default), and leave the canvas pletely transparent.

I need to see what's behind the canvas, and I can not ...

:(

How is it done, editing the .js or directly from my own html code?

Visit my project here

And the .js here

Thanks!

I have an online project running with Babylon JS where I need to remove the gray and white background (which Babylon JS has by default), and leave the canvas pletely transparent.

I need to see what's behind the canvas, and I can not ...

:(

How is it done, editing the .js or directly from my own html code?

Visit my project here

And the .js here

Thanks!

Share Improve this question asked Feb 6, 2019 at 23:37 Pablo_WebPablo_Web 4433 silver badges15 bronze badges 1
  • Please include relevant information in your question. Do not link to external resources. See How to Ask. – Felix Kling Commented Feb 7, 2019 at 0:12
Add a ment  | 

1 Answer 1

Reset to default 9

Hello you should just be able to call:

scene.autoClear = false

Other option:

scene.clearColor = new BABYLON.Color4(0, 0, 0, 0);
发布评论

评论列表(0)

  1. 暂无评论