Skip to content

Commit

Permalink
site upates
Browse files Browse the repository at this point in the history
  • Loading branch information
arcadeperfect committed Nov 26, 2024
1 parent a67d4f4 commit ff6acd3
Show file tree
Hide file tree
Showing 3 changed files with 453 additions and 302 deletions.
94 changes: 18 additions & 76 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,95 +1,36 @@
<!-- <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bevy Vector Style</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<div class="row header">
<h1>Bevy Vector Style</h1>
</div>
<div class="row content">
<div id="wasm-container"></div>
</div>
<div class="row header">
<h2>Second Header</h2>
</div>
<div class="row footer">
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit.</p>
</div>
</div>
<script type="module">
import init from './out/bevy_wireframe.js';
async function run() {
const wasmContainer = document.getElementById('wasm-container');
// Create a mutation observer to watch for the canvas being added to the body
const observer = new MutationObserver((mutations) => {
for (let mutation of mutations) {
for (let node of mutation.addedNodes) {
if (node.tagName === 'CANVAS') {
node.style.width = '100%';
node.style.height = '100%';
wasmContainer.appendChild(node);
observer.disconnect(); // Stop observing once we've moved the canvas
}
}
}
});
// Start observing the document body for changes
observer.observe(document.body, { childList: true });
// Initialize the WebAssembly module
await init();
}
run();
</script>
</body>
</html> -->

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bevy Vector Style</title>
<link rel="stylesheet" href="styles.css">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Roboto+Mono&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Roboto+Mono&display=swap"
rel="stylesheet">
</head>

<body class="color-scheme-home">
<div class="grid">
<div class="main-column">
<h1 class="main-heading">Bevy Vector Style</h1>
<a href="/" class="back-arrow">alexharding.ooo</a>
<h1 class="main-heading">Bevy Vaporwave</h1>
<div id="wasm-container"></div>
<h2>Second Header</h2>
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit.</p>
</div>
<div class="sidebar-column">
<div class="social-links">
<div><a href="#">Link 1</a></div>
<div><a href="#">Link 2</a></div>
<div><a href="#">Link 3</a></div>
</div>
<a href="/" class="big-side-text">SIDEBAR</a>
<h2><a href="https://github.com/arcadeperfect/bevy_vaporwave">Github</a></h2>
<p>Side project to learn some wgsl basics, gltf, and develop a look for my <a href="https://alexharding.ooo/posts/Rustroneer/">main Bevy project</a>.</p>
<p>I'm learning. The code is pretty garbage. If you're intetested though have at it.</p>
<p>The goal was to achieve a wireframe look without rendering every triangle, and without using textures.</p>
</div>

</div>
</div>

<script type="module">
import init from './out/bevy_vaporwave.js';

async function run() {
const wasmContainer = document.getElementById('wasm-container');

const observer = new MutationObserver((mutations) => {
for (let mutation of mutations) {
for (let node of mutation.addedNodes) {
Expand All @@ -102,13 +43,14 @@ <h2>Second Header</h2>
}
}
});

observer.observe(document.body, { childList: true });

await init();
}

run();
</script>
</body>

</html>
Loading

0 comments on commit ff6acd3

Please sign in to comment.