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: reorganize sidebar navigation and add physics contact solver parameters
esenginea0954d122e11
diff --git a/docs/astro/astro.config.mjs b/docs/astro/astro.config.mjsindex ed8847145..ad9b49311 100644--- a/docs/astro/astro.config.mjs+++ b/docs/astro/astro.config.mjs@@ -77,11 +77,11 @@ export default defineConfig({{ label: 'Custom Draw', translations: { 'zh-CN': '自定义绘制' }, slug: 'guides/custom-draw' },{ label: 'Post-Processing', translations: { 'zh-CN': '后处理效果' }, slug: 'guides/post-processing' },{ label: 'Render Texture', translations: { 'zh-CN': '渲染纹理' }, slug: 'guides/render-texture' },+ { label: 'Particles', translations: { 'zh-CN': '粒子系统' }, slug: 'guides/particles' },],},{ label: 'Scenes', translations: { 'zh-CN': '场景' }, slug: 'guides/scenes' },{ label: 'Prefabs', translations: { 'zh-CN': '预制体' }, slug: 'guides/prefabs' },- { label: 'Storage', translations: { 'zh-CN': '数据存储' }, slug: 'guides/storage' },{ label: 'Input Handling', translations: { 'zh-CN': '输入处理' }, slug: 'guides/input' },{label: 'UI',@@ -94,16 +94,9 @@ export default defineConfig({{ label: 'Masking & SafeArea', translations: { 'zh-CN': '遮罩与安全区' }, slug: 'guides/ui-masking' },],},- {- label: 'Audio & Effects',- translations: { 'zh-CN': '音频与特效' },- items: [- { label: 'Audio', translations: { 'zh-CN': '音频' }, slug: 'guides/audio' },- { label: 'Particles', translations: { 'zh-CN': '粒子系统' }, slug: 'guides/particles' },- { label: 'Physics', translations: { 'zh-CN': '物理' }, slug: 'guides/physics' },- { label: 'Tilemap', translations: { 'zh-CN': '瓦片地图' }, slug: 'guides/tilemap' },- ],- },+ { label: 'Physics', translations: { 'zh-CN': '物理' }, slug: 'guides/physics' },+ { label: 'Audio', translations: { 'zh-CN': '音频' }, slug: 'guides/audio' },+ { label: 'Tilemap', translations: { 'zh-CN': '瓦片地图' }, slug: 'guides/tilemap' },{label: 'Assets & Materials',translations: { 'zh-CN': '资源与材质' },@@ -113,6 +106,8 @@ export default defineConfig({{ label: 'Geometry & Meshes', translations: { 'zh-CN': '几何体与网格' }, slug: 'guides/geometry' },],},+ { label: 'Storage', translations: { 'zh-CN': '数据存储' }, slug: 'guides/storage' },+ { label: 'Plugins', translations: { 'zh-CN': '插件系统' }, slug: 'guides/plugins' },{label: 'Editor',translations: { 'zh-CN': '编辑器' },@@ -124,7 +119,6 @@ export default defineConfig({{ label: 'Debugging', translations: { 'zh-CN': '调试' }, slug: 'guides/debugging' },],},- { label: 'Plugins', translations: { 'zh-CN': '插件系统' }, slug: 'guides/plugins' },{label: 'Build & Deploy',translations: { 'zh-CN': '构建与部署' },diff --git a/docs/astro/src/content/docs/guides/physics.mdx b/docs/astro/src/content/docs/guides/physics.mdxindex fd804c91b..3cac7f2bf 100644--- a/docs/astro/src/content/docs/guides/physics.mdx+++ b/docs/astro/src/content/docs/guides/physics.mdx@@ -19,6 +19,9 @@ Configure the simulation parameters in the same panel:| Gravity Y | `-9.81` | Vertical gravity (negative = downward) || Fixed Timestep | `1/60` | Physics step interval in seconds || Sub-Step Count | `4` | Sub-steps per physics step for accuracy |+| Contact Hertz | `120` | Contact stiffness (cycles/sec). Higher = less overlap but more jitter |+| Contact Damping Ratio | `10` | Contact bounciness damping. Lower = faster overlap recovery but more energetic |+| Contact Speed | `10` | Max overlap resolution speed (m/s) |<Aside type="note">The physics WASM module is loaded automatically by the editor preview and build pipeline. No manual plugin initialization is needed in your game scripts.diff --git a/docs/astro/src/content/docs/zh/guides/physics.mdx b/docs/astro/src/content/docs/zh/guides/physics.mdxindex 1a336d110..8b2a516bd 100644--- a/docs/astro/src/content/docs/zh/guides/physics.mdx+++ b/docs/astro/src/content/docs/zh/guides/physics.mdx@@ -19,6 +19,9 @@ import { Aside } from '@astrojs/starlight/components';| Gravity Y | `-9.81` | 垂直重力(负数 = 向下) || Fixed Timestep | `1/60` | 物理步进间隔(秒) || Sub-Step Count | `4` | 每次物理步进的子步数,用于提高精度 |+| Contact Hertz | `120` | 接触刚度(周期/秒)。越高穿透越少但抖动越明显 |+| Contact Damping Ratio | `10` | 接触弹性阻尼。越低重叠恢复越快但弹性越强 |+| Contact Speed | `10` | 最大重叠修正速度(米/秒) |<Aside type="note">物理 WASM 模块由编辑器预览和构建流程自动加载,无需在游戏脚本中手动初始化插件。