@baidumap/mapv-three 1.0.0 → 1.0.1
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/README.md +11 -8
- package/dist/assets/map/style/default.json +1 -1
- package/dist/assets/map/style/yanmou.json +1 -1
- package/dist/assets/textures/imposter/tree1/base.webp +0 -0
- package/dist/assets/textures/imposter/tree1/norm_depth.webp +0 -0
- package/dist/assets/textures/imposter/tree1/orm.webp +0 -0
- package/dist/assets/textures/imposter/tree2/base.webp +0 -0
- package/dist/assets/textures/imposter/tree2/norm_depth.webp +0 -0
- package/dist/assets/textures/imposter/tree2/orm.webp +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Road_Bitumen_albedo.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Road_Bitumen_ao.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Road_Bitumen_height.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Road_Bitumen_normal.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Road_Bitumen_roughness.jpg +0 -0
- package/dist/assets/textures/water/foam_noise.webp +0 -0
- package/dist/devtool/panel.js +48 -12
- package/dist/mapvthree.module.js +29126 -22967
- package/dist/mapvthree.umd.js +15 -5
- package/dist/types/Internal.d.ts +2 -0
- package/dist/types/addons/traffic/handler/ModelCreator.d.ts +0 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/types/index.open.d.ts +1 -1
- package/dist/types/threejs/controls/DraggingMovementAggregator.d.ts +23 -0
- package/dist/types/threejs/controls/MapControl3D.d.ts +27 -1
- package/dist/types/threejs/geometries/line/FatLineGeometry.d.ts +9 -0
- package/dist/types/threejs/geometries/sphere/BasePillarGeometry.d.ts +1 -2
- package/dist/types/threejs/loaders/gltf/metadata/PropertyTable.d.ts +1 -1
- package/dist/types/threejs/materials/natural/WaterMaterial.d.ts +61 -0
- package/dist/types/threejs/materials/point/OctahedralImpostor.d.ts +9 -0
- package/dist/types/threejs/objects/GeoInstancedMesh.d.ts +3 -1
- package/dist/types/threejs/objects/element/OctahedralImpostor.d.ts +97 -0
- package/dist/types/threejs/objects/element/TileTrafficLight.d.ts +2 -0
- package/dist/types/threejs/objects/line/FatLine.d.ts +3 -0
- package/dist/types/threejs/objects/point/BubblePoint.d.ts +4 -5
- package/dist/types/threejs/objects/point/{DomPoint.d.ts → DOMPoint.d.ts} +3 -3
- package/dist/types/threejs/objects/point/FanPoint.d.ts +4 -2
- package/dist/types/threejs/objects/point/TwinLabel.d.ts +8 -3
- package/dist/types/threejs/objects/sphere/Cone.d.ts +2 -1
- package/dist/types/threejs/objects/sphere/Pillar.d.ts +1 -0
- package/dist/types/threemap/3dtiles/materials/HDMap3DTilesMaterialManagerV2.d.ts +8 -0
- package/dist/types/threemap/controls/editors/CircleEditor.d.ts +0 -9
- package/dist/types/threemap/controls/editors/Editor.d.ts +26 -6
- package/dist/types/threemap/controls/editors/EditorManager.d.ts +158 -0
- package/dist/types/threemap/controls/editors/PointEditor.d.ts +0 -13
- package/dist/types/threemap/controls/editors/PolygonEditor.d.ts +3 -10
- package/dist/types/threemap/controls/editors/RectEditor.d.ts +0 -9
- package/dist/types/threemap/controls/editors/SplineEditor.d.ts +0 -10
- package/dist/types/threemap/controls/measure/AreaMeasure.d.ts +1 -1
- package/dist/types/threemap/controls/measure/LengthMeasure.d.ts +1 -1
- package/dist/types/threemap/controls/measure/PointMeasure.d.ts +3 -3
- package/dist/types/threemap/controls/measure/SlopeMeasure.d.ts +3 -3
- package/dist/types/threemap/dataSource/DataSource.d.ts +0 -8
- package/dist/types/threemap/engine/Rendering.d.ts +2 -0
- package/dist/types/threemap/engine/rendering/features/Shadow.d.ts +10 -8
- package/dist/types/threemap/engine/rendering/features/shadow/CSMShadow.d.ts +2 -1
- package/dist/types/threemap/engine/rendering/features/shadow/DefaultShadow.d.ts +7 -1
- package/dist/types/threemap/engine/rendering/features/shadow/ShadowFrustum.d.ts +2 -2
- package/dist/types/threemap/engine/rendering/postprocessing/OpaqueCopyPass.d.ts +17 -0
- package/dist/types/threemap/engine/rendering/postprocessing/OpaquePostprocessings.d.ts +7 -0
- package/dist/types/threemap/mapView/baidu/MapStyleHelper.d.ts +11 -0
- package/dist/types/threemap/mapView/baidu/SignCompile.d.ts +1 -0
- package/dist/types/threemap/mapView/map/MapView.d.ts +5 -0
- package/dist/types/threemap/mapView/surface/MapSurface.d.ts +2 -0
- package/dist/types/threemap/mapView/tileProvider/AsyncDataTileLoader.d.ts +2 -0
- package/dist/types/threemap/mapView/tileProvider/TileProvider.d.ts +5 -0
- package/dist/types/threemap/mapView/tileProvider/vector/BaiduVectorTileProvider.d.ts +18 -2
- package/dist/types/threemap/mapView/tileProvider/vector/HDTrafficTileProvider.d.ts +7 -2
- package/dist/types/util/WorkerTaskScheduler.d.ts +1 -0
- package/dist/types/util/object.d.ts +4 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,27 +1,30 @@
|
|
|
1
|
-
#
|
|
1
|
+
# JSAPI Three
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
JSAPI Three 是由百度地图开放平台推出的基于 WebGL 的下一代二三维一体化地图引擎,帮助开发者快速搭建自己的二三维地图场景。JSAPI Three 采用`mapvthree`作为命名空间,基于 Three.js 158 版本开发,采用 Three.js 作为底层渲染引擎。
|
|
4
|
+
|
|
5
|
+
官网:https://lbsyun.baidu.com/faq/api?title=jsapithree
|
|
4
6
|
|
|
5
7
|
## 文档示例
|
|
6
8
|
|
|
7
9
|
示例中心:https://lbsyun.baidu.com/jsapithree/tutorial
|
|
8
|
-
|
|
10
|
+
|
|
11
|
+
类参考:https://lbsyun.baidu.com/jsapithree/docs/modules/mapvthree.html
|
|
9
12
|
|
|
10
13
|
## 开始使用
|
|
11
14
|
|
|
12
15
|
### 1. 安装依赖
|
|
13
|
-
|
|
16
|
+
mapvthree 基于 Three.js 158 版本开发,采用 Three.js 作为底层渲染引擎。请执行以下命令安装必要的依赖:
|
|
14
17
|
```shell static
|
|
15
18
|
npm i -S @baidumap/mapv-three three@0.158.0
|
|
16
19
|
```
|
|
17
20
|
|
|
18
21
|
### 2. 静态资源配置
|
|
19
|
-
|
|
22
|
+
mapvthree 在初始化时需要加载必要的静态资源。如果在未完成配置的情况下运行 `npm run dev`,您可能会遇到以下错误提示:
|
|
20
23
|
```jsx noeditor
|
|
21
24
|
<p style={{color: '#f00'}}>"Unable to determine base URL automatically, try defining a global variable called MAPV_BASE_URL."</p>
|
|
22
25
|
```
|
|
23
26
|
|
|
24
|
-
此错误表明引擎无法正确访问所需的静态资源。您需要配置构建工具,将
|
|
27
|
+
此错误表明引擎无法正确访问所需的静态资源。您需要配置构建工具,将 mapvthree 的静态资源复制到项目的打包目录中。
|
|
25
28
|
|
|
26
29
|
#### Webpack 配置
|
|
27
30
|
如果您使用 Webpack 作为构建工具,请参考以下配置:
|
|
@@ -76,7 +79,7 @@ const viteConfig = {
|
|
|
76
79
|
|
|
77
80
|
### 3. 配置百度地图AK
|
|
78
81
|
|
|
79
|
-
|
|
82
|
+
mapvthree 默认展示百度地图矢量数据,使用前需要配置百度地图开发者密钥(AK)。请按照以下步骤操作:
|
|
80
83
|
|
|
81
84
|
1. 访问[百度地图开放平台](https://lbsyun.baidu.com/apiconsole/key),登录您的百度账号
|
|
82
85
|
2. 在控制台页面点击"创建应用"
|
|
@@ -94,4 +97,4 @@ mapvthree.BaiduMapConfig.ak = '您的AK密钥';
|
|
|
94
97
|
```
|
|
95
98
|
|
|
96
99
|
### 4. 安装完成
|
|
97
|
-
完成上述配置后,您即可开始使用
|
|
100
|
+
完成上述配置后,您即可开始使用 mapvthree 进行开发。
|