mirror of
https://github.com/exogen/t2-mapper.git
synced 2026-07-13 07:25:07 +00:00
improve lighting, fog, clouds, force fields
This commit is contained in:
parent
3ba1ce9afd
commit
a4b7021acc
40 changed files with 4046 additions and 291 deletions
15
app/page.tsx
15
app/page.tsx
|
|
@ -2,7 +2,7 @@
|
|||
import { useState, useEffect, useCallback, Suspense } from "react";
|
||||
import { useSearchParams, useRouter } from "next/navigation";
|
||||
import { Canvas } from "@react-three/fiber";
|
||||
import { EffectComposer, N8AO } from "@react-three/postprocessing";
|
||||
import { NoToneMapping, SRGBColorSpace } from "three";
|
||||
import { Mission } from "@/src/components/Mission";
|
||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
||||
import { ObserverControls } from "@/src/components/ObserverControls";
|
||||
|
|
@ -18,6 +18,14 @@ import { getMissionList, getMissionInfo } from "@/src/manifest";
|
|||
// stuff too, e.g. missions, terrains, and more. This client is used for those.
|
||||
const queryClient = new QueryClient();
|
||||
|
||||
// Renderer settings to match Tribes 2's simple rendering pipeline.
|
||||
// Tribes 2 (Torque engine, 2001) worked entirely in gamma/sRGB space with no HDR
|
||||
// or tone mapping. We disable tone mapping and ensure proper sRGB output.
|
||||
const glSettings = {
|
||||
toneMapping: NoToneMapping,
|
||||
outputColorSpace: SRGBColorSpace,
|
||||
};
|
||||
|
||||
function MapInspector() {
|
||||
const searchParams = useSearchParams();
|
||||
const router = useRouter();
|
||||
|
|
@ -86,7 +94,7 @@ function MapInspector() {
|
|||
</div>
|
||||
</div>
|
||||
)}
|
||||
<Canvas shadows frameloop="always">
|
||||
<Canvas shadows frameloop="always" gl={glSettings}>
|
||||
<CamerasProvider>
|
||||
<AudioProvider>
|
||||
<Mission
|
||||
|
|
@ -99,9 +107,6 @@ function MapInspector() {
|
|||
<ObserverControls />
|
||||
</AudioProvider>
|
||||
</CamerasProvider>
|
||||
<EffectComposer>
|
||||
<N8AO intensity={3} aoRadius={3} quality="performance" />
|
||||
</EffectComposer>
|
||||
</Canvas>
|
||||
</div>
|
||||
<InspectorControls
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue