mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-06 13:15:47 -06:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| de5cddd9b6 | |||
| e3f37ab48e | |||
| 3dd8d5aff7 |
@@ -1,4 +1,8 @@
|
||||
[target.wasm32-unknown-emscripten]
|
||||
rustflags = [
|
||||
"--use-preload-plugins --preload-file assets -s USE_SDL=2 -s USE_SDL_IMAGE=2 -s ASSERTIONS=1",
|
||||
]
|
||||
"-O", "-C", "link-args=-O2 --profiling",
|
||||
#"-C", "link-args=-O3 --closure 1",
|
||||
"-C", "link-args=-sASYNCIFY -sALLOW_MEMORY_GROWTH=1",
|
||||
"-C", "link-args=-sUSE_SDL=2 -sUSE_SDL_IMAGE=2 -sSDL2_IMAGE_FORMATS=['png']",
|
||||
"-C", "link-args=--preload-file assets/ -lidbfs.js",
|
||||
]
|
||||
|
||||
4
.github/workflows/deploy.yaml
vendored
4
.github/workflows/deploy.yaml
vendored
@@ -11,8 +11,8 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2 # repo checkout
|
||||
- uses: mymindstorm/setup-emsdk@v11 # setup emscripten toolchain
|
||||
# with:
|
||||
# version: 3.1.35
|
||||
with:
|
||||
version: 1.39.20
|
||||
- uses: actions-rs/toolchain@v1 # get rust toolchain for wasm
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
@@ -128,9 +128,9 @@ pub fn main() {
|
||||
|
||||
tick_no += 1;
|
||||
|
||||
const PERIOD: u32 = 60 * 2;
|
||||
const PERIOD: u32 = 60 * 60;
|
||||
let tick_mod = tick_no % PERIOD;
|
||||
if tick_mod % PERIOD == 0 || tick_no == PERIOD {
|
||||
if tick_mod % PERIOD == 0 {
|
||||
let average_fps = PERIOD as f32 / last_averaging_time.elapsed().as_secs_f32();
|
||||
let average_sleep = sleep_time / PERIOD;
|
||||
let average_process = loop_time - average_sleep;
|
||||
|
||||
Reference in New Issue
Block a user