Compare commits
2
Commits
5baaf0239a
...
f449e081c6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f449e081c6 | ||
|
|
4ff8821562 |
@@ -116,7 +116,7 @@ export function format_report(report: BenchmarkReport): string {
|
||||
const memory = system.memory_gb ? `, ${system.memory_gb} GB` : "";
|
||||
const refresh = system.refresh_hz ? `, ${system.refresh_hz} Hz` : "";
|
||||
const lines = [
|
||||
`## bworld render benchmark ${report.version}`,
|
||||
`## cubi render benchmark ${report.version}`,
|
||||
"",
|
||||
`${system.browser} on ${system.os}, ${system.gpu}`,
|
||||
`${system.cpu_threads} threads${memory}${refresh}, drawn at ${report.resolution}, ${system.workers} mesh workers` +
|
||||
|
||||
@@ -93,7 +93,7 @@ export class TitleScreen extends GuiScreen {
|
||||
}
|
||||
|
||||
on_render(): void {
|
||||
const title = "bworld";
|
||||
const title = "Cubi";
|
||||
const title_width = measure_text(title, TITLE_SCALE);
|
||||
draw_text(
|
||||
title,
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>bworld</title>
|
||||
<title>Cubi</title>
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"pack-mod": "deno run --allow-read --allow-write --allow-run --allow-env tools/pack_mod.ts",
|
||||
"test": "deno test --allow-read --allow-write --allow-run --allow-net tests/",
|
||||
"bench": "deno bench --allow-read --allow-write --allow-run tests/",
|
||||
"desktop": "deno run -A build.ts --once && deno desktop --allow-read --allow-write --allow-net --allow-ffi --allow-env=BWORLD_SERVER,BWORLD_CLIENT_UPDATES,HOME,USERPROFILE,APPDATA,XDG_DATA_HOME,DEBUG --include build --include server_mods --include server/game/worker.ts --include server/game/worldgen_worker.ts --include desktop/config.json desktop/main.ts && deno run --allow-read --allow-write desktop/linux_launcher.ts dist/bworld",
|
||||
"desktop": "deno run -A build.ts --once && deno desktop --allow-read --allow-write --allow-net --allow-ffi --allow-env=CUBI_SERVER,CUBI_CLIENT_UPDATES,HOME,USERPROFILE,APPDATA,XDG_DATA_HOME,DEBUG --include build --include server_mods --include server/game/worker.ts --include server/game/worldgen_worker.ts --include desktop/config.json desktop/main.ts && deno run --allow-read --allow-write desktop/linux_launcher.ts dist/bworld",
|
||||
"desktop-all": "deno run -A tools/desktop_all.ts"
|
||||
},
|
||||
"compilerOptions": {
|
||||
@@ -42,8 +42,8 @@
|
||||
"zod": "jsr:@zod/zod@^4.6.7"
|
||||
},
|
||||
"desktop": {
|
||||
"app": { "name": "bworld", "identifier": "com.bworld.game" },
|
||||
"app": { "name": "cubi", "identifier": "com.bworld.game" },
|
||||
"backend": "cef",
|
||||
"output": { "macos": "./dist/bworld.app", "windows": "./dist/bworld", "linux": "./dist/bworld" }
|
||||
"output": { "macos": "./dist/cubi.app", "windows": "./dist/cubi", "linux": "./dist/cubi" }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,11 +44,11 @@ export function wrap_linux_launcher(dir: string) {
|
||||
launcher,
|
||||
`#!/bin/sh
|
||||
# starts ${name} with the chromium switches webgpu needs on some linux setups, see desktop/linux_launcher.ts.
|
||||
# BWORLD_CHROMIUM_FLAGS replaces them, set it to "" to start without any
|
||||
# CUBI_CHROMIUM_FLAGS replaces them, set it to "" to start without any
|
||||
here="$(dirname "$(readlink -f "$0")")"
|
||||
# the binary finds its runtime by its own name, which is ${name}.so and not ${name}-bin.so
|
||||
export LAUFEY_RUNTIME_PATH="$here/${name}.so"
|
||||
exec "$here/${name}-bin" \${BWORLD_CHROMIUM_FLAGS-${SWITCHES.join(" ")}} "$@"
|
||||
exec "$here/${name}-bin" \${CUBI_CHROMIUM_FLAGS-${SWITCHES.join(" ")}} "$@"
|
||||
`,
|
||||
);
|
||||
if (Deno.build.os !== "windows") {
|
||||
|
||||
+3
-3
@@ -21,11 +21,11 @@ const BUILD_DIR = join(ROOT, "build");
|
||||
const config: { server?: string; client_updates?: string } = JSON.parse(
|
||||
await Deno.readTextFile(new URL("./config.json", import.meta.url)),
|
||||
);
|
||||
const default_server = Deno.env.get("BWORLD_SERVER") ?? config.server ?? "";
|
||||
const default_server = Deno.env.get("CUBI_SERVER") ?? config.server ?? "";
|
||||
|
||||
// the site the client updates from, see client_updates.ts. BWORLD_CLIENT_UPDATES=off plays the client the app was
|
||||
// the site the client updates from, see client_updates.ts. CUBI_CLIENT_UPDATES=off plays the client the app was
|
||||
// built with (to test a local build), or it can point at a local server to test updating
|
||||
const updates_from = (Deno.env.get("BWORLD_CLIENT_UPDATES") ?? config.client_updates ?? "off").replace(/\/+$/, "");
|
||||
const updates_from = (Deno.env.get("CUBI_CLIENT_UPDATES") ?? config.client_updates ?? "off").replace(/\/+$/, "");
|
||||
// how long the first page waits for an update, a slower one is played next time
|
||||
const UPDATE_WAIT_MS = 3000;
|
||||
const client_options = {
|
||||
|
||||
+1
-1
@@ -42,6 +42,6 @@ if (Deno.build.os !== "windows") {
|
||||
}
|
||||
|
||||
Deno.serve(
|
||||
{ port: PORT, onListen: ({ port }) => console.log(`bworld server on http://localhost:${port}/`) },
|
||||
{ port: PORT, onListen: ({ port }) => console.log(`cubi server on http://localhost:${port}/`) },
|
||||
host.handle,
|
||||
);
|
||||
|
||||
@@ -20,7 +20,7 @@ const DESKTOP_ARGS = [
|
||||
"--allow-write",
|
||||
"--allow-net",
|
||||
"--allow-ffi",
|
||||
"--allow-env=BWORLD_SERVER,BWORLD_CLIENT_UPDATES,HOME,USERPROFILE,APPDATA,XDG_DATA_HOME,DEBUG",
|
||||
"--allow-env=CUBI_SERVER,CUBI_CLIENT_UPDATES,HOME,USERPROFILE,APPDATA,XDG_DATA_HOME,DEBUG",
|
||||
"--include",
|
||||
"build",
|
||||
"--include",
|
||||
|
||||
Reference in New Issue
Block a user