refactor: doc md to mdx

This commit is contained in:
eyworldwide
2025-02-10 11:09:40 +08:00
parent c5a54276ac
commit e225a37383
7 changed files with 77 additions and 77 deletions

View File

@@ -13,7 +13,7 @@ When exporting to the H5 platform, there is no additional platform-related expor
After selecting the H5 platform, click the download button at the bottom of the export panel to export the required project:
<image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*jINgTIhAuDgAAAAAAAAAAAAADjCHAQ/fmt.webp" />
<Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*jINgTIhAuDgAAAAAAAAAAAAADjCHAQ/fmt.webp" />
After exporting to the local computer, the directory structure is as follows:
@@ -47,11 +47,11 @@ npm run dev
```
After executing the above command, if successful, the following will appear:
<image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*FJI5Q7qhFu4AAAAAAAAAAAAADjCHAQ/fmt.webp" />
<Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*FJI5Q7qhFu4AAAAAAAAAAAAADjCHAQ/fmt.webp" />
3、In the browser, enter the above Local or Network URL to preview the actual running effect, as follows:
<image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*Q9qwQqivKp8AAAAAAAAAAAAADjCHAQ/fmt.webp" />
<Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*Q9qwQqivKp8AAAAAAAAAAAAADjCHAQ/fmt.webp" />
## Build

View File

@@ -15,15 +15,15 @@ When we complete the project development and need to export it to a certain plat
1、Click the Export button on the left side of the editor:
<img src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*U2RuQLwwNXIAAAAAAAAAAAAADjCHAQ/fmt.webp" />
<Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*U2RuQLwwNXIAAAAAAAAAAAAADjCHAQ/fmt.webp" />
2、On the left side of the export panel that appears, select the export platform:
<img src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*50WSQoBlxpcAAAAAAAAAAAAADjCHAQ/fmt.webp" />
<Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*50WSQoBlxpcAAAAAAAAAAAAADjCHAQ/fmt.webp" />
3、On the right side of the export panel are some project-related export configurations, which are mainly divided into two parts: **General configuration** (in the red box) and **Platform-related configuration** (in the yellow box):
<img src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*aCiZTLygoQwAAAAAAAAAAAAADjCHAQ/fmt.webp"/>
<Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*aCiZTLygoQwAAAAAAAAAAAAADjCHAQ/fmt.webp"/>
### Export Configuration Instructions
@@ -35,13 +35,13 @@ The platform-related export configuration will be described separately in the pl
| Main Scene | Project main scene |
| Engine version | The engine version number used by the project |
| Upload to CDN | Whether to upload assets to CDN |
| Texture Type | Texture type, supports KTX2 and Original:<br> **Original**No processing is done on the texture <br> **KTX2**Enable texture compression <image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*yHPrSrhyo0sAAAAAAAAAAAAADjCHAQ/fmt.webp" /> Selecting KTX2 allows you to choose different compression formats:<br> **ETC1S** Small size, very small memory, but low quality, suitable for albedo, specular and other textures <br> **UASTC** Large size, high quality, suitable for normal textures <br> <image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*_Ga2SKIDvv0AAAAAAAAAAAAADjCHAQ/fmt.webp" /> If the ETC1S compression format is selected, you can set the compression quality through Quality (the larger the value, the better the rendering quality):<image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*ZhviTYuo7A4AAAAAAAAAAAAADjCHAQ/fmt.webp" />|
| Tree shaking | Whether to crop the exported assets: <br> **None:** Export all assets without cropping <br> **Current Scene:** Export only the assets used in the current scene <br> **All Scene:** Treeshaking all scenes, exporting all the assets used by the scenes <image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*BJbwQrdlghwAAAAAAAAAAAAADjCHAQ/fmt.webp" />|
| WebGL Mode | Select the version to use with WebGL:<br> **Auto** WebGL2.0 is preferred. If the operating environment does not support it, it will automatically switch to WebGL1.0 <br> **WebGL1.0** Using WebGL1.0 <br> **WebGL2.0** Using WebGL2.0 <image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*HszfTJChrdEAAAAAAAAAAAAADjCHAQ/fmt.webp" />|
| Texture Type | Texture type, supports KTX2 and Original:<br/> **Original**No processing is done on the texture <br/> **KTX2**Enable texture compression <Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*yHPrSrhyo0sAAAAAAAAAAAAADjCHAQ/fmt.webp" style={{zoom: "50%"}} /> Selecting KTX2 allows you to choose different compression formats:<br/> **ETC1S** Small size, very small memory, but low quality, suitable for albedo, specular and other textures <br/> **UASTC** Large size, high quality, suitable for normal textures <br/> <Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*_Ga2SKIDvv0AAAAAAAAAAAAADjCHAQ/fmt.webp" style={{zoom: "50%"}} /> If the ETC1S compression format is selected, you can set the compression quality through Quality (the larger the value, the better the rendering quality):<Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*ZhviTYuo7A4AAAAAAAAAAAAADjCHAQ/fmt.webp" style={{zoom: "50%"}} />|
| Tree shaking | Whether to crop the exported assets: <br/> **None:** Export all assets without cropping <br/> **Current Scene:** Export only the assets used in the current scene <br/> **All Scene:** Treeshaking all scenes, exporting all the assets used by the scenes <Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*BJbwQrdlghwAAAAAAAAAAAAADjCHAQ/fmt.webp" style={{zoom: "50%"}} />|
| WebGL Mode | Select the version to use with WebGL:<br/> **Auto** WebGL2.0 is preferred. If the operating environment does not support it, it will automatically switch to WebGL1.0 <br/> **WebGL1.0** Using WebGL1.0 <br/> **WebGL2.0** Using WebGL2.0 <Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*HszfTJChrdEAAAAAAAAAAAAADjCHAQ/fmt.webp" style={{zoom: "50%"}} />|
| Anti-Alias | Whether to enable anti-aliasing |
| Alpha | Whether the canvas supports transparent background. If you want the content below the canvas to be visible, you can turn it on. |
| Preserve Drawing Buffer | Controls whether the drawing buffer retains its contents after calling the gl.clear() method. |
| DPR Mode | [The pixel ratio of the device](/en/docs/core/canvas)Control the size of the canvas by calling engine.canvas.resizeByClientSize: <br> **Auto** Automatic adaptation, that is, the parameter is window.devicePixelRatio <br> **Fixed** Developers set their own parameters <image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*EQOxSI8I8awAAAAAAAAAAAAADjCHAQ/fmt.webp" /> After selecting Fixed, developers can enter the parameters they need to set. <image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*-7YfTLegt_AAAAAAAAAAAAAADjCHAQ/fmt.webp" />|
| DPR Mode | [The pixel ratio of the device](/en/docs/core/canvas)Control the size of the canvas by calling engine.canvas.resizeByClientSize: <br/> **Auto** Automatic adaptation, that is, the parameter is window.devicePixelRatio <br/> **Fixed** Developers set their own parameters <Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*EQOxSI8I8awAAAAAAAAAAAAADjCHAQ/fmt.webp" style={{zoom: "50%"}} /> After selecting Fixed, developers can enter the parameters they need to set. <Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*-7YfTLegt_AAAAAAAAAAAAAADjCHAQ/fmt.webp" style={{zoom: "50%"}} />|
## Supported export platforms
Currently, Galacean supports exporting to the following platforms:

View File

@@ -9,7 +9,7 @@ label: Platform
When exporting to the WeChat Mini Game platform, there are the following configuration items:
<image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*natiS7i3cvUAAAAAAAAAAAAADjCHAQ/fmt.webp" />
<Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*natiS7i3cvUAAAAAAAAAAAAADjCHAQ/fmt.webp" />
| Configuration | Describe | Corresponding to the configuration file of WeChat Mini Games | Corresponding to the fields in WeChat Mini Games
| ------------- | ------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------- |
@@ -26,7 +26,7 @@ For more configuration details, see: [project.config.json](https://developers.we
After selecting the WeChat Mini Game platform, click the download button at the bottom of the export panel to export the required project:
<image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*a1-PQIsWlgIAAAAAAAAAAAAADjCHAQ/fmt.webp" />
<Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*a1-PQIsWlgIAAAAAAAAAAAAADjCHAQ/fmt.webp" />
## Debug
@@ -38,15 +38,15 @@ npm i
2、Open **WeChat Developer Tools**, select Mini Game, and import the project just now, as follows:
<image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*gCnXSqRgLnMAAAAAAAAAAAAADjCHAQ/fmt.webp" />
<Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*gCnXSqRgLnMAAAAAAAAAAAAADjCHAQ/fmt.webp" />
3、In WeChat Developer Tools, click **Tools->Build** npm, as follows:
<image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*G5aBQKNFdV8AAAAAAAAAAAAADjCHAQ/fmt.webp" />
<Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*G5aBQKNFdV8AAAAAAAAAAAAADjCHAQ/fmt.webp" />
4、After completing the above 3, you can preview the final result in the WeChat developer tool as follows:
<image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*JyoIS54k3uYAAAAAAAAAAAAADjCHAQ/fmt.webp" />
<Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*JyoIS54k3uYAAAAAAAAAAAAADjCHAQ/fmt.webp" />
5、For debugging in WeChat developer tools, see: [WeChat Mini Game Debugging](https://developers.weixin.qq.com/minigame/dev/guide/runtime/debug/)
@@ -58,7 +58,7 @@ After local debugging is completed, you can publish it. For details on the publi
The project directory exported to the local is as follows:
<image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*3jBDQYE5T9AAAAAAAAAAAAAADjCHAQ/fmt.webp" />
<Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*3jBDQYE5T9AAAAAAAAAAAAAADjCHAQ/fmt.webp" style={{zoom: "50%"}} />
**Project Catalog Description**
|Directory or file|Describe|

View File

@@ -13,7 +13,7 @@ label: Platform
选择好 H5 平台后,点击导出面板最下方的下载按钮,即可导出所需工程:
<image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*jINgTIhAuDgAAAAAAAAAAAAADjCHAQ/fmt.webp" />
<Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*jINgTIhAuDgAAAAAAAAAAAAADjCHAQ/fmt.webp" />
导出到本地后,目录结构如下:
@@ -47,11 +47,11 @@ npm run dev
```
执行完上述命令后,如果成功,将出现如下内容:
<image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*FJI5Q7qhFu4AAAAAAAAAAAAADjCHAQ/fmt.webp" />
<Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*FJI5Q7qhFu4AAAAAAAAAAAAADjCHAQ/fmt.webp" />
3、在浏览器中输入上述 Local 或者 Network 的 URL 即可预览实际运行效果,如下:
<image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*Q9qwQqivKp8AAAAAAAAAAAAADjCHAQ/fmt.webp" />
<Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*Q9qwQqivKp8AAAAAAAAAAAAADjCHAQ/fmt.webp" />
## 构建

