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

Add compass rose and work around wasm crash #64

Merged
merged 8 commits into from
Dec 9, 2023

Conversation

oli-obk
Copy link
Collaborator

@oli-obk oli-obk commented Dec 8, 2023

wasm failed to load the cloud and earth textures, and then crashed. Now we fail gracefully. But I also embedded the textures directly into the binary, so we don't need to download them.

We should figure out how to add a loading bar for downloading the wasm blob, because that's 60 MB now 😆

fixes #63
fixes #51

src/lib.rs Outdated
Comment on lines 303 to 310
player: Player,
) {
if let Ok((mut pos, mut grid)) = compass.get_single_mut() {
let player = player.pos();
let directions = player.directions();
pos.translation = player.transform.translation - directions.up * 5.;
*grid = player.grid;
pos.look_to(directions.north, directions.up)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@DerKarlos I added a helper that wraps all the annoying math in a nice function and gives you a struct with a north, up, and west vector (all orthogonal to each other).

@oli-obk oli-obk merged commit c15e21a into DerKarlos:main Dec 9, 2023
7 checks passed
@oli-obk oli-obk deleted the cleanups branch December 9, 2023 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Functions to calculate between Geo- and GPU coordinates test Wasm startup in CI
1 participant