1
0
Fork 0

Fix some migration issues

This commit is contained in:
Pafnooty 2025-05-08 23:44:59 +03:00
parent da1bbb839d
commit 410c3cf504
3 changed files with 2 additions and 12 deletions

View File

@ -1,7 +0,0 @@
export function awoo(a: i32, b: i32): void {
console.log((a * b).toString());
}
export function testTemplate(a: i32, f: f64): string {
return `${a} + ${f} = ${a + f}`;
}

View File

@ -1,10 +1,7 @@
import { awoo, testTemplate } from "./awoo.wasm";
import { render } from "preact";
import attack from './assets/attack.wav';
export default function main() {
awoo(42, 69);
console.log(testTemplate(420, 69));
render(
<button onClick={() => attack.play()}>

View File

@ -1,4 +1,4 @@
import { delay, nextFrame } from "@common/utils";
import { nextFrame } from "@common/utils";
import { Color, GAME_HEIGHT, GAME_WIDTH } from "./const";
import type { IChar, IColorLike, IRegion } from "./types";
import { generateColors, randChar } from "./utils";
@ -222,7 +222,7 @@ export async function tick(desiredFPS = 60) {
const totalDelay = 1000 / desiredFPS;
const remainingDelay = totalDelay - dt;
if (remainingDelay > 4) {
await delay(remainingDelay);
await Bun.sleep(remainingDelay);
}
}