Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Babylon JS - How can I make the transparent background

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 completely 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!

like image 296
Pablo_Web Avatar asked Jan 01 '23 08:01

Pablo_Web


1 Answers

Hello you should just be able to call:

scene.autoClear = false

Other option:

scene.clearColor = new BABYLON.Color4(0, 0, 0, 0);
like image 162
David Catuhe Avatar answered Jan 08 '23 03:01

David Catuhe