three_dart icon indicating copy to clipboard operation
three_dart copied to clipboard

Transparent scene

Open Cyril212 opened this issue 1 year ago • 1 comments

Hello, first of all I want to thank you for such a fantastic library, you did a really great job!

I have one question, is it possible to make a scene transparent in order to use background of flutter view?

Cyril212 avatar Apr 25 '23 16:04 Cyril212

You can try (MyApp.engine!.renderer is THREE.WebGLRenderer) :

MyApp.engine!.renderer = THREE.WebGLRenderer(_options);
MyApp.engine!.renderer!.alpha = true;
MyApp.engine!.renderer!.setClearColor(THREE.Color(0x000000), 0);
MyApp.engine!.renderer!.autoClearDepth = true;

And on your scene :

MyApp.engine!.scene = THREE.Scene();
MyApp.engine!.scene!.background = null;

Result : (In my case my background is a map) Screenshot_20230530_145457_Gallery

MapleNoise avatar May 30 '23 12:05 MapleNoise