-
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
8884737
commit 98c7e92
Showing
10 changed files
with
304 additions
and
112 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Intuition Labs</title> | ||
<script type="text/javascript"> | ||
// Single Page Apps for GitHub Pages | ||
// MIT License | ||
// https://github.com/rafgraph/spa-github-pages | ||
var pathSegmentsToKeep = 0; | ||
|
||
var l = window.location; | ||
l.replace( | ||
l.protocol + '//' + l.hostname + (l.port ? ':' + l.port : '') + | ||
l.pathname.split('/').slice(0, 1 + pathSegmentsToKeep).join('/') + '/?/' + | ||
l.pathname.slice(1).split('/').slice(pathSegmentsToKeep).join('/').replace(/&/g, '~and~') + | ||
(l.search ? '&' + l.search.slice(1).replace(/&/g, '~and~') : '') + | ||
l.hash | ||
); | ||
</script> | ||
</head> | ||
<body> | ||
</body> | ||
</html> |
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,23 +1,8 @@ | ||
import { Scene } from './src/three/Scene'; | ||
import { CardEffects } from './src/ui/CardEffects'; | ||
import { ScrollEffects } from './src/ui/ScrollEffects'; | ||
import { createRoot } from 'react-dom/client'; | ||
import { RemotionVideo } from './src/Video'; | ||
import React from 'react'; | ||
import { createRoot } from 'react-dom/client'; | ||
import App from './src/App'; | ||
import './style.css'; | ||
|
||
// Initialize Three.js scene | ||
const scene = new Scene(); | ||
scene.animate(); | ||
|
||
// Initialize UI effects | ||
new CardEffects(); | ||
new ScrollEffects(); | ||
|
||
// Initialize Remotion video | ||
const videoContainer = document.createElement('div'); | ||
videoContainer.id = 'remotion-video'; | ||
document.body.appendChild(videoContainer); | ||
|
||
// Create React root and render Remotion video | ||
const root = createRoot(videoContainer); | ||
root.render(React.createElement(RemotionVideo)); | ||
// Create React root for main app | ||
const root = createRoot(document.getElementById('root')); | ||
root.render(<App />); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,51 @@ | ||
import React, { useEffect } from 'react'; | ||
import { createRoot } from 'react-dom/client'; | ||
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'; | ||
import Home from './pages/Home'; | ||
import Manifesto from './pages/Manifesto'; | ||
import { Scene } from './three/Scene'; | ||
import { CardEffects } from './ui/CardEffects'; | ||
import { ScrollEffects } from './ui/ScrollEffects'; | ||
import { RemotionVideo } from './Video'; | ||
|
||
function App() { | ||
useEffect(() => { | ||
// Initialize Three.js scene | ||
const scene = new Scene(); | ||
scene.animate(); | ||
|
||
// Initialize UI effects | ||
new CardEffects(); | ||
new ScrollEffects(); | ||
|
||
// Initialize Remotion video | ||
const videoContainer = document.createElement('div'); | ||
videoContainer.id = 'remotion-video'; | ||
document.body.appendChild(videoContainer); | ||
|
||
// Create React root for video | ||
const videoRoot = createRoot(videoContainer); | ||
videoRoot.render(<RemotionVideo />); | ||
|
||
// Cleanup on unmount | ||
return () => { | ||
if (videoContainer.parentNode) { | ||
videoContainer.parentNode.removeChild(videoContainer); | ||
} | ||
}; | ||
}, []); | ||
|
||
return ( | ||
<> | ||
<canvas id="bg"></canvas> | ||
<Router> | ||
<Routes> | ||
<Route path="/" element={<Home />} /> | ||
<Route path="/manifesto" element={<Manifesto />} /> | ||
</Routes> | ||
</Router> | ||
</> | ||
); | ||
} | ||
|
||
export default App; |
Oops, something went wrong.