A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
docs: add UI-canvas, physics-settings, and input-map screenshots (en + zh)
yhhe69649801fc3
diff --git a/docs/astro/src/assets/guides/en/collision-matrix.png b/docs/astro/src/assets/guides/en/collision-matrix.pngnew file mode 100644index 000000000..21a686781Binary files /dev/null and b/docs/astro/src/assets/guides/en/collision-matrix.png differdiff --git a/docs/astro/src/assets/guides/en/input-map.png b/docs/astro/src/assets/guides/en/input-map.pngnew file mode 100644index 000000000..e80b906bbBinary files /dev/null and b/docs/astro/src/assets/guides/en/input-map.png differdiff --git a/docs/astro/src/assets/guides/en/ui-screen.png b/docs/astro/src/assets/guides/en/ui-screen.pngnew file mode 100644index 000000000..0a146e851Binary files /dev/null and b/docs/astro/src/assets/guides/en/ui-screen.png differdiff --git a/docs/astro/src/assets/guides/zh/collision-matrix.png b/docs/astro/src/assets/guides/zh/collision-matrix.pngnew file mode 100644index 000000000..1c8a6b728Binary files /dev/null and b/docs/astro/src/assets/guides/zh/collision-matrix.png differdiff --git a/docs/astro/src/assets/guides/zh/input-map.png b/docs/astro/src/assets/guides/zh/input-map.pngnew file mode 100644index 000000000..1b071a427Binary files /dev/null and b/docs/astro/src/assets/guides/zh/input-map.png differdiff --git a/docs/astro/src/assets/guides/zh/ui-screen.png b/docs/astro/src/assets/guides/zh/ui-screen.pngnew file mode 100644index 000000000..35e75235bBinary files /dev/null and b/docs/astro/src/assets/guides/zh/ui-screen.png differdiff --git a/docs/astro/src/content/docs/guides/input.mdx b/docs/astro/src/content/docs/guides/input.mdxindex 735a4f0e5..f6c7abe39 100644--- a/docs/astro/src/content/docs/guides/input.mdx+++ b/docs/astro/src/content/docs/guides/input.mdx@@ -81,6 +81,10 @@ buttons; gamepad edges are frame-granular.</Aside>## Input actions (`InputMap`)+++*The Input Map editor: named actions (Move / Jump / Fire), each with as many keyboard, mouse, and gamepad bindings as you like.*+Hard-coded key checks scatter device knowledge through gameplay code. An **inputmap** names each action once — with as many keyboard / mouse / gamepad bindings asyou like — and gameplay queries the action by name:diff --git a/docs/astro/src/content/docs/guides/physics.mdx b/docs/astro/src/content/docs/guides/physics.mdxindex bb1f92cbe..f710f85fa 100644--- a/docs/astro/src/content/docs/guides/physics.mdx+++ b/docs/astro/src/content/docs/guides/physics.mdx@@ -120,6 +120,10 @@ are in meters.## Collision filtering+++*Project Settings → Physics: name your 16 collision layers, then toggle which pairs collide in the matrix (alongside the solver tuning below).*+`categoryBits` (what layer a body is on) and `maskBits` (what it collides with) are16-bit filters. Two bodies collide only if each one's category is in the other's mask:diff --git a/docs/astro/src/content/docs/guides/ui.mdx b/docs/astro/src/content/docs/guides/ui.mdxindex a1ee0631a..bd5ffe0cc 100644--- a/docs/astro/src/content/docs/guides/ui.mdx+++ b/docs/astro/src/content/docs/guides/ui.mdx@@ -120,6 +120,10 @@ hit-testing. Add `UIMask` to a node to clip its children to the box.## Editor or code+++*A UI Canvas in the editor — laid out against the design frame, with the selected node's gizmo. The same widgets author from code or the editor.*+Both author the **same components** — there is no separate editor format:- **Editor** — *Create… → UI* drops widget prefabs (Button, Toggle, Slider,diff --git a/docs/astro/src/content/docs/zh-cn/guides/input.mdx b/docs/astro/src/content/docs/zh-cn/guides/input.mdxindex 8e0dc11fc..40d4fde59 100644--- a/docs/astro/src/content/docs/zh-cn/guides/input.mdx+++ b/docs/astro/src/content/docs/zh-cn/guides/input.mdx@@ -76,6 +76,10 @@ const jump = defineSystem([Query(Mut(CharacterController)), Res(Input)], (player## 输入动作(`InputMap`)+++*输入映射编辑器:命名动作(Move / Jump / Fire),每个都能挂任意多个键盘、鼠标、手柄绑定。*+写死的按键检查会把设备细节散落进玩法代码。**输入映射**给每个动作起一次名——键盘 / 鼠标 / 手柄绑定随便挂多少个——玩法按名字查询动作:diff --git a/docs/astro/src/content/docs/zh-cn/guides/physics.mdx b/docs/astro/src/content/docs/zh-cn/guides/physics.mdxindex 02eea8018..2280ea6ac 100644--- a/docs/astro/src/content/docs/zh-cn/guides/physics.mdx+++ b/docs/astro/src/content/docs/zh-cn/guides/physics.mdx@@ -112,6 +112,10 @@ const spawnBall = defineSystem([Commands()], (cmds) => {## 碰撞过滤+++*项目设置 → 物理:给 16 个碰撞层命名,再在矩阵里切换哪些层两两相撞(下方还有求解器调参)。*+`categoryBits`(刚体在哪一层)和 `maskBits`(它与什么碰撞)是 16 位过滤器。仅当彼此的 category都在对方的 mask 里,两个刚体才碰撞:diff --git a/docs/astro/src/content/docs/zh-cn/guides/ui.mdx b/docs/astro/src/content/docs/zh-cn/guides/ui.mdxindex 3e5bcabfc..5a074d293 100644--- a/docs/astro/src/content/docs/zh-cn/guides/ui.mdx+++ b/docs/astro/src/content/docs/zh-cn/guides/ui.mdx@@ -113,6 +113,10 @@ addStartupSystem(buildPauseMenu);## 编辑器还是代码+++*编辑器里的一个 UI Canvas——依据设计框排布,带选中节点的 gizmo。同一套控件既能从代码写,也能在编辑器里排。*+两者书写的是**同一套组件**——没有单独的编辑器格式:- **编辑器**——*Create… → UI* 放入控件预制件(Button、Toggle、Slider、Dialog……);diff --git a/examples/input-actions/assets/input/game.inputmap b/examples/input-actions/assets/input/game.inputmapnew file mode 100644index 000000000..259b379dd--- /dev/null+++ b/examples/input-actions/assets/input/game.inputmap@@ -0,0 +1,32 @@+{+ "version": 1,+ "actions": {+ "Move": {+ "type": "axis2d",+ "bindings": [+ { "kind": "keys2d", "up": "KeyW", "down": "KeyS", "left": "KeyA", "right": "KeyD" },+ { "kind": "stick", "stick": "left" }+ ]+ },+ "Jump": {+ "type": "button",+ "bindings": [+ { "kind": "key", "code": "Space" },+ { "kind": "gpButton", "button": 0 }+ ]+ },+ "Fire": {+ "type": "button",+ "bindings": [+ { "kind": "mouse", "button": 0 },+ { "kind": "gpButton", "button": 2 }+ ]+ },+ "Aim": {+ "type": "axis2d",+ "bindings": [+ { "kind": "stick", "stick": "right" }+ ]+ }+ }+}diff --git a/examples/input-actions/assets/input/game.inputmap.meta b/examples/input-actions/assets/input/game.inputmap.metanew file mode 100644index 000000000..aabed03c5--- /dev/null+++ b/examples/input-actions/assets/input/game.inputmap.meta@@ -0,0 +1,8 @@+{+ "uuid": "7a1c9e40-3b2d-4f6a-9c8e-1d2f3a4b5c6d",+ "version": "2.0",+ "type": "inputmap",+ "importer": {+ "autoMigrate": true+ }+}