-
Notifications
You must be signed in to change notification settings - Fork 3
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
89d548d
commit 9c81943
Showing
6 changed files
with
85 additions
and
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,9 +11,10 @@ import { | |
import define from "https://api.observablehq.com/@roboticsuniversity/livekit.js?v=4"; | ||
import define2 from "https://api.observablehq.com/@roboticsuniversity/robotics-hardware.js?v=4"; | ||
//import define3 from "https://api.observablehq.com/@roboticsuniversity/voxels-diffusion-policy-3d.js?v=4"; | ||
import define3 from "https://api.observablehq.com/@roboticsuniversity/[email protected]?v=4"; | ||
//import define3 from "https://api.observablehq.com/@roboticsuniversity/[email protected]?v=6"; | ||
|
||
// v??? - -- adsf | ||
import VoxelNotebook from "https://api.observablehq.com/@roboticsuniversity/[email protected]?v=4"; | ||
|
||
|
||
//import {Runtime, Inspector} from "https://cdn.jsdelivr.net/npm/@observablehq/runtime@5/dist/runtime.js"; | ||
|
@@ -48,7 +49,7 @@ function Livekit() { | |
useEffect(() => { | ||
const runtime = new Runtime(); | ||
runtime.module(define, (name) => { | ||
console.log(name); | ||
//console.log(name); | ||
if (name === "LOGO") return new Inspector(lOGORef.current); | ||
}); | ||
return () => runtime.dispose(); | ||
|
@@ -88,7 +89,7 @@ function RoboticsHardware() { | |
const runtime = new Runtime(); | ||
runtime.module(define2, (name) => { | ||
if (name === "LOGO") return new Inspector(viewofModuleNameRef.current); | ||
console.log(name); | ||
//console.log(name); | ||
//if (name === "viewof moduleName") return new Inspector(viewofModuleNameRef.current); | ||
return [ | ||
"basicRequire", | ||
|
@@ -124,43 +125,33 @@ function RoboticsHardware() { | |
|
||
// https://files.hashirama.blog/static/blog/arm-day1.gif | ||
function DiffusionVoxelPointCloud() { | ||
const viewofModuleNameRef = useRef(); | ||
const viewofModuleNameRef2 = useRef(); | ||
const lOGORef = useRef(); | ||
const nOTCHRef = useRef(); | ||
|
||
useEffect(() => { | ||
const runtime = new Runtime(); | ||
runtime.module(define3, (name) => { | ||
//if (name === "viewof moduleName") return new Inspector(viewofModuleNameRef.current); | ||
//if (name === "NOTCH") return new Inspector(viewofModuleNameRef.current); | ||
if (name === "LOGO") return new Inspector(viewofModuleNameRef2.current); | ||
return [ | ||
"basicRequire", | ||
"dynamicImport", | ||
"skypackImport", | ||
"bundleRun", | ||
"scavengingForLinks", | ||
"globalLeaksPattern", | ||
"pkg", | ||
].includes(name); | ||
runtime.module(VoxelNotebook, name => { | ||
if (name === "LOGO") return new Inspector(lOGORef.current); | ||
if (name === "NOTCH") return new Inspector(nOTCHRef.current); | ||
}); | ||
return () => runtime.dispose(); | ||
}, []); | ||
|
||
|
||
//return <></> | ||
return ( | ||
<> | ||
<div ref={viewofModuleNameRef} /> | ||
<p className="text-green-100"> | ||
Credit:{" "} | ||
<a href="https://observablehq.com/@observablehq/module-require-debugger"> | ||
LIVE KIT = WEBRTC = GREAT | ||
</a> | ||
</p> | ||
<VoxelPainter /> | ||
<div ref={lOGORef} /> | ||
<div ref={nOTCHRef} /> | ||
{/* <p>Credit: <a href="https://observablehq.com/@roboticsuniversity/voxels-diffusion-policy-3d@88">Voxels + diffusion-policy-3d by roboticsuniversity</a></p> */} | ||
</> | ||
|
||
|
||
); | ||
|
||
// https://files.hashirama.blog/static/blog/animated_gifs/Animated%20GIF%20optimizer.gif | ||
} | ||
|
||
|
||
|
||
// https://files.hashirama.blog/static/blog/seeing/cropped_image_0.png | ||
// https://files.hashirama.blog/static/blog/animated_gifs/Optimized%20%281%29.gif | ||
// https://files.hashirama.blog/static/blog/animated_gifs/samus.jpeg | ||
|
@@ -182,7 +173,7 @@ function TeleGuidance() { | |
<Livekit /> | ||
</div> | ||
<div className="lg:col-span-2 flex flex-col rounded-lg bg-gray-800 overflow-hidden" style={{ maxHeight: '50vh' }}> | ||
{/* <TwitchPlaysPokemonPanel/> */} | ||
<TwitchPlaysPokemonPanel/> | ||
</div> | ||
<div className="lg:col-span-2 flex flex-col rounded-lg bg-gray-800 overflow-hidden" style={{ maxHeight: '50vh' }}> | ||
<RoboticsHardware /> | ||
|
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,44 @@ | ||
|
||
.hafu { | ||
margin: 0; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
background: #222; | ||
perspective: 1000px; | ||
} | ||
|
||
.scene { | ||
width: 300px; | ||
height: 300px; | ||
position: relative; | ||
transform-style: preserve-3d; | ||
animation: rotate 10s infinite linear; | ||
} | ||
|
||
.mirror { | ||
width: 100px; | ||
height: 150px; | ||
position: absolute; | ||
background: linear-gradient(45deg, rgba(255,255,255,0.8), rgba(0,0,0,0.2)); | ||
border: 2px solid rgba(255, 255, 255, 0.3); | ||
transform-origin: center; | ||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); | ||
} | ||
|
||
/* Positioning mirrors in a 3D grid */ | ||
.mirror:nth-child(1) { transform: rotateY(0deg) translateZ(150px); } | ||
.mirror:nth-child(2) { transform: rotateY(45deg) translateZ(150px); } | ||
.mirror:nth-child(3) { transform: rotateY(90deg) translateZ(150px); } | ||
.mirror:nth-child(4) { transform: rotateY(135deg) translateZ(150px); } | ||
.mirror:nth-child(5) { transform: rotateY(180deg) translateZ(150px); } | ||
.mirror:nth-child(6) { transform: rotateY(225deg) translateZ(150px); } | ||
.mirror:nth-child(7) { transform: rotateY(270deg) translateZ(150px); } | ||
.mirror:nth-child(8) { transform: rotateY(315deg) translateZ(150px); } | ||
|
||
@keyframes rotate { | ||
from { transform: rotateY(0deg); } | ||
to { transform: rotateY(360deg); } | ||
} | ||
|
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