I have been asked if I can add a sky that can be changed via parameters and I found the wonderful sky.js example here from the three.js samples but when I add it into my Needle project, the sky is just black when I run it in browser.
Find my work in progress script attached where the sky is added
That script can just be added onto an empty in the scene for a build, a plane of water will appear using water.js and the sky from sky.js is presumably set up but the sky is just black which I assume means it isn’t even rendering as it doesn’t affect the scene objects
Ah I see! It was when I removed the skybox material in Unity from the lighting menu and the sky was still black that I suspected there was some clash. I assume it overwrites what you guys export in Needle without any issues then
Got realistic ocean, sky and environment map updating when the sky changes here if anyone wants to use it in their projects! It is best to make a parent for the directional light as this script sets the position of the sun at 0,0,0 worldspace if you hook up your directional light to mainSun Gameobject variable on it. Have fun!