Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix loading screen for default Bevy app #144

Merged
merged 6 commits into from
Oct 16, 2024
Merged

Conversation

TimJentzsch
Copy link
Collaborator

Closes #134.

This PR adjusts the default index.html we serve with bevy run web to work better for a Bevy app that doesn't have any special configuration.

We don't assume anymore that the canvas is already created with ID #bevy, but instead watch for a new canvas to be created (which is the default behavior).

We also adjust the styling to better work with this setup and change the web background color to the default Bevy app background color.

@TimJentzsch TimJentzsch requested a review from BD103 October 15, 2024 20:48
@BD103 BD103 added C-Bug A bug in the program A-Run Related to the bevy run command labels Oct 16, 2024
Copy link
Member

@BD103 BD103 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works like a charm, and fixes fun things like this:

use bevy::prelude::*;

fn main() {
    App::new().add_plugins(DefaultPlugins).run();
}

image

assets/web/index.html Outdated Show resolved Hide resolved
@BD103
Copy link
Member

BD103 commented Oct 16, 2024

Merge this once you feel it's ready! :D

@TimJentzsch TimJentzsch enabled auto-merge (squash) October 16, 2024 20:41
@TimJentzsch TimJentzsch merged commit f32efe1 into main Oct 16, 2024
8 checks passed
@TimJentzsch TimJentzsch deleted the 134-fix-loading-screen branch October 16, 2024 20:47
@BD103 BD103 linked an issue Oct 20, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Run Related to the bevy run command C-Bug A bug in the program
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix loading screen for default bevy app setup
3 participants