admin管理员组

文章数量:1391991

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);

本文标签: javascriptBabylon JSHow can I make the transparent backgroundStack Overflow