mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-11 14:08:01 -06:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4a1f565f72 | |||
| 2ddf2611d9 |
28
.cargo/config.toml
Normal file
28
.cargo/config.toml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
[target.wasm32-unknown-emscripten]
|
||||||
|
rustflags = [
|
||||||
|
"-C",
|
||||||
|
"link-arg=-s",
|
||||||
|
"-C",
|
||||||
|
"link-arg=FULL_ES2",
|
||||||
|
"-C",
|
||||||
|
"link-arg=-s",
|
||||||
|
"-C",
|
||||||
|
"link-arg=FULL_ES3",
|
||||||
|
"-C",
|
||||||
|
"link-arg=-s",
|
||||||
|
"-C",
|
||||||
|
"link-arg=USE_SDL=2",
|
||||||
|
"-C",
|
||||||
|
"link-arg=-s",
|
||||||
|
"-C",
|
||||||
|
"link-arg=MAX_WEBGL_VERSION=2 ",
|
||||||
|
"-C",
|
||||||
|
"link-arg=-s",
|
||||||
|
"-C",
|
||||||
|
"link-arg=MIN_WEBGL_VERSION=2",
|
||||||
|
"-C",
|
||||||
|
"link-arg=-s",
|
||||||
|
"-C",
|
||||||
|
"link-arg=ERROR_ON_UNDEFINED_SYMBOLS=0", # for ignoring some egl symbols. needed for wgpu
|
||||||
|
|
||||||
|
]
|
||||||
21
index.html
Normal file
21
index.html
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<canvas id="canvas"></canvas>
|
||||||
|
<script type="text/javascript">
|
||||||
|
const Module = {
|
||||||
|
canvas: (function () {
|
||||||
|
// this is how we provide a canvas to our sdl2
|
||||||
|
return document.getElementById("canvas");
|
||||||
|
})(),
|
||||||
|
preRun: [function () {
|
||||||
|
ENV.RUST_LOG = "info,wgpu=warn"
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script src="rust-sdl2-wasm.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user