Public
Edited
Dec 20, 2024
Fork of WebGL Shader
Insert cell
Insert cell
andrew_ng = FileAttachment("labeling_infinite.png").image()
Insert cell
html`<iframe src="https://hashirama.blog/livekit" />`
Insert cell
Insert cell
Insert cell
//exec_magic_iframe("https://zenphoton.com/")
Insert cell
//exec_magic_iframe("https://lidar-now.scale.com/scene?title=Scene%20%231")
Insert cell
//exec_magic_iframe("https://sam2.metademolab.com/demo")
Insert cell
spec_conv_main_div
Insert cell
import { spec_conv_main_div } from "@ameyasd/interactive-spectral-conversions"
Insert cell
//exec_magic_iframe("https://www.redblobgames.com/articles/visibility/")
Insert cell
//exec_magic_iframe("https://www.falstad.com/dotproduct/")
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
// exec_magic_iframe("https://hashirama.blog/llama-tools")
Insert cell
Insert cell
//comment - decompose / deconstruct -> image -> svg -> find data -> reverse engineer
Insert cell
viewer_vid = html`<video></video>`
Insert cell
{
const vid_3 = viewer_vid;
d3.select(vid_3).on("mousedown", () => {
const room = connectToRoom();
});

async function connectToRoom() {
const roomName = "room"; // Use the same room name as in your server code
const token = `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MjkxODEzMjEsImlzcyI6IkFQSXRTYndYdlNqaDRjZiIsIm5hbWUiOiJ0ZXN0X3VzZXIiLCJuYmYiOjE3MjkwOTQ5MjEsInN1YiI6InRlc3RfdXNlciIsInZpZGVvIjp7ImNhblVwZGF0ZU93bk1ldGFkYXRhIjp0cnVlLCJyb29tIjoicm9vbSIsInJvb21BZG1pbiI6dHJ1ZSwicm9vbUNyZWF0ZSI6dHJ1ZSwicm9vbUpvaW4iOnRydWUsInJvb21MaXN0Ijp0cnVlLCJyb29tUmVjb3JkIjp0cnVlfX0.9I-Zlrq3kUVEt_jKUM4MdRHFpCj6G747pl0-jgRY39g`;

const room = new LiveKit.Room();

room.on(
LiveKit.RoomEvent.TrackSubscribed,
(track, publication, participant) => {
console.log("track", track);
if (track.kind === "video") {
publication.track.attach(vid_3);
} else publication.track.attach(vid_3);
}
);

await room.connect(
"wss://omnissiah-university-kmuz0plz.livekit.cloud",
token
);
console.log("Connected to room:", room.name);
}

// registerRoomEvents(room);
}
Insert cell
viewof zoom = Inputs.range([10, 100], {value: 25, transform: Math.log, label: "Zoom"})
Insert cell
_shader = shader({
width,
height: 200,
iTime: true,
visibility,
inputs: { size: viewof zoom }
})`

mat2 rotate2d(float a) {
return mat2(cos(a), -sin(a), sin(a), cos(a));
}

void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 p = (fragCoord.xy - iResolution.xy / 2.0) * rotate2d(iTime / 10.0);
float k = float(mod(p.x, size * 2.0) < size == mod(p.y, size * 2.0) < size);
fragColor = vec4(0.0, 0.105, 0.255, k + 0.75);
}

`
Insert cell
import {shader} from "@mbostock/shader"
Insert cell
LiveKit = require("livekit-client@2.5.8/dist/livekit-client.umd.js")
Insert cell
Insert cell
html`<iframe src="https://hashirama.blog/iframe/llama-tools" />`
// https://docs.livekit.io/client-sdk-js/
//dont go against the wizards in training
//https://hono.dev/docs/api/context#req

//1. perception
//2. prediction
//3. simulation-emulator
//4. systems - (alan kay + dynamicland + real world applications)
Insert cell
import { exec_magic_iframe } from "@roboticsuniversity/dynamicland"
Insert cell
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more