透视
基本信息
| 属性 | 值 |
|---|---|
| 仓库内清单 | src/main/resources/perspectives.txt(620 行) |
| 条目数 | 102 |
| 实现类 | 全部为 org.dynmap.hdmap.IsoHDPerspective(102/102) |
| 抽象基类 | org.dynmap.hdmap.HDPerspective(hdmap/HDPerspective.java) |
| 用户扩展文件 | src/main/resources/custom-perspectives.txt(3 行,仓库内仅注释) |
| 运行时路径 | <MC 根目录>/dynmap/perspectives.txt 与 custom-perspectives.txt |
功能
透视定义"从什么角度、以什么倾角看地图"。仓库内 102 项全部是等轴测(isometric)透视,即 IsoHDPerspective——grep perspectives.txt 中 class: 字段的去重结果只有这一个类。
命名规则
102 项的 id 呈严格的"方位角 × 仰角 × 分辨率"矩阵:
iso_<方位>_<仰角>_<分辨率>
| 维度 | 取值 |
|---|---|
| 方位 | S、SE、E、NE、N、NW、W、SW(8 个) |
| 仰角 | 60、30、90(3 个) |
| 分辨率 | vlowres、lowres、medres、hires、vhires(5 个) |
8 × 3 × 5 = 120,但实际只有 100 个 iso_ 前缀项,因为并非每个组合都存在——iso_*_30_* 与 iso_*_90_* 系列在方位上不完整。另有 2 个非矩阵项:
| id | 说明 |
|---|---|
default |
兜底透视(perspectives.txt:7 注释 “Default - used if bad or no perspective name supplied”;条目在 :8-12,参数 azimuth: 135、inclination: 60、scale: 4) |
classic |
经典(平面)投影 |
计数交叉验证:grep -cE '^\s*- class:' 与 grep -cE '^\s*name:' 均为 102;grep -cE '^\s*name: iso_' 为 100。三者一致。
数值
| 数值名 | 值 |
|---|---|
| 透视条目总数 | 102 |
iso_ 前缀项 |
100 |
| 非矩阵项 | 2(default、classic) |
| 方位数 | 8 |
| 仰角数 | 3 |
| 分辨率档数 | 5 |
| 实现类种类 | 1(IsoHDPerspective) |
含 azimuth: 键的条目 |
102 |
perspectives.txt:8-12 给出 default 的完整参数:class: org.dynmap.hdmap.IsoHDPerspective、name: default、azimuth: 135、inclination: 60、scale: 4。
用户扩展
custom-perspectives.txt 是留给玩家的覆盖文件,其注释(custom-perspectives.txt:1-2)说明:
“The user is free to add new and custom perspectives here, including replacements for standard ones” / “Dynmap’s install will not overwrite it”
即玩家可在此新增透视或替换标准透视,且 mod 安装/升级不会覆盖它。仓库内该文件除注释外无任何条目。
交互
| 触发 | 行为 |
|---|---|
| 地图渲染 | 模板或 /dmap mapadd 的 perspective: 指定 id |
perspective: 缺失或非法 |
回退到 default |
/dmap perspectivelist |
列出可用透视(该子命令未登记进帮助表,见 /dmap) |
玩家编辑 custom-perspectives.txt |
覆盖或新增透视 |
相关条目
- 地图模板 -
perspective:的引用方 - 着色器与光照 - 同一
components体系的另两项 - HDMap 渲染管线 -
HDPerspective接口 - /dmap - 动态增删透视的指令