The WebGL.clearColor option is only applied once (when the scene is initially rendered), meaning that it's not possible to have a dynamic background color using WebGL.clearColor alone. However, it should be possible for elm-3d-scene to work around this limitation by:
always setting the clear color to be fully transparent
rendering (as the very first entity) a full-screen quad using the actual specified background color, without touching the depth buffer
and then rendering all other entities on top of that
The
WebGL.clearColor
option is only applied once (when the scene is initially rendered), meaning that it's not possible to have a dynamic background color usingWebGL.clearColor
alone. However, it should be possible forelm-3d-scene
to work around this limitation by: