Skip to content

Fix loading screen for default Bevy app#144

Merged
TimJentzsch merged 6 commits intomainfrom
134-fix-loading-screen
Oct 16, 2024
Merged

Fix loading screen for default Bevy app#144
TimJentzsch merged 6 commits intomainfrom
134-fix-loading-screen

Conversation

@TimJentzsch
Copy link
Copy Markdown
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
Copy Markdown
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

@BD103
Copy link
Copy Markdown
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
@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