@yangyongtao/gaea 1.1.31 → 1.1.32
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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/GaeaMethods.js +26 -4
- package/src/vite-plugin.js +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.1.32] - 2026-09-09
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
- 引擎大文件(`Gaea.pck` / `Gaea.wasm`)改为从外部资源服务器加载:默认 `executable` 指向 `http://172.20.176.100:7072/gaea/Gaea`。可通过宿主站点 `config.js` 设置 `window.__GAEA_ASSETS_URL__`(运行时覆盖,换地址无需重新打包),或构建环境变量 `VITE_GAEA_EXECUTABLE` 覆盖
|
|
7
|
+
- Vite 插件 `closeBundle` 默认不再把 `Gaea.pck` / `Gaea.wasm` 复制到输出目录(引擎从外部服务器加载,dist 体积大幅减小);可用 `gaeaVitePlugin({ skipEngineFiles: [...] })` 覆盖
|
|
8
|
+
- 屏幕图标(`.gaea-iconGif` / `.gaea-iconscreen` / `.gaea-locationLineStyle`)z-index 统一改为 `11`
|
|
9
|
+
|
|
3
10
|
## [1.1.31] - 2026-09-09
|
|
4
11
|
|
|
5
12
|
### Added
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yangyongtao/gaea",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.32",
|
|
4
4
|
"description": "Gaea 3D visualization component library - Vue 3 components based on Godot WASM engine. Includes WMTS layer loading, camera view control, Vite plugin auto-injection, etc.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.cjs",
|
package/src/GaeaMethods.js
CHANGED
|
@@ -56,7 +56,7 @@ import Gaea from '../public/index.js';
|
|
|
56
56
|
#gaea-layertree-btn:hover { background: rgba(0,0,0,0.7); }
|
|
57
57
|
/* 屏幕图标样式(对齐 ht_3dview) */
|
|
58
58
|
.gaea-locationLineStyle {
|
|
59
|
-
position: absolute; overflow: hidden; z-index:
|
|
59
|
+
position: absolute; overflow: hidden; z-index: 11; pointer-events: auto;
|
|
60
60
|
user-select: none; -webkit-user-select: none;
|
|
61
61
|
}
|
|
62
62
|
.gaea-locationLineStyle .text-wrapper {
|
|
@@ -75,7 +75,7 @@ import Gaea from '../public/index.js';
|
|
|
75
75
|
}
|
|
76
76
|
.gaea-iconscreen {
|
|
77
77
|
position: absolute; overflow: hidden; width: 169px; height: 55px;
|
|
78
|
-
user-select: none; -webkit-user-select: none; z-index:
|
|
78
|
+
user-select: none; -webkit-user-select: none; z-index: 11; pointer-events: auto;
|
|
79
79
|
}
|
|
80
80
|
.gaea-iconscreen img {
|
|
81
81
|
position: absolute; width: 100%; height: 100%;
|
|
@@ -92,7 +92,7 @@ import Gaea from '../public/index.js';
|
|
|
92
92
|
}
|
|
93
93
|
.gaea-iconGif {
|
|
94
94
|
position: absolute; overflow: hidden; width: 48px; height: 48px;
|
|
95
|
-
user-select: none; -webkit-user-select: none; z-index:
|
|
95
|
+
user-select: none; -webkit-user-select: none; z-index: 11; pointer-events: auto;
|
|
96
96
|
}
|
|
97
97
|
.gaea-iconGif img {
|
|
98
98
|
width: 100%; height: 100%; object-fit: contain; display: block;
|
|
@@ -119,11 +119,33 @@ function hideLoading() {
|
|
|
119
119
|
|
|
120
120
|
// ==================== 配置 ====================
|
|
121
121
|
|
|
122
|
+
/** 默认引擎资源服务器地址(Gaea.pck / Gaea.wasm 等大文件),可在运行时/环境变量覆盖 */
|
|
123
|
+
const DEFAULT_ENGINE_ASSETS_URL = 'http://172.20.176.100:7072/gaea/Gaea';
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* 解析默认 executable:
|
|
127
|
+
* 优先级:运行时全局变量 window.__GAEA_ASSETS_URL__(宿主站点 config.js 可设置,
|
|
128
|
+
* 换地址无需重新打包)> 构建环境变量 VITE_GAEA_EXECUTABLE > 内置默认地址。
|
|
129
|
+
*/
|
|
130
|
+
function resolveDefaultExecutable() {
|
|
131
|
+
if (typeof window !== 'undefined' && window.__GAEA_ASSETS_URL__) {
|
|
132
|
+
return window.__GAEA_ASSETS_URL__;
|
|
133
|
+
}
|
|
134
|
+
try {
|
|
135
|
+
if (import.meta.env && import.meta.env.VITE_GAEA_EXECUTABLE) {
|
|
136
|
+
return import.meta.env.VITE_GAEA_EXECUTABLE;
|
|
137
|
+
}
|
|
138
|
+
} catch (e) {
|
|
139
|
+
/* 非 vite 环境忽略 */
|
|
140
|
+
}
|
|
141
|
+
return DEFAULT_ENGINE_ASSETS_URL;
|
|
142
|
+
}
|
|
143
|
+
|
|
122
144
|
const defaultConfig = {
|
|
123
145
|
serveUrl: '',
|
|
124
146
|
serveLocal: '',
|
|
125
147
|
// Engine 配置
|
|
126
|
-
executable:
|
|
148
|
+
executable: resolveDefaultExecutable(),
|
|
127
149
|
fileSizes: { 'Gaea.pck': 450751936, 'Gaea.wasm': 16580215 },
|
|
128
150
|
canvasResizePolicy: 2,
|
|
129
151
|
experimentalVK: false,
|
package/src/vite-plugin.js
CHANGED
|
@@ -89,6 +89,8 @@ function skipExternalScriptTags(html, rules) {
|
|
|
89
89
|
|
|
90
90
|
export default function gaeaVitePlugin(options = {}) {
|
|
91
91
|
const skipScripts = options.skipExternalScripts || [];
|
|
92
|
+
// 构建时不复制到输出目录的引擎大文件(引擎默认从外部资源服务器加载,可配置 skipEngineFiles 覆盖)
|
|
93
|
+
const skipEngineFiles = options.skipEngineFiles || ['Gaea.pck', 'Gaea.wasm'];
|
|
92
94
|
let resolvedOutDir = '';
|
|
93
95
|
|
|
94
96
|
return {
|
|
@@ -188,6 +190,7 @@ export default function gaeaVitePlugin(options = {}) {
|
|
|
188
190
|
|
|
189
191
|
fs.mkdirSync(outRoot, { recursive: true });
|
|
190
192
|
for (const name of BUILD_TOP_FILES) {
|
|
193
|
+
if (skipEngineFiles.includes(name)) continue;
|
|
191
194
|
const src = path.join(pkgPublic, name);
|
|
192
195
|
if (fs.existsSync(src)) copyFile(src, path.join(outRoot, name));
|
|
193
196
|
}
|