'ThreeJS scene.background works in WebStorm but disappears in browser

I'm working on a ThreeJS project. When I run my code via WebStorm, it works perfectly:

enter image description here

When I run my code in the browser (both Firefox and Chrome), the scene.background shows up as black.

enter image description here

There are no errors or warnings in console. What is happening and how do I fix this?

enter image description here

I'm loading the images from disk. Could that be the issue?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source