1
0
This commit is contained in:
2026-03-07 23:16:35 +09:00
parent 350b32e87f
commit 03e1ac06bf
4 changed files with 168 additions and 2 deletions

View File

@@ -19,6 +19,7 @@ import {
import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader';
import { FollowCamera } from './controls/CameraRig';
import { worldState } from './worldState';
const TIME_SCALE = 100;
const INITIAL_DATE = new Date('2024-06-21T12:00:00');
@@ -111,6 +112,7 @@ export default function AtmosphereScene({ timeScale: timeScaleProp, overrideDate
useFrame((_, delta) => {
const currentDate = dateRef.current;
currentDate.setTime(currentDate.getTime() + delta * timeScaleRef.current * 1000);
worldState.currentHour = currentDate.getHours() + currentDate.getMinutes() / 60;
if (atmosphereRef.current) {
atmosphereRef.current.updateByDate(currentDate);