-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ 94b983a 🚀
- Loading branch information
1 parent
f0e0c08
commit 41acb13
Showing
17 changed files
with
907 additions
and
47 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"liveServer.settings.port": 5501 | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,120 @@ | ||
{ | ||
"asset":{ | ||
"generator":"Khronos glTF Blender I/O v4.1.63", | ||
"version":"2.0" | ||
}, | ||
"scene":0, | ||
"scenes":[ | ||
{ | ||
"name":"Scene", | ||
"nodes":[ | ||
0 | ||
] | ||
} | ||
], | ||
"nodes":[ | ||
{ | ||
"extras":{ | ||
"selected_edges_json":"[[2643, 2644], [2644, 2645], [2676, 2709], [2676, 2677], [2677, 2678], [2645, 2678], [2709, 2710], [2710, 2711]]" | ||
}, | ||
"mesh":0, | ||
"name":"Torus" | ||
} | ||
], | ||
"meshes":[ | ||
{ | ||
"name":"Torus", | ||
"primitives":[ | ||
{ | ||
"attributes":{ | ||
"_INDEX":0, | ||
"POSITION":1, | ||
"NORMAL":2, | ||
"TEXCOORD_0":3 | ||
}, | ||
"indices":4 | ||
} | ||
] | ||
} | ||
], | ||
"accessors":[ | ||
{ | ||
"bufferView":0, | ||
"componentType":5126, | ||
"count":11616, | ||
"type":"SCALAR" | ||
}, | ||
{ | ||
"bufferView":1, | ||
"componentType":5126, | ||
"count":11616, | ||
"max":[ | ||
2.049999952316284, | ||
0.7491505146026611, | ||
2.049999952316284 | ||
], | ||
"min":[ | ||
-2.049999952316284, | ||
-0.7491505146026611, | ||
-2.049999952316284 | ||
], | ||
"type":"VEC3" | ||
}, | ||
{ | ||
"bufferView":2, | ||
"componentType":5126, | ||
"count":11616, | ||
"type":"VEC3" | ||
}, | ||
{ | ||
"bufferView":3, | ||
"componentType":5126, | ||
"count":11616, | ||
"type":"VEC2" | ||
}, | ||
{ | ||
"bufferView":4, | ||
"componentType":5123, | ||
"count":17424, | ||
"type":"SCALAR" | ||
} | ||
], | ||
"bufferViews":[ | ||
{ | ||
"buffer":0, | ||
"byteLength":46464, | ||
"byteOffset":0, | ||
"target":34962 | ||
}, | ||
{ | ||
"buffer":0, | ||
"byteLength":139392, | ||
"byteOffset":46464, | ||
"target":34962 | ||
}, | ||
{ | ||
"buffer":0, | ||
"byteLength":139392, | ||
"byteOffset":185856, | ||
"target":34962 | ||
}, | ||
{ | ||
"buffer":0, | ||
"byteLength":92928, | ||
"byteOffset":325248, | ||
"target":34962 | ||
}, | ||
{ | ||
"buffer":0, | ||
"byteLength":34848, | ||
"byteOffset":418176, | ||
"target":34963 | ||
} | ||
], | ||
"buffers":[ | ||
{ | ||
"byteLength":453024, | ||
"uri":"torus_custom_property.bin" | ||
} | ||
] | ||
} |
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,100 @@ | ||
<!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> | ||
<style> | ||
body, html { | ||
margin: 0; | ||
padding: 0; | ||
height: 100%; | ||
} | ||
.container { | ||
display: flex; | ||
flex-direction: column; | ||
height: 100vh; | ||
} | ||
.row { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
padding: 20px; | ||
} | ||
.header { | ||
flex: 0 0 auto; | ||
} | ||
.content { | ||
flex: 1 0 auto; | ||
overflow: hidden; /* Prevents scrolling within this container */ | ||
} | ||
.footer { | ||
flex: 0 0 auto; | ||
} | ||
#wasm-container { | ||
width: 50%; | ||
height: 0; | ||
padding-bottom: 56.25%; /* 16:9 aspect ratio */ | ||
position: relative; | ||
background-color: red; | ||
} | ||
#wasm-container canvas { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
</style> | ||
</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> | ||
|
Oops, something went wrong.