@faiber/faiber-game-sdk

中文文档
2.8.0发布于 2026/11/14TypeScriptES Module近 30 天下载 3722

Portable TypeScript/WebAssembly game runtime designed to scale from a small 2D web game to a cross-platform 3D title.

原始使用文档

@faiber/faiber-game-sdk

Portable TypeScript/WebAssembly game runtime designed to scale from a small 2D web game to a cross-platform 3D title.

npm install @faiber/faiber-game-sdk

The first foundation includes an ECS world, fixed-step game loop, pluggable renderer and physics systems, WebAssembly game plugins, adaptive device quality, automatic texture variant selection, WebGL 2/headless backends, and direct Infera State replication bindings.

import { FaiberGame } from "@faiber/faiber-game-sdk";

const game = new FaiberGame({ canvas, tickRate: 60, autoResize: true });
await game.start();

WebGPU, native GPU backends, Bevy component interchange, 2D/3D physics, editor tooling, shader graph, ray tracing, mobile/desktop packaging, asset cooking, and platform certification are adapter-level roadmap items. The capability detector never claims unsupported ray tracing and always selects a runnable fallback for the device.

This is a local browser runtime, not a separate Game HTTP service. State-backed match transports must use an authenticated State SDK client with secure HttpOnly cookies or an in-memory token provider. Never put a service secret in game code. Transport promises propagate failures to the caller; close match sessions and stop the game on unmount. Local rendering does not authorize moves or determine server rewards. Use @faiber/faiber-ts-sdk for the complete service facade. The packaged provenance manifest binds the local source and State dependency contract.

版本与发布记录

@faiber/faiber-game-sdk 共发布 59 个版本,首次发布于 2026/07/28;过去 12 个月发布了 59 个版本。

版本发布日期距今
2.8.0latest2026/11/14今天
2.7.02026/11/059 天前
2.6.02026/11/049 天前
2.5.02026/11/049 天前
2.4.02026/11/0310 天前
2.3.02026/11/0211 天前

关于 @faiber/faiber-game-sdk 的常见问题

@faiber/faiber-game-sdk 是什么?

Portable TypeScript/WebAssembly game runtime designed to scale from a small 2D web game to a cross-platform 3D title.

如何安装 @faiber/faiber-game-sdk?

在项目目录运行 npm install @faiber/faiber-game-sdk,或使用 pnpm add / yarn add / bun add。

@faiber/faiber-game-sdk 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@faiber/faiber-game-sdk 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@faiber/faiber-game-sdk 可以商用吗?

@faiber/faiber-game-sdk 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@faiber/faiber-game-sdk 的下载量有多少?

根据 npm 官方下载统计,@faiber/faiber-game-sdk 在 2026/10/14 – 2026/11/12 这 30 天内被下载 3,722 次,日均约 124 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@faiber/faiber-game-sdk 还在维护吗?

最新版本 2.8.0 发布于 2026/11/14(今天);至今共发布 59 个版本,其中过去 12 个月发布了 59 个;首次发布于 2026/07/28。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。