https://github.com/friflo/sdlwasmsample-web
https://github.com/friflo/sdlwasmsample-web
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/friflo/sdlwasmsample-web
- Owner: friflo
- Created: 2024-03-01T13:39:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-10T14:07:52.000Z (over 1 year ago)
- Last Synced: 2025-01-21T18:36:47.926Z (9 months ago)
- Language: HTML
- Homepage: https://sdl-wasm-sample-web.vercel.app
- Size: 10.1 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Test MonoGame-wasm on the Web
Demo hosted at Vercel
[MonoGame-wasm - Demo](https://sdl-wasm-sample-web.vercel.app/docs/MonoGame/)Tried also github pages but deployment took too long.
Lost patience after 5 minutes. So I searched for an alternative.
Found this: [Top 5 free website hosting platforms for your next project](https://dev.to/vishnusatheesh/5-static-website-hosting-platforms-for-your-next-project-2ahf)
and tried Vercel.## Vercel
Sign-In and deployment in 2 min.## Github Pages
Deployment with GitHub pages had not the expected result.
The *.wasm files were excluded from deployment.
See: https://github.com/friflo/SdlWasmSample-web/actions/runs/8114311717/job/22179648959Deployment included only these files
```
./
./README.md
./docs/
./docs/MonoGame/
./docs/MonoGame/index.html
./docs/MonoGame/main.js
./docs/index.html
./index.html
./assets/
./assets/css/
./assets/css/style.css
```# Setup MonoGame-wasm
- Clone the two repositories below in the same folder
https://github.com/friflo/MonoGame/tree/feature/dotnet-wasm
https://github.com/friflo/SdlWasmSample/tree/monogame-net8
Ensure using the exact branches: `monogame-net8` and `dotnet-wasm`## Deploy as static web page
Below the list of files added to repository for static web site hosting.
```
index.html (copied via devtools)
main.js (copied via devtools)
_framework/
blazor.boot.json
dotnet.js
dotnet.native.8.0.2.sxojud5nuz.js
dotnet.runtime.8.0.2.8j60y5zbay.js
*.wasm
*.dat
```The *.wasm and *.dat files are cached by the browser. So subsequent loads are fast.
The resulting folder structure - see [MonoGame](https://github.com/friflo/SdlWasmSample-web/tree/main/docs/MonoGame)