Skip to content

lukacslacko/terrain3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

182 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terrain3d

  • Run with cargo run -r. Startup takes a bit of time, see the progress report in the console.
  • Drag with left mouse button to rotate the Earth.
  • Scroll with the mouse to zoom in and out.
  • Right click to create a city.
  • Left click one city then another to connect them.
  • Left click a train to ride it.
  • Press Esc to get off a train.

Profiling

To profile, do cargo install flamegraph, then run with cargo flamegraph as admin, eg in windows by searching for cmd, right clicking on Command Prompt and selecting Run as administrator. Finally, open the result flamegraph.svg in a browser.

WebAssembly (WASM) Build & Deployment

Local WASM Build

To build the Bevy app for WebAssembly and output to the docs/ directory (for local testing or manual deployment):

  • On Linux/macOS:
    bash build-wasm.sh
  • On Windows:
    build-wasm.bat

The output will be in the docs/ directory. You can serve this directory locally with

trunk serve --release --filehash=false --dist docs

to test the WASM build.

Automatic Deployment (GitHub Actions)

On every push to the main branch, a GitHub Actions workflow automatically:

  • Builds the WASM app using Trunk
  • Outputs the result to the docs/ directory
  • Commits and pushes any changes in docs/ back to the repository

You can configure GitHub Pages to serve from the /docs folder on the main branch for automatic deployment.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages