Reputation: 2190
I'm implementing this WebGL Globe Chrome Experiments on my page and simply need to change the background color.
The standard is black, but this example managed to have a nice either transparent or white background. Ideally, I'd really prefer transparent, but white works too.
Upvotes: 1
Views: 2232
Reputation: 17586
If you want white on the background then use
var renderer = new THREE.WebGLRenderer();
renderer.setClearColor( 0xffffff );
if you want transparent then use
var renderer = new THREE.WebGLRenderer( { alpha: true } );
renderer.setClearColor( 0x000000, 0 ); // the second parameter is opacity
Upvotes: 5