View File

@@ -1,52 +0,0 @@
---
order: 0
title: 多平台导出总览
type: 多平台导出
label: Platform
---
为了满足广大开发者对各个平台上线的诉求真正做到一处开发处处运行1.4 版本开始支持多平台导出。开发者通过编辑器制作的项目,可以快速的导出到不同的平台所需的工程。
## 前置准备
项目在编辑器中开发完成后,就可以导出各个平台的工程并进行发布了。在导出之前,我们先来了解一下导出面板和导出设置。
### 导出面板
当我们完成项目开发,需要导出到某个平台(以导出至微信小游戏平台为例)的时候,可以按如下步骤操作:
1、点击编辑器左侧的导出按钮
<img src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*U2RuQLwwNXIAAAAAAAAAAAAADjCHAQ/fmt.webp" />
2、在唤出的导出面板的左侧选择导出平台
<img src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*50WSQoBlxpcAAAAAAAAAAAAADjCHAQ/fmt.webp" />
3、导出面板的右侧为项目相关的一些导出配置主要分为 2 块:**通用配置**(红色框内)和**平台相关配置**(黄色框内):
<img src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*aCiZTLygoQwAAAAAAAAAAAAADjCHAQ/fmt.webp"/>
### 导出配置说明
平台相关的导出配置将在平台导出的文档里单独说明,这里重点介绍下和平台无关的**通用配置**。
| 配置 | 描述 |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| Project Name | 项目名称,导出到本地的根目录名就是项目名称 |
| Main Scene | 项目主场景 |
| Engine version | 项目使用的引擎版本号 |
| Upload to CDN | 是否将资产上传至 CDN |
| Texture Type | 纹理类型,支持 KTX2 和 Original<br> **Original**:不对纹理做任何处理 <br> **KTX2**:开启纹理压缩 <image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*yHPrSrhyo0sAAAAAAAAAAAAADjCHAQ/fmt.webp" /> 选择 KTX2 可以选择不同的压缩格式:<br> **ETC1S** 尺寸小,内存极小,但是质量较低,适合 albedo, specular 等贴图 <br> **UASTC** 尺寸大,质量高,适合 normal 这类贴图 <br> <image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*_Ga2SKIDvv0AAAAAAAAAAAAADjCHAQ/fmt.webp" /> 如果选择了 ETC1S 压缩格式,可以通过 Quality 来设置压缩质量(值越大,渲染质量越好)<image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*ZhviTYuo7A4AAAAAAAAAAAAADjCHAQ/fmt.webp" />|
| Tree shaking | 是否对导出的资产进行裁剪: <br> **None:** 不进行裁剪,导出所有资产 <br> **Current Scene:** 只导出当前场景用到的资产 <br> **All Scene:** 对所有场景 treeshaking导出全量场景用到的资产 <image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*BJbwQrdlghwAAAAAAAAAAAAADjCHAQ/fmt.webp" />|
| WebGL Mode | 选择使用 WebGL 的版本:<br> **Auto** 优先使用 WebGL2.0, 如果运行环境不支持自动切到 WebGL1.0 <br> **WebGL1.0** 使用 WebGL1.0 <br> **WebGL2.0** 使用 WebGL2.0 <image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*HszfTJChrdEAAAAAAAAAAAAADjCHAQ/fmt.webp" />|
| Anti-Alias | 是否开启抗锯齿 |
| Alpha | 画布是否支持透明背景,如果希望画布下方的内容可以透出可以开启 |
| Preserve Drawing Buffer | 用于控制在调用 gl.clear() 方法后,绘图缓冲区是否保留其内容 |
| DPR Mode | [设备的像素比](/docs/core/canvas),通过调用 engine.canvas.resizeByClientSize 来控制画布的尺寸 <br> **Auto** 自动适配,即参数为 window.devicePixelRatio <br> **Fixed** 开发者自行设置参数 <image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*EQOxSI8I8awAAAAAAAAAAAAADjCHAQ/fmt.webp" /> 选择 Fixed 后,开发者可以自行输入需要设置的参数 <image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*-7YfTLegt_AAAAAAAAAAAAAADjCHAQ/fmt.webp" />|
## 支持的导出平台
目前 Galacean 支持导出的平台如下:
[导出至 H5 平台](/docs/platform/h5/)
[导出至微信小游戏平台](/docs/platform/wechatMiniGame/)

