I want to create a gradient background like this in cesium. I went through the docs and searched online, but didn’t find any information on how to do so.
Hi @victorchrollo14, thanks for the question.
You can change the background of the cesium scene with viewer.scene.backgroundColor
. This can take any Cesium.Color
.
However I don’t think there’s a way to set that property to a gradient. If you want to do that your best bet might be to set the background within the webgl context to Color.TRANSPARENT
and use normal css for the gradient. I created a quick demonstration of that in this sandcastle.
Hopefully that helps but let me know if you have more questions