目录结构

编辑器文件夹结构 

Wonderland Editor 安装包含以下文件夹:

 1Wonderland Editor
 2├── bin
 3│   ├── magnum
 4│   └── plugins
 5├── fonts
 6├── deploy
 7├── shaders
 8│   └── lib
 9└── js
10    ├── lib
11    └── components

bin 包含可执行文件,plugins 包含编辑器插件,magnum 包含场景和图像导入插件(遵循开源 Magnum 图形库定义的接口)。

fonts 包含编辑器使用的字体。

deploy 包含用于部署的文件,例如各种版本的 WebAssembly 运行时。

shaders 包含 Wonderland Engine 附带的默认着色器。您可以将自己的自定义着色器放置在这里。

js 包含默认的 JavaScript 组件(components)和库(libs)。

推荐的项目结构 

为了保持项目的组织性,我们推荐以下项目结构:

 1unnamed-wonderland/
 2├── .editor/
 3│   └── state.json
 4├── cache/
 5├── deploy/
 6├── raw/
 7│   └── audio/
 8│       ├── audio_file.wav
 9│       └── ...
10├── assets/
11│   ├── models/
12│   │   ├── model_file.blend
13│   │   └── ...
14│   ├── scenes/
15│   │   ├── SceneFile.glb
16│   │   └── ...
17│   └── textures/
18│       ├── texture_file.png
19│       └── ...
20├── js/
21│   ├── components/
22│   │   ├── js-component.js
23│   │   └── ...
24│   ├── lib/
25│   |   ├── js-lib.js
26│   |   └── ...
27│   └── index.js
28├── plugins/
29├── shaders/
30├── static/
31│   └── audio/
32│       ├── audio_file.mp3
33│       └── ...
34├── package.json
35└── UnnamedWonderland.wlp

.editor 存储的是仅对该开发者本地有效的文件。例如,state.json 存储哪些视图是打开的以及哪些调试设置是启用的。此文件夹通常从源码控制中排除。

deploy 是 Wonderland Editor 将您的可部署项目打包到的文件夹。它也是从中 Wonderland Editor 的本地网络服务器服务于大部分文件的编辑器。

cache 被 Wonderland Editor 用于存储需要长时间计算的文件。这包括纹理压缩的结果,全局光照探针。

assets 包含所有图形和音频的资源。

js 包含所有定制的组件和它们所需的 JavaScript 库。

plugins 包含您的自定义插件

shaders 包含您的自定义着色器。

static 包含按原样复制到 deploy 的文件。像 static/sounds/mysound.mp3 这样的文件将通过 URL 以 sounds/mysound.mp3 的形式访问。

package.json 列出您项目的 JavaScript 包依赖。

UnnamedWonderland.wlp 是主要的 Wonderland Engine 项目文件。