View File

@@ -0,0 +1,52 @@
---
order: 0
title: 多平台导出总览
type: 多平台导出
label: Platform
---
为了满足广大开发者对各个平台上线的诉求真正做到一处开发处处运行1.4 版本开始支持多平台导出。开发者通过编辑器制作的项目,可以快速的导出到不同的平台所需的工程。
## 前置准备
项目在编辑器中开发完成后,就可以导出各个平台的工程并进行发布了。在导出之前,我们先来了解一下导出面板和导出设置。
### 导出面板
当我们完成项目开发,需要导出到某个平台(以导出至微信小游戏平台为例)的时候,可以按如下步骤操作:
1、点击编辑器左侧的导出按钮
<Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*U2RuQLwwNXIAAAAAAAAAAAAADjCHAQ/fmt.webp" />
2、在唤出的导出面板的左侧选择导出平台
<Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*50WSQoBlxpcAAAAAAAAAAAAADjCHAQ/fmt.webp" />
3、导出面板的右侧为项目相关的一些导出配置主要分为 2 块:**通用配置**(红色框内)和**平台相关配置**(黄色框内):
<Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*aCiZTLygoQwAAAAAAAAAAAAADjCHAQ/fmt.webp"/>
### 导出配置说明
平台相关的导出配置将在平台导出的文档里单独说明,这里重点介绍下和平台无关的**通用配置**。
| 配置 | 描述 |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| Project Name | 项目名称,导出到本地的根目录名就是项目名称 |
| Main Scene | 项目主场景 |
| Engine version | 项目使用的引擎版本号 |
| Upload to CDN | 是否将资产上传至 CDN |
| Texture Type | 纹理类型,支持 KTX2 和 Original<br/> **Original**:不对纹理做任何处理 <br/> **KTX2**:开启纹理压缩 <Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*yHPrSrhyo0sAAAAAAAAAAAAADjCHAQ/fmt.webp" style={{zoom: "50%"}}/> 选择 KTX2 可以选择不同的压缩格式:<br/> **ETC1S** 尺寸小,内存极小,但是质量较低,适合 albedo, specular 等贴图 <br/> **UASTC** 尺寸大,质量高,适合 normal 这类贴图 <br/> <Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*_Ga2SKIDvv0AAAAAAAAAAAAADjCHAQ/fmt.webp" style={{zoom: "50%"}} /> 如果选择了 ETC1S 压缩格式,可以通过 Quality 来设置压缩质量(值越大,渲染质量越好)<Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*ZhviTYuo7A4AAAAAAAAAAAAADjCHAQ/fmt.webp" style={{zoom: "50%"}} />|
| Tree shaking | 是否对导出的资产进行裁剪: <br/> **None:** 不进行裁剪,导出所有资产 <br/> **Current Scene:** 只导出当前场景用到的资产 <br/> **All Scene:** 对所有场景 treeshaking导出全量场景用到的资产 <Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*BJbwQrdlghwAAAAAAAAAAAAADjCHAQ/fmt.webp" style={{zoom: "50%"}} />|
| WebGL Mode | 选择使用 WebGL 的版本:<br/> **Auto** 优先使用 WebGL2.0, 如果运行环境不支持自动切到 WebGL1.0 <br/> **WebGL1.0** 使用 WebGL1.0 <br/> **WebGL2.0** 使用 WebGL2.0 <Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*HszfTJChrdEAAAAAAAAAAAAADjCHAQ/fmt.webp" style={{zoom: "50%"}} />|
| Anti-Alias | 是否开启抗锯齿 |
| Alpha | 画布是否支持透明背景,如果希望画布下方的内容可以透出可以开启 |
| Preserve Drawing Buffer | 用于控制在调用 gl.clear() 方法后,绘图缓冲区是否保留其内容 |
| DPR Mode | [设备的像素比](/docs/core/canvas),通过调用 engine.canvas.resizeByClientSize 来控制画布的尺寸 <br/> **Auto** 自动适配,即参数为 window.devicePixelRatio <br/> **Fixed** 开发者自行设置参数 <Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*EQOxSI8I8awAAAAAAAAAAAAADjCHAQ/fmt.webp" style={{zoom: "50%"}} /> 选择 Fixed 后,开发者可以自行输入需要设置的参数 <Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*-7YfTLegt_AAAAAAAAAAAAAADjCHAQ/fmt.webp" style={{zoom: "50%"}} />|
## 支持的导出平台
目前 Galacean 支持导出的平台如下:
[导出至 H5 平台](/docs/platform/h5/)
[导出至微信小游戏平台](/docs/platform/wechatMiniGame/)

