Skip to content

Commit

Permalink
Deploying to gh-pages from @ 712f105 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
arcadeperfect committed Nov 27, 2024
1 parent a14a313 commit 9132b04
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
20 changes: 19 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,25 @@
</head>

<body class="color-scheme-home">

<script>
window.addEventListener('DOMContentLoaded', (event) => {
// Find the canvas element created by Bevy
const canvas = document.querySelector('canvas');
if (canvas) {
// Save the original focus method
const originalFocus = canvas.focus.bind(canvas);
// Override the focus method to include preventScroll
canvas.focus = function(options) {
if (!options || typeof options !== 'object') {
options = { preventScroll: true };
} else {
options.preventScroll = true;
}
originalFocus(options);
};
}
});
</script>
<div class="grid">
<div class="main-column">
<!-- <a href="https://alexharding.ooo" class="back-arrow">alexharding.ooo</a> <a href="https://bsky.app/profile/alexharding.bsky.social" class="back-arrow">bluesky</a> -->
Expand Down
2 changes: 1 addition & 1 deletion out/bevy_vaporwave.js
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ function __wbg_get_imports() {
return ret;
};
imports.wbg.__wbg_focus_06621101cc79f5d8 = function() { return handleError(function (arg0) {
// arg0.focus();
arg0.focus();
}, arguments) };
imports.wbg.__wbg_fetch_0b9f0f8239b62e25 = function(arg0, arg1, arg2) {
const ret = arg0.fetch(getStringFromWasm0(arg1, arg2));
Expand Down
Binary file modified out/bevy_vaporwave_bg.wasm
Binary file not shown.

0 comments on commit 9132b04

Please sign in to comment.