add game
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user