mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 15:20:43 +00:00
bd3e8f5c3c
Replace node-canvas in the namelayer asset builder with skia-canvas so icon and emoji atlases are rasterized through the same cross-platform rendering backend. This removes the previous dependency on host Cairo/Pango emoji rendering, which could produce monochrome emoji sprites depending on the local font stack. Add twemoji-colr-font as a pinned COLR/CPAL emoji font input for the build. The emoji atlas now renders from that explicit font instead of whichever OS emoji font happens to be installed, making the generated sprite sheet stable across developer machines and CI. Generalize atlas frame packing for both SVG icons and emoji glyphs: render into a scratch canvas, trim to alpha bounds, center, and scale into the cell with consistent padding. This prevents icon frames from touching cell edges while preserving the existing Pixi atlas JSON contract. Regenerate namelayer emoji and icon atlases. The builder now validates generated atlas frames and fails if any frame is empty or if the emoji atlas contains no color pixels, catching the monochrome-regeneration failure at build time.
136 lines
4.6 KiB
JSON
136 lines
4.6 KiB
JSON
{
|
|
"name": "openfront-client",
|
|
"scripts": {
|
|
"build-dev": "concurrently \"tsc --noEmit\" \"vite build --mode development\"",
|
|
"build-prod": "concurrently --kill-others-on-fail \"tsc --noEmit\" \"vite build\"",
|
|
"start:client": "vite",
|
|
"start:server": "tsx src/server/Server.ts",
|
|
"start:server-dev": "cross-env GAME_ENV=dev tsx src/server/Server.ts",
|
|
"dev": "cross-env GAME_ENV=dev concurrently \"npm run start:client\" \"npm run start:server-dev\"",
|
|
"dev:staging": "cross-env GAME_ENV=dev API_DOMAIN=api.openfront.dev concurrently \"npm run start:client\" \"npm run start:server-dev\"",
|
|
"dev:prod": "cross-env GAME_ENV=dev API_DOMAIN=api.openfront.io concurrently \"npm run start:client\" \"npm run start:server-dev\"",
|
|
"docs:map-generator": "cd map-generator && go doc -cmd -u -all",
|
|
"tunnel": "npm run build-prod && npm run start:server",
|
|
"test": "vitest run && vitest run tests/server",
|
|
"build:namelayer-assets": "node scripts/build-namelayer-assets.mjs",
|
|
"perf": "npx tsx tests/perf/run-all.ts",
|
|
"test:coverage": "vitest run --coverage",
|
|
"format": "prettier --ignore-unknown --write .",
|
|
"format:map-generator": "cd map-generator && go fmt .",
|
|
"lint": "eslint",
|
|
"lint:fix": "eslint --fix",
|
|
"prepare": "husky",
|
|
"gen-maps": "cd map-generator && go run . && npm run format",
|
|
"inst": "npm ci --ignore-scripts"
|
|
},
|
|
"lint-staged": {
|
|
"**/*": [
|
|
"eslint --fix",
|
|
"prettier --ignore-unknown --write"
|
|
]
|
|
},
|
|
"devDependencies": {
|
|
"@datastructures-js/priority-queue": "^6.3.3",
|
|
"@eslint/compat": "^1.2.7",
|
|
"@eslint/js": "^9.21.0",
|
|
"@tailwindcss/vite": "^4.1.18",
|
|
"@types/benchmark": "^2.1.5",
|
|
"@types/chai": "^4.3.17",
|
|
"@types/d3": "^7.4.3",
|
|
"@types/ejs": "^3.1.5",
|
|
"@types/express": "^5.0.6",
|
|
"@types/google-protobuf": "^3.15.12",
|
|
"@types/hammerjs": "^2.0.46",
|
|
"@types/howler": "^2.2.12",
|
|
"@types/jquery": "^3.5.31",
|
|
"@types/js-yaml": "^4.0.9",
|
|
"@types/msgpack5": "^3.4.6",
|
|
"@types/node": "^22.10.2",
|
|
"@types/pg": "^8.11.11",
|
|
"@types/seedrandom": "^3.0.8",
|
|
"@types/sinon": "^17.0.3",
|
|
"@types/systeminformation": "^3.23.1",
|
|
"@types/ws": "^8.5.11",
|
|
"@vitest/coverage-v8": "^4.0.16",
|
|
"@vitest/ui": "^4.0.16",
|
|
"autoprefixer": "^10.4.20",
|
|
"benchmark": "^2.1.4",
|
|
"canvas": "^3.2.1",
|
|
"chai": "^5.1.1",
|
|
"concurrently": "^9.2.1",
|
|
"cross-env": "^7.0.3",
|
|
"d3": "^7.9.0",
|
|
"eslint": "^9.21.0",
|
|
"eslint-config-prettier": "^10.1.1",
|
|
"eslint-formatter-gha": "^1.5.2",
|
|
"glob": "^13.0.0",
|
|
"globals": "^16.0.0",
|
|
"husky": "^9.1.7",
|
|
"jsdom": "^27.4.0",
|
|
"lint-staged": "^16.1.2",
|
|
"lit": "^3.3.1",
|
|
"lit-markdown": "^1.3.2",
|
|
"mrmime": "^2.0.0",
|
|
"msdf-bmfont-xml": "^2.8.0",
|
|
"pixi-filters": "^6.1.5",
|
|
"pixi.js": "^8.18.1",
|
|
"prettier": "^3.5.3",
|
|
"prettier-plugin-organize-imports": "^4.1.0",
|
|
"prettier-plugin-sh": "^0.17.4",
|
|
"protobufjs": "^7.5.5",
|
|
"skia-canvas": "^3.0.8",
|
|
"sinon": "^21.0.1",
|
|
"sinon-chai": "^4.0.0",
|
|
"tailwindcss": "^4.1.18",
|
|
"tsconfig-paths": "^4.2.0",
|
|
"twemoji-colr-font": "^15.0.3",
|
|
"typescript": "^6.0.3",
|
|
"typescript-eslint": "^8.59.1",
|
|
"vite": "^7.3.2",
|
|
"vite-plugin-html": "^3.2.2",
|
|
"vite-plugin-static-copy": "^3.1.4",
|
|
"vite-tsconfig-paths": "^6.0.3",
|
|
"vitest": "^4.0.16",
|
|
"vitest-canvas-mock": "^1.1.3"
|
|
},
|
|
"dependencies": {
|
|
"@aws-sdk/client-s3": "^3.758.0",
|
|
"@lit-labs/virtualizer": "^2.1.1",
|
|
"@opentelemetry/api": "^1.9.0",
|
|
"@opentelemetry/api-logs": "^0.200.0",
|
|
"@opentelemetry/exporter-logs-otlp-http": "^0.200.0",
|
|
"@opentelemetry/exporter-metrics-otlp-http": "^0.200.0",
|
|
"@opentelemetry/resources": "^2.0.0",
|
|
"@opentelemetry/sdk-logs": "^0.200.0",
|
|
"@opentelemetry/sdk-metrics": "^2.0.0",
|
|
"@opentelemetry/semantic-conventions": "^1.32.0",
|
|
"@opentelemetry/winston-transport": "^0.11.0",
|
|
"@types/compression": "^1.8.1",
|
|
"colord": "^2.9.3",
|
|
"colorjs.io": "^0.5.2",
|
|
"compression": "^1.8.1",
|
|
"dompurify": "^3.4.0",
|
|
"dotenv": "^16.5.0",
|
|
"ejs": "^3.1.10",
|
|
"express": "^5.2.1",
|
|
"express-rate-limit": "^8.3.2",
|
|
"fastpriorityqueue": "^0.7.5",
|
|
"howler": "^2.2.4",
|
|
"intl-messageformat": "^10.7.16",
|
|
"ip-anonymize": "^0.1.0",
|
|
"jose": "^6.0.10",
|
|
"js-yaml": "^4.1.1",
|
|
"limiter": "^3.0.0",
|
|
"nanoid": "^3.3.6",
|
|
"node-html-parser": "^7.0.2",
|
|
"obscenity": "^0.4.3",
|
|
"seedrandom": "^3.0.5",
|
|
"ts-node": "^10.9.2",
|
|
"tsx": "^4.17.0",
|
|
"winston": "^3.17.0",
|
|
"ws": "^8.18.0",
|
|
"zod": "^4.0.5"
|
|
},
|
|
"type": "module"
|
|
}
|