NiklasEi / bevy_game_template

Template for a Bevy game including CI/CD for web, Windows, Linux, macOS, iOS and Android
https://niklasei.github.io/bevy_game_template/
Creative Commons Zero v1.0 Universal
844 stars 89 forks source link

Add Trunk.toml and make urls relative. #90

Closed kaydensigh closed 11 months ago

kaydensigh commented 11 months ago

This enables IDEs to live preview dist/index.html without any extra config (since they usually default to serving the whole repo).

It also allows the template to work as-is on itch.io and any other services that serve the package under some path.

kaydensigh commented 11 months ago

Do you mean keyboard and mouse inputs? Which IDE do you see this in? (Maybe we should move this to an issue).

I've only been using RustRover's built-in server, which always opens in your default browser. On VS Code, the ritwickdey.LiveServer extension also opens on default browser. ms-vscode.live-server opens in a panel, but mouse seems to work. My guess would be any preview that displays inside the IDE might have some inputs captured by the IDE itself.

BTW thanks for the reviews and for putting together this template; it's super useful to folks like myself who are new to Bevy and Rust 😁

NiklasEi commented 11 months ago

I tested it in RustRover and IntelliJ. Opening it in a browser is fine and keyboard inputs work.

I was testing it inside the IDE itself and that's when the inputs stop working. They seem to be captured by the preview (the canvas gets marked), but Bevy doesn't get them.

I don't think we need an issue for it, since it works in browsers. Seems like in issue of the IDEs.