Skip to content

Commit

Permalink
altered dropdown links and dynamic models
Browse files Browse the repository at this point in the history
  • Loading branch information
aleatorydialogue committed May 29, 2024
1 parent 879e3a4 commit dd86757
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
14 changes: 11 additions & 3 deletions hybrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -1002,10 +1002,18 @@ async function main() {
}
};

const url = params.get("url") ? new URL(params.get("url"), "https://huggingface.co/aleatorydialogue/dynamic_splats/tree/main/") : "timer.splatv";
const req = await fetch(url, { mode: "cors", credentials: "omit" });
if (req.status != 200) throw new Error(req.status + " Unable to load " + req.url);
// List of available models
const modelNames = ["timer.splatv", "guitar.splatv", "controller.splatv", "god.splatv", "controller_rgb.splatv", "timer_rgb.splatv"];

// Randomly select a model
const randomIndex = Math.floor(Math.random() * modelNames.length);
const randomModel = modelNames[randomIndex];

// Check if a URL parameter is provided, otherwise use the randomly selected model
const url = params.get("url") ? new URL(params.get("url"), "https://huggingface.co/aleatorydialogue/dynamic_splats/tree/main/") : new URL(randomModel, "https://huggingface.co/aleatorydialogue/dynamic_splats/tree/main/");

const req = await fetch(url, { mode: "cors", credentials: "omit" });
if (req.status != 200) throw new Error(req.status + " Unable to load " + req.url);
await readChunks(req.body.getReader(), [{ size: 8, type: "magic" }], chunkHandler);
}

Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<div class="dropdown-content">
<a href="consulting/index.html" target="_blank">Consulting</a>
<div class="submenu-link">
<a href="gaussian.html" target="_blank">Gaussian Splats</a>
<a target="_blank">Gaussian Splats</a>
<div class="submenu-content">
<a href="static.html" target="_blank">Static</a>
<a href="dynamic.html" target="_blank">Dynamic</a>
Expand Down
10 changes: 8 additions & 2 deletions styles.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* styles.css */
@import url('https://fonts.googleapis.com/css2?family=Turret+Road:wght@200;400;700&display=swap');

body {
font-family: Arial, sans-serif;
Expand All @@ -16,7 +17,11 @@ header {
}

.title {
font-size: 2em;
font-family: 'Turret Road', sans-serif;
font-size: 3em; /* Adjust size as needed */
color: white; /* Adjust color as needed */
text-align: center;
margin-top: 20px; /* Adjust margin as needed */
}

main.content {
Expand Down Expand Up @@ -71,7 +76,7 @@ footer {
.dropdown-content {
display: none;
position: absolute;
background-color: rgba(255, 255, 255, 0.9);
background-color: rgba(100, 100, 100, 0.85);
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
Expand All @@ -80,6 +85,7 @@ footer {

.dropdown-content .submenu-link {
position: relative;
display: inline-block
}

.dropdown-content .submenu-content {
Expand Down
Binary file removed timer.splatv
Binary file not shown.

0 comments on commit dd86757

Please sign in to comment.