54 lines
1.4 KiB
TypeScript
54 lines
1.4 KiB
TypeScript
import { Canvas } from "@react-three/fiber";
|
|
|
|
import BuilderDuplicate from "./duplicateBuilder/builderDuplicate";
|
|
import { Environment } from "@react-three/drei";
|
|
import Shadows from "../scene/environment/shadow";
|
|
import Sun from "../scene/environment/sky";
|
|
|
|
import background from "../../assets/textures/hdr/mudroadpuresky2k.hdr";
|
|
import ControlsDuplicate from "./duplicateSetup/controlsDuplicate";
|
|
import PostProcessingDuplicate from "./duplicateSetup/postProcessingDuplicate";
|
|
import { Color } from "three";
|
|
import SimulationDuplicate from "./duplicateSimulation/duplicateSimulation";
|
|
|
|
export default function DuplicateScene() {
|
|
const projectId = "6842c683d4c6ce57664da93b";
|
|
|
|
return (
|
|
<Canvas
|
|
id="sceneCanvas"
|
|
shadows
|
|
color="#aaaa"
|
|
eventPrefix="client"
|
|
style={{
|
|
pointerEvents: "none",
|
|
}}
|
|
onContextMenu={(e) => {
|
|
e.preventDefault();
|
|
}}
|
|
onCreated={(e) => {
|
|
e.scene.background = new Color(0x19191d);
|
|
}}
|
|
gl={{
|
|
powerPreference: "high-performance",
|
|
antialias: true,
|
|
preserveDrawingBuffer: true,
|
|
}}
|
|
>
|
|
<Sun />
|
|
|
|
<Shadows />
|
|
|
|
<ControlsDuplicate />
|
|
|
|
<PostProcessingDuplicate />
|
|
|
|
<Environment files={background} environmentIntensity={1.5} />
|
|
|
|
<BuilderDuplicate projectId={projectId} />
|
|
|
|
<SimulationDuplicate />
|
|
</Canvas>
|
|
);
|
|
}
|