Created a simple scene for 3DTTT

This commit is contained in:
2023-03-11 15:29:12 -08:00
parent ac5ace85c7
commit 622a0bc615
12 changed files with 7146 additions and 60 deletions
+29 -22
View File
@@ -1,25 +1,32 @@
import logo from './logo.svg';
import './App.css';
import React from "react";
import { Canvas } from '@react-three/fiber'
import { OrbitControls, Environment } from '@react-three/drei'
import space from './space.hdr'
// Import styles
import './App.css'
function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
);
}
return (
<>
<Canvas camera={{
fov: 50,
position: [-10, -5, -15],
rotation: [Math.PI, 0, 0] }}>
export default App;
<OrbitControls maxDistance={40} enableDampling />
<ambientLight/>
<pointLight
position={[-150, 300, -300]}
intensity={0.9}
/>
<Environment background={true} files={space} />
</Canvas>
</>
);
};
export default React.memo(App);