ianmackenzie / elm-3d-scene

A high-level 3D rendering engine for Elm, with support for lighting, shadows, and realistic materials.
https://package.elm-lang.org/packages/ianmackenzie/elm-3d-scene/latest/
Mozilla Public License 2.0
205 stars 27 forks source link

Allow for dynamic background color #36

Closed ianmackenzie closed 4 years ago

ianmackenzie commented 4 years ago

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:

ianmackenzie commented 4 years ago

Alternate solution: always set a transparent clear color in WebGL, and then have a wrapper <div> with a background color set.