@yangyongtao/gaea 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/GaeaMethods.js +7 -4
package/package.json
CHANGED
package/src/GaeaMethods.js
CHANGED
|
@@ -384,13 +384,16 @@ export class GaeaApp {
|
|
|
384
384
|
}
|
|
385
385
|
|
|
386
386
|
/** 初始化基础环境(关闭默认雾、设置默认光照等) */
|
|
387
|
-
initDefaultEnvironment() {
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
387
|
+
async initDefaultEnvironment() {
|
|
388
|
+
// 等待 Gaea 就绪
|
|
389
|
+
const ready = await waitForGaea(15000);
|
|
390
|
+
if (!ready) {
|
|
391
|
+
console.error('Gaea 引擎初始化超时');
|
|
391
392
|
return;
|
|
392
393
|
}
|
|
393
394
|
|
|
395
|
+
const Gaea = window.Gaea;
|
|
396
|
+
|
|
394
397
|
// 关闭默认雾
|
|
395
398
|
const fogEnv = Gaea.Environment.ConvertBy(
|
|
396
399
|
Gaea.GaeaResourceLoader.Instance.LoadLoaclResource('res://default_env.tres')
|