50 lines
1.5 KiB
TypeScript
50 lines
1.5 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 = "684bcd620a64bc2a815a88d6";
|
|
|
|
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>
|
|
);
|
|
} |