File tree Expand file tree Collapse file tree 4 files changed +28
-0
lines changed
Expand file tree Collapse file tree 4 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ rm -f Res/Game.wasm
2+ cd Source
3+ GOOS=js GOARCH=wasm go build -o Game.wasm -v * .go
4+ mv Game.wasm ../Res/
Original file line number Diff line number Diff line change 1+ git add .
2+ git commit -m $1 $2
3+ git push origin main --force
Original file line number Diff line number Diff line change 1+ <!DOCTYPE HTML>
2+ < html >
3+ < title >
4+ Bones 'N Souls
5+ </ title >
6+ < style >
7+ body { margin : 0 ; }
8+ canvas { display : block; }
9+ </ style >
10+ < script src ="Res/Cannon.js "> </ script >
11+ < script src ="Res/Three.js "> </ script >
12+ < script src ="Res/Wasm.js "> </ script >
13+ < script >
14+ try {
15+ var go = new Go ( ) ;
16+ WebAssembly . instantiateStreaming ( fetch ( "Res/Game.wasm" ) , go . importObject ) . then ( ( result ) => { go . run ( result . instance ) ; } ) ;
17+ } catch ( E ) {
18+ alert ( "An error has occured:\n\n" + E + "\n\nPlease reload the game." ) ;
19+ } ;
20+ </ script >
21+ </ html >
You can’t perform that action at this time.
0 commit comments