View File

@@ -9,7 +9,7 @@ label: Platform
在导出到微信小游戏平台的时候,有以下这些配置项:
<image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*natiS7i3cvUAAAAAAAAAAAAADjCHAQ/fmt.webp" />
<Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*natiS7i3cvUAAAAAAAAAAAAADjCHAQ/fmt.webp" />
| 配置 | 描述 | 对应到微信小游戏的配置文件 | 对应到微信小游戏中的字段
| ------------- | ------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------- |
@@ -26,7 +26,7 @@ label: Platform
选择好微信小游戏平台后,点击导出面板最下方的下载按钮,即可导出所需工程:
<image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*a1-PQIsWlgIAAAAAAAAAAAAADjCHAQ/fmt.webp" />
<Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*a1-PQIsWlgIAAAAAAAAAAAAADjCHAQ/fmt.webp" />
## 调试
@@ -38,15 +38,15 @@ npm i
2、打开**微信开发者工具** ,选择小游戏,并导入刚才的工程,如下:
<image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*gCnXSqRgLnMAAAAAAAAAAAAADjCHAQ/fmt.webp" />
<Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*gCnXSqRgLnMAAAAAAAAAAAAADjCHAQ/fmt.webp" />
3、在微信开发者工具中点击**工具->构建 npm**,如下:
<image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*G5aBQKNFdV8AAAAAAAAAAAAADjCHAQ/fmt.webp" />
<Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*G5aBQKNFdV8AAAAAAAAAAAAADjCHAQ/fmt.webp" />
4、完成上述 3 后,即可在微信开发者工具中预览最终的结果,如下:
<image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*JyoIS54k3uYAAAAAAAAAAAAADjCHAQ/fmt.webp" />
<Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*JyoIS54k3uYAAAAAAAAAAAAADjCHAQ/fmt.webp" />
5、在微信开发者工具中的调试详见[微信小游戏调试](https://developers.weixin.qq.com/minigame/dev/guide/runtime/debug/)
@@ -58,7 +58,7 @@ npm i
导出到本地的工程目录如下:
<image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*3jBDQYE5T9AAAAAAAAAAAAAADjCHAQ/fmt.webp" />
<Image src="https://mdn.alipayobjects.com/huamei_w6ifet/afts/img/A*3jBDQYE5T9AAAAAAAAAAAAAADjCHAQ/fmt.webp" style={{zoom: "50%"}} />
**工程目录说明**
|目录或文件|说明|