If you want to use transparent background in Three.js, you need to pass alpha parameter to WebGLRenderer constructor in the code given below -
var renderer = new THREE.WebGLRenderer( {alpha: true } ); // You can leave the clear color at the defaultvalue. renderer.setClearColor( 0x000000, 0 ); //default
However, to set the background color,
renderer.setClearColor(0xb0f442 );
The above is the detailed content of Change background of three.js to transparent or other color in HTML. For more information, please follow other related articles on the PHP Chinese website!