MCPcopy Create free account
hub / github.com/SuboptimalEng/three-js-tutorials / App

Function App

02-setup-guide/src/App.jsx:7–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5import SceneInit from './lib/SceneInit';
6
7function App() {
8 useEffect(() => {
9 const test = new SceneInit('myThreeJsCanvas');
10 test.initialize();
11 test.animate();
12
13 const boxGeometry = new THREE.BoxGeometry(16, 16, 16);
14 const boxMaterial = new THREE.MeshNormalMaterial();
15 const boxMesh = new THREE.Mesh(boxGeometry, boxMaterial);
16
17 test.scene.add(boxMesh);
18 }, []);
19
20 return (
21 <div>
22 <canvas id="myThreeJsCanvas" />
23 </div>
24 );
25}
26
27export default App;

Callers

nothing calls this directly

Calls 2

initializeMethod · 0.95
animateMethod · 0.95

Tested by

no test coverage detected