s3m-maplibre 0.3.0 → 0.3.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.
Files changed (2) hide show
  1. package/docs/API.md +2 -1
  2. package/package.json +3 -3
package/docs/API.md CHANGED
@@ -288,7 +288,8 @@ V = P⁻¹ × MVP
288
288
 
289
289
  ## 宿主兼容与已知限制
290
290
 
291
- - **地形遮挡**未实现:MapLibre 的地形深度没有写进 custom layer 的深度缓冲,建筑不会被地形裁掉。
291
+ - **地形遮挡**已支持:MapLibre 的地形网格与本层(`renderingMode: '3d'`)共用主 framebuffer 的同一深度缓冲、同一 `depthRangeFor3D`、同一 `LEQUAL + ReadWrite` 深度模式,所以地形可以遮挡建筑。前提是宿主开启 `map.setTerrain({ source: 'dem' })` 并提供 DEM 源,且地形网格需要有 raster / hillshade 层供图(否则地形面空白)。另外 S3M 数据通常按海拔 0 建模,需要用 `setDatasetHeight()` 把模型抬到真实地面高程,否则深度虽可比但空间位置对不上。
292
+ - **物理地表(地下透视 / 基坑)**与 terrain 是两个正交维度:前者表达模型自身的地上 / 地下结构覆盖关系,后者表达真实地面的起伏遮挡,地铁站 / 基坑这类数据没有真实 DEM 时只能靠前者。
292
293
  - **正交投影**需要 MapLibre ≥ 5;v4 / v5 以下(含 Mapbox v2)只给合并矩阵,会告警一次并保持透视,见[投影](#投影)。
293
294
  - **多数据集叠加**应位于同一城市量级(几公里内),跨城市叠加会重新引入 float32 精度问题。
294
295
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "s3m-maplibre",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "SuperMap S3M 三维模型格式的 MapLibre / Mapbox 原生渲染图层:浏览器内直接解析 .s3mb 瓦片,无需转 3D Tiles,支持多数据集叠加、白膜/按高度/按单体/动态扫描着色、单体级 GPU 拾取与属性查询。基于 s3m-three 渲染内核。",
5
5
  "type": "module",
6
6
  "repository": {
@@ -36,7 +36,7 @@
36
36
  "scripts": {
37
37
  "build": "tsc -p tsconfig.build.json",
38
38
  "typecheck": "tsc --noEmit -p tsconfig.json",
39
- "prepublishOnly": "node -e \"const fs=require('node:fs');const p=JSON.parse(fs.readFileSync('package.json','utf8'));p.dependencies['s3m-three']='^0.1.0';fs.writeFileSync('package.json',JSON.stringify(p,null,2)+'\\n')\" && node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json && tsc --noEmit -p tsconfig.json",
39
+ "prepublishOnly": "node -e \"const fs=require('node:fs');const p=JSON.parse(fs.readFileSync('package.json','utf8'));p.dependencies['s3m-three']='^0.2.0';fs.writeFileSync('package.json',JSON.stringify(p,null,2)+'\\n')\" && node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json && tsc --noEmit -p tsconfig.json",
40
40
  "clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\""
41
41
  },
42
42
  "keywords": [
@@ -58,7 +58,7 @@
58
58
  "author": "",
59
59
  "license": "Apache-2.0",
60
60
  "dependencies": {
61
- "s3m-three": "^0.1.0"
61
+ "s3m-three": "^0.2.0"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "three": ">=0.168.0"