add game
This commit is contained in:
@@ -8,6 +8,8 @@ export const worldState = {
|
||||
quaternion: new Quaternion(),
|
||||
speed: 1000.0,
|
||||
stageRotationY: 0,
|
||||
currentHour: 12,
|
||||
currentLocation: 'Tokyo',
|
||||
};
|
||||
|
||||
// Pre-allocated temp objects (avoid GC in useFrame)
|
||||
@@ -49,7 +51,10 @@ export const LOCATIONS = [
|
||||
{ name: 'Space', longitude: 139.7671, latitude: 35.6812, heading: 0, pitch: -90, distance: 100000 },
|
||||
];
|
||||
|
||||
const LOCATION_MULT = { Tokyo: 1, Fuji: 2, Space: 3 };
|
||||
|
||||
export function teleportTo(location) {
|
||||
worldState.currentLocation = location.name;
|
||||
const { longitude, latitude, heading, pitch, distance } = location;
|
||||
const position = new Vector3();
|
||||
const globalQuaternion = new Quaternion();
|
||||
|
||||
Reference in New Issue
Block a user