Skip to content

Commit 05a519a

Browse files
committed
Update README screenshots and example code, modify build script to run build-typings
1 parent 583f9e6 commit 05a519a

4 files changed

Lines changed: 25914 additions & 33706 deletions

File tree

@flywave/flywave.gl/README.md

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,20 @@ You can use this engine to:
3333
<div align="center">
3434

3535
| | | |
36-
| :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: |
37-
| <img src="https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/01-globe-view.png" alt="Globe View" width="200" /> | <img src="https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/02-terrain-rendering.png" alt="Terrain Rendering" width="200" /> | <img src="https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/03-3dtiles-rendering.png" alt="3D Tiles Rendering" width="200" /> |
36+
|:---:|:---:|:---:|
37+
| ![3D Globe](https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/01-globe-view.png) | ![Terrain](https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/02-terrain-rendering.png) | ![Atmosphere](https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/08-atmosphere.png) |
38+
39+
| | | |
40+
|:---:|:---:|:---:|
41+
| ![Controls](https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/06-interactive-controls.png) | ![Post-processing](https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/04-post-processing.png) | ![Animation](https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/09-animation.png) |
42+
3843
| | | |
39-
| <img src="https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/04-post-processing.png" alt="Post Processing" width="200" /> | <img src="https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/06-interactive-controls.png" alt="Interactive Controls" width="200" /> | <img src="https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/07-planar-map.png" alt="Planar Map" width="200" /> |
44+
|:---:|:---:|:---:|
45+
| ![Planar](https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/07-planar-map.png) | ![3D Tiles](https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/03-3dtiles-rendering.png) | ![Drawing](https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/16-drawing-controls.png) |
46+
4047
| | | |
41-
| <img src="https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/08-atmosphere.png" alt="Atmosphere Effect" width="200" /> | <img src="https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/09-animation.png" alt="Animation System" width="200" /> | <img src="https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/11-lighting.png" alt="Lighting System" width="200" /> |
48+
|:---:|:---:|:---:|
49+
| ![New Feature 1](https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/Snip20250917_4.png) | ![New Feature 2](https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/Snip20251016_3.png) | ![New Feature 3](https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/Snip20251021_4.png) |
4250

4351
</div>
4452

@@ -72,14 +80,30 @@ npm install @flywave/flywave.gl
7280
### Basic Usage
7381

7482
```typescript
75-
import { MapView, GeoCoordinates, sphereProjection } from "@flywave/flywave.gl";
76-
83+
import {
84+
MapView,
85+
GeoCoordinates,
86+
MapControls,
87+
sphereProjection,
88+
ArcGISWebTileDataSource
89+
} from "@flywave/flywave.gl";
90+
91+
// Initialize map view
7792
const mapView = new MapView({
78-
projection: sphereProjection,
79-
target: new GeoCoordinates(36, 118),
80-
zoomLevel: 6,
81-
canvas: document.getElementById("mapCanvas") as HTMLCanvasElement
93+
projection: sphereProjection,
94+
target: new GeoCoordinates(39.9042, 116.4074), // Beijing coordinates
95+
zoomLevel: 10,
96+
canvas: document.getElementById("mapCanvas")
8297
});
98+
99+
// Create data source
100+
const webTileDataSource = new ArcGISWebTileDataSource();
101+
102+
// Add data source to map
103+
mapView.addDataSource(webTileDataSource);
104+
105+
// Add controls for user interaction
106+
const mapControls = new MapControls(mapView);
83107
```
84108

85109
## Core Features

@flywave/flywave.gl/README.zh.md

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,20 @@
3333
<div align="center">
3434

