@yangyongtao/gaea 1.1.16 → 1.1.18

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 CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.1.18] - 2026-07-13
4
+
5
+ ### Fixed
6
+ - 修复引擎初始化时 `querySelector('#')` 报错:`_startEngine` 显式传 `canvas` 元素,避免引擎全局取第一个 canvas(可能命中其他无 id 的 canvas 导致 `.id` 为空)
7
+
8
+ ## [1.1.17] - 2026-07-10
9
+
10
+ ### Removed
11
+ - 移除已废弃的 `public/config.js`(其全局变量已被 `setConfig()` 取代,包内无任何引用)
12
+ - 中间件 `gaeaTopFiles` 取消对 `config.js` 的托管
13
+ - 模板 `public/index.html` 移除 `<script src="config.js">` 引用
14
+
15
+ ### 升级注意
16
+ - 若老项目的 `index.html` 仍保留 `<script src="config.js">`,升级后需手动删除该行,否则会因请求不到文件而报错
17
+
3
18
  ## [1.1.16] - 2026-07-10
4
19
 
5
20
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yangyongtao/gaea",
3
- "version": "1.1.16",
3
+ "version": "1.1.18",
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",
@@ -31,7 +31,6 @@
31
31
  "public/*.png",
32
32
  "public/*.ico",
33
33
  "public/*.import",
34
- "public/config.js",
35
34
  "public/constants.js",
36
35
  "public/math/",
37
36
  "public/image/",
package/public/index.html CHANGED
@@ -7,7 +7,6 @@
7
7
  <link rel="icon" href="<%= BASE_URL %>favicon.ico">
8
8
  <title><%= htmlWebpackPlugin.options.title %></title>
9
9
  <script src="<%= BASE_URL %>Gaea.js"></script>
10
- <script src="<%= BASE_URL %>config.js"></script>
11
10
  <script src="./jsencrypt.min.js"></script>
12
11
  <!-- <script src="./jsWebControl-1.0.0.min.js"></script> -->
13
12
  <script src="./web-control.min.js"></script>
@@ -417,8 +417,10 @@ export class GaeaApp {
417
417
  }
418
418
 
419
419
  const cfg = this.config;
420
+ const canvasEl = document.getElementById('canvas');
420
421
  const engine = new window.Engine({
421
422
  args: [],
423
+ canvas: canvasEl,
422
424
  canvasResizePolicy: cfg.canvasResizePolicy,
423
425
  executable: cfg.executable,
424
426
  experimentalVK: cfg.experimentalVK,
@@ -55,7 +55,7 @@ export default function gaeaVitePlugin() {
55
55
 
56
56
  const gaeaTopFiles = [
57
57
  'Gaea.js', 'Gaea.wasm', 'Gaea.pck', 'Gaea.worker.js',
58
- 'Gaea.audio.worklet.js', 'index.js', 'config.js', 'constants.js',
58
+ 'Gaea.audio.worklet.js', 'index.js', 'constants.js',
59
59
  ];
60
60
  const gaeaDirs = ['math/', 'static/', 'image/'];
61
61
 
package/public/config.js DELETED
@@ -1,76 +0,0 @@
1
- /*
2
- * @Description:
3
- * @Version:
4
- * @Author: Do not edit
5
- * @Date: 2025-01-20 14:59:55
6
- * @LastEditors: yangyongtao
7
- * @LastEditTime: 2025-05-19 14:38:45
8
- */
9
- //服务平台地址
10
- var serveUrl = "http://192.168.3.151:8088/gaeaExplorerServer/"
11
-
12
- //本地项目地址
13
- var serveLocal = "https:/169.254.25.130:9012";
14
- if (typeof window !== "undefined") {
15
- serveLocal = window.location.origin
16
- }
17
-
18
- //加载静态资源地址
19
- var getServerAssets = `${serveLocal}/static/`
20
-
21
- //初始定位
22
- var defaultPosition = {
23
- x: 27.380913,
24
- y: 120.449982,
25
- // x: 22.942807,
26
- // y: 114.048997,
27
- z: 80000,
28
- };
29
-
30
- //地形
31
- var TerrainList = {
32
- // 东深地形: `${serveUrl}htc/service/tms/1.0.0/东深地形@EPSG%3A4326@terrain/`,
33
- 苍南县地形: `${serveUrl}htc/service/tms/1.0.0/苍南县地形@EPSG%3A4326@terrain/`,
34
- };
35
-
36
- // 标签打包路径
37
- var biaoqianExportPath = "D:\\gaea\\biaoqian\\"
38
- //image访问地址
39
- var imageUrlApi = "http://localhost:9878/fileImgServer/fileServer?url=";
40
-
41
- // 流场文件配置
42
- var liuchangXMLPath = "D:\\gaea\\dat文件\\result.xml"
43
- var liuchangDatPath = "D:\\gaea\\dat文件\\result\\UVW"
44
-
45
- // 打开浏览器路径
46
- var browser_Path = "C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe"
47
-
48
- var developmentMode = true;
49
-
50
- // 标签打包路径
51
- // const biaoqianExportPath = "D:\\gaea\\biaoqian\\"
52
-
53
- // 倾斜路径
54
- var qingxieUrl = "http://10.6.157.207:8088/gaeaExplorerServer/model/webqxsy/水库02/tileset.json"
55
-
56
- // 白膜路径
57
- var baimoUrl = "http://10.6.157.207:8088/gaeaExplorerServer/model/webqxsy/深圳白膜2/tileset.json"
58
-
59
- var httpUrlToLocal = 'E:\\Gaea\\webCode\\code2\\shuiwenzu-dongshen\\src\\assets\\img\\httpImg'
60
-
61
- // const dixing_path = 'http://10.6.157.207:8088/gaeaExplorerServer/htc/service/tms/1.0.0/地形修正@EPSG%3A4326@terrain/'
62
- var dixing_path = 'http://192.168.3.111:8088/gaeaExplorerServer/htc/service/tms/1.0.0/SRTM@EPSG%3A4490@terrain/'
63
-
64
- var isC = true;
65
-
66
- // 卫星代理替换
67
- var qixiangDailiReplace = "http://10.6.157.198:9000/"
68
-
69
- var yuntudailiReplace = "http://10.6.157.198:9000/"
70
-
71
- var bimBaseUrl = 'http://10.6.157.198:7001/'
72
- var bimToken = 'd13a50d00016e9f2403e739bc43537b9'
73
-
74
- // const serversUrl = 'http://192.168.0.123:8082'
75
- var serversUrl = 'http://localhost:9878'
76
- var cloudPort = '9998'