You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
830 B

import React, { Suspense } from 'react'
import { Physics } from '@react-three/cannon'
import { PointerLockControls } from '@react-three/drei'
import World from './models/World'
import WorldCollisions from './models/WorldCollisions'
import Player from './Player'
import Lighting from './Lighting'
import Effects from './Effects'
const Scene: React.FC = () => {
return (
<>
<Lighting />
<Suspense fallback={null}>
<World />
<Physics
gravity={[0, 0, 0]}
iterations={2}
size={10}
defaultContactMaterial={{
friction: 0,
restitution: 0,
}}
>
<WorldCollisions />
<Player />
</Physics>
<Effects />
</Suspense>
<PointerLockControls />
</>
)
}
export default Scene