3535
| | | |
36-
| :----------------------------------------------------------: | :----------------------------------------------------------: | :----------------------------------------------------------: |
37-
| <img src="https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/01-globe-view.png" alt="球面视图" width="200" /> | <img src="https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/02-terrain-rendering.png" alt="地形渲染" width="200" /> | <img src="https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/03-3dtiles-rendering.png" alt="3D Tiles渲染" width="200" /> |
36+
|:---:|:---:|:---:|
37+
| ![3D 球面](https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/01-globe-view.png) | ![地形](https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/02-terrain-rendering.png) | ![大气](https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/08-atmosphere.png) |
38+
39+
| | | |
40+
|:---:|:---:|:---:|
41+
| ![控制](https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/06-interactive-controls.png) | ![后期处理](https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/04-post-processing.png) | ![动画](https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/09-animation.png) |
42+
3843
| | | |
39-
| <img src="https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/04-post-processing.png" alt="后期处理" width="200" /> | <img src="https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/06-interactive-controls.png" alt="交互控制" width="200" /> | <img src="https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/07-planar-map.png" alt="平面地图" width="200" /> |
44+
|:---:|:---:|:---:|
45+
| ![平面](https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/07-planar-map.png) | ![3D 瓦片](https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/03-3dtiles-rendering.png) | ![绘图](https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/16-drawing-controls.png) |
46+
4047
| | | |
41-
| <img src="https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/08-atmosphere.png" alt="大气效果" width="200" /> | <img src="https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/09-animation.png" alt="动画系统" width="200" /> | <img src="https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/11-lighting.png" alt="光照系统" width="200" /> |
48+
|:---:|:---:|:---:|
49+
| ![新功能 1](https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/Snip20250917_4.png) | ![新功能 2](https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/Snip20251016_3.png) | ![新功能 3](https://raw.githubusercontent.com/flywave/flywave.gl/master/docs/static/screenshots/Snip20251021_4.png) |
4250

4351
</div>
4452

@@ -72,14 +80,30 @@ npm install @flywave/flywave.gl
7280
### 代码中使用
7381

7482
```ts
75-
import { MapView, GeoCoordinates, sphereProjection } from "@flywave/flywave.gl";
76-
83+
import {
84+
MapView,
85+
GeoCoordinates,
86+
MapControls,
87+
sphereProjection,
88+
ArcGISWebTileDataSource
89+
} from "@flywave/flywave.gl";
90+
91+
// 初始化地图视图
7792
const mapView = new MapView({
78-
projection: sphereProjection,
79-
target: new GeoCoordinates(36, 118),
80-
zoomLevel: 6,
81-
canvas: document.getElementById("mapCanvas") as HTMLCanvasElement
93+
projection: sphereProjection,
94+
target: new GeoCoordinates(39.9042, 116.4074), // 北京坐标
95+
zoomLevel: 10,
96+
canvas: document.getElementById("mapCanvas")
8297
});
98+
99+
// 创建数据源
100+
const webTileDataSource = new ArcGISWebTileDataSource();
101+
102+
// 添加数据源到地图
103+
mapView.addDataSource(webTileDataSource);
104+
105+
// 添加控制以支持用户交互
106+
const mapControls = new MapControls(mapView);
83107
```
84108

85109
## 核心功能

@flywave/flywave.gl/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
],
2929
"scripts": {
3030
"tsc": "tsc --build",
31-
"build": "webpack --mode production",
32-
"prepare": "webpack --mode production",
31+
"build": "webpack --mode production && npm run build-typings",
32+
"prepare": "webpack --mode production && npm run build-typings",
3333
"build-typings": "tsc --build && api-extractor run --local && echo 'export as namespace flywave;' >> dist/flywave.d.ts && rm -rf temp",
3434
"debug": "webpack"
3535
},
@@ -71,6 +71,10 @@
7171
"@flywave/flywave-vectortile-datasource": "workspace:*",
7272
"@flywave/flywave-webpack-utils": "workspace:*",
7373
"@flywave/flywave-webtile-datasource": "workspace:*",
74+
"@flywave/flywave-geojson-datasource": "workspace:*",
75+
"@flywave/flywave-gltf": "workspace:*",
76+
"@flywave/flywave-transfer-manager": "workspace:*",
77+
"@flywave/flywave-geometry": "workspace:*",
7478
"copy-webpack-plugin": "catalog:",
7579
"cross-env": "catalog:",
7680
"expose-loader": "5.0.1",

0 commit comments

Comments
 (0)