Add Zesty beacon, favicon, and web manifest
All checks were successful
Build / build (push) Successful in 1m41s

Wire up sig-beacon for spatial web discovery (production only),
add favicon/apple-touch-icon links to index.html, populate
site.webmanifest with app metadata, and add OG/meta tags.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Michael Mainguy 2026-03-04 09:46:18 -06:00
parent 0bb27691fe
commit d47b6458a8
12 changed files with 62 additions and 0 deletions

View File

@ -5,6 +5,17 @@
<meta content="width=device-width, initial-scale=1, height=device-height" name="viewport">
<link href="/styles.css" rel="stylesheet">
<title>Space Game</title>
<meta name="application-name" content="Flat Earth Defense Space Shooter">
<meta name="description" content="WebXR space shooter game built with BabylonJS for VR headsets">
<meta property="og:url" content="https://www.flatearthdefense.com">
<meta property="og:image" content="https://www.flatearthdefense.com/og-image.png">
<meta name="keywords" content="webxr, vr, space, game, babylonjs, metaverse">
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="manifest" href="/site.webmanifest">
<meta name="theme-color" content="#000000">
<script>
navigator.serviceWorker.getRegistrations().then(registrations => {
for (const registration of registrations) {

7
package-lock.json generated
View File

@ -20,6 +20,7 @@
"@newrelic/browser-agent": "^1.302.0",
"@supabase/supabase-js": "^2.84.0",
"loglevel": "^1.9.2",
"sig-beacon": "^0.0.14",
"svelte-routing": "^2.13.0"
},
"devDependencies": {
@ -3067,6 +3068,12 @@
"node": ">=8"
}
},
"node_modules/sig-beacon": {
"version": "0.0.14",
"resolved": "https://registry.npmjs.org/sig-beacon/-/sig-beacon-0.0.14.tgz",
"integrity": "sha512-BQo7GTCdbA+SAKBC3JcCsWNl/0mcr3aPUZInPZ9Vj+4LnSLYTWL+mWLf81/4AYh+NDl9Rf4WZVvaYR1ghuwsoA==",
"license": "MIT"
},
"node_modules/source-map-js": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",

View File

@ -28,6 +28,7 @@
"@newrelic/browser-agent": "^1.302.0",
"@supabase/supabase-js": "^2.84.0",
"loglevel": "^1.9.2",
"sig-beacon": "^0.0.14",
"svelte-routing": "^2.13.0"
},
"devDependencies": {

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

BIN
public/apple-touch-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
public/favicon-16x16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 B

BIN
public/favicon-32x32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
public/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

20
public/site.webmanifest Normal file
View File

@ -0,0 +1,20 @@
{
"name": "Flat Earth Defense Space Shooter",
"short_name": "FED Space",
"start_url": "/",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#000000",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}

View File

@ -3,6 +3,7 @@ import App from '../components/layouts/App.svelte';
import { LegacyMigration } from '../levels/migration/legacyMigration';
import { LevelRegistry } from '../levels/storage/levelRegistry';
import log from './logger';
import { initBeacon } from '../services/beacon';
// Type for Main class - imported dynamically to avoid circular dependency
type MainClass = new (progressCallback?: (percent: number, message: string) => void) => any;
@ -56,6 +57,7 @@ export async function initializeApp(MainConstructor: MainClass): Promise<void> {
}
mountAppAndCreateMain(MainConstructor);
initBeacon();
log.info('[Main] initializeApp() FINISHED');
}

21
src/services/beacon.ts Normal file
View File

@ -0,0 +1,21 @@
import Beacon from 'sig-beacon';
import log from '../core/logger';
/**
* Initialize the Zesty beacon for spatial web discovery.
* Only runs in production (non-dev) environments.
*/
export async function initBeacon(): Promise<void> {
const isDev = window.location.hostname === 'localhost' ||
window.location.hostname.includes('dev.') ||
window.location.port !== '';
if (isDev) return;
try {
const beacon = new Beacon('https://relay.zesty.xyz');
await beacon.signal();
log.info('[Beacon] Registered with relay');
} catch (error) {
log.error('[Beacon] Failed to signal:', error);
}
}