You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I assume you want to change the code so that the sun is in sync with your local time?
One way to do this would be to calculate the percentage of daytime and sync that with the sun: https://codepen.io/dirkk0/pen/OGNyJP
But of course this depends on where you are - the codepen would be on the equator (i.e. no shadows on high noon).
I assume you want to change the code so that the sun is in sync with your local time?
Yes, you're right!
Thanks for the help but upon observing since implementing that, like for example, right now it's already 11 PM here but the scene is pretty bright, it looks not matching a client time, you can view your codepen sample. And also almost all shadows are now gone every time I check my work.
How do you convert
var time = new Date().getTime() * 0.0002
into client time?I've tried the following but have no luck:
The text was updated successfully, but these errors were encountered: