You're a star thanks. I will look into passing this in CesiumWidget directly tomorrow first thing.
Project is going for Royal Bank of Scotland (RBS) guys. Another step forward for this amazing plugin 
Thanks again! 
The problem here is that you need to make sure the Context is created with "alpha" set to true. It's false by default (I believe for performance benefits).
Here's a simple Viewer example that does what you want:
var viewer = new Cesium\.Viewer\('cesiumContainer', \{
contextOptions : \{
alpha : true
\}
\}\);
viewer\.scene\.skyBox\.destroy\(\);
viewer\.scene\.skyBox = undefined;
viewer\.scene\.sun\.destroy\(\);
viewer\.scene\.sun = undefined;
viewer\.scene\.skyAtmosphere\.destroy\(\);
viewer\.scene\.skyAtmosphere = undefined;
viewer\.scene\.backgroundColor = new Cesium\.Color\(0, 0, 0, 0\);
This assumes you want to get rid of everything but the earth. You can add the sun or skyAtmosphere back in by removing the corresponding line. The skyBox needs to be destroyed however.
If you are not using Viewer, or CesiumWidget; then you can still do this by simply passing the contextOptions to the Scene constructor (second parameter).
var scene = new Scene(canvas, { alpha : true });
Hope that helps!
Hi all,
Great Work! I am looking to remove the background from the scene, in other words make it transparent.
The regular WebGL technique does not work
var gl = canvas.getContext("experimental-webgl");
gl.clearColor(0.5, 0, 0, 0.5);
gl.clear(gl.COLOR_BUFFER_BIT);
I went into Scene/Scene to investigate, and removed the backgroundColor from line 462, and tried to implement:
var clear = scene._clearColorCommand;
clear.color.alpha = 0;
clear\.color\.red = 0;
clear\.color\.blue = 0;
clear\.color\.green = 0;
clear.execute(context, passState);
No luck. I believe the alphaBIT is not applied correctly?
Any advice would be greatly appreciated, and please let me know what more info you require.
Thanks! 
--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.