-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7ab3d3a
commit 78c5a1a
Showing
14 changed files
with
308 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,21 @@ | ||
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} | ||
{ | ||
"name": "Intuition Labs LLC", | ||
"short_name": "IntuitionLab", | ||
"description": "Pioneering the future of AI through intuitive design", | ||
"start_url": "/", | ||
"display": "standalone", | ||
"background_color": "#000000", | ||
"theme_color": "#7A9E9F", | ||
"icons": [ | ||
{ | ||
"src": "/android-chrome-192x192.png", | ||
"sizes": "192x192", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "/android-chrome-512x512.png", | ||
"sizes": "512x512", | ||
"type": "image/png" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import React, { useEffect, useRef } from 'react'; | ||
import { Scene } from '../three/Scene'; | ||
|
||
const Canvas = () => { | ||
const canvasRef = useRef(null); | ||
|
||
useEffect(() => { | ||
if (!canvasRef.current) return; | ||
|
||
const handleResize = () => { | ||
if (canvasRef.current) { | ||
canvasRef.current.width = window.innerWidth; | ||
canvasRef.current.height = window.innerHeight; | ||
} | ||
}; | ||
|
||
handleResize(); | ||
window.addEventListener('resize', handleResize); | ||
|
||
const scene = new Scene(canvasRef.current); | ||
scene.init(); | ||
scene.animate(); | ||
|
||
return () => { | ||
window.removeEventListener('resize', handleResize); | ||
scene.dispose(); | ||
}; | ||
}, []); | ||
|
||
return ( | ||
<canvas | ||
ref={canvasRef} | ||
style={{ | ||
position: 'fixed', | ||
top: 0, | ||
left: 0, | ||
width: '100vw', | ||
height: '100vh', | ||
zIndex: -1, | ||
background: '#000000' | ||
}} | ||
/> | ||
); | ||
}; | ||
|
||
export default Canvas; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import React from 'react'; | ||
|
||
class ErrorBoundary extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
this.state = { hasError: false }; | ||
} | ||
|
||
static getDerivedStateFromError(error) { | ||
return { hasError: true }; | ||
} | ||
|
||
componentDidCatch(error, errorInfo) { | ||
console.error('Error:', error); | ||
console.error('Error Info:', errorInfo); | ||
} | ||
|
||
render() { | ||
if (this.state.hasError) { | ||
return ( | ||
<div style={{ | ||
padding: '2rem', | ||
textAlign: 'center', | ||
minHeight: '100vh', | ||
display: 'flex', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
background: '#000000', | ||
color: 'white' | ||
}}> | ||
<div> | ||
<h1>Something went wrong</h1> | ||
<p>Please refresh the page or try again later.</p> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
return this.props.children; | ||
} | ||
} | ||
|
||
export default ErrorBoundary; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
import React from 'react'; | ||
import { createRoot } from 'react-dom/client'; | ||
import App from './src/App'; | ||
import App from './App'; | ||
import './style.css'; | ||
|
||
// Create React root and render App | ||
const root = createRoot(document.getElementById('root')); | ||
root.render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode> | ||
); | ||
); |
Oops, something went